docs: add pydantic-monty to AI and Agents intro

The intro did not mention a README entry added after it was written, so readers got no advice on it.

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Vinta Chen
2026-11-08 22:35:50 +08:00
co-authored by Claude
parent 7deee2dc82
commit 05e7bad8d2
@@ -6,6 +6,7 @@ How to choose:
- Agents on Claude, OpenAI, or Gemini models: Claude Agent SDK, OpenAI Agents SDK, or Google ADK
- Skills for your coding agent: Django AI Skills, Sentry Skills, or Trail of Bits Skills
- MCP servers and clients: MCP Python SDK, or FastMCP to compose and proxy servers
- Sandboxing AI-written code: Monty
- A personal assistant in your chat apps: Hermes Agent, or AstrBot for QQ, Feishu, and DingTalk
- Prompts tuned against a metric: DSPy
- Agent data: Instructor for structured output, LlamaIndex for RAG, Mem0 for memory
@@ -32,6 +33,8 @@ CrewAI splits an app into Flows, which manage state and control execution, and C
The MCP Python SDK reads each tool's schema [from its type hints and docstring](https://py.sdk.modelcontextprotocol.io/get-started/first-steps/), so you write no JSON Schema or request handlers. FastMCP wrote the high-level API that the SDK [took in](https://gofastmcp.com/getting-started/welcome). The standalone project is a fuller framework: it can [mount several servers into one](https://gofastmcp.com/servers/composition) and [proxy another MCP server](https://gofastmcp.com/servers/providers/proxy) through your own.
Monty is [a Python sandbox written in Rust for code written by AI](https://pydantic.dev/docs/monty/). It [runs Code Mode in Pydantic AI](https://pydantic.dev/docs/ai/harness/code-mode/), where the model writes one Python program that calls your tools, instead of one tool call per action. The sandbox has no filesystem, environment variables, or network, so the code reaches your host only through the functions and mounts you pass in. [Open a pool of workers and check out a session](https://pydantic.dev/docs/monty/quickstart/python/), setting memory and time limits on the checkout. A host function runs with your process's full authority, so [validate its arguments](https://pydantic.dev/docs/monty/concepts/security/) like any untrusted input. Monty implements only enough Python for a model to express what it wants, so [turn on type checking](https://pydantic.dev/docs/monty/limitations/) to catch most unsupported code before it runs.
Hermes Agent talks to you on Telegram, Discord, Slack, WhatsApp, and Signal [from one gateway process](https://github.com/NousResearch/hermes-agent), and writes itself new skills as it works. Since it runs commands for whoever it lets in, allow only your own account on its gateway with an [allowlist](https://hermes-agent.nousresearch.com/docs/user-guide/security#user-authorization-gateway), and leave approval prompts on for dangerous commands. AstrBot covers chat apps such as QQ, Feishu, and DingTalk. It's AGPL, while Hermes Agent is MIT.
DSPy has you write [structured signatures, not prompts](https://dspy.ai/current/), and its optimizers tune the prompts for you. Before they can, [define a metric and score a baseline](https://dspy.ai/current/getting-started/metrics/) to beat.