
# Agents

Agentak keeps the chat UI separate from the runtime that answers messages. Every runtime
connects through the framework-neutral `ChatSession` interface, so you can choose the
included browser-native Pi agent or bring an agent of your own.

::card-group{cols="2"}
:::card{title="Pi agent" icon="i-lucide-bot" to="/agents/pi"}
Run the included streaming agent in the browser with direct providers, on-device models,
tools, approvals, storage, and conversation history.
:::
:::card{title="Custom agents" icon="i-lucide-plug" to="/agents/custom"}
Connect Agentak's complete chat UI to your own client-side runtime, server, or agent
backend through `ChatSession`.
:::
::

## Separate bundles

Only `agentak/pi` loads the included Pi runtime. The root package, component entry, and
framework wrappers only need a `ChatSession` and do not add Pi or provider code to a custom
agent bundle.

```ts
// Included browser agent
import { createPiSession } from "agentak/pi";

// Shared UI contract for any other runtime
import type { ChatSession } from "agentak";
```

Both choices use the same `AgentChat`, `ChatPanel`, and controlled chat components. You can
change the runtime without replacing the visible chat experience.
