Skip to content

3. [Supplementary] Architectural Principles for Agents

Chapters 3-5 provide a comprehensive and detailed account of the components and architectural considerations for constructing AI Agents within WOG. While these are not compliance requirements to be followed per se, this elaboration aims to equip developers, policymakers, and stakeholders with a robust understanding of the process involved in designing, developing, and deploying AI Agents that can comply with this Standard.

3.1 Agentic Workflow Patterns

Agentic systems shall conform to established workflow patterns that define their operational structure and coordination mechanisms. This standard differentiates Agentic Workflows from general AI Workflows, with specific requirements applying to the former. Refer to Appendix 7.2 for a comprehensive overview of approved workflow patterns.

Agentic Primer 12

Source: Slides from AI Practice’s Agentic AI Primer

3.2 Core Agentic Loop

Agents can handle sophisticated tasks, but their implementation is often straightforward. They are typically just LLMs using tools based on environmental feedback in a loop.

Agentic Loop

It is therefore crucial to design toolsets and their documentation clearly and thoughtfully. This cyclical interaction between the LLM, its tools, and the environment is fundamental to an agent's functionality. The LLM processes information, decides on an action, utilizes a tool to execute that action, observes the environmental response, and then uses that feedback to inform its next decision.

3.3 Common Agentic AI Workflow Topologies

Agentic AI workflows can be implemented in various ways, including sequential, parallel, hierarchical, collaborative, and human-in-the-loop approaches. For more details, please see Appendix 7.2.

3.4 Streaming and Asynchronous Agents

This section details how agent workflows can handle long-running and asynchronous tasks through two primary mechanisms: Streaming with Server-Sent Events (SSE) and Push Notifications for disconnected scenarios. SSE is suitable for real-time progress monitoring and incremental results, where a client maintains a persistent connection and receives continuous updates, including task status and artifact updates.

For tasks lasting extended periods or when clients cannot maintain constant connections, agent workflows can utilize push notifications. This involves the server notifying a client-provided webhook of significant task updates. Crucially, the section emphasizes robust security measures for push notifications, including rigorous URL validation and authentication for both the sending server and the receiving client webhook, to prevent attacks like Server-Side Request Forgery (SSRF), Distributed Denial of Service (DDoS), and replay attacks.

Without regular communication between agents, several critical issues can arise. Agents may operate with outdated information, leading to suboptimal or incorrect decisions. They could duplicate efforts, resulting in inefficiencies and wasted resources. Furthermore, a lack of timely updates can cause workflows to stall, as dependent agents wait indefinitely for information that never arrives, or proceed based on incomplete data, potentially leading to errors or system failures. In complex multi-agent systems, this can quickly degrade overall system performance, reliability, and the ability to achieve overarching goals.

3.5 Agents and Tools

3.5.1 What are tools

Tools in agentic systems extend an agent's capabilities beyond its core reasoning, enabling interaction with external environments, data sources, and other systems. These can range from simple functions like web search or calculator access to complex integrations with databases, APIs, or even other specialized agents. The purpose of a tool is to provide the agent with a means to gather specific information, perform actions, or interact with real-world systems to achieve its goals effectively.

3.5.2 Tool use

Tool use by an agent involves a structured process where the agent identifies a need for external interaction, selects the appropriate tool, formulates the necessary input for that tool, executes it, and then interprets the tool's output to further its objective. This process is crucial for agents to move beyond purely linguistic tasks and engage with dynamic environments. Effective tool use requires robust reasoning capabilities within the agent to understand when and how to leverage specific tools, how to handle their outputs, and how to recover from potential errors or unexpected results, thereby enabling more complex and adaptive behaviors.

3.5.3 MCP - Usage and limitations

The Model Context Protocol (MCP) is designed to standardize the way agents and models share and understand context, facilitating more seamless communication and collaboration in multi-agent environments. By providing a common framework for representing and exchanging contextual information, MCP aims to reduce ambiguities and improve the interoperability of diverse AI components.

For more information on Tools and MCP, please see Appendix 7.3.

3.6 Agentic Context and Memory

3.6.1 How Context and Memory are Used in Agentic Systems

In agentic systems, context and memory are fundamental for enabling intelligent, sustained, and adaptive behavior. Context refers to the immediate, relevant information surrounding an agent's current task or interaction, allowing it to understand the nuances of a situation and make informed decisions. Memory, on the other hand, provides agents with the ability to retain and recall past experiences, knowledge, and learned behaviors over longer durations. Together, they allow an agent to maintain a coherent understanding of its environment, track ongoing tasks, learn from interactions, and improve its performance over time, moving beyond single-turn interactions to engage in complex, multi-step workflows.

3.6.2 Types of Memory

Agentic systems employ various types of memory to support their operations, each serving distinct purposes. Short-term memory, often analogous to an LLM's context window, holds immediate conversational history and current task-relevant information, allowing for rapid recall within a limited scope. Long-term memory, frequently implemented using vector databases (VDBs) or knowledge graphs, stores persistent knowledge, past experiences, and learned information that can be retrieved as needed. This includes episodic memory (specific past events), semantic memory (general facts and concepts), and procedural memory (how to perform actions). The strategic combination and interaction of these memory types are crucial for an agent to exhibit comprehensive understanding and adaptive behavior.

3.6.3 Memory Management

Effective memory management in agentic systems is critical for maintaining performance, relevance, and efficiency. This involves strategies for deciding what information to store, how to store it (e.g., embedding relevant data into a VDB), when to retrieve it, and how to update or discard outdated information. Key aspects include context window management, where older or less relevant information is pruned to keep the current context within operational limits; indexing and retrieval mechanisms for efficient access to long-term memory; and mechanisms for continuous learning and memory consolidation, ensuring that the agent's knowledge base remains current and optimized for its ongoing tasks.

3.6.4 Challenges in Managing Context and Memory

Managing context and memory in agentic systems presents several significant challenges. One challenge is maintaining context coherence over long or complex interactions, as the relevant information can become extensive and difficult to track. The "context window" limitation of LLMs often necessitates sophisticated summarization or retrieval augmented generation (RAG) techniques to keep vital information accessible without exceeding computational bounds. Another challenge is the "recency bias," where an agent might over-prioritize recent information over more historically significant data. Furthermore, ensuring efficient and accurate retrieval from vast long-term memory stores, preventing hallucinations, and addressing the dynamic evolution of relevant information are ongoing areas of research and development in building robust agentic systems.