Class: RubyLLM::Agents::AgentOverride Private

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/ruby_llm/agents/agent_override.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Stores dashboard-managed overrides for agent settings.

When an agent declares a field as ‘overridable: true` in its DSL, the dashboard can persist an override value in this table. The DSL getter merges the override on top of the code-defined default.

Each row maps one agent class name to a JSON hash of overridden fields.

Examples:

AgentOverride.create!(
  agent_type: "SupportAgent",
  settings: { "model" => "claude-sonnet-4-5", "temperature" => 0.3 }
)

See Also:

  • DSL::Base#resolve_override

Instance Method Summary collapse

Instance Method Details

#[](field) ⇒ Object?

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns the override value for a single field, or nil

Parameters:

  • field (Symbol, String)

    The field name

Returns:

  • (Object, nil)

    The override value



33
34
35
# File 'app/models/ruby_llm/agents/agent_override.rb', line 33

def [](field)
  (settings || {})[field.to_s]
end