AgentRunner
Run turns of one agent session, one at a time.
session_id is the agent's own session ID once a turn has recorded it;
later turns resume it. model and effort go to the CLI's model and
reasoning effort settings for each turn; None keeps the CLI's default. stopped is set by stop and stays set until the
caller clears it for the next turn, so a stop that comes before the
process starts still cancels the turn.
Attributes
attributeagent= agentattributecwd= cwdattributename= nameattributesession_id= session_idattributemodel= modelattributeeffort= effortattributeskills= list(skills)attributeprocessasyncio.subprocess.Process | None= Noneattributestopped= FalseattributerunningboolFunctions
constructor__init__(agent, cwd, name, session_id=None, model=None, effort=None, skills=()) -> NoneparamagentstrparamcwdPathparamnamestrparamsession_idstr | None= Noneparammodelstr | None= Noneparameffortstr | None= NoneparamskillsSequence[Skill]= ()Returns
Nonefuncturn(prompt, system_prompt) -> AsyncIterator[Event]Run one turn and yield its events; raise AgentError when it cannot run.
parampromptstrparamsystem_promptstrReturns
collections.abc.AsyncIterator[anylumino.workbench.agents.Event]funcstop() -> NoneStop the current turn, including one whose process has not started yet.
Returns
Nonefuncterminate(process) -> Noneparamprocessasyncio.subprocess.ProcessReturns
None