- Agent Playground — build and test interactively in the UI, then save.
- SDK — define the manifest in code and save it programmatically, as shown below.
Install and authenticate
Agent creation uses the standard TrueFoundry client (from truefoundry import client), not the TrueFoundryGateway client used to run agents.
tfy login or the TFY_API_KEY / TFY_HOST environment variables. For more details, see the CLI setup guide.
Save an agent to the registry
Build a manifest and callcreate_or_update:
Python
AgentManifest spec. The registry handles versioning, RBAC, and audit automatically.
What goes in a manifest
| Section | Purpose |
|---|---|
model | Which LLM to use (via AI Gateway) and sampling parameters. |
instructions | System prompt. Supports {{variable}} placeholders from variables. |
mcp_servers[] | MCP tools the agent can call, with allowlists and approval gates. |
skills[] | Versioned skills from the Skills Registry, optionally preloaded. |
config | Runtime limits: iteration count, timeout, sandbox, sub-agents, compaction. |
collaborators | Users with access to this agent (required, can be []). |
Full YAML example
The YAML below shows every commonly used field. See the Agent manifest reference for complete field descriptions.MCP tool selectors
MCP server entries support special tags that match MCP tool annotations:| Tag | Matches |
|---|---|
@all | Every tool exposed by the server. |
@read-only | Tools with readOnlyHint: true. |
@destructive | Tools with destructiveHint: true. |
@write | Tools that do not have readOnlyHint: true — a superset of @destructive. |
enable_tools to allowlist, disable_tools to blocklist, and require_approval_for_tools to gate sensitive calls. See Human in the loop for how approvals work at runtime.