Architecture
9 min read

How do AI systems work?

An AI system exposes tools and resources that an AI client can discover and call safely.

Published June 3, 2026

Client and server roles

An AI system deployment usually has two main parts: the client and the server. The client is the AI application the user interacts with. It sends user messages to the model, decides when external capabilities are needed, and calls integration methods on behalf of the user. The server is the integration layer that connects those calls to real systems.

This split is intentional. Clients should focus on conversation, tool selection, and user experience. Servers should focus on authentication, business rules, data access, and safe execution. When these responsibilities blur, systems become harder to debug and harder to secure.

In local development, the client and server often run on the same machine. In production, the server may run as a managed service, a container, or a remote process accessed over a secure transport. The protocol stays the same even when the deployment model changes.

Discovery and capability listing

Before a model can use a server, it needs to know what the server offers. The connection layer handles this through capability discovery. The client asks the server to describe available tools, resources, and prompts. Each tool includes a name, description, and input schema. That schema is critical because it tells the model what arguments it can send.

Good server descriptions are written for model selection, not just human documentation. A vague description like handle data creates ambiguity. A precise description like search customer tickets by email and return the five most recent open tickets gives the model a much better chance of choosing correctly.

Discovery is not a one-time event. Servers can expose different capabilities depending on user permissions, environment, or connected accounts. That means the client should refresh capabilities when context changes, especially in multi-tenant or enterprise settings.

Tool calls and structured responses

When the model decides to use a tool, the client sends a tool call request to the server with structured arguments. The server validates those arguments before doing any work. Validation should happen server-side even if the client also checks input, because the server is the trust boundary.

After validation, the server executes the action or fetches the data. The result should be returned in a structured format the model can reuse. Unstructured walls of text can work occasionally, but structured JSON fields make downstream reasoning much more reliable.

Errors should also be structured. Instead of returning a generic failure, the server should explain whether the problem was invalid input, missing permissions, unavailable dependencies, or a temporary outage. Useful error messages help the model recover or ask the user for the missing information.

Resources and context design

Resources let a server expose readable context without forcing an action. Examples include policy documents, account summaries, repository files, or recent activity logs. Resources are especially useful when the model needs background information before choosing a tool.

Context design is one of the most underestimated parts of AI system architecture. Too little context leads to weak answers. Too much context increases cost, adds noise, and can push the model toward unsafe or irrelevant actions. The best servers expose layered context: lightweight summaries by default, with deeper detail available on demand.

Resources should have clear ownership and freshness expectations. If a document was updated five minutes ago, the server should expose that fact. If a resource is static reference material, say so. Context without provenance makes models overconfident.

Transport, auth, and deployment

AI systems can run in multiple environments, but every deployment needs a transport layer and an authentication story. Local servers often use simple process-to-process communication during development. Production systems typically require authenticated remote access, secret management, and audit logging.

Authentication should map to real user or service identity. A server should not simply trust any client that can reach it. Instead, it should verify who is calling, what tenant they belong to, and whether they are allowed to invoke the requested tool. This is where Connected workflows connect directly to enterprise security requirements.

Deployment choices depend on latency, compliance, and operational maturity. Some teams run servers centrally for shared business systems. Others run user-scoped servers close to local files or developer environments. The protocol supports both, but the operational model determines what safe usage looks like.

Testing and observability

Reliable AI systems are tested with realistic prompts, not just unit tests on helper functions. You should create evaluation cases that mirror actual user requests and verify that the model selects the right tool with valid arguments. This catches ambiguous descriptions and weak schemas early.

Observability is equally important. Log tool invocations, permission failures, latency, and downstream API errors. When a user says the assistant got it wrong, you need to know whether the model chose poorly, the tool returned incomplete data, or the upstream system failed.

The best teams treat AI systems like product surfaces. They version tool contracts carefully, document breaking changes, and monitor usage patterns to decide which tools deserve more investment. That discipline turns AI integrations from a demo integration into durable infrastructure.

Local development versus production patterns

During development, builders often run an AI system locally while iterating on tool schemas and descriptions. This tight feedback loop makes it easy to test prompt behavior, inspect raw responses, and fix validation issues quickly. Local development is where most tool naming and schema mistakes are discovered.

Production introduces new requirements: stable uptime, authenticated access, rate limiting, monitoring, and version management. A server that works on a laptop is not automatically ready for a team of fifty users. Production rollout should include staged deployment, rollback plans, and explicit ownership for maintenance.

Many successful teams keep a small set of approved production servers while allowing experimentation in sandbox environments. That separation protects business-critical workflows without blocking innovation.

Document environment differences clearly so builders know which credentials, endpoints, and data sets are safe to use during testing. Clear environment boundaries prevent accidental production changes during routine development.

As usage grows, rotate credentials on a schedule and review which tools require elevated permissions. Security maintenance is part of operating AI systems, not an optional late-stage task.