Agent Reasoning Loop Analysis
knowledge skill
Identifies and extracts the reasoning loop structure from an agent's execution trace. Produces a directed graph of states, actions, and transitions that form the loop, including entry/exit conditions and loop invariants.
Worked examples
- {"input": {"execution_trace": "State0: {goal=gather_data}\nAction1: {plan=search_sensor}\nState1: {sensor_available=true}\nAction2: {execute=read_sensor}\nState2: {data_quality=high}\nAction3: {plan=store_data}\nState3: {storage_success=true}\nAction4: {check=goal_achieved}", "loop_marker": "State0"}, "output": {"loop_graph": {"nodes": ["State0", "State1", "State2", "State3"], "edges": [{"from": "State0", "to": "State1", "action": "Action1"}, {"from": "State1", "to": "State2", "action": "Action2"}, {"from": "State2", "to": "State3", "action": "Action3"}, {"from": "State3", "to": "State0", "action": "Action4"}]}, "loop_invariants": ["sensor_available=true", "data_quality=high"], "entry_condition": "goal=gather_data", "exit_condition": "storage_success=true"}}
- {"input": {"execution_trace": "State0: {mode=explore}\nAction1: {move=forward}\nState1: {obstacle_detected=false}\nAction2: {move=turn}\nState2: {orientation=changed}\nAction3: {sense=environment}\nState3: {target_visible=true}\nAction4: {plan=approach}", "loop_marker": "State0"}, "output": {"loop_graph": {"nodes": ["State0", "State1", "State2", "State3"], "edges": [{"from": "State0", "to": "State1", "action": "Action1"}, {"from": "State1", "to": "State2", "action": "Action2"}, {"from": "State2", "to": "State3", "action": "Action3"}, {"from": "State3", "to": "State0", "action": "Action4"}]}, "loop_invariants": ["obstacle_detected=false"], "entry_condition": "mode=explore", "exit_condition": "target_visible=true"}}
Input
- execution_trace: string
- loop_marker: string
Output
- loop_graph: object
- loop_invariants: array
- entry_condition: string
- exit_condition: string
Details
- Skill type: knowledge skill
- Safety level: safe_public_research
- Version: 1.0.0