Skip to content

/agents · read me first

For AI agents

You are an AI agent and you need a human. One call opens a live session with a verified human expert; you stream their replies, keep talking, and hand control back when it is resolved.

this page as markdown: /agents.md

discover
curl https://chatwithhuman.chrismai.ai/llms.txt
curl https://chatwithhuman.chrismai.ai/openapi.json
curl https://chatwithhuman.chrismai.ai/agents.md

When to escalate

  • -Ambiguous intent you cannot resolve with another clarifying question.
  • -Sensitive context (money, health, legal, account access) that needs human judgment.
  • -A task that requires a human action or sign-off you cannot perform.
  • -The user explicitly asks for a human.

The loop

Implemented routes, schemas in /openapi.json.
#CallWhat it does
1POST /api/sessionsOpen a session with agent_id + context (Authorization: Bearer <API key>). Returns session_id, status "queued", eta_seconds.
2GET /api/sessions/{id}/eventsServer-Sent Events: status changes (queued → connected → closed) and human messages. Ping every 20 s.
3POST /api/sessions/{id}/messagesSend your messages (role "agent") into the live session.
4GET /api/sessions/{id}Read status and the full transcript at any time; resume your flow when status is "closed".
1 · escalate
curl -X POST https://chatwithhuman.chrismai.ai/api/sessions \
  -H "Authorization: Bearer $CHATWITHHUMAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"agent_id":"agent_abc123","context":"User is asking about a refund for order #8821","tier":"priority"}'
# 201 {"session_id":"ses_…","status":"queued","eta_seconds":12,"billing_started":false,"tier":"priority","rate_cents_per_minute":2500,…}
2 · listen
curl -N https://chatwithhuman.chrismai.ai/api/sessions/ses_x9k2m/events \
  -H "Authorization: Bearer $CHATWITHHUMAN_API_KEY"
# data: {"type":"status","status":"connected"}
# data: {"type":"message","message":{"role":"human","content":"…"}}
3 · reply
curl -X POST https://chatwithhuman.chrismai.ai/api/sessions/ses_x9k2m/messages \
  -H "Authorization: Bearer $CHATWITHHUMAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"role":"agent","content":"Order #8821 was paid by card ending 4242."}'
4 · read
curl https://chatwithhuman.chrismai.ai/api/sessions/ses_x9k2m \
  -H "Authorization: Bearer $CHATWITHHUMAN_API_KEY"   # status + full transcript

Writing good context

  • -Put everything the human needs in context: the user goal, what you already tried, relevant ids.
  • -Use tier: "priority" ($25/min, guaranteed fast human response) when a user is waiting on it; otherwise the default standard ($10/min).
  • -Attach your own correlation ids in metadata; they are echoed back.

Billing

Billing starts when a human connects (status "connected"), not when you create the session: whole minutes at the session tier rate (Standard $10/min, Priority $25/min), no platform fee.
PlanRateAPI tierFor
Standard$10 / min"standard"Developers and small teams
Priority$25 / min"priority"Funded startups and crypto projects
Enterprisefrom $250,000 / yearcontractPublic companies and large institutions

Same call in other languages

One request, pick your client. Add "tier": "priority" for $25/min guaranteed fast response.
curl -X POST https://chatwithhuman.chrismai.ai/api/sessions \
  -H "Authorization: Bearer $CHATWITHHUMAN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "agent_id": "agent_abc123",
  "context": "User is asking about a refund for order #8821",
  "tier": "standard"
}'

MCP server

plannedThere is no MCP server yet. The descriptor at /.well-known/mcp.json documents the intended shape so agent runtimes can plan for it. Until then, use the REST API in /openapi.json. Descriptor: /.well-known/mcp.json

Planned toolREST equivalent (today)Arguments
escalate_to_humanPOST /api/sessionsagent_id, context, priority?, metadata?
send_messagePOST /api/sessions/{id}/messagessession_id, content
get_sessionGET /api/sessions/{id}session_id
close_sessionPATCH /api/sessions/{id}session_id (status: "closed")

Machine-readable