Observe: The agent receives an input or perceives a change in its environment (e.g., user query, system alert).
Orient/Retrieve: The LLM, acting as the reasoning engine, analyzes the input. It then queries its memory systems (e.g., vector database via RAG) to retrieve relevant context, facts, or past interactions.
Reason/Plan: The LLM processes the input and retrieved information. It formulates a plan, which might involve breaking down a complex task into smaller steps and determining if external tools are needed.
Decide/Tool Selection: Based on its reasoning, the LLM decides which specific tool(s) to use, if any, to execute the next step. This selection is dynamic and context-dependent.
Act/Tool Execution: The agent invokes the selected tool, passing necessary parameters. The tool interacts with the external system (e.g., API call, database query, function execution).
Reflect/Learn: The agent receives the output from the tool or the environment. It evaluates the outcome, updates its memory, and potentially refines its internal model or future actions (a form of continuous learning).
Respond/Iterate: The agent generates a response or continues to the next step of its plan, repeating the cycle as needed until the goal is achieved.