Blogs

Meet Nasiko: The Open Runtime for AI Agents

Karan Bharadwaj, Head of Product and Co-founder

Launch art: “The Open Runtime for agents starts now” and the Nasiko wordmark beside an exploded stack of glowing layers, the Nasiko mark on the top layer.

AI agents are multiplying. What started with one engineer experimenting with a prompt is now spreading across entire organizations. Every team is adopting different frameworks, tools, and vendors, with each running inside its own closed runtime.

Claude Code meters Claude Code. Cursor meters Cursor. But nothing gives you a complete picture across all of them.

And that leaves three pretty fundamental questions unanswered:

Which agent did that? Whose agent is it? And what did it cost?

That's what we built Nasiko to solve.

Nasiko is an open runtime that sits underneath the agents you're already running. With a single command, it discovers the coding harnesses and agent frameworks on your machine, including Claude Code, Codex, Cursor, and OpenCode, and registers each one.

No wrappers. No SDKs in your code path. No changes to how you work.

From that point on, every model call and tool call passes through a single place. And that gives us the foundation to do some pretty interesting things.

See: One Cost Schema Across Every Vendor

The first step is visibility.

Every call is attributed to an agent, a team, a model, and a provider. Instead of sampling usage from live traces, we write everything to a durable usage store.

The result is a consistent view of usage across your entire agent ecosystem. The numbers reconcile with your vendor invoices, and you can break down spend by agent, team, model, or provider.

No more piecing together usage data from a dozen different dashboards.

Nasiko TokenOps Monitor, Drivers tab: a spend concentration bar showing Code Reviewer at 32.4% of spend, a token mix of prompt and completion tokens, a table of which agents drive cost with spend, share, change and cost per operation, and a cost-versus-performance scatter plot.

Cut: Token Optimization, Layer by Layer

Here's something we've found particularly interesting: a significant portion of what you spend on agents is actually context they don't need.

So we built an optimization layer into Nasiko that works on every request before it reaches the model. It does this in four steps, in a specific order.

1. Select the right context.

Most systems default to recency truncation. Keep the last N conversation turns, discard everything else. That works until you have a long-running session where the information you actually need happens to be buried much earlier in the conversation.

We take a different approach.

Nasiko uses query-aware selection. Conversation turns, memory entries, and tool outputs become a pool of candidates. We then select the subset that best covers the current request, within a hard token budget.

Under the hood, this is a submodular optimization problem. A lazy-greedy algorithm lets us find a near-optimal subset efficiently, with an approximation guarantee.

And the results are pretty compelling.

At a 45% token budget on long sessions, our approach retains 97.2% of the evidence needed to answer a request. Traditional recency truncation retains just 0.3%.

You can read the research here.

2. Compress what survives.

Once we've selected the relevant context, we compress each item individually.

The process is deterministic and reversible, with no additional LLM calls. We first flatten structured data losslessly, and only fall back to lossy compression when necessary.

The ordering matters. We select first and compress second, because there's no point spending compute compressing context we're going to discard anyway.

3. Send only the tools that matter.

As agents become more capable, the number of tools they have access to keeps growing.

But an agent with dozens of tools doesn't need every tool definition included in every model request.

Instead, the Nasiko gateway searches for the relevant tools. We use semantic search by default, with BM25 as a fallback when no embedding model is configured.

In our evaluation across 2,491 queries and 2,547 tools, semantic search placed the correct tool in the top 15 results 86.1% of the time.

That means significantly less unnecessary tool context being sent to the model.

4. Generate lean.

This one's straightforward.

Output tokens generally cost more than input tokens. So we use a brevity instruction to keep responses concise.

The goal is simple: pay for the answer, not the padding.

And importantly, we measure the impact of every optimization.

Each layer records token counts before and after processing, so we know exactly where savings are coming from. Those savings roll up by agent, team, and model, using the same schema as your overall spend.

Nasiko TokenOps Optimize view: “Saving ~62% of history tokens” over the last 30 days, with ~67.5M tokens without optimization, ~25.9M sent, ~41.6M saved and about $47.18 of input not billed, above a daily bar chart of tokens sent versus saved.

Control: One Gateway for Every Tool Call

Visibility and cost optimization are important, but they're only part of the problem.

As agents take on more responsibility, we also need to control what they're allowed to do.

Nasiko routes every tool call through a single gateway, where permissions can be defined at the individual agent and tool level.

Each decision is straightforward: allow, ask for approval, or block.

If a call requires human approval, the agent pauses until that approval is provided.

And the same approval model works whether the agent is invoked through the gateway or directly from chat.

One consistent control point, regardless of how the agent is being used.

Open, by Design

We made Nasiko open source for a reason.

We believe the runtime for AI agents should be open and independent of any individual vendor, including us.

You should be able to use whichever harness works best for you, connect to any model, and change either without losing your agent configurations, cost history, or policies.

That flexibility becomes increasingly important as the agent ecosystem evolves.

And it's something we believe should be built into the infrastructure from day one.

Try It

Getting started takes one command:

curl -fsSL https://registry.nasiko.com/r/nasiko/install-ee | bash

Run it on your machine, and Nasiko discovers what's already running, registers your agents, and starts tracking their costs in minutes.

No changes to your existing workflows. No need to rebuild anything.

Use any harness. Reach any model. Measure every token.

Get started