Skip to main content

Command Palette

Search for a command to run...

Designing Systems for AI Agents

Updated
6 min readView as Markdown
B
Senior Software Architect with 30+ years of experience building enterprise systems using Java, Spring Boot, and cloud-native technologies.

We spent decades designing systems for humans.

What happens when your primary users become AI agents instead?

Most software isn't ready.

For years, software architecture has revolved around one assumption:

Humans make decisions. Software executes them.

A user clicks a button.

A backend validates the request.

A database stores the result.

An API returns a response.

The software is deterministic, predictable, and largely stateless between interactions.

AI agents completely change that model.

Instead of following predefined workflows, agents reason, plan, remember, collaborate, call tools, recover from failures, and continuously adapt.

That means we're no longer designing applications.

We're designing ecosystems where autonomous software entities operate.


The Architecture Shift

Traditional architecture asks:

  • How do users interact with the system?

  • How should services communicate?

  • How do we scale traffic?

Agentic architecture asks different questions:

  • How does an agent discover capabilities?

  • How does it decide which tool to use?

  • How does it recover from uncertainty?

  • How do multiple agents collaborate safely?

  • How do we observe reasoning that isn't deterministic?

Those questions didn't exist five years ago.

Today, they're becoming the most important design decisions.


Think Beyond APIs

Traditional systems expose APIs.

Agent systems expose capabilities.

Instead of:

POST /orders

An agent thinks:

"I need to create an order."

Then discovers available tools:

  • CreateOrder

  • SearchInventory

  • EstimateShipping

  • ValidatePayment

  • NotifyCustomer

The interface becomes semantic instead of procedural.

Instead of calling endpoints directly, agents choose capabilities based on context.

This requires APIs to become:

  • self-describing

  • discoverable

  • machine-readable

  • version-aware

The future isn't API-first.

It's capability-first.


Context Becomes Infrastructure

Traditional applications treat context as temporary.

Agents treat context as memory.

An agent may need to remember:

  • previous conversations

  • earlier decisions

  • business constraints

  • user preferences

  • failed attempts

  • retrieved documents

  • external knowledge

Suddenly, context is no longer just prompt engineering.

It's infrastructure.

Modern systems need multiple layers of memory:

Short-term

Current conversation.

Working memory

Active task state.

Long-term memory

Persistent knowledge.

Organizational knowledge

Documentation, policies, architecture decisions, code repositories, tickets, and databases.

Without effective context management, even the smartest LLM behaves like someone suffering from amnesia.


Every Tool Is a Distributed System

When an AI agent calls a tool, it isn't making a simple API request.

It's orchestrating distributed systems.

One task may involve:

  • ERP

  • CRM

  • payment gateways

  • email services

  • Slack

  • GitHub

  • databases

  • cloud storage

  • vector search

One reasoning step may trigger dozens of network calls.

Failures become normal.

Timeouts become expected.

Partial success becomes common.

Agent platforms therefore need:

  • retries

  • idempotency

  • circuit breakers

  • compensation

  • rollback strategies

  • observability

Ironically, many "AI problems" are actually classic distributed systems problems.


Trust Requires Explainability

Traditional applications rarely explain why they made a decision.

Agents must.

Imagine an AI approving a $500,000 loan.

Would you trust:

"The model said yes."

Probably not.

Instead, organizations need:

  • evidence used

  • confidence scores

  • source citations

  • reasoning summaries

  • policy references

  • decision history

Explainability isn't a nice-to-have.

It's a production requirement.


Permissions Must Become Dynamic

Traditional RBAC assumes humans.

Agents are different.

They may:

  • act on behalf of users

  • delegate tasks

  • collaborate with other agents

  • temporarily elevate permissions

  • call external systems

Permissions become contextual.

Questions evolve into:

Can this agent:

  • read this document?

  • execute this tool?

  • spend this budget?

  • modify production?

  • approve payments?

Identity, authorization, and auditing become central architecture concerns.


Multi-Agent Systems Need Coordination

One agent rarely solves everything.

Imagine an enterprise platform:

Planner Agent

Research Agent

Coding Agent

Testing Agent

Deployment Agent

Monitoring Agent

Incident Response Agent

Now architecture looks less like microservices and more like an intelligent workforce.

The challenge isn't creating agents.

The challenge is coordinating them.

That requires:

  • task routing

  • shared memory

  • conflict resolution

  • event orchestration

  • workflow recovery

  • governance

We're moving from Service-Oriented Architecture to Agent-Oriented Architecture.


Observability Gets Harder

Traditional monitoring tracks:

  • latency

  • CPU

  • memory

  • requests

  • errors

Agent systems require much more.

We need visibility into:

  • reasoning paths

  • tool selection

  • prompt versions

  • retrieved knowledge

  • token usage

  • decision chains

  • hallucination rates

  • recovery attempts

Logs become conversations.

Tracing becomes reasoning graphs.

Dashboards become execution timelines.


Designing for Failure

Agents will make mistakes.

That's guaranteed.

Good systems assume:

  • hallucinations happen

  • tools fail

  • APIs change

  • context is incomplete

  • users give ambiguous instructions

  • models disagree

Production-ready agent systems include:

✅ Human approval checkpoints

✅ Safe fallback workflows

✅ Retry strategies

✅ Rollback mechanisms

✅ Guardrails

✅ Continuous evaluation

Reliability isn't achieved by making AI perfect.

It's achieved by making failures recoverable.


What Architects Should Focus On

Instead of asking:

Which LLM should we use?

Start asking:

  • How will agents discover capabilities?

  • Where does memory live?

  • How is context managed?

  • How do agents collaborate?

  • How are permissions enforced?

  • How are decisions audited?

  • How do we observe reasoning?

  • What happens when an agent is wrong?

Those questions will shape the next generation of software architecture.


Final Thoughts

The biggest misconception about AI is that it's just another feature.

It isn't.

It's a new execution model.

Over the past two decades, we've evolved from monoliths to microservices, embraced cloud-native platforms, adopted event-driven architectures, and built resilient distributed systems.

Now we're entering another transformation.

We're designing systems where software doesn't simply execute instructions—it makes decisions, coordinates actions, and collaborates autonomously.

The architects who succeed won't be the ones who choose the best model.

They'll be the ones who build the best systems around the model.

Because in the age of AI agents, architecture is no longer just about software.

It's about designing environments where intelligence can operate safely, reliably, and at scale.


What architectural principle do you think will matter most in the era of AI agents—context, memory, observability, governance, or something else? I'd love to hear your perspective.

More from this blog

B

Bill LIao's Blog

137 posts

A technical blog on modern backend development, software architecture, and practical AI agent workflows