API by router
Knowledge internal
Ingest Knowledge Internal
Ingest text from agent runtime (e.g., after reading a Google Drive doc).
Path Parameters
instance_idInstance Id
Format
uuidchunk_overlap?Chunk Overlap
Default
200Range
0 <= value <= 1000chunk_size?Chunk Size
Default
1500Range
200 <= value <= 5000contentContent
Text content to ingest
Length
1 <= lengthcustomer_id?Customer Id
instance_id?Instance Id
source_idSource Id
Source identifier (file path, URL, etc.)
Length
length <= 500source_nameSource Name
Human-readable source name
Length
length <= 500source_type?Source Type
Source type: r2, drive, web, sheet, email
Default
"r2"Response Body
curl -X POST "https://loading/internal/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/knowledge/ingest" \ -H "Content-Type: application/json" \ -d '{ "content": "string", "source_id": "string", "source_name": "string" }'{
"chunks_created": 0,
"source_id": "string",
"tokens_embedded": 0
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}Query Knowledge Internal
Semantic search over knowledge base ā called by agent runtime.
The agent uses this as a function tool: "What's the torque spec for X?" ā embed query ā pgvector cosine similarity ā return top-k chunks.
Path Parameters
instance_idInstance Id
Format
uuidcustomer_id?Customer Id
queryQuery
Length
1 <= length <= 2000top_k?Top K
Default
5Range
1 <= value <= 20Response Body
curl -X POST "https://loading/internal/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/knowledge/query" \ -H "Content-Type: application/json" \ -d '{ "query": "string" }'{
"query": "string",
"results": [
{
"chunk_id": "string",
"chunk_index": 0,
"chunk_text": "string",
"similarity": 0,
"source_id": "string",
"source_name": "string",
"source_type": "string",
"token_count": 0
}
],
"total": 0
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}