class

Crig::AgentRun

Inherits Reference < Object

Sans-IO state machine

Constructors

from_json(string : String) : self

ameba:disable Metrics/CyclomaticComplexity

Source
new(prompt : Completion::Message)
Source
new(prompt : String) : self
Source

Instance methods

cancel_error(reason : String) : Completion::PromptError
Source
chat_history
Source
chat_history=(chat_history : Array(Completion::Message) | Nil)
Source
completion_calls
Source
completion_calls=(completion_calls : Array(CompletionCall))
Source
current_turn=(v : Int32) : Nil
Source
done?
Source
full_history
Source
is_done

ameba:disable Naming/PredicateName

Source
max_invalid_tool_call_retries(v : Int32) : self
Source
max_invalid_tool_call_retries
Source
max_invalid_tool_call_retries=(max_invalid_tool_call_retries : Int32)
Source
max_output_retries
Source
max_output_retries=(max_output_retries : Int32)
Source
max_turns(v : Int32) : self
Source
max_turns
Source
max_turns=(max_turns : Int32)
Source
messages
Source
model_response(turn : ModelTurn) : ModelTurnOutcome
Source
new_messages
Source
next_step
Source
output_schema
Source
output_schema=(output_schema : JSON::Any | Nil)
Source
output_tool_name
Source
output_tool_name=(output_tool_name : String | Nil)
Source
pending
Source
pending=(p : Array(PendingToolCall)) : Nil
Source
pending_invalid_tool_call
Source
record_streamed_completion_call(usage : Completion::Usage) : CompletionCall
Source
resolve_invalid_tool_call(action : InvalidToolCallHookAction) : ModelTurnOutcome
Source
response
Source
state=(s : State) : Nil
Source
streamed_turn(turn : StreamedTurn) : Nil
Source
to_json(json : JSON::Builder)
Source
to_json
Source
tool_choice
Source
tool_choice=(tool_choice : Completion::ToolChoice | Nil)
Source
tool_results(results : Array(Completion::UserContent)) : Nil
Source
turn
Source
usage
Source
with_history(h : Array(Completion::Message)) : self
Source
with_output_tool_name(v : String) : self
Source
with_output_validation(s : JSON::Any | Nil, r : Int32) : self
Source
with_tool_choice(v : Completion::ToolChoice) : self
Source

Nested types