Skip to main content
POST
/
api
/
v2
/
agents
/
{agent_id}
/
answer
curl -X POST "http://localhost:8000/api/v2/agents/my-agent/answer?question=How%20should%20we%20contact%20the%20user%3F" \
  -H "Authorization: Bearer your_api_key" \
  -H "X-Session-Token: your_session_token"
{
  "agent_id": "my-agent",
  "question": "How should we contact the user?",
  "answer": "Based on stored preferences, the user prefers email communication. Send email during business hours.",
  "memory_references": ["mem_abc123"]
}

Overview

Answer questions using stored agent memories.

Authentication

  • Authorization: Bearer your_api_key
  • X-Session-Token: {session_token}

Path Parameters

agent_id
string
required
Agent identifier.

Body Parameters

question
string
required
Question to answer.

Request Example

curl -X POST "http://localhost:8000/api/v2/agents/my-agent/answer?question=How%20should%20we%20contact%20the%20user%3F" \
  -H "Authorization: Bearer your_api_key" \
  -H "X-Session-Token: your_session_token"

Response Example

{
  "agent_id": "my-agent",
  "question": "How should we contact the user?",
  "answer": "Based on stored preferences, the user prefers email communication. Send email during business hours.",
  "memory_references": ["mem_abc123"]
}

Response Fields

agent_id
string
Agent ID.
question
string
Input question.
answer
string
Generated answer.
memory_references
array
Referenced memory IDs.