Updated 27 November 2026

Service · AI agents

# AI agents for companies: _how we build them._

An AI agent connects a language model to tools. It reads a request, works inside your systems and keeps a record of what it did. Agentic AI is the name for systems in which such agents plan and carry out tasks themselves. Even so, many AI projects never get past the pilot. Whether an agent holds up in operation depends on the context it gets and on tools with clear permissions. It also needs tests before every change and a cost cap in operation.

We use these disciplines every day in three AI products of our own. We build agents for sales, service, order handling, finance and people teams with the same method.

[Start your brief ](https://miragedigital.de/contact)[How we build agents](https://miragedigital.de/ai-agents#architecture)

ERP

CRM

Tickets

Documents

Models

Person

Agent

Point at a system

01 · Technical architecture

## Five layers carry every agent, from the server to the product

Mirage Scout, Mirage Office and Mirage Academy run on this platform. Client projects use the same building blocks, so nothing runs for the first time in your operation.

01Agents & APIs

02Model gateway

03Models & providers

04Retrieval & data

05Infrastructure

06 · Quality & observability

1. 01  
### Agents & APIs  
How agents reach your systems, signed in and logged.

  * MCP server with OAuth
  * Audit logging
  * REST APIs with OpenAPI contracts
  * CLI
2. 02  
### Model gateway  
Sits between agent and model: routing, a cost account, caps per company and models compared side by side.

  * Provider registry
  * Routing & model resolution
  * Cost ledger
  * Per-company caps
  * EU-location routing
  * Guardrails
  * Evals
  * Side-by-side model tests
3. 03  
### Models & providers  
Large models for hard steps, small models for routine work, even without a network.

  * Anthropic Claude
  * OpenAI GPT
  * Google Vertex AI & Gemini
  * Mistral
  * Open models in the browser
4. 04  
### Retrieval & data  
Where the knowledge lives that an agent searches and cites.

  * PostgreSQL 17
  * pgvector
  * OpenAI embeddings
  * multilingual-e5
  * Document ingestion worker
  * Hybrid search
5. 05  
### Infrastructure  
Operation in the EU on servers we manage ourselves, with edge delivery.

  * Docker
  * Hetzner + Coolify
  * Vercel
  * Cloudflare
  * Cloudflare R2
6. 06  
### Quality & observability  
Tests in English and German and a check before every release.

  * Playwright EN + DE
  * Lighthouse CI
  * GitHub Actions
  * gitleaks
  * Sentry

02 · Data flows

## Documents become answers with a source

What an agent knows comes from your data. Each step has courses in our Academy, named under it.

Documents

Sections

Vectors

Query

Answer with source

1. 01  
### Documents  
Your knowledge sits in documents, tickets and databases.

  * Production-Ready RAG
2. 02  
### Sections  
We split that knowledge into sections.

  * Production-Ready RAG
3. 03  
### Vectors  
We create vectors, combine semantic search with keyword search and re-rank the hits. For figures held in databases, the agent translates the question into SQL.

  * NL to SQL
4. 04  
### Query and context  
A model does not know your company. It works only with what is in its context window. We decide which instructions, facts, memories and tools go in, and measure whether each one improves the answer. Anything that adds nothing comes out, because it costs money and distracts the model.

  * Context Engineering
  * Agent Memory
5. 05  
### Answer with source  
Every answer points to its source. A test set of real questions shows after every change whether the answers got better or worse.

  * Production-Ready RAG

03 · An agent, taken apart

## An agent consists of context, model access, tools and a log

One agent run

Read the request

Plan the next step

Call a tool

MCP server · sign-in through OAuth

Check the result, plan again

Call logged

1. 01  
### Agents, tools & MCP  
An agent plans a step, calls a tool, checks the result and plans again. Every tool is an MCP server. It sets what the agent may do, signs it in through OAuth and logs every call. When a call fails, the agent tries another route or hands the task over.

  * Agentic Engineering
  * MCP
2. 02  
### Gateways, cost & operations  
Every model call runs through one gateway. It picks the right model per task, caps the cost per company and logs every call. In operation you see latency, cost and quality per task. Switching a model is a setting in the gateway, with no rebuild of the agent.

  * LLM Gateways
  * AI Observability
3. 03  
### Voice agents  
A voice agent uses the same tools, tests and limits as any other agent. It hears the request, does the task in your systems and confirms by voice what it did, in more than 70 languages.

  * Voice AI
  * Voice Agent Evaluation

[What makes AI agentic →](https://miragedigital.de/agentic-ai)[Course: Agentic Engineering →](https://academy.miragedigital.de/en/courses/agentic-engineering-design-build-and-operate-production-ai-agents-250ff7cf-7495-4281-aef6-d93fb91aca9a)[Voice agents in detail →](https://miragedigital.de/voice-agents)

04 · Decision systems

## Every decision follows a set path and a check, and unclear cases go to a person

1. 01  
### Fixed workflow  
Where the path is known, we build a fixed workflow. It costs less and is easier to check.

  * Agent Orchestration
2. 02  
### Agent loop  
We use an agent loop where the path depends on the case. Several agents share a task only when the tests show better results.

  * Multi-Agent Systems
3. 03  
### Guardrail  
Guardrails stop unsafe input, including attempts to redirect the agent through injected instructions.

  * Factuality
4. 04  
### Eval  
Before we build an agent, we write down with you what a correct answer is. That becomes an eval suite every change runs against.

  * AI Evaluation
5. 05  
### Person  
People sit at the points you choose. Where the EU AI Act asks for human oversight, it is part of the flow.

  * EU AI Act

[Four levels of autonomy, and when an agent is the wrong choice →](https://miragedigital.de/agentic-ai)

Use cases

## Agents pay back first where work waits in queues

### Order changes in the ERP

The agent reads the customer's request, checks stock and delivery date, changes the order and adds a note. Above an amount you set, a person confirms.

### Answers from documents

Policies, contracts and product data become searchable. Every answer names its source, so your team can check it.

### Invoice processing with AI

Incoming invoices are read and matched against the order and the goods received. Anything that does not match goes to the person responsible.

### AI agents for customer service

Requests are sorted in the customer's language and answered with context from the CRM and order history, or passed on with a suggested reply.

### Quotes and follow-ups

The agent puts together quotes from the CRM and the price list and reminds the team of open follow-ups. Approving and sending stays with sales.

### Numbers in plain language

Managers ask in their own words and get the numbers together with the query they came from.

[AI customer service for e-mail, chat and tickets →](https://miragedigital.de/ai-customer-service)[AI automation: rule, model or agent? →](https://miragedigital.de/ai-automation)[AI in sales: leads, call prep, follow-ups →](https://miragedigital.de/ai-sales)

Approach

## A project runs in four phases until your team takes over

This is how a project runs when you have us develop an AI agent.

Project plan

Four phases until your team takes over

1. SelectResult: a ranked list, checked against the EU AI Act.
2. PrepareResult: connected sources and a reasoned choice of models.
3. Build and testResult: an agent that passes your test set.
4. Roll out and runResult: a measured system in production that your team runs.

1. 01  
### Select  
We look at where work and money go in your operation and rank the use cases by return, effort and risk. Result: a ranked list, checked against the EU AI Act.
2. 02  
### Prepare  
We connect the data sources with their access rights, check data quality and choose model, routing and EU hosting per task. Result: connected sources and a reasoned choice of models.
3. 03  
### Build and test  
We build context, retrieval, tools and prompts, and test the agent against your bar before go-live. Result: an agent that passes your test set.
4. 04  
### Roll out and run  
The agent works in the systems your people already use. Monitoring, replay of real cases and regression tests keep it stable. Result: a measured system in production that your team runs.

Checklist

## Six questions separate dependable agents from pilots

Ask any vendor these questions, us included.

Is there a test set before anything is built?Our answer

Are options compared on real data?Our answer

What happens in unclear cases?Our answer

Who caps the cost?Our answer

Can a test spend money or send e-mails?Our answer

How are prompts and tools checked?Our answer

Cost

## The price is fixed before you sign

We agree the price once the scope is clear: one number before you sign, no hourly billing.

The effort depends mostly on how many systems we connect, the quality of the data and the languages. The risk class under the EU AI Act and who runs the system afterwards also count.

In operation, the cost of model calls comes on top. Our gateway caps it per company and shows it per task.

[An agent calls a model several times for one task: what that means for cost →](https://miragedigital.de/ai-cost)

Data and law

## Every tool call is logged, and hosting is in the EU first

Our gateway routes requests to EU locations wherever a provider offers them. Where data must not leave the building, small open models run fully offline.

Where the EU AI Act asks for human oversight, it is part of the flow. With the logs you can show a regulator or a works council how the AI behaves.

[Local AI: where your models run →](https://miragedigital.de/local-ai)

## Questions we hear

### What is the difference between an AI agent and a chatbot?

A chatbot answers questions. An agent calls tools in your systems, with permissions and a log, and reports what it did.

### AI automation or an AI agent: what is the difference?

Classic process automation follows fixed rules, while an AI agent decides within its limits which step comes next. Which step of a process needs a rule, a language model or an agent is on our AI automation page.

### Which systems can you connect?

ERP, CRM, ticketing and back office, through their interfaces. Every tool is an MCP server with scoped permissions.

### Which models do you use?

Claude, Gemini, OpenAI and Mistral for demanding tasks, and small open models where they are enough. The gateway picks the right model per task.

### What happens when the agent is unsure?

It hands over to a person. We agree with you where that line sits before go-live.

### Who runs the agent after the project?

Your team. Every project ends with a measured system in production, and we train the people who run it.

## Which work should an agent take over?

Seven short questions, about two minutes. You hear from us within 48 hours, with a time for a call or an honest no.

[Start your brief ](https://miragedigital.de/contact)[Voice agents in detail](https://miragedigital.de/voice-agents)
