Interleave reasoning and action through a parseable protocol. Every executed action must have an attributable observation or an execution error; unparsed output is not an action.Reason-act-observe
Interleave reasoning and external actions.
interleaved_reasoning_and_actionRECORD STATUSCandidate · v0.1.0UML class view
The proposed contract drawn as participant roles, received calls, and numbered dependencies.
Object interactions
The same roles and calls as a class collaboration and a numbered message sequence.
Pointcut
Where the mechanism applies. All four dimensions belong to the proposed match, not just its vocabulary.
- Context
- An agent can reason and use an external action interface.
- Trigger
- The model emits reasoning followed by an action request.
- Structure
- Parsed action, execution result, and observation fed into the next cycle.
- Effect
- External evidence enters the reasoning trajectory before the next action.
Protected contract
The obligation that clients, operators, and auditors should be able to rely on.
- Requires
- Action and observation schemas are stable enough to parse.
- Ensures
- Every executed action has an attributable observation or execution error.
- Invariant
- Model reasoning is not treated as environment evidence.
- Violation
- Invalid action, unavailable tool, or parse error is exposed to the loop.
Negative control
Chain-of-thought text without external action is not ReAct.
Variation & lifecycle
The hot spot is admitted only where the protected semantics survive.
Permitted variation
Prompt protocol, typed tool call, XML or text parser, and observation compression.
Test obligation
Test action-observation linkage, malformed action, tool error, and loop termination.
Evolution question
Did textual thought-action protocols become typed tool events?
Prompt + code design
An illustrative prompt and a small design sketch for the proposed contract. Names and APIs are invented; this is not a repository excerpt.
def reason_act(task, model, tools):
trace = []
while not trace or trace[-1].kind != "final":
raw = model.complete(task, trace)
step = protocol.parse(raw)
if step.kind == "action":
try:
observation = tools.execute(step.action)
except ToolError as error:
observation = Observation.error(step.action, error)
trace.append(observation)
else:
trace.append(step)
return traceIllustrative design sketch. The parser is the boundary between thought and effect; every effect gets an observation. This example is a teaching aid, not implementation evidence or a conformance claim.
Detection & matching
The frozen rule that retrieves this record, the canonical source exemplar, and the control that should stay unmatched.
- Join point
interleaved_reasoning_and_action- Source locator
- Yao et al.
- Lexical cue
(?i)\bReAct\b|\breason[_-]?act[_-]?observe\b|\bThought:\s|\bAction:\sFrozen expression, v0.1.0. A match is a retrieval cue, not a confirmed implementation.- Aliases
- None
- Canonical exemplar
- huggingface/smolagents
src/smolagents/agents.py:270Support: tests/test_agents.py:217 - Negative control
- Chain-of-thought text without external action is not ReAct.
Scope-anchored review. pohe-agent analyze <repo> --pattern R01 anchors the cue to its enclosing declaration and checks a separate operational signature for all four pointcut dimensions. Missing roles and negative-control risks remain visible; a structural match is not E2/E3. Calibration report ↗
Repository files
Up to five public files retrieved by the frozen cue and pinned to the audited commit. A match is a place to inspect, not a confirmed implementation.
src/smolagents/agents.py:270CANONICAL SOURCE02aaif-goose/goosecrates/goose-cli/src/session/elicitation.rs:13RETRIEVAL CUE03affaan-m/ECCskills/agent-self-evaluation/scripts/evaluate.py:242RETRIEVAL CUE04agno-agi/agnolibs/agno/agno/company/execution.py:610RETRIEVAL CUE05Aider-AI/aideraider/coders/patch_coder.py:642RETRIEVAL CUEEvidence & provenance
Each layer answers a different question. Do not substitute retrieval for review.
Source-located exemplar
A concrete source anchor is available for this proposed record. It is one exemplar, not evidence that all repositories—or every contract field—conform.
Review boundary: this candidate and its specification come from an AI-assisted study. Independent human validation remains open.
97.2% of repository families in the frozen panel have at least one current cue, historical cue, or canonical source layer. This is not confirmed prevalence.
Current lexical-cue repositories: 39 / 4196f33faaf028src/smolagents/agents.py:270tests/test_agents.py:217ReAct agent loop with thought/action/observation.
Exploratory retrieval cue Regex / v0.1.0
(?i)\bReAct\b|\breason[_-]?act[_-]?observe\b|\bThought:\s|\bAction:\sThis expression is a discovery instrument only. A match is a retrieval cue—not a confirmed implementation, pointcut match, or contract proof.