Menu
InfoQ Architecture·May 18, 2026

Agentic Architecture: AI Agents, Context Engineering, and Microservices

This article explores agentic architecture, a new paradigm where AI agents, powered by Large Language Models, become central to software development. It highlights how "context engineering" can provide rigorous constraints to LLMs, enabling specifications to become the source of truth, while code is regenerated. The discussion emphasizes the architectural implications, particularly the necessity of microservices for managing changes and context windows in such systems.

Read original on InfoQ Architecture

The Shift to Agentic Architecture

The core idea of agentic architecture is to leverage Large Language Models (LLMs) as "reasoning machines" capable of interpreting human ambiguity, making software specifications the primary source of truth. Unlike traditional development, where code is the definitive artifact, agentic architecture proposes that code becomes a disposable, intermediate language, regenerated from evolving specifications. This paradigm shift aims to address long-standing challenges in mapping human intent to executable code, a problem that previous attempts with CASE tools often failed to solve due to the inherent ambiguity of human language.

Context Engineering vs. Prompt Engineering

ℹ️

Key Distinction

While prompt engineering is often described as "voodoo incantations" due to its trial-and-error nature, context engineering is presented as a rigorous engineering discipline. It focuses on providing explicit, structured instructions and clear intent to AI models through artifacts like skills, rules, scripts, feedback, and evaluation.

Context engineering is crucial for constraining the stochastic nature of LLMs. Without proper context, LLMs can generate unpredictable or incorrect code. By systematically providing 'context artifacts,' architects and developers guide the AI agent's reasoning process, ensuring that the generated code aligns with the intended requirements. This process involves a continuous feedback loop where AI agents can ask clarifying questions to resolve ambiguities in specifications, effectively performing a "shift left" in quality evaluation by validating requirements before code is even written.

Architectural Implications: Microservices and Orchestration

A significant architectural implication of agentic AI development, given current LLM limitations, is the necessity of a microservices architecture. LLMs have finite "context windows"—the amount of information they can process at one time. If an entire monolithic application's specification were fed to an LLM, it would quickly exceed this limit, making regeneration and modification impractical. By breaking down applications into smaller, independent microservices, each service's specification can fit within an LLM's context window. This allows individual services to be regenerated from their specifications independently when changes occur.

  • Microservices for Manageability: Enables granular regeneration of code from specifications, accommodating frequent changes and updates.
  • Human Orchestration: A human architect remains responsible for orchestrating these regenerated microservices, ensuring they integrate correctly and managing the emergent properties of the overall system.
  • Specification as Source of Truth: Code becomes a disposable artifact, with specifications and a trace of LLM interactions serving as the primary documentation and source of truth for understanding development decisions and tracing errors.

Role of the Human Architect

In this agentic future, the human architect's role evolves. They are no longer primarily writing code but are responsible for: determining the correctness of requirements, providing the proper context to AI agents, validating the final results, and orchestrating the microservices. They also manage the emergent properties of the system and adapt them to changing circumstances. The article suggests that testing now primarily validates the accuracy of specifications, rather than just the code itself, as the AI agent continually refines its understanding through clarifying questions.

AI agentsLLMscontext engineeringsoftware architecturemicroservicescode generationDevOpssystem design

Comments

Loading comments...