The whole security model of Agent Sandboxes fits in one argument.
The string is the code your agent wrote. external_lookup is the complete list of things it's allowed to call. No files, network or env vars unless you grant them.
uv run main.py 👇
pydantic.io/ih7Pn
A repeated agent failure, pulled from Logfire traces, became a skill. Re-run on the same 12 scenarios: 3 passed without it, 12 with it.
New blogpost on monitoring, reusing and evaluating coding agent sessions with Logfire MCP:
Code Mode in Pydantic AI is one line:
capabilities=[CodeMode(monty_sandbox=logfire.agent_sandboxes)]
The model writes one script that calls your tools, and Agent Sandboxes runs it. In our example, without that line, tokens and cost roughly double.
pydantic.io/jhQRw
On Temporal, a SubAgents delegation runs in an activity, so the delegate's own durability does nothing.
Now each delegation can run as a Temporal or DBOS child workflow, with the delegate's model requests and tool calls in its own history.
pydantic.io/7nQ48
Your chat UI no longer has to own the conversation.
Pass a ConversationStore to Pydantic AI's Vercel AI or AG-UI adapter, and each request loads the chat it names, runs the client's new turn and saves what the run added.
pydantic.io/Vrnop