jeevesagent.architecture.react¶
ReAct: the canonical observe-think-act loop.
Each turn:
Check budget; emit warning / exceeded.
Call the model with current messages + available tools.
Stream tokens, accumulate text + tool calls + usage.
If no tool calls, the model is done; break.
Otherwise, dispatch all tool calls in parallel through hooks → permissions → tool host. Append results to messages.
Loop.
This is the v0.1.x default behaviour, lifted verbatim out of
Agent._loop and behind the Architecture protocol.
Behaviour is identical; the refactor only changes the shape.
Classes¶
Observe-think-act in a tight loop. |
Module Contents¶
- class jeevesagent.architecture.react.ReAct(*, max_turns: int | None = None)[source]¶
Observe-think-act in a tight loop.
The default architecture for every
Agent. Other architectures wrap or replace this strategy; seeSubagent.md.max_turnsoverridesDependencies.max_turnsfor this architecture only — useful when wrapping ReAct inside another architecture that sets its own per-leaf cap (Reflexion, Plan-and-Execute, etc.).Nonemeans “use whatever the Agent was configured with”.- declared_workers() dict[str, jeevesagent.agent.api.Agent][source]¶
- async run(session: jeevesagent.architecture.base.AgentSession, deps: jeevesagent.architecture.base.Dependencies, prompt: str) collections.abc.AsyncIterator[jeevesagent.core.types.Event][source]¶
- name = 'react'¶