AnyLumino

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
= agent
attributecwd
= cwd
attributename
= name
attributesession_id
= session_id
attributemodel
= model
attributeeffort
= effort
attributeskills
= list(skills)
attributeprocessasyncio.subprocess.Process | None
= None
attributestopped
= False
attributerunningbool

Functions

constructor__init__(agent, cwd, name, session_id=None, model=None, effort=None, skills=()) -> None
paramagentstr
paramcwdPath
paramnamestr
paramsession_idstr | None
= None
parammodelstr | None
= None
parameffortstr | None
= None
paramskillsSequence[Skill]
= ()

Returns

None
functurn(prompt, system_prompt) -> AsyncIterator[Event]

Run one turn and yield its events; raise AgentError when it cannot run.

parampromptstr
paramsystem_promptstr

Returns

collections.abc.AsyncIterator[anylumino.workbench.agents.Event]
funcstop() -> None

Stop the current turn, including one whose process has not started yet.

Returns

None
functerminate(process) -> None
paramprocessasyncio.subprocess.Process

Returns

None

On this page