Skip to main content

Add Procedures to an Agent

Procedures are step-by-step instructions that tell an agent exactly how to perform a task. They define inputs, outputs, tools, and the sequence of steps to follow.

Procedures use YAML format and are stored as .proc files in the agent's directory.

Minimal .proc file example

name: research-competitor
description: Research a competitor and produce a summary report.
inputs:
- company_name
- topic
outputs:
- summary report in markdown format
tools_used:
- web_search
- file_write
steps:
- Search the web for recent news about {company_name}
- Summarize the top 5 results into bullet points
- Save the summary to a markdown file named {company_name}-research.md
- Report the findings back to the user

Prerequisites

  • A created agent
  • Familiarity with YAML syntax

Steps

1. Open the Procedures tab

Navigate to Agents in the sidebar, click your agent, then select the Procedures tab.

2. Create a new procedure

Click New Procedure. The editor opens with a blank procedure template.

3. Define the procedure

Fill in the following fields:

  • Name -- a short, descriptive identifier (e.g., research-competitor)
  • Description -- what this procedure accomplishes, in one or two sentences
  • Inputs -- the data the procedure expects (e.g., company name, topic)
  • Outputs -- what the procedure produces (e.g., a summary report, a list of findings)
  • Tools Used -- which tools the agent should call during execution
  • Steps -- the ordered sequence of actions the agent performs

4. Write the steps

Each step should be a clear, actionable instruction. Be specific about what tool to call, what data to pass, and what to do with the result. For example:

steps:
- Search the web for recent news about {company_name}
- Summarize the top 5 results into bullet points
- Save the summary to a markdown file named {company_name}-research.md
- Report the findings back to the user

5. Save the procedure

Click Save. The procedure is now available to the agent.

6. Use shared procedures (optional)

Procedures placed in the shared/ directory are available to all agents in the project. If you want multiple agents to use the same procedure, move it to the shared directory instead of keeping it in the agent's own folder.

For more on sharing resources between agents (including tools), see Share Tools Between Agents. The shared/ directory for procedures works the same way as the _shared/tools/ directory for tools.

Verify

  • The procedure appears in the agent's Procedures tab.
  • Ask the agent to perform the task described by the procedure. It invokes the procedure using the invoke_procedure tool automatically when the request matches.
info

You can also trigger a procedure explicitly by asking the agent to "use the [procedure name] procedure" in a conversation.

tip

Start with simple procedures and iterate. Complex multi-step procedures work best when each step has a clear success criterion the agent can check before moving on.