Agno Knowledge API
The Knowledge API from Agno — 8 operation(s) for knowledge.
The Knowledge API from Agno — 8 operation(s) for knowledge.
openapi: 3.1.0
info:
title: Agno API Reference A2A Knowledge API
description: The all-in-one, private, secure agent platform that runs in your cloud.
version: 2.5.6
tags:
- name: Knowledge
paths:
/knowledge/content:
post:
tags:
- Knowledge
summary: Upload Content
description: Upload content to the knowledge base. Supports file uploads, text content, or URLs. Content is processed asynchronously in the background. Supports custom readers and chunking strategies.
operationId: upload_content
security:
- HTTPBearer: []
parameters:
- name: db_id
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Database ID to use for content storage
title: Db Id
description: Database ID to use for content storage
- name: knowledge_id
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Knowledge base ID to upload to
title: Knowledge Id
description: Knowledge base ID to upload to
requestBody:
content:
multipart/form-data:
schema:
$ref: '#/components/schemas/Body_upload_content'
responses:
'202':
description: Content upload accepted for processing
content:
application/json:
schema:
$ref: '#/components/schemas/ContentResponseSchema'
example:
id: content-123
name: example-document.pdf
description: Sample document for processing
metadata:
category: documentation
priority: high
status: processing
'400':
description: Invalid request - malformed metadata or missing content
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequestResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/UnauthenticatedResponse'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/NotFoundResponse'
'422':
description: Validation error in form data
content:
application/json:
schema:
$ref: '#/components/schemas/ValidationErrorResponse'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/InternalServerErrorResponse'
get:
tags:
- Knowledge
summary: List Content
description: Retrieve paginated list of all content in the knowledge base with filtering and sorting options. Filter by status, content type, or metadata properties.
operationId: get_content
security:
- HTTPBearer: []
parameters:
- name: limit
in: query
required: false
schema:
anyOf:
- type: integer
minimum: 1
- type: 'null'
description: Number of content entries to return
default: 20
title: Limit
description: Number of content entries to return
- name: page
in: query
required: false
schema:
anyOf:
- type: integer
minimum: 0
- type: 'null'
description: Page number
default: 1
title: Page
description: Page number
- name: sort_by
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Field to sort by
default: created_at
title: Sort By
description: Field to sort by
- name: sort_order
in: query
required: false
schema:
anyOf:
- $ref: '#/components/schemas/SortOrder'
- type: 'null'
description: Sort order (asc or desc)
default: desc
title: Sort Order
description: Sort order (asc or desc)
- name: db_id
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Database ID to use
title: Db Id
description: Database ID to use
- name: knowledge_id
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Knowledge base ID to use
title: Knowledge Id
description: Knowledge base ID to use
responses:
'200':
description: Content list retrieved successfully
content:
application/json:
schema:
$ref: '#/components/schemas/PaginatedResponse_ContentResponseSchema_'
example:
data:
- id: 3c2fc685-d451-4d47-b0c0-b9a544c672b7
name: example.pdf
description: ''
type: application/pdf
size: '251261'
metadata: {}
access_count: 1
status: completed
status_message: ''
created_at: '2025-09-08T15:22:53Z'
updated_at: '2025-09-08T15:22:54Z'
meta:
page: 1
limit: 20
total_pages: 1
total_count: 2
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequestResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/UnauthenticatedResponse'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/NotFoundResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/ValidationErrorResponse'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/InternalServerErrorResponse'
delete:
tags:
- Knowledge
summary: Delete All Content
description: Permanently remove all content from the knowledge base. This is a destructive operation that cannot be undone. Use with extreme caution.
operationId: delete_all_content
security:
- HTTPBearer: []
parameters:
- name: db_id
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Database ID to use
title: Db Id
description: Database ID to use
- name: knowledge_id
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Knowledge base ID to use
title: Knowledge Id
description: Knowledge base ID to use
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequestResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/UnauthenticatedResponse'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/NotFoundResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/ValidationErrorResponse'
'500':
description: Failed to delete all content
content:
application/json:
schema:
$ref: '#/components/schemas/InternalServerErrorResponse'
/knowledge/remote-content:
post:
tags:
- Knowledge
summary: Upload Remote Content
description: Upload content from a remote source (S3, GCS, SharePoint, GitHub) to the knowledge base. Content is processed asynchronously in the background.
operationId: upload_remote_content
security:
- HTTPBearer: []
parameters:
- name: db_id
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Database ID to use for content storage
title: Db Id
description: Database ID to use for content storage
- name: knowledge_id
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Knowledge base ID to upload to
title: Knowledge Id
description: Knowledge base ID to upload to
requestBody:
required: true
content:
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/Body_upload_remote_content'
responses:
'202':
description: Remote content upload accepted for processing
content:
application/json:
schema:
$ref: '#/components/schemas/ContentResponseSchema'
example:
id: content-456
name: reports/q1-2024.pdf
description: Q1 Report from S3
metadata:
source: s3-docs
status: processing
'400':
description: Invalid request - unknown config or missing path
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequestResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/UnauthenticatedResponse'
'404':
description: Not Found
content:
application/json:
schema:
$ref: '#/components/schemas/NotFoundResponse'
'422':
description: Validation error in request body
content:
application/json:
schema:
$ref: '#/components/schemas/ValidationErrorResponse'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/InternalServerErrorResponse'
/knowledge/content/{content_id}:
patch:
tags:
- Knowledge
summary: Update Content
description: Update content properties such as name, description, metadata, or processing configuration. Allows modification of existing content without re-uploading.
operationId: update_content
security:
- HTTPBearer: []
parameters:
- name: content_id
in: path
required: true
schema:
type: string
description: Content ID
title: Content Id
description: Content ID
- name: db_id
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Database ID to use
title: Db Id
description: Database ID to use
- name: knowledge_id
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Knowledge base ID to use
title: Knowledge Id
description: Knowledge base ID to use
requestBody:
content:
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/Body_update_content'
responses:
'200':
description: Content updated successfully
content:
application/json:
schema:
$ref: '#/components/schemas/ContentResponseSchema'
example:
id: 3c2fc685-d451-4d47-b0c0-b9a544c672b7
name: example.pdf
description: ''
type: application/pdf
size: '251261'
metadata: {}
access_count: 1
status: completed
status_message: ''
created_at: '2025-09-08T15:22:53Z'
updated_at: '2025-09-08T15:22:54Z'
'400':
description: Invalid request - malformed metadata or invalid reader_id
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequestResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/UnauthenticatedResponse'
'404':
description: Content not found
content:
application/json:
schema:
$ref: '#/components/schemas/NotFoundResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/ValidationErrorResponse'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/InternalServerErrorResponse'
get:
tags:
- Knowledge
summary: Get Content by ID
description: Retrieve detailed information about a specific content item including processing status and metadata.
operationId: get_content_by_id
security:
- HTTPBearer: []
parameters:
- name: content_id
in: path
required: true
schema:
type: string
title: Content Id
- name: db_id
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Database ID to use
title: Db Id
description: Database ID to use
- name: knowledge_id
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Knowledge base ID to use
title: Knowledge Id
description: Knowledge base ID to use
responses:
'200':
description: Content details retrieved successfully
content:
application/json:
schema:
$ref: '#/components/schemas/ContentResponseSchema'
example:
id: 3c2fc685-d451-4d47-b0c0-b9a544c672b7
name: example.pdf
description: ''
type: application/pdf
size: '251261'
metadata: {}
access_count: 1
status: completed
status_message: ''
created_at: '2025-09-08T15:22:53Z'
updated_at: '2025-09-08T15:22:54Z'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequestResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/UnauthenticatedResponse'
'404':
description: Content not found
content:
application/json:
schema:
$ref: '#/components/schemas/NotFoundResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/ValidationErrorResponse'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/InternalServerErrorResponse'
delete:
tags:
- Knowledge
summary: Delete Content by ID
description: Permanently remove a specific content item from the knowledge base. This action cannot be undone.
operationId: delete_content_by_id
security:
- HTTPBearer: []
parameters:
- name: content_id
in: path
required: true
schema:
type: string
title: Content Id
- name: db_id
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Database ID to use
title: Db Id
description: Database ID to use
- name: knowledge_id
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Knowledge base ID to use
title: Knowledge Id
description: Knowledge base ID to use
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ContentResponseSchema'
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequestResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/UnauthenticatedResponse'
'404':
description: Content not found
content:
application/json:
schema:
$ref: '#/components/schemas/NotFoundResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/ValidationErrorResponse'
'500':
description: Failed to delete content
content:
application/json:
schema:
$ref: '#/components/schemas/InternalServerErrorResponse'
/knowledge/content/{content_id}/status:
get:
tags:
- Knowledge
summary: Get Content Status
description: Retrieve the current processing status of a content item. Useful for monitoring asynchronous content processing progress and identifying any processing errors.
operationId: get_content_status
security:
- HTTPBearer: []
parameters:
- name: content_id
in: path
required: true
schema:
type: string
title: Content Id
- name: db_id
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Database ID to use
title: Db Id
description: Database ID to use
- name: knowledge_id
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Knowledge base ID to use
title: Knowledge Id
description: Knowledge base ID to use
responses:
'200':
description: Content status retrieved successfully
content:
application/json:
schema:
$ref: '#/components/schemas/ContentStatusResponse'
examples:
completed:
summary: Example completed content status
value:
status: completed
status_message: ''
'400':
description: Bad Request
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequestResponse'
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/UnauthenticatedResponse'
'404':
description: Content not found
content:
application/json:
schema:
$ref: '#/components/schemas/NotFoundResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/ValidationErrorResponse'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/InternalServerErrorResponse'
/knowledge/search:
post:
tags:
- Knowledge
summary: Search Knowledge
description: Search the knowledge base for relevant documents using query, filters and search type.
operationId: search_knowledge
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/VectorSearchRequestSchema'
required: true
responses:
'200':
description: Search results retrieved successfully
content:
application/json:
schema:
$ref: '#/components/schemas/PaginatedResponse_VectorSearchResult_'
example:
data:
- id: doc_123
content: Jordan Mitchell - Software Engineer with skills in JavaScript, React, Python
name: cv_1
meta_data:
page: 1
chunk: 1
usage:
total_tokens: 14
reranking_score: 0.95
content_id: content_456
meta:
page: 1
limit: 20
total_pages: 2
total_count: 35
'400':
description: Invalid search parameters
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/UnauthenticatedResponse'
'404':
description: No documents found
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/ValidationErrorResponse'
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/InternalServerErrorResponse'
security:
- HTTPBearer: []
/knowledge/config:
get:
tags:
- Knowledge
summary: Get Config
description: Retrieve available readers, chunkers, and configuration options for content processing. This endpoint provides metadata about supported file types, processing strategies, and filters.
operationId: get_knowledge_config
security:
- HTTPBearer: []
parameters:
- name: db_id
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Database ID to use
title: Db Id
description: Database ID to use
- name: knowledge_id
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Knowledge base ID to use
title: Knowledge Id
description: Knowledge base ID to use
responses:
'200':
description: Knowledge configuration retrieved successfully
content:
application/json:
schema:
$ref: '#/components/schemas/ConfigResponseSchema'
example:
readers:
website:
id: website
name: WebsiteReader
description: Reads website files
chunkers:
- AgenticChunker
- DocumentChunker
- RecursiveChunker
- SemanticChunker
- FixedSizeChunker
firecrawl:
id: firecrawl
name: FirecrawlReader
description: Reads firecrawl files
chunkers:
- SemanticChunker
- FixedSizeChunker
- AgenticChunker
- DocumentChunker
- RecursiveChunker
youtube:
id: youtube
name: YoutubeReader
description: Reads youtube files
chunkers:
- RecursiveChunker
- AgenticChunker
- DocumentChunker
- SemanticChunker
- FixedSizeChunker
web_search:
id: web_search
name: WebSearchReader
description: Reads web_search files
chunkers:
- AgenticChunker
- DocumentChunker
- RecursiveChunker
- SemanticChunker
- FixedSizeChunker
arxiv:
id: arxiv
name: ArxivReader
description: Reads arxiv files
chunkers:
- FixedSizeChunker
- AgenticChunker
- DocumentChunker
- RecursiveChunker
- SemanticChunker
csv:
id: csv
name: CsvReader
description: Reads csv files
chunkers:
- RowChunker
- FixedSizeChunker
- AgenticChunker
- DocumentChunker
- RecursiveChunker
docx:
id: docx
name: DocxReader
description: Reads docx files
chunkers:
- DocumentChunker
- FixedSizeChunker
- SemanticChunker
- AgenticChunker
- RecursiveChunker
gcs:
id: gcs
name: GcsReader
description: Reads gcs files
chunkers:
- FixedSizeChunker
- AgenticChunker
- DocumentChunker
- RecursiveChunker
- SemanticChunker
json:
id: json
name: JsonReader
description: Reads json files
chunkers:
- FixedSizeChunker
- AgenticChunker
- DocumentChunker
- RecursiveChunker
- SemanticChunker
markdown:
id: markdown
name: MarkdownReader
description: Reads markdown files
chunkers:
- MarkdownChunker
- DocumentChunker
- AgenticChunker
- RecursiveChunker
- SemanticChunker
- FixedSizeChunker
pdf:
id: pdf
name: PdfReader
description: Reads pdf files
chunkers:
- DocumentChunker
- FixedSizeChunker
- AgenticChunker
- SemanticChunker
- RecursiveChunker
text:
id: text
name: TextReader
description: Reads text files
chunkers:
- CodeChunker
- FixedSizeChunker
- AgenticChunker
- DocumentChunker
- RecursiveChunker
- SemanticChunker
readersForType:
url:
- url
- website
- firecrawl
- youtube
- web_search
- gcs
youtube:
- youtube
text:
- web_search
topic:
- arxiv
file:
- csv
- gcs
.csv:
- csv
- field_labeled_csv
.xlsx:
- excel
.xls:
- excel
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet:
- excel
application/vnd.ms-excel:
- excel
.docx:
- docx
.doc:
- docx
.json:
- json
.md:
- markdown
.pdf:
- pdf
.txt:
- text
chunkers:
AgenticChunker:
key: AgenticChunker
name: AgenticChunker
description: Chunking strategy that uses an LLM to determine natural breakpoints in the text
metadata:
chunk_size: 5000
CodeChunker:
key: CodeChunker
name: CodeChunker
description: The CodeChunker splits code into chunks based on its structure, leveraging Abstract Syntax Trees (ASTs) to create contextually relevant segments
metadata:
chunk_size: 2048
DocumentChunker:
key: DocumentChunker
name: DocumentChunker
description: A chunking strategy that splits text based on document structure like paragraphs and sections
metadata:
chunk_size: 5000
chunk_overlap: 0
FixedSizeChunker:
key: FixedSizeChunker
name: FixedSizeChunker
description: Chunking strategy that splits text into fixed-size chunks with optional overlap
metadata:
chunk_size: 5000
chunk_overlap: 0
MarkdownChunker:
key: MarkdownChunker
name: MarkdownChunker
description: A chunking strategy that splits markdown based on structure like headers, paragraphs and sections
metadata:
chunk_size: 5000
chunk_overlap: 0
RecursiveChunker:
key: RecursiveChunker
name: RecursiveChunker
description: Chunking strategy that recursively splits text into chunks by finding natural break points
metadata:
chunk_size: 5000
chunk_overlap: 0
RowChunker:
key: RowChunker
name: RowChunker
description: RowChunking chunking strategy
metadata: {}
SemanticChunker:
key: SemanticChunker
name: SemanticChunker
description: Chunking strategy that splits text into semantic chunks using chonkie
metad
# --- truncated at 32 KB (62 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/agno/refs/heads/main/openapi/agno-knowledge-api-openapi.yml