Skip to main content
Five linear steps from zero to a streaming agent reply. Same flow for Anthropic and Google — flip a flag to swap.

1. Bootstrap Copass

Install the CLI, log in, create a sandbox, mint an API key. About 30 seconds.
npm install -g @copass/cli
copass login                       # email OTP
copass setup                       # creates a sandbox, writes .olane/refs.json
copass apikey create --name my-app # prints an olk_... key — save it once

2. Set environment variables

export COPASS_API_KEY=olk_...
export COPASS_SANDBOX_ID=sb_...    # from .olane/refs.json

3. Install the SDK

# No install needed — cURL ships with macOS, most Linux distros, and Git Bash on Windows.

4. Run your first agent

curl -N https://ai.copass.id/api/v1/storage/sandboxes/$COPASS_SANDBOX_ID/agents/run \
  -H "Content-Type: application/json" \
  -H "Accept: text/event-stream" \
  -H "Authorization: Bearer $COPASS_API_KEY" \
  -d '{
    "provider": "anthropic",
    "model": "claude-opus-4-7",
    "system_prompt": "You are a helpful agent.",
    "messages": [{"role": "user", "content": "Write a haiku about shipping on a Friday."}],
    "end_user_id": "u-123"
  }'
You should see a haiku stream into your terminal, followed by [done] end_turn.

5. Try a different provider

Flip one flag. Memory, tools, and end users stay.
curl -N https://ai.copass.id/api/v1/storage/sandboxes/$COPASS_SANDBOX_ID/agents/run \
  -H "Content-Type: application/json" \
  -H "Accept: text/event-stream" \
  -H "Authorization: Bearer $COPASS_API_KEY" \
  -d '{
    "provider": "google",
    "model": "gemini-3.1-pro",
    "reasoning_engine_id": "'"$COPASS_REASONING_ENGINE_ID"'",
    "system_prompt": "You are a helpful agent.",
    "messages": [{"role": "user", "content": "Same question, different brain."}],
    "end_user_id": "u-123"
  }'
See Providers for the full list and Google’s one-time ADK deploy step.

Next steps

Connect an integration

router.integrations.connect('github', …) runs the whole OAuth dance. The agent picks up the tools automatically.

Continue a conversation

Thread session_id across turns for multi-turn chat with window-aware retrieval.

Cookbooks

Multi-integration recipes — decision archaeology, cross-repo features, customer health.

Agent Router overview

The interactive widget, value props, full API surface.