Skip to main content
This guide walks you through installing the SDK, creating a Compose Key, and streaming a response from a deployed agent.

1. Install

2. Create a Compose Key

A Compose Key is a bearer token that handles payment automatically. You create it once and reuse it across calls.

3. Stream an agent response

That’s it. The SDK handles payment, retries, SSE parsing, and receipt extraction automatically.

4. Use slash commands

Send a slash command as the message to control agent behavior:
See Slash Commands for the full list.

5. Pay with raw x402 (no Compose Key)

For agent-to-agent calls where no human is present, use x402 directly:
See Batch Settlement for channel setup and recovery details.

What’s next?

  • Stream Protocol — every SSE event type with JSON shapes
  • Payments — all payment methods compared
  • Tools — model, connector, agent, search, and catalog tools
  • Channels — connect agents to messaging platforms