Minimal Agent Primitives

Eleven primitives for building agents in production, from model routers to evals. Three gaps stay open: identity, governance, and continuous learning.

Manoj BajajJanuary 11, 2026Updated August 12, 2026
agentsharness-engineering

The agent stack I actually use (and the pieces still missing)

Every few weeks someone asks me what an agent is and what you need to build one. I used to open a slide. Now I open a list.

Here is the stack I use when I build. Each layer is a primitive. Some layers are mature. Some are duct tape. Three do not really exist yet.

Model and model router

You do not pick one model anymore. You pick a routing strategy. LiteLLM gives me an OpenAI-compatible shim across every provider. OpenRouter gives me access to more than 500 models behind one key. For cost-sensitive routing I watch RouteLLM. If you lock yourself to a single model, you write a migration into next quarter's roadmap.

Agentic loop

This is what makes an agent an agent. Read the goal. Pick the next step. Act. Observe. Repeat. LangGraph, CrewAI, the Claude Agent SDK, and OpenAI's server-side primitives all implement this in different ways. Most teams write their own 40-line loop or adopt a framework. For production I still write my own. Frameworks bury the control flow you need when you debug.

Tools

Tools are the atomic unit of execution: bash, grep, read_file, patch_file, web_fetch. One tool is one verb. The best agents I have built use fewer, stronger tools, not one tool per API endpoint. MCP is becoming the standard wiring here, and that is good.

Skills

Skills are the newest primitive, and most people underestimate them. Anthropic formalized them as SKILL.md: a folder of instructions the agent loads only when the task matches. A tool is a hammer. A skill is how a carpenter frames a wall. I split mine into technical skills (how to use the Google Workspace CLI, how to write a Dockerfile) and business skills (how we write LinkedIn posts, how we structure a pitch). Tools are the what. Skills are the how.

Prompts

System prompts still hold most of an agent's personality. Prompt drift is real. Version them. Diff them. When something regresses, bisect by prompt before you bisect by model.

Scheduler

This layer is the least built. Agents that run only when a human types are assistants, not agents. You need cron, triggers, or event queues that can wake the agent every hour to check an inbox. Temporal and Inngest handle this well in production. Most agent frameworks do not ship a scheduler, so you bolt one on.

Interfaces

TUI, web, Slack, Discord, email, iMessage. The interface is a thin skin. Pick two, not six. I keep seeing teams burn a quarter on a custom web UI when a Slack app would have shipped in a week.

Memory

This is the hardest unsolved layer. A Memory.md file gets you most of the way for a single user. Honcho goes further with a peer-centric, theory-of-mind layer. It builds a behavioral profile of the user, not only a fact store. The trap: if you call an LLM on every memory recall, you add 500 to 2000ms and non-determinism to every step. Treat memory as infrastructure, not prompt engineering.

Tracing

Use LangSmith if you are deep in LangChain. Use Langfuse if you want open source and OpenTelemetry. Use Braintrust or Arize if you lean evals-first. You cannot debug a multi-step agent without a trace viewer. Print statements stop working past five steps.

Evals and RL

This is where the moat is forming. Evals were optional in 2024. By 2026 they are the product. The loop I aim for is production traces, then curated golden sets, then offline evals, then RL environments, then model updates. Vendors like HUD, Mercor, and Invisible build the RL-environment layer. Without evals you have no feedback loop. You fly blind on every prompt change.

Infra: sandboxes and secrets

e2b is the default for code-execution sandboxes. Modal, Daytona, and Northflank are solid alternatives. Secret management for agents is still oddly manual. I have not seen a clean Vault for agents yet. That leads to what is missing.

What is still missing

Three gaps remain.

Agent identity and auth

RSAC 2026 shipped five agent-identity frameworks. Every one of them skipped the delegation-chain problem. When an agent spawns a sub-agent that makes a purchase at 3 AM, who authorized what? Short-lived tokens expire mid-run. Nobody has a clean story for 90-minute workflows.

Action governance

Identity tells you who ran an action. Governance tells you whether they should have. Today only about 28% of teams can trace an agent action back to a human sponsor across all environments. That is a non-starter for regulated industries.

Continuous learning

Everyone talks about RL. Very few teams have the pipeline that closes the loop from production trace to eval to reward signal to model update. The teams that build that pipeline first will compound faster than everyone else.

If you build today, the eleven primitives above are table stakes. If you invest, bet on the teams that solve those three gaps, not on the next agent framework.

That is the stack. Twelve layers. Nine of them mature. Three of them wide open.