Skip to main content
SONZAI
Api

Process

Process an external conversation transcript

POST
/agents/{agentId}/process
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/process" \  -H "Content-Type: application/json" \  -d '{    "messages": [      {        "content": "string",        "role": "string"      }    ],    "userId": "string"  }'
{
  "$schema": "/api/v1/schemas/ProcessResponse.json",
  "facts_extracted": 0,
  "side_effects": {
    "habits_observed": 0,
    "interests_detected": 0,
    "mood_updated": true,
    "personality_updated": true
  },
  "success": true
}
{
  "$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"
}