How We Build AI Agents with Memory, Embeddings, Workflows, Reranking, Local Models, and MCP

Peacekeeper builds production AI agents with long-term memory, embeddings, reranking, workflow orchestration, local models, and MCP servers. See PasClaw.dev for a live example.

We build AI agents for a living. Not chatbots wrapped around a single prompt — real agents with memory, retrieval, reranking, tool use, and durable workflows. Some run in the cloud, some run entirely on your laptop or on-prem hardware. All of them ship.

One agent we orchestrated is live at PasClaw.dev — an AI pair programmer for Delphi and C++Builder developers that reasons about real Pascal codebases.

What a real AI agent stack looks like

A production agent is not a single model call. It is a small system:

  • A planner that decomposes a goal into steps
  • Memory so the agent remembers what happened last turn, last session, last month
  • Retrieval so it can pull the right context from millions of documents
  • Reranking so the top results are actually the right ones
  • Tool use so it can call APIs, run code, query databases, and browse
  • A workflow layer that survives crashes, retries, and long-running jobs

We build every one of these layers.

Memory and long-term context

Agents without memory are demos. We give agents persistent memory backed by a vector store plus a structured store for facts, preferences, and prior decisions. Short-term working memory lives in the context window; long-term memory is retrieved on demand and re-ranked before it reaches the model.

Embeddings and retrieval

We build custom embedding pipelines — chunking, metadata, hybrid search (BM25 + vector), and per-tenant isolation. We run OpenAI embeddings when latency and quality dominate, and local embedding models (BGE, Nomic, Qwen) when data cannot leave the building.

Reranking for precision

Raw vector search returns "close enough." A cross-encoder reranker turns that into "correct." We deploy rerankers locally (bge-reranker, Cohere Rerank when cloud is fine) so agents cite the right passage, call the right tool, and stop hallucinating around near-misses.

Workflow orchestration

Real agents run for minutes or hours across dozens of tool calls. We use durable workflow engines so an agent can pause, resume, retry a failed step, branch on human approval, and pick up exactly where it left off after a deploy. No lost state, no half-finished jobs.

Local AI models

We run local models when privacy, cost, or latency demands it — Llama, Qwen, Mistral, Gemma, and Stable Diffusion / Flux / LoRA for image work. We deploy on your workstation, on a Runpod GPU, on your on-prem server, or on a mini cluster. Same agent code, different execution target.

MCP servers and tool use

We build MCP servers so agents can talk to your internal systems the way Claude Code and Codex already talk to their tools — filesystem, git, databases, ticketing, CI, whatever the agent needs. Standard protocol, one implementation, works across every MCP-aware client.

A shipped example: PasClaw.dev

PasClaw.dev is a working AI agent we orchestrated for the Delphi and C++Builder community. It understands Pascal semantics, navigates real projects, and produces code suggestions grounded in the developer's actual codebase — not generic autocomplete. It is a live proof that the stack above is not a slide deck.

How to start

If you have an agent idea — internal copilot, customer-facing assistant, autonomous workflow, on-prem AI for a regulated environment — we can scope it in a week and ship a working prototype shortly after. Start a project and tell us what the agent needs to do.

Frequently asked questions

+What is an AI agent versus a chatbot?
A chatbot answers one message at a time. An AI agent plans, remembers, uses tools, retrieves information, and executes multi-step workflows to achieve a goal.
+Can you run the agent entirely on-prem?
Yes. We deploy local models, local embeddings, local rerankers, and MCP servers on your own hardware so no data leaves your environment.
+What is MCP and why does it matter for agents?
MCP (Model Context Protocol) is a standard for connecting agents to tools and data sources. Building an MCP server once lets your agent work with Claude Code, Codex, and any other MCP-aware client.
+How long does it take to ship a working agent?
We typically deliver a working prototype within a few weeks and iterate from there. Complex agents with heavy workflow and tool integration take longer, but we ship in slices, not big-bang releases.

Ready to ship?

How We Build AI Agents with Memory, Embeddings, Workflows, Reranking, Local Models, and MCP