panel-agents¶
panel-agents gives Panel apps the pieces an AI agent's user interface needs: a streaming chat with tool-call cards, versioned artifacts and documents the agent edits, human-in-the-loop approvals, typed actions on the page the user is looking at, and traces you can record and replay.
The components never talk to an agent framework directly. An adapter translates the framework's output into a small set of normalized events, modelled on the AG-UI protocol, and the components bind to a reactive RunState built from those events. That is why the same UI works during a live run, against a recorded session, or with any framework that has an adapter. The pydantic-ai adapter ships with the package.

Install¶
The mcp extra adds panel_agents.mcp for serving an agent's tools over MCP, and the examples extra installs what the example apps need.
A minimal app¶
A chat with a pydantic-ai agent, served with panel serve app.py:
import panel as pn
from pydantic_ai import Agent
from panel_agents import AgentChat
from panel_agents.adapters.pydantic_ai import AgentRunner
agent = Agent("anthropic:claude-sonnet-5-5", instructions="Answer briefly.")
runner = AgentRunner(agent)
pn.ui.Page(title="Ask an agent", main=[AgentChat(runner=runner)]).servable()
From there, Getting started adds a tool and docks the agent beside an existing app with AgentDrawer.
Where to go next¶
- Getting started walks through a chat and a drawer in a few minutes.
- The how-to guides cover arranging the chat, the agent drawer, approvals, document artifacts, front-end actions, MCP, model calls and run traces, model traces and replay and security.
- Examples describes the runnable apps in the repository.
- The API overview lists everything public, and API by module has the docstrings.
Compatibility¶
panel-agents follows semantic versioning for the names listed in the API overview. Names and modules starting with an underscore are private and may change in any release, and recordings written by a release can be read by later releases of the same major version.