Class: ApplicationAgent
- Inherits:
-
Ask::Agent::Definition
- Object
- Ask::Agent::Definition
- ApplicationAgent
- Defined in:
- lib/generators/ask/install/templates/application_agent.rb
Overview
Base class for your application's AI agents.
Subclass this to define agents:
# app/agents/support_bot/agent.rb
module SupportBot
class Agent < ApplicationAgent
model "gpt-4o"
tools :search_knowledge_base
end
end
# app/agents/support_bot/instructions.md — auto-loaded as the system prompt
# app/agents/support_bot/tools/search_knowledge_base.rb — per-agent tools
Then run:
agent = Ask::Agent.new("support_bot")
agent.run("How do I reset my password?")