Class: Silas::Engines::Base
- Inherits:
-
Object
- Object
- Silas::Engines::Base
- Defined in:
- lib/silas/engines/base.rb
Overview
The inference seam. An engine executes exactly ONE model call for a step and reports what came back; the framework owns the loop, the ledger owns tool execution.
Direct Known Subclasses
Class Method Summary collapse
-
.loop_ownership ⇒ Object
:framework — Silas's AgentLoopJob drives the loop (ruby_llm).
Instance Method Summary collapse
-
#execute_step(context, &on_event) ⇒ Object
context: { turn:, index:, system:, messages:, tools:, model:, limits: } Yields Silas::Event objects as they stream; returns a Result.
Class Method Details
.loop_ownership ⇒ Object
:framework — Silas's AgentLoopJob drives the loop (ruby_llm). :engine — the engine drives its own loop (agent_sdk, future).
15 |
# File 'lib/silas/engines/base.rb', line 15 def self.loop_ownership = :framework |
Instance Method Details
#execute_step(context, &on_event) ⇒ Object
context: { turn:, index:, system:, messages:, tools:, model:, limits: } Yields Silas::Event objects as they stream; returns a Result.
19 20 21 |
# File 'lib/silas/engines/base.rb', line 19 def execute_step(context, &on_event) raise NotImplementedError, "#{self.class} must implement #execute_step" end |