agentleFS
bolna-aibolna-ai/skills/create-knowledgebase/SKILL.md

create-knowledgebase

Skill4 starsChanged 34 days agoMITView on GitHub

Create, list, inspect, and delete Bolna knowledge bases from PDF files or URLs, including multilingual retrieval settings, chunking, overlap, similarity top k, processing status, rag_id and vector_id usage. Use when a voice agent needs RAG over FAQs, policies, product docs, or web pages.

  • Reads credentials

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Do not attach a knowledgebase to an agent until it is processed.

    line 70
  2. Very specific:

    When creating or updating an agent, configure the LLM as a knowledgebase agent and include the processed vector IDs in the vector store …

    line 74

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Create Bolna Knowledgebase

Endpoints

  • Create: POST https://api.bolna.ai/knowledgebase
  • Get: GET https://api.bolna.ai/knowledgebase/{rag_id}
  • List: GET https://api.bolna.ai/knowledgebase/all
  • Delete: DELETE https://api.bolna.ai/knowledgebase/{rag_id}

Use Authorization: Bearer $BOLNA_API_KEY.

Create from PDF

curl --request POST \
  --url https://api.bolna.ai/knowledgebase \
  --header "Authorization: Bearer $BOLNA_API_KEY" \
  --form 'file=@"/path/to/file.pdf"' \
  --form 'chunk_size=512' \
  --form 'similarity_top_k=15' \
  --form 'overlapping=128' \
  --form 'language_support=multilingual'

PDF max size is documented as 20 MB. Use language_support=multilingual for non-English documents or cross-lingual retrieval.

Create from URL

curl --request POST \
  --url https://api.bolna.ai/knowledgebase \
  --header "Authorization: Bearer $BOLNA_API_KEY" \
  --form 'url=https://example.com/docs' \
  --form 'chunk_size=512' \
  --form 'similarity_top_k=15' \
  --form 'overlapping=128'

Response fields

  • rag_id: knowledgebase ID used for get/delete operations.
  • file_name: PDF name or URL source name.
  • status: processing, processed, or error.
  • source_type: pdf or url.
  • language_support: multilingual or null.

List responses include vector_id, which is what an agent uses for RAG wiring.

Poll until processed

curl --request GET \
  --url "https://api.bolna.ai/knowledgebase/$RAG_ID" \
  --header "Authorization: Bearer $BOLNA_API_KEY"

Do not attach a knowledgebase to an agent until it is processed.

Wire into an agent

When creating or updating an agent, configure the LLM as a knowledgebase agent and include the processed vector IDs in the vector store provider config. Use create-agent for the full agent shape.

Delete

curl --request DELETE \
  --url "https://api.bolna.ai/knowledgebase/$RAG_ID" \
  --header "Authorization: Bearer $BOLNA_API_KEY"

Confirm deletion first; agents using the vector may stop answering from that source.

Wire into a Bolna agent

In the agent config, use agent_type: "knowledgebase_agent" and attach the vector_id (one or more):

{
  "llm_agent": {
    "agent_type": "knowledgebase_agent",
    "agent_flow_type": "streaming",
    "llm_config": { "provider": "openai", "model": "gpt-4o", "max_tokens": 200, "temperature": 0.3 },
    "vector_store": {
      "provider": "lancedb",
      "provider_config": {
        "vector_ids": ["<vector_id_1>", "<vector_id_2>"],
        "similarity_top_k": 8
      }
    }
  }
}

For graph agents, attach per-node via rag_config on individual nodes — see bolna-graph-agents/references/edges-and-routing.md and the example in bolna-graph-agents/assets/full-example.json.

Script

python3 create-knowledgebase/scripts/create_knowledgebase.py \
  --file /path/to/manual.pdf \
  --multilingual

Tuning

KnobDefaultEffect
chunk_size512Larger chunks = more context per retrieval, less precise matching.
overlapping128Overlap between chunks. Higher prevents missing answers that straddle boundaries.
similarity_top_k15How many chunks to retrieve. Lower for tight answers, higher for broader synthesis.
language_supportnullSet to multilingual for non-English docs or cross-lingual retrieval.

See also

  • create-agent — knowledgebase_agent example with vector wiring.
  • bolna-graph-agents — per-node RAG via rag_config.
  • https://raw.githubusercontent.com/bolna-ai/skills/main/references/prompting-tips.md — anti-hallucination guidance when answering from retrieved chunks.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.