POST /api/agents/companionAgent/generate
Generate a complete response from the companion agent without streaming.Request Body
Conversation history array containing user and assistant messages.
Personality mode for the response. Options:
"guru", "wanderer", "friend", "philosopher"Unique identifier for the conversation thread. Recommended for conversation continuity.
User identifier for conversation persistence. Recommended for user-specific conversations.
Alternative personality specification method.
Request Example
Response
The complete response text from the companion agent.
Token usage statistics for the request.
Number of input tokens used.
Number of output tokens generated.
Total tokens used (input + output).
Tokens used for reasoning (if applicable).
Cached input tokens (cost savings).
Detailed execution steps including tool calls and results.
Reason for response completion (
"stop", "length", "tool_calls", etc.)Any warnings generated during processing.
Provider-specific metadata (OpenAI, etc.)
Unique request trace identifier for debugging.
Success Response (200)
Error Responses
| Code | Description |
|---|---|
| 400 | Invalid request body or parameters |
| 500 | Server-side processing error |
