All Engineering posts

Architecture

We didn't pick a managed agent platform. Here's the calculus.

For most SMB-facing AI products, running your own thin agent loop against an LLM API is the right call. Here's when the platforms make sense and when they're just expensive indirection.

Priyank Gandhi ยท ยท 6 min read

Every few months a builder asks why we run our own agent loop against an LLM API directly instead of using a managed platform โ€” Bedrock, Vertex AI Agent Builder, Azure AI Foundry, the Assistants API, or any of the agent frameworks that wrap them. The answer is load-bearing for how we built the rest of the product, so it's worth writing down.

What the platforms bundle

A managed agent platform is, almost universally, a bundle of seven things:

  1. Inference โ€” the actual model call.
  2. Agent loop โ€” the orchestration that takes a user message, gives it to the model with a list of tools, runs the tools the model picks, feeds results back, and loops until the model produces a final answer.
  3. Knowledge bases / RAG โ€” chunking, embeddings, vector store, retrieval, all behind a single API.
  4. Guardrails โ€” content filters, PII redaction, denied topics, hallucination flags.
  5. Compliance โ€” the audit trail and certifications you need to sell to regulated industries (HIPAA, FedRAMP, SOC 2 on the inference layer specifically).
  6. Multi-model โ€” switch between vendors without rewriting client code.
  7. Operations โ€” IAM, networking, billing, throughput reservation, capacity.

When you adopt a platform you take the whole bundle. When you build directly, you write each piece you actually need and skip the rest.

What "directly" looks like

The thin version of an agent fits in a few hundred lines of code. You hold a connection to the user, you hold a connection to the model provider, and you shuttle structured messages between them. When the model wants a tool, you call it locally and append the result. When the model emits text, you stream it. You stop when the model stops asking for tools.

That's it. No framework, no orchestration product, no DSL. Your tools are just functions. Your "knowledge base" is whichever data store fits the data โ€” for a small business's facts (services, hours, address, a few dozen pages of website content), a regular database plus full-text search is more than enough.

When the platforms genuinely earn their keep

There are real scenarios where the bundle is the right choice:

When the platforms are a tax

The opposite cases are common in SMB-facing AI products like ours:

The single useful question

The question to ask is: do you want to operate the agent loop, or do you want to outsource it?

If the agent loop is part of your product's competitive surface โ€” the prompts, the tool design, the orchestration policy, the latency budget โ€” outsourcing it is paying to be slower, more expensive, and less differentiated. If the agent loop is a commodity that you wish you didn't have to think about, the platform is doing you a favor.

For us, the prompts are a competitive surface. The tools are a competitive surface. We change them weekly. They're the difference between a chat that sounds like the business and a chat that sounds like generic AI. We're not going to outsource that.

What this means in practice

A few things follow:

The general lesson

This isn't really about Bedrock. It's about a pattern that recurs every time a new layer of infrastructure becomes hot: hosted databases, container orchestrators, build systems, observability stacks. The platforms exist because at scale, in enterprise contexts, with strict compliance, they're the right answer. They become the wrong answer when they bundle features you don't need, charge you for the bundle, and limit your ability to shape the layer that matters most.

Build small, build directly, until something in the bundle is actually load-bearing for you. Then buy that one thing.

Build with us

Want this for your business?

NovaBuildBot ships a full AI-managed site + chat assistant for your business. No code, no infra, paid monthly.

Start on Telegram โ†’