Defining Agents
Agents represent a bundle of Tools, Hooks, Skills, Instructions and Configuration for interacting with models.
fast-agent supports two complementary ways to define agents:
- Python API - define agents and workflows in Python with decorators such as
@fast.agentor@fast.parallel. - Agent Cards - portable markdown files that can be loaded by
fast-agent go, the TUI, and card tooling.
Use the Python API when you are want to build a self contained Python application or script. Use Agent Cards when you want portable, reusable agent definitions that can be easily loaded, edited or shared.
Agents can be used in a number of ways:
- From the Harness API: a high level session based automation framework.
- Directly from a Python program using
fast_agent.run() - Interactively, from the
fast-agentTUI or ACP - Deployed as an MCP Server