Skip to content

AI & automation

AI agent development services: RAG and MCP in production

AI development services: agents that look up company data and carry out tasks in your systems, with tested quality and usage cost under control.

Free first conversation · Reply within 1 business day

Facts behind this service

  • DIAL, for The Hackett Group (NASDAQ: HCKT): 74 pages and 27 API routes on Claude

  • Mirador: generative AI with Claude and OpenAI behind a provider abstraction

  • Zorbit (own product): AI coding agents orchestrated with ~74 MCP tools

  • Contas Casal (own product): LLM assistant with RAG and a semantic cache

Recognize this situation?

  • The agent impresses in the demo but fails on real data, and nobody can measure answer quality.

  • The agent gets lost in long tasks: it forgets what it already decided, fills the context window and repeats expensive model calls.

  • The LLM bill grows every month, with no visibility of cost per flow, model or customer.

  • Security and legal are holding the launch over prompt-injection and data-leak risk.

What we deliver

  • AI agents with planning and subagents

    AI agents with planning and subagents

    Agents that plan long tasks, act on your systems (tool calling), delegate parts to subagents with isolated context and reuse skills, with human approval at decision points.

  • Harness and context engineering

    Harness and context engineering

    We design the harness around the model (loop, tools, permissions, rules and checks) and what enters the context: short-, medium- and long-term memory, compaction, token budget and handoffs.

  • Orchestration with LangGraph, Deep Agents and Mastra

    Orchestration with LangGraph, Deep Agents and Mastra

    A single agent or a multi-agent system, with routing between agents: we choose LangChain, LangGraph, Deep Agents, Mastra or the Vercel AI SDK for the problem and your team's stack.

  • RAG with hybrid search and reranking

    RAG with hybrid search and reranking

    The model answers from company documents and databases and cites the source: chunking, embeddings, a vector store (pgvector), hybrid search, reranking and structured queries for tabular data.

  • MCP servers and tool calling

    MCP servers and tool calling

    MCP (Model Context Protocol) is an open standard for connecting agents to systems: servers that expose ERP, CRM and APIs as tools and resources, with per-tool permissions and audit trails.

  • Multi-provider layer and caching

    Multi-provider layer and caching

    Model swaps by configuration (Claude, OpenAI, Gemini), routing per task and fallback across providers; prompt caching and semantic caching cut latency and token cost.

  • Evals, datasets, metrics and traces

    Evals, datasets, metrics and traces

    A versioned dataset of real and edge cases, evals in CI with LLM-as-a-judge, and traces in OpenTelemetry, LangSmith or Langfuse: quality, latency and cost per task on every change.

  • Guardrails and prompt-injection defense

    Guardrails and prompt-injection defense

    Input and output validation, sanitized LLM responses and adversarial tests before every release, so the agent neither leaks data nor follows instructions hidden in the content it reads.

  • Machine learning and data science

    Machine learning and data science

    Supervised models for classification, regression and forecasting, validated on held-out data; fine-tuning and reinforcement learning (RLHF, RL with verifiable rewards) only when an eval shows a gain.

See also: AI for e-commerce, software architecture consulting, and AI training for engineering teams.

How an AI agent worksThe agent plans, uses tools and memory, and only answers after passing the checks. If a check fails, it goes back to the plan. Every step leaves traces with cost, latency and quality.
failed: back to the planRequestperson or systemPlanningplan and subagentsTools and MCPAPIs, search, RAGChecksevals and guardrailsAnswerwith human approval

Results and experience

  • The Hackett Group (NASDAQ: HCKT)

    Scope:
    AI architecture and engineering

    DIAL: architecture and delivery of the AI-native data-strategy platform, on Anthropic Claude.

    • 198releases in 8 weeks
    • Data-assessment engine with 65 endpoints behind a tenant-isolated proxy
    • LLM output sanitization and STRIDE threat modeling

    Read the case study

  • The Hackett Group (NASDAQ: HCKT)

    Scope:
    AI architecture and engineering

    Mirador: generative-AI application engine, with Claude and OpenAI behind a provider abstraction.

    • Multi-provider: Claude and OpenAI, with runtime model selection
    • Prompt-injection defenses and an audit trail of the system prompt
    • In the same program: ~380 cross-browser Playwright E2E cases

    Read the case study

Facing a similar challenge? Tell us the problem and the timeline.

Request a first call

Free first conversation · Reply within 1 business day

Who it is for and who it is not

AI & LLM engineering is AI agent development for companies: assistants built on LLMs, the technology behind ChatGPT, that look up company data and carry out tasks in your systems, with quality tests, safety limits and cost under control. Hire it when the AI use case is already clear and what is missing is making it run safely.

A good fit for

  • CTOs and engineering leaders who need an agent, a RAG system, a copilot or a machine learning model in production with measurable quality.
  • B2B companies with their own data and systems (ERP, CRM, APIs) that the model must query or act on.
  • Teams that already have a prototype and need a harness, evals and guardrails to scale it.
  • US companies that want senior AI engineering in an overlapping time zone, working in English.

Not a fit for

  • Anyone looking for an off-the-shelf chatbot with no system integration: a SaaS tool does that for less.
  • Projects with no owner on the client side to validate answers and acceptance criteria.
  • Foundation-model training or academic research: we apply machine learning to business problems.
  • Teams that need dozens of people staffed immediately: we deliver senior engineering on a defined scope, not staff augmentation.

How it works and timelines

  1. Discovery

    Discovery

    We read the code, the data and the business goal, and map use cases, integrations and risks. You receive an assessment with the target architecture, the plan and the estimate.

  2. Specification and evaluation criteria

    Specification and evaluation criteria

    Specs, ADRs and acceptance criteria before the first line of code. We build the evaluation dataset: real questions, expected answers and adversarial cases. You approve what will be measured.

  3. Proof of concept

    Proof of concept

    One end-to-end flow on real data, measured by the evals. You receive a working PoC, the evaluation results and a recommendation to proceed, adjust or stop.

  4. Production

    Production

    Short iterations with frequent releases: integrations, guardrails, evals, traces and minimum test coverage as a condition for every release. You receive the system in production, with CI/CD.

  5. Operate and hand over

    Operate and hand over

    We track quality, latency and cost through the traces, document the system and prepare your team to run it. You receive the documentation and the dashboards; evolution can continue under a monthly retainer.

Typical ways to engage this service
ScopeTypical timelineEngagement model
AI discoveryUse cases, data, target architecture, plan and estimate1–2 weeksFixed-scope project
Proof of conceptOne end-to-end flow on real data, with a dataset and evals2–4 weeksFixed-scope project
ProductionAgent, RAG or MCP server integrated with your systems, with guardrails, evals, traces and CI/CD6–12 weeksFixed scope or time & materials with a cap
Ongoing evolutionNew flows, with quality and cost overseen by a part-time (fractional) AI architectOngoingMonthly fractional retainer

Timelines are typical ranges. Discovery defines the scope and the estimate of each project; the contract can be in USD or BRL.

Want to know which format fits your project?

Request a first call

Free first conversation · Reply within 1 business day

Technical details

How we use AI with governance, the decision comparison and the stack

AI with governance

We build AI products and we use AI to build them. The same rules apply to both: specs before code, a harness with rules and checks, automated evals and human review of decisions.

  • Where AI comes inAI coding agents (Claude Code, Codex, Cursor, Copilot, OpenCode) implement from approved specs, following Spec-Driven Development, inside a harness of rules, skills and quality hooks.

  • What humans reviewArchitecture, ADRs, acceptance criteria and every merge go through senior human review; in the product, sensitive agent actions require human approval.

  • Quality gatesA merge only happens with automated tests passing, the coverage target met and CodeQL static analysis passed.

  • Evals in CIThe evaluation dataset runs on every prompt, model or tool change, with code checks and LLM-as-a-judge; a quality regression blocks the release.

  • Traces in productionEvery run becomes a trace (OpenTelemetry, LangSmith or Langfuse) with the model calls, tools, tokens and cost of each step.

  • Guardrails and dataValidated and sanitized LLM output, prompt-injection defenses and per-tool limits; client data never trains models, and we work under NDA.

Decision comparison

RAG, fine-tuning, tool-using agent, fixed workflow or machine learning: when to use each approach
ApproachWhen to use itWhat it requiresMain risk
RAGThe model must answer from company data that changes oftenChunking, embeddings, hybrid search, reranking and evals of retrieval and answersPoor retrieval yields a wrong answer that looks right
Fine-tuningStable tone, format or task, when an eval shows a gain over prompt and contextA curated dataset, evals before and after, and retraining on every changeStale knowledge and maintenance cost
Tool-using agent (MCP)The model must act on systems: query, create or update recordsA harness with scoped permissions, autonomy limits and auditingUnintended actions without guardrails or human approval
Fixed workflow with an LLMThe steps are known and the model only classifies, extracts or summarizesDeterministic orchestration and tests per stepLittle flexibility outside the planned path
Supervised machine learningClassify, forecast or estimate from labeled historical dataLabeled data, data science and validation on held-out dataAccuracy drops when the data pattern shifts

Stack and integrations

  • Claude
  • OpenAI
  • Gemini
  • MCP
  • LangChain
  • LangGraph
  • Deep Agents
  • Mastra
  • Vercel AI SDK
  • pgvector
  • OpenTelemetry
  • LangSmith
  • Langfuse
  • Hugging Face
  • Python
  • TypeScript

Frequently asked questions about AI & LLM Engineering

Should we use RAG or fine-tuning?

In most cases, RAG: it queries current company data on every question, cites the source and needs no retraining when information changes. Fine-tuning pays off when the problem is tone, format or a very specific, stable task, and only when an eval shows a gain over prompt and context. Combining both is common, and discovery shows which approach your case calls for.

What are context engineering and harness engineering?

Context engineering is deciding what enters the model's window at each step: short-, medium- and long-term memory, compaction, the token budget and handoffs between agents and sessions, so the agent is more accurate and costs less. Harness engineering is everything around the model, such as tools, permissions and checks; the term has its own guide: “What Is Harness Engineering for AI Agents?”.

LangChain, LangGraph, Deep Agents or Mastra: which should we use?

It depends on the problem and on your team's stack, and the choice is recorded in an ADR. LangGraph fits stateful flows with persistence and human approval, designed as a graph; Deep Agents, built on LangGraph, adds planning, subagents and skills for long tasks; LangChain provides the building blocks; Mastra and the Vercel AI SDK suit TypeScript teams. For autonomous AI agents such as OpenClaw and Hermes Agent (Nous Research), we set up permissions, channels and scheduled tasks.

How do you measure an AI agent's quality (evals, datasets, traces)?

With a versioned dataset of real and edge cases, automated evals on every prompt, model or tool change, and a trace of every run in production. Evals combine code checks, human review and LLM-as-a-judge, and a regression blocks the release. Traces in OpenTelemetry, LangSmith or Langfuse show accuracy, latency, tokens, cost per task and hand-offs to a person. For an agent that already exists, this measurement is the first step of discovery.

Do you do machine learning and data science, not just LLMs?

Yes: when the problem needs its own model, we apply data science and supervised learning (classification, regression and forecasting), validated on held-out data. LLM fine-tuning and reinforcement learning (RLHF, RL with verifiable rewards) come in only when an eval shows a gain over prompt and context, because they cost more to maintain. We do not train foundation models: our focus is solving business problems.

How do you protect an AI agent against prompt injection?

With layered defenses: system instructions isolated from external content, input and output validation, sanitized LLM responses and least-privilege permissions per tool. Sensitive actions require human approval, and adversarial tests run in CI before every release. On Mirador, The Hackett Group's generative-AI engine, we implemented prompt-injection defenses and an audit trail of the system prompt.

How much does it cost to build a production AI agent?

It depends on three factors: the number of integrations, the quality of the data and how much autonomy the agent has. That is why we do not publish a price list. A 1–2 week discovery defines scope, risks and estimate, and the proposal can be fixed scope or time & materials with a cap, in USD or BRL. Beyond development there is the recurring token cost, which we forecast, monitor per model and reduce with prompt caching and semantic caching.

Who does LLM consulting and RAG development for production systems?

Master Timm builds production AI agents, RAG systems and MCP servers from São Paulo, Brazil, for companies in the United States and Brazil. For The Hackett Group (NASDAQ: HCKT), we designed and delivered the DIAL data platform and Mirador, a generative-AI engine on Claude and OpenAI; both are in our case studies. Whoever designs the architecture also writes the code, with nothing handed off to a junior team.

About Master Timm

Master Timm

AI-focused IT consultancy

Get to know Master Timm

Senior engineering from discovery to delivery: whoever designs the architecture also writes and reviews the code.

  • 20+ years of software engineering experience
  • Projects for US and Brazilian companies, under B2B contracts
  • Specs, tests and documentation in the client's repository
  • Fixed scope, capped time & materials or retainer, in USD or BRL

Why Brazil

  • São Paulo is 1–2 hours ahead of US Eastern Time, so working hours overlap.
  • We work in English: calls, specs and documentation.
  • Remote B2B work for US companies since 2022.
  • Scope, ownership and confidentiality are set in the contract before work starts.

Master Timm · Updated on

Let's assess your AI use case

In the first conversation we look at the use case, the data and the integrations, and tell you plainly whether it calls for an agent, RAG, a machine learning model or none of them.

Request a first call

Free first conversation · Reply within 1 business day