Api
Tools
Search agent knowledge base (GET)
AuthorizationBearer <token>
API key issued to a Sonzai project. Format: Bearer sk_....
In: header
Path Parameters
agentId*string
Agent UUID or URL-encoded agent name
Query Parameters
q*string
Search query
limit?integer
Max results (default 10, max 50)
Format
int64Response Body
application/json
application/problem+json
curl -X GET "https://loading/api/v1/agents/string/tools/kb-search?q=string"{
"$schema": "/api/v1/schemas/KbSearchResponse.json",
"query": "string",
"results": [
{
"content": "string",
"label": "string",
"scope": "string",
"score": 0.1,
"source": "string",
"type": "string"
}
]
}{
"$schema": "/api/v1/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "string",
"message": "string",
"value": null
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}Search agent knowledge base
AuthorizationBearer <token>
API key issued to a Sonzai project. Format: Bearer sk_....
In: header
Path Parameters
agentId*string
Agent UUID or URL-encoded agent name
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/problem+json
curl -X POST "https://loading/api/v1/agents/string/tools/kb-search" \ -H "Content-Type: application/json" \ -d '{ "query": "string" }'{
"$schema": "/api/v1/schemas/KbSearchResponse.json",
"query": "string",
"results": [
{
"content": "string",
"label": "string",
"scope": "string",
"score": 0.1,
"source": "string",
"type": "string"
}
]
}{
"$schema": "/api/v1/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "string",
"message": "string",
"value": null
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}Get available tool schemas
AuthorizationBearer <token>
API key issued to a Sonzai project. Format: Bearer sk_....
In: header
Path Parameters
agentId*string
Agent UUID or URL-encoded agent name
Response Body
application/json
application/problem+json
curl -X GET "https://loading/api/v1/agents/string/tools/schemas"{
"$schema": "/api/v1/schemas/GetToolSchemasOutputBody.json",
"tools": [
{
"description": "string",
"endpoint": "string",
"name": "string",
"parameters": {
"property1": null,
"property2": null
}
}
]
}{
"$schema": "/api/v1/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"errors": [
{
"location": "string",
"message": "string",
"value": null
}
],
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "https://example.com/errors/example"
}