HydraCore
API by router

Knowledge internal

Ingest Knowledge Internal

Ingest text from agent runtime (e.g., after reading a Google Drive doc).

POST
/internal/v1/instances/{instance_id}/knowledge/ingest

Path Parameters

instance_idInstance Id
Formatuuid
chunk_overlap?Chunk Overlap
Default200
Range0 <= value <= 1000
chunk_size?Chunk Size
Default1500
Range200 <= value <= 5000
contentContent

Text content to ingest

Length1 <= length
customer_id?Customer Id
instance_id?Instance Id
source_idSource Id

Source identifier (file path, URL, etc.)

Lengthlength <= 500
source_nameSource Name

Human-readable source name

Lengthlength <= 500
source_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.

POST
/internal/v1/instances/{instance_id}/knowledge/query

Path Parameters

instance_idInstance Id
Formatuuid
customer_id?Customer Id
queryQuery
Length1 <= length <= 2000
top_k?Top K
Default5
Range1 <= value <= 20

Response 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"
    }
  ]
}