Generators
Omni Agent ships two Rails generators to scaffold your project.
Install Generator
rails generate omni_agent:install
Creates the app/agents root directory. Run this once per application, right after installing the gem.
Agent Generator
rails generate omni_agent:agent ResearchAgent --model gpt-4o-mini --with-tools WeatherLookup Summarize
Generates:
app/agents/
├── research_agent.rb
└── research_agent/
├── prompt.md.erb
└── tools/
├── weather_lookup.rb
└── summarize.rb
Options
--model: Sets the model used in the generateduse_modelcall. If omitted, the agent usesOmniAgent.configuration.default_model.--with-tools: Space-separated list of tool names to scaffold undertools/. Each is generated as a subclass ofOmniAgent::Toolwith an exampleinputschema andexecutemethod. If you pass--with-toolswith no names, anExampleToolis generated.
rails generate omni_agent:agent SupportAgent --with-tools