Skip to main contentThis recipe shows how to build an Agent from scratch, giving it tools (Capabilities) and the intelligence to use them (Orchestration).
1) Create the Agent
- Go to Forge > Agents.
- Click Create Agent.
- Fill in the basics:
- Name: e.g., “Support Triage Bot”.
- Description: What the agent does (used for routing if this agent is a sub-agent).
- Base URL (optional): A default API host for any API Actions this agent uses.
See: Create Agent
2) Add Capabilities
Capabilities are the “tools” your agent can use.
- Open your new Agent.
- Go to the Capabilities tab.
- Click Add Capability and choose a type:
- LLM Action: A sub-task handled by an LLM prompt (e.g., “Summarize Ticket”).
- API Action: An external API call (e.g., “Get User Profile”).
- Sub-Agent: Delegate to another existing agent.
See: Capabilities
Now define how the agent decides which Capability to use.
- Go to the Configuration tab → Routing sub-tab.
- Choose a Routing Strategy:
- LLM Router: The model decides based on the user request and capability descriptions.
- Deterministic: Define exact rules (e.g., “If message contains ‘refund’, call RefundCapability”).
- Add Orchestration Instructions to guide the LLM router (e.g., “Always check the user’s status before offering a refund”).
See: Orchestration
If your agent needs to remember specific information across the session (like a user’s name or order ID), define it in the Agent Form.
- Go to Configuration → Agent Form.
- Add fields (e.g.,
order_id, user_email).
- Set Read/Write Scope to control which other agents or actions can see/update these fields.
See: Agent Form
5) Add Instructions
Refine how the agent plans and processes results.
- Go to Configuration → Instructions.
- Strategy Instructions: How the agent should break down complex requests (e.g., “Ask for clarification if the request is ambiguous”).
- Processing Instructions: How to handle results from capabilities (e.g., “Summarize the API response for the user”).
See: Special Instructions
6) Test in Studio
Finally, verify your agent works as expected.
- Go to Forge > Studio.
- Select your Agent.
- Chat with it to verify routing, state collection, and capability execution.
7) Call the agent from your application
Once you’re happy with the behavior in Studio, invoke the agent from code: