Agentic AI in action ->

Agentic AI in Practice: What Really Matters When Building Production AI Agents

Deploying AI agents in production: hands-on lessons on tool design, multi-agent patterns, and open protocols like MCP and AG-UI.

Dr. Andreas Ejupi

Dr. Andreas Ejupi

AI Research

Agentic AI is the topic of 2026. But between an impressive demo and an AI agent that runs reliably in production lies a lot of engineering work. The demo takes a week – the reliability afterwards is the real task.

This post summarizes the patterns that have proven themselves in practice when building production agents – and the approaches that turn out to be dead ends. The running example is a conversational agent that creates, revises, and publishes surveys in dialogue.


What Makes an Agent

A chatbot answers questions. An agent acts: it independently selects tools, executes multi-step tasks, and reacts to intermediate results. The formula is simple:

Agent = LLM + harness + tools

The harness is everything that surrounds and steers the language model: the system prompt, the execution loop, state management, and the guardrails. The user says: “Create a customer satisfaction survey with three questions” – and the agent plans, builds, shows a preview, and asks for confirmation on critical steps. The quality of an agent, however, emerges almost entirely outside the model: in the harness and in how the tools are designed. That is where the interesting decisions happen.


Lesson 1: Tool Design Is the Real Craft

The obvious design is one single, powerful tool that accepts the entire object on every change. That scales poorly: for every small edit, the model has to reproduce the whole structure – costing time and tokens, and producing errors in places that were never meant to change.

What works instead is a hierarchy by depth of intervention:

InterventionToolEffect
Rephrase one questiontargeted edit toolminimal error surface
Change title or welcome textdedicated meta toolstructure stays untouched
Add/remove questionsfull updateonly when truly structural

The agent is instructed to always pick the smallest possible tool. The model cannot break anything the tool has no access to.

The second insight: safety rules belong in tool code, not in the prompt. If an agent tries to modify a published survey that already has real responses, the tool itself should refuse to execute and demand explicit confirmation from the user. The prompt can reinforce such rules – but only code makes them deterministic.


Lesson 2: An Agent Should Not Grade Its Own Work

Can an agent objectively review its own output? No – its own conversation history acts as bias, and it tends to rubber-stamp its results. This is where a classic multi-agent pattern comes in: the quality check is itself a tool that internally spins up a second, fresh agent – with its own rubric and deliberately no access to the previous conversation:

@tool
def review(document_id):
    reviewer = Agent(
        system_prompt=REVIEW_RUBRIC,   # its own evaluation rubric
        # deliberately: no builder conversation history
    )
    return reviewer.structured_output(Review, load(document_id))

The reviewer sees only the result, not the process that produced it – and returns not a free-text verdict but structured findings with severity levels (critical, warning, suggestion) and a clear publish recommendation. That makes the review programmatically usable, for instance as a publishing gate.

A striking observation from practice: more complex architectures – orchestrators with sub-agents, swarms, routers – do work, but they are often harder to debug than they are useful. A few specialized agents with a clear division of labor regularly beat more complicated topologies on reliability and maintainability. The minimal topology that solves the problem wins.


Lesson 3: Open Protocols Instead of Silos

An agent that lives in only one interface is a dead end. A sustainable architecture therefore strictly separates agent logic and interface – the agent itself knows nothing about the frontend and is connected through open protocols:

Userweb interfaceAgentLLMHarnessToolsTools & Dataexternal systemsOther agentsAG-UIMCPA2A
LayerProtocol / ExamplePurpose
Agent ↔ User InteractionAG-UI (Agent–User Interaction Protocol)The open, event-based standard that connects agents to user-facing applications – enabling real-time, multimodal, interactive experiences.
Agent ↔ Tools & DataMCP (Model Context Protocol)Open standard (originated by Anthropic) that lets agents securely connect to external systems – tools, workflows, and data sources.
Agent ↔ AgentA2A (Agent to Agent)Open standard (originated by Google) which defines how agents coordinate and share work across distributed agentic systems.

Source: ag-ui.com


What Production Teaches

Five lessons that appear in no framework tutorial:

  1. Agents fail silently: A classic service throws an exception when something breaks. An agent instead returns a plausible but wrong answer – or simply goes quiet. A subtly malformed conversation history can paralyze an agent without any error message. Without observability down to the level of raw model requests, such bugs are unfindable.
  2. Evals replace unit tests: Agents are non-deterministic – the same prompt returns a different answer tomorrow. Classic tests cover the tools, but not the behavior. What helps are evaluation suites built from realistic dialogues: does the agent complete the task? Does it pick the right tool? Every prompt change and every model swap runs against them – otherwise every change is a blind flight.
  3. The loop multiplies everything: A chatbot makes one model call per answer; an agent makes five to twenty. Every inefficiency – oversized tool payloads, unnecessary reads, bloated prompts – multiplies with each loop iteration, in cost and latency. Tool design is therefore not just a quality question but an economic one.
  4. Security at the API layer, not in the UI: Anything the interface hides is still reachable via the API – and an agent with mutating tools is a powerful API client. Write protection, confirmation requirements, rate limits, and payload caps belong on the server.
  5. The model is the most replaceable component: Tool design, prompts, evals, and rubrics survive every model swap. The encoded domain expertise – in the survey example: short questionnaires, neutral wording, intelligent follow-ups instead of rigid “Other” options – is the actual core of the system.

Whoever wants to win with agentic AI in 2026 will not win with the biggest model, but with vertical domain expertise, clean tool design, and open protocols.


Further Reading


Experience Such an Agent Live

At Feedbk.ai, a builder agent following these principles can be tried directly in the browser – an AI-moderated survey takes shape in dialogue, without forms.

Try the demo now