Class: ApplicationAgent

Inherits:
Ask::Agent::Definition
  • Object
show all
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
class SupportBotAgent < ApplicationAgent
model "gpt-4o"
tools :search_knowledge_base
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?")