Pick the Framework Last

This morning I went down a rabbit hole I’ve been avoiding for weeks: which agent framework should sit under the internal context layer I’ve been building?

Some background. At a contact center AI company, I run what I call our internal field operator context layer. It’s an internal app plus an MCP server that gives the people deploying our product, and the agents helping them, one place to pull account context instead of digging through Slack threads, tickets, call notes and half-finished docs. It started as a side project. Now a good part of the delivery team uses it every week. That’s when tooling decisions start to matter, because the cost of being wrong goes up.

So I lined up the options. Vercel’s AI SDK is a library: model calls, tools, streaming, a simple agent loop. Memory, evals and durable state are yours to build. Mastra is a full framework on top of the AI SDK, with memory, workflows that pause and resume, tracing, and the one that caught my eye: it can publish your agents and tools as an MCP server, not just call one. And Vercel’s own eve framework went GA a couple of weeks ago, aimed at long-running agents that live in channels and run on schedules.

All three are reasonable. And that’s the problem with starting from the framework. When every option is reasonable, the comparison chart can’t make the decision for you. What decides it is what you think you’re building.

The framework isn’t the product. The context is.

When I looked at what has actually made the context layer useful, none of it came from the agent loop. It came from four boring things:

  1. What counts as the source of truth. For any account, which system wins when the CRM, the ticket tracker and the last call disagree? We spent more time on that than on any prompt.
  2. Who’s allowed to see what. Internal doesn’t mean everyone sees everything. Deal terms, escalations and people issues all need boundaries, and those boundaries have to hold whether the request comes from a person in the app or from an agent over MCP.
  3. How fresh is fresh enough. Some context can be a day old. Some is wrong after an hour. Getting this wrong quietly is worse than getting it wrong loudly.
  4. The shape of the interface. Which tools we expose over MCP, what they’re called, and what they return. Every agent and every person downstream learns that surface. Change it carelessly and you break workflows you didn’t know existed.

None of those four live in the framework. All of them would survive a framework swap. That told me something: the framework is a replaceable layer, and I should treat it that way.

So how I’m actually deciding

Once I framed it that way, the choice got smaller:

  • For quick prototypes, I’ll keep using the lightest thing that works. Most of my proofs of concept are small Next.js apps on Vercel, and the AI SDK fits that with almost no ceremony. A prototype that needs a framework diagram to explain it is already too heavy.
  • For the context layer itself, the features that matter are the ones next to my four boring things: serving tools over MCP cleanly, tracing what an agent asked for and what it got back, and keeping memory separate from source data. That’s where a framework like Mastra earns its place, because I’d otherwise be hand-rolling those.
  • For the future, if this grows into a long-running operator that lives in Slack and does work on a schedule, that’s a different problem, and something like eve becomes relevant. I don’t need to solve that today.

One thing I’m deliberately not doing is letting a framework own the knowledge. Several tools now offer built-in stores for policies, runbooks and “knowledge.” It’s convenient, but it moves the most valuable part of the system into the part I’ve just decided is replaceable. The context stays in storage we control. The framework reads from it and serves it.

The forward-deployed lesson, again

This lines up with what I learned as a forward-deployed PM. The customers who got real value from AI agents were rarely the ones with the most sophisticated stack. They were the ones who had done the unglamorous work: they knew which system was authoritative, who could see what, and what “done” meant for a given workflow. The model and the orchestration were the easy part to swap. The operating knowledge was not.

Internal AI works the same way. Your colleagues are the customer, and the hard part is still deciding what’s true, who can see it, and what shape it takes when you hand it to an agent.

What I’d tell another team

If you’re building an internal context layer and stuck on framework choice:

  • Write down your source-of-truth rules and access boundaries before you write agent code.
  • Design your MCP tool surface like a public API, even if only three agents use it today.
  • Keep your context in your own storage. Let frameworks read it, not own it.
  • Pick the lightest framework that covers the features next to those decisions, and expect to replace it.

I’ll pick a framework this month. But I’ll pick it last, after the things that actually make the context layer worth using are written down. If you’ve been through this choice, I’d love to hear what you’d do differently.