# Quickstart
URL: /docs/runtimes/a2a/quickstart

Minimal runtime and Thread setup against an A2A server.

Three steps to a working chat against an A2A server. Assumes you have already installed the package and have an A2A v1.0 server reachable; if not, start at [overview](/docs/runtimes/a2a).

<Steps>
  <Step>
    ### Wire up the runtime provider \[#wire-up-the-runtime-provider]

    ```tsx title="app/MyRuntimeProvider.tsx"
    "use client";

    import { AssistantRuntimeProvider } from "@assistant-ui/react";
    import { useA2ARuntime } from "@assistant-ui/react-a2a";

    export function MyRuntimeProvider({
      children,
    }: {
      children: React.ReactNode;
    }) {
      const runtime = useA2ARuntime({
        baseUrl: "http://localhost:9999",
      });
      return (
        <AssistantRuntimeProvider runtime={runtime}>
          {children}
        </AssistantRuntimeProvider>
      );
    }
    ```
  </Step>

  <Step>
    ### Render the Thread \[#render-the-thread]

    ```tsx title="app/page.tsx"
    import { Thread } from "@assistant-ui/react";
    import { MyRuntimeProvider } from "./MyRuntimeProvider";

    export default function Page() {
      return (
        <MyRuntimeProvider>
          <Thread />
        </MyRuntimeProvider>
      );
    }
    ```
  </Step>

  <Step>
    ### Set up UI components \[#set-up-ui-components]

    Follow the [UI Components guide](/docs/ui/thread) to wire up the Thread, composer, and supporting primitives.
  </Step>
</Steps>

Once your A2A server is reachable, the runtime negotiates streaming vs non-streaming based on the agent card's `capabilities.streaming` flag and starts forwarding messages.

## Auth and headers \[#auth-and-headers]

Pass static or dynamic headers when your server expects auth:

```tsx
const runtime = useA2ARuntime({
  baseUrl: "http://localhost:9999",
  headers: async () => ({
    Authorization: `Bearer ${await getAccessToken()}`,
  }),
});
```

## Adding adapters \[#adding-adapters]

Attachments, speech, feedback, history, and a custom thread list are all supported via the standard adapter slots. See [adapters](/docs/runtimes/concepts/adapters) for the contracts; pass them on `useA2ARuntime`:

```tsx
const runtime = useA2ARuntime({
  baseUrl: "http://localhost:9999",
  adapters: { attachments, history, speech, feedback },
});
```

For multi-thread, see [threads](/docs/runtimes/concepts/threads) and pass `adapters.threadList`.

## Next \[#next]

<Cards>
  <Card title="Client and hooks" description="A2AClient, useA2ARuntime options, hooks reference, task states, artifacts." href="/docs/runtimes/a2a/client-and-hooks" />

  <Card title="Pick a runtime" description="Compare A2A to other runtime options." href="/docs/runtimes/pick-a-runtime" />
</Cards>
