class RubyLLM::AgentTask
The Task a subagentโs call pauses on while the agent waits (see AgentTool). It is Task#input_required? when the agent needs a person, and agent is the agent, so you can settle what it waits for:
task = chat.pending_tasks.first task.agent.pending_approvals.each { |call| task.agent.approve(call) } chat.complete
The agent lives in the process that ran it. A task loaded in another process has no agent, and resuming it reports that the work was lost.
Attributes
Public Instance Methods
Source
# File lib/ruby_llm/agent_task.rb, line 33 def cancel stop(agent) if agent @tool&.forget(data['run']) self end
Cancels the agent, as Chat#cancel does for the chat that waits on it, along with the tasks the agent waits on, and returns self.