Class: Assistant::SunnyAgent
- Inherits:
-
RubyLLM::Agent
- Object
- RubyLLM::Agent
- Assistant::SunnyAgent
- Defined in:
- app/agents/assistant/sunny_agent.rb
Overview
RubyLLM Agent for the Sunny AI assistant, backed by persisted AssistantConversation records.
Serves as the canonical factory and configuration baseline for Sunny conversations.
The controller creates/finds conversations through this agent class; ChatService then
applies per-request runtime configuration (dynamic model selection, role-based tool
registration, extended thinking, Anthropic prompt-caching, lifecycle callbacks) before
each turn.
The instructions macro points to the base system prompt template
(app/prompts/assistant/sunny_agent/instructions.txt.erb). ChatService renders this
template and appends dynamic sections (user identity, tool rules, schema hints) before
handing off to the conversation.