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
In this repository20 other files it gives its agents.
- add-providerSkill
- bolna-extraction-designerSkill
- bolna-graph-agentsSkill
- create-agentSkill
- create-batchSkill
- create-dispositionSkill
- debug-bolna-callsSkill
- get-executionsSkill
- make-callSkill
- manage-agentsSkill
- manage-phone-numbersSkill
- manage-subaccountsSkill
- manage-violationsSkill
- migrate-call-to-workflowSkill
- prompt-writingSkill
- setup-api-keySkill
- setup-inboundSkill
- setup-sip-trunkSkill
- setup-toolsSkill
- setup-webhookSkill
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
- Very specific: line 70
Do not attach a knowledgebase to an agent until it is processed.
- Very specific: line 74
When creating or updating an agent, configure the LLM as a knowledgebase agent and include the processed vector IDs in the vector store …
≈ “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.
Files
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, orerror.source_type:pdforurl.language_support:multilingualor 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 \
--multilingualTuning
| Knob | Default | Effect |
chunk_size | 512 | Larger chunks = more context per retrieval, less precise matching. |
overlapping | 128 | Overlap between chunks. Higher prevents missing answers that straddle boundaries. |
similarity_top_k | 15 | How many chunks to retrieve. Lower for tight answers, higher for broader synthesis. |
language_support | null | Set to multilingual for non-English docs or cross-lingual retrieval. |
See also
create-agent—knowledgebase_agentexample with vector wiring.bolna-graph-agents— per-node RAG viarag_config.https://raw.githubusercontent.com/bolna-ai/skills/main/references/prompting-tips.md— anti-hallucination guidance when answering from retrieved chunks.
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
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.

