# Agentic AI Engineering — Production agents, measured on every run

> We build the gateway, the managed runtime and the evaluation loop around your agents — so every prompt, model and tool change ships with evidence, not guesswork.

Service 02 of Majily LLC: **AI Strategy & Agentic Implementation**. Engagement: project-based build, with an optional retainer for the improvement loop. [Request this engagement](https://majily.com/consultation/?service=ai-strategy).

## The architecture

One gateway. A managed runtime. A loop that learns. The managed-agent pattern — hosted runtime, sandboxed tools, durable sessions — deployed in your own cloud, behind a gateway you control, with an evaluation plane wired into every trace.

1. **Clients** — your products (web, mobile, API), internal tools (back office, chat) and other agents (MCP, A2A).
2. **Agent gateway** — one front door: auth and tenancy, intent routing, model fallbacks, budgets and limits, policy and PII filters.
3. **Managed agent runtime** — an orchestrator with specialized sub-agents (research, act, review); durable sessions and memory, sandboxed tool execution, human approval steps.
4. **Models, tools, data** — multi-provider models, MCP servers and internal APIs, retrieval and the warehouse.
5. **Evaluation plane** — every trace flows into online evals, datasets, experiments and reviewed improvements, which flow back into prompts, models and routing.

Built on LangChain, Deep Agents, LangSmith, Langfuse, Model Context Protocol (MCP) and Vertex AI.

## Four layers, each with its own job

### 01. Agent gateway
A single front door for every user, system and agent. It authenticates the caller, works out what they need and routes the request to the right agent, model or tool — with budgets, policy and tracing on every call.
- Routing across models and providers, with fallbacks
- Per-tenant budgets, rate limits and an audit trail
- Policy checks and PII filtering before anything leaves

### 02. Managed agent runtime
Agents run as a service, not a script: sessions that survive restarts, tools executed in sandboxes, memory scoped per user, and human approval wherever an action needs it — in your cloud, next to your data.
- Long-running sessions, queues and retries
- Sandboxed code and tool execution; MCP for every integration
- Approval steps for actions that touch money, data or customers

### 03. Compound AI systems
We compose models, retrieval, deterministic code and specialized sub-agents instead of betting on one giant prompt. Each component has its own contract and its own evals, so you can improve one without breaking the rest.
- Orchestrator and sub-agents with LangChain Deep Agents
- Retrieval and tools grounded in your own data
- Small models where they suffice, frontier models where they matter

### 04. Evaluation plane
Quality is measured, not assumed. Every trace is scored online, failures become datasets, and every change to a prompt, model or tool is an experiment before it is a deploy.
- Heuristic checks and calibrated LLM judges
- Versioned datasets and offline experiments
- A/B tests in production, guarded by online evals

## Evaluation is the product

Models update, data drifts, prompts get edited. We make quality a measured property of the system — and give it a loop that keeps improving it.

1. **Trace everything.** Every run, span, tool call, token, cost and latency is captured, so any answer can be replayed and explained. In LangSmith or Langfuse — hosted, or self-hosted when data can't leave your cloud.
2. **Online evals: heuristics.** Fast, deterministic checks on every response: schema validity, tool-call correctness, citations present, policy and PII rules, cost and latency budgets.
3. **Online evals: LLM judges.** Rubric-based judges score what heuristics can't — task success, faithfulness to sources, tone. We calibrate them against human labels so their scores mean something.
4. **Datasets from production.** Failures, edge cases and judge disagreements are promoted into versioned datasets: the golden set every future change has to pass.
5. **Experiments and A/B tests.** Prompt, model and tool variants run offline against those datasets, side by side. Winners go to production behind an A/B split, watched by the same online evals.
6. **Continuous improvement.** Trace analysis clusters failures and drafts the fix — a prompt change, a routing rule, a new tool guard — then runs it as an experiment. An engineer reviews the evidence and ships it.

## Running in production

- [Agentic AI for Capital Markets Research](https://majily.com/case-studies/capital-markets.md) — 6 agents · 60+ tools, with full tool-call traceability.
- [Tiltmeter](https://majily.com/case-studies/tiltmeter.md) — API drift detection that opens the fixing pull request; 84 PRs · 20 merged in its public test.
- [Callsign](https://majily.com/case-studies/callsign.md) — an open messaging network where AI agents from different labs message each other over MCP.

## Service overview

**Who it's for:** teams taking agents from demo to production — or already in production without a clear view of quality, cost and latency.

**Typical deliverables:**
- Agent gateway: routing, fallbacks, budgets, policy and tracing
- Managed agent runtime with sandboxed tools, MCP integrations and approval steps
- Online evaluation with heuristic checks and calibrated LLM judges
- Datasets, offline experiments and A/B tests for prompts and models
- Automated trace analysis with reviewed improvement proposals

**Engagement model:** project-based build · retainer for the improvement loop.

## Questions we get

### Which models and providers do you work with?
Whichever fit the job. The gateway is provider-agnostic: it routes between hosted frontier models and smaller or open-weight models, with fallbacks, and we choose per task based on your evals rather than habit.

### Do we need LangSmith or Langfuse?
We build on them rather than reinvent them. Traces, datasets and experiments live in the tool that fits your security and hosting requirements — including self-hosted Langfuse when data can't leave your cloud.

### How do you keep LLM judges honest?
Each judge gets a written rubric and is calibrated against human-labelled examples before it gates anything. We track agreement between judge and humans over time and re-calibrate when it drifts.

### We already have agents in production. Where do you start?
With the traces. We instrument what you have, switch on online evals and build the first dataset from real failures — the fastest way to see where quality is actually lost.

Every engagement starts with a 45-minute discovery call with a senior engineer — free. [Schedule a technical consultation](https://majily.com/consultation/).

---

*Markdown version of [https://majily.com/agentic-ai/](https://majily.com/agentic-ai/) · [Español](https://majily.com/es/agentic-ai.md) · Index for AI agents: [llms.txt](https://majily.com/llms.txt) · Whole site in one file: [llms-full.txt](https://majily.com/llms-full.txt)*
