Skip to main content
An agent is a saved definition in the Agent Registry: its model, system instructions, tools (MCP servers and skills), and runtime configuration. Once saved, any application can invoke it by name. There are two ways to create an agent:
  • Agent Playground — build and test interactively in the UI, then save.
  • SDK — define the manifest in code and save it programmatically, as shown below.
After saving, continue to Use an agent to open a session and invoke it.

Install and authenticate

Agent creation uses the standard TrueFoundry client (from truefoundry import client), not the TrueFoundryGateway client used to run agents.
The client picks up credentials from 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 call create_or_update:
Python
The manifest follows the AgentManifest spec. The registry handles versioning, RBAC, and audit automatically.

What goes in a manifest

Start with a minimal manifest (model + instructions + collaborators) and add MCP servers, skills, and config as you need them. See MCP servers and Skills for platform concepts.

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: Use 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.

Next step

Your agent is saved in the Registry. Continue to Use an agent to open a session and invoke it.