Generate Agents
You can generate agents using a specialized agent that acts as a generator. This agent will help you scaffold new agents.
Usage
To run the generator agent, use the following command:
ddev drush agents:run {agent_name}
(Replace {agent_name} with the name of the generator agent if known, or the agent you wish to run)
Workflow for Creating New Agents
When you create a new agent, follow this standard workflow to ensure it is properly integrated:
- Create a Module: Every agent should belong to a module.
- Create Tools: Implement any necessary tools for the agent within the module.
- Export Configuration:
- Once the agent is configured, export it using
drush config:exportordrush cex. - Place the exported agent configuration YAML file into the
config/installfolder of your module.
- Once the agent is configured, export it using
- Define Dependencies:
- Ensure the agent configuration declares a dependency on the module you created.
Composer
Always add a composer file to your module, even if it's just a placeholder. This is important for managing dependencies and ensuring the module can be easily installed and maintained.