> ## Documentation Index
> Fetch the complete documentation index at: https://docs.karta.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Consumer adapters

> Talk to a Karta agent with OpenAI- or Anthropic-shaped client code - same turn, re-framed into familiar wire formats.

Karta's native session API is one way to drive an agent. The **consumer
adapters** are another: they expose the *same* turn under three familiar wire
formats, so a client built for OpenAI or Anthropic can talk to a Karta agent
after you point it at the agent URL and use the right credential.

<CardGroup cols={3}>
  <Card title="OpenAI Responses" icon="comment-dots" href="/api-reference/adapters/openai-responses">
    `POST /{org}/{agent}/v1/responses` - the OpenAI Responses API shape, with
    `previous_response_id` continuation.
  </Card>

  <Card title="OpenAI Chat Completions" icon="comments" href="/api-reference/adapters/openai-chat-completions">
    `POST /{org}/{agent}/v1/chat/completions` - the classic messages-array
    shape.
  </Card>

  <Card title="Anthropic Managed Agents" icon="robot" href="/api-reference/adapters/managed-agents">
    Event-sourced managed-agent sessions with a streamed `agent.*` event log.
  </Card>
</CardGroup>

## Pick an adapter

| Adapter                                                                    | Best for                                                                            | Continuity                                                            | Streaming shape                                                        | Avoid when                                                                   |
| -------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | --------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
| [OpenAI Responses](/api-reference/adapters/openai-responses)               | New OpenAI-style clients that can use Responses.                                    | Continue with `previous_response_id` when `store` is set.             | Named SSE events such as `response.output_text.delta`.                 | Your client only supports Chat Completions.                                  |
| [OpenAI Chat Completions](/api-reference/adapters/openai-chat-completions) | Existing clients that require the classic messages-array API.                       | Stateless: each call runs the latest user message on a fresh session. | Bare `data:` chunks ending with `[DONE]`.                              | You need durable continuation, approval details, files, or event-log replay. |
| [Anthropic Managed Agents](/api-reference/adapters/managed-agents)         | UIs that post events, replay logs, upload files, confirm tools, or resume sessions. | Session id plus ordered `agent.*` event log.                          | `agent.*`, `session.*`, and `warm` SSE events.                         | You only need a single request/response call.                                |
| [Native sessions](/api-reference/sessions)                                 | Backends that want Karta's direct session/message/input API.                        | Session id and Karta typed events.                                    | Karta event names from [Streaming events](/concepts/streaming-events). | You need an OpenAI- or Anthropic-shaped SDK without adapter code.            |

## Why adapters

The point of a fixed session protocol is that one client talks to any agent.
The adapters extend that idea to clients you did not write for Karta: point an
existing OpenAI or Anthropic SDK at your agent URL and it works, because Karta
maps its [typed event stream](/concepts/streaming-events) onto each format's
wire shape.

```
        +- /responses          -> OpenAI Responses shape
Karta   +- /chat/completions   -> OpenAI Chat Completions shape
turn -->+- /managed-agents     -> Anthropic Managed Agents events
        +- /sessions/.../messages -> native Karta shape
        (one turn, four projections)
```

## Auth & scope

All adapters live on the **agent** route family
(`/{org}/{agent}/v1/...` on `agent.karta.sh`), so they accept either a
[session token](/security/session-tokens) (the browser-safe credential) or a
`kt_live_...` [API key](/platform/api-keys). They enforce the same
[budget](/platform/usage-and-budgets) gate (`402`) and agent pinning as the
native routes.

## Streaming

Every adapter supports `stream: true` and emits SSE in **that format's** event
vocabulary - `response.output_text.delta` for Responses, `chunk` for Chat
Completions, `agent.*` for Managed Agents - rather than Karta's native event
names. Pick the adapter that matches your client and its streaming
expectations.

<Note>
  These adapters are a *compatibility surface*, not a re-implementation of the
  providers' full APIs. They cover the conversational turn - input, streamed
  output, usage. Provider-specific features beyond that are not guaranteed.
</Note>
