- What is Agent Knowledge Base?
- Core Concepts
- Knowledge Item
- Agent Knowledge Item
- RAG Configuration
- Knowledge Item Lifecycle
- Status Definitions
- Key Features
- Flexible Content Sources
- Automatic Processing
- Re-Ingestion
- RAG Search Modes
- API Resources
- Team-Scoped Knowledge Items
- Agent-Scoped Knowledge Items
- Constraints & Limits
- Common Workflows
- Workflow 1: Add Knowledge to an Agent
- Workflow 2: Update Knowledge Content
- Workflow 3: Remove Knowledge from Agent
- Getting Started
- Base URL
- Authentication
Agent Knowledge Base
The Agent Knowledge Base API enables RAG (Retrieval Augmented Generation) support for conversational AI agents. Teams can upload documents, URLs, or plain text as “knowledge items” which are processed (extracted, chunked, embedded, and indexed) and then attached to agents for context-aware responses.
What is Agent Knowledge Base?
Agent Knowledge Base allows agents to:
- Access Information: Retrieve relevant context from uploaded documents, URLs, or text
- Answer Questions: Provide accurate responses based on indexed knowledge
- Stay Up-to-Date: Re-ingest content when sources change
- Scale Responses: Handle domain-specific queries with confidence
Core Concepts
Knowledge Item
A unit of knowledge (document, URL, or text) that belongs to a team. Knowledge items can be:
- Documents: PDF files up to 25MB
- URLs: Web pages with HTTP/HTTPS protocols
- Text: Plain text up to 10,000 characters
Agent Knowledge Item
A join relationship that attaches a knowledge item to an agent. Knowledge items can be shared across multiple agents.
RAG Configuration
Per-agent settings for how knowledge retrieval works:
- search_mode: Choose between
"speed"(faster, less thorough) or"accuracy"(more thorough) - max_chunks_per_query: Number of relevant chunks to retrieve per query (must be > 0, default: 8)
Knowledge Item Lifecycle
Status Definitions
Key Features
Flexible Content Sources
Upload knowledge from multiple sources:
- PDF documents with automatic text extraction
- Web pages for dynamic content
- Direct text input for quick knowledge additions
Automatic Processing
The platform handles all processing automatically:
- Extraction: Extract text from PDFs or fetch from URLs
- Chunking: Split content into optimal-sized chunks
- Embedding: Generate vector embeddings for semantic search
- Indexing: Store in search index for fast retrieval
Re-Ingestion
Update knowledge when source content changes:
- Re-run the entire ingestion pipeline
- Rate limited to 1 request per minute per item
- Cannot re-ingest items currently processing
RAG Search Modes
Choose the right balance for your use case:
- Speed Mode: Faster retrieval with less thoroughness
- Accuracy Mode: More thorough retrieval for critical applications
API Resources
The Knowledge Base API is organized into two scopes:
Team-Scoped Knowledge Items
Manage knowledge items at the team level:
- List Knowledge Items
- Get Knowledge Item
- Create Knowledge Item
- Delete Knowledge Item
- Re-ingest Knowledge Item
Agent-Scoped Knowledge Items
Attach and detach knowledge items to specific agents:
Constraints & Limits
Common Workflows
Workflow 1: Add Knowledge to an Agent
- Create knowledge item:
POST /api/v2/knowledge_items - Poll for status:
GET /api/v2/knowledge_items/:uuiduntilstatus: "ready" - Attach to agent:
POST /api/v2/agents/:agent_uuid/knowledge_items
Workflow 2: Update Knowledge Content
- Update source (e.g., update the webpage content)
- Trigger reingest:
POST /api/v2/knowledge_items/:uuid/reingest - Poll for status:
GET /api/v2/knowledge_items/:uuiduntilstatus: "ready"
Workflow 3: Remove Knowledge from Agent
- Detach from agent:
DELETE /api/v2/agents/:agent_uuid/knowledge_items/:knowledge_item_uuid - (Optional) Delete knowledge item:
DELETE /api/v2/knowledge_items/:uuid
Getting Started
To use the Knowledge Base API, you’ll need:
- An API token for authentication
- At least one agent (get via Agents API)
- Knowledge content (document, URL, or text)
Base URL
Authentication
All requests require Bearer token authentication using your API key:
Get your API key from https://app.resemble.ai/account/api
