Skip to content

docs(deploy): §8.7 Call it — POST /agents/{id}/chat - #27

Open
yash-kark wants to merge 1 commit into
mainfrom
docs/deploy-guide-call-agent
Open

yash-kark wants to merge 1 commit into
mainfrom
docs/deploy-guide-call-agent

Conversation

@yash-kark

Copy link
Copy Markdown
Contributor

Adds §8.7 Call it to docs/DEPLOYING_ON_AGENTCORE_AND_MICROVM.md. It covers how to call an agent after registering it (§8.2):

  • POST $AGENTOS/agents/$AGENT_ID/chat with x-api-key: $LYZR_KEY. These are the same names §8.2–§8.4 use.
  • The first turn has no sessionId. Read the X-CAS-Session-Id response header and send it back as sessionId to continue the session.
  • The SSE stream format, its terminal frame (ca_done / ca_error), and the curl flags (-N, -D -, --max-time).
  • The errors a caller is expected to handle: SANDBOX_BUSY, SANDBOX_GONE, SESSION_NOT_FOUND, and the 4 h sandbox TTL.

The content follows the route's OpenAPI contract in AgentOS (routes/chat.ts, sendAgentChat).

🤖 Generated with Claude Code

How to run a turn on a registered agent: the first call returns the
session in X-CAS-Session-Id, later calls send it back as sessionId.
Uses the guide's $AGENTOS / $LYZR_KEY / $AGENT_ID names.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant