Send only what the model needs. Keep a receipt of why.

Runtime defense for AI agents: deterministic, in milliseconds, before every model call.

Measured on the prompt-injection benchmark

  • Attack success rate

    −91%

    with Next Moca, mean of three runs

  • Task completion

    +18.5

    points more work completed under attack

  • Model spend

    −31%

    on the same tasks, before any Next Moca fee

  • Runtime check

    11 ms

    median round trip

Means across our three runs of AgentDojo, ETH Zurich's prompt-injection benchmark, October 2026: 949 attacked tasks per arm on GPT-4o (twice) and 5,040 paired runs on Gemini 2.5 Flash, each against a same-day baseline with no defense. Round trip from the 5,040-run study.

How it works

One API call to secure your agent-model communication

One call sits between your agent and every model call. It takes tool results, documents, memory and messages, and hands the model what the step needs, word for word.

  1. 01

    Select

    Keeps the records this step needs. Nothing is rewritten or summarised.

  2. 02

    Scan

    Attacks that arrive inside what the agent reads, from an instruction planted in a document to a tool result an attacker wrote, are quarantined before the model sees them.

  3. 03

    Enforce

    Your policies run on every call, in front of the guardrails and gateways you already use.

  4. 04

    Record

    A receipt for every decision: what was sent, what was set aside, and why.

Recorded call · Support assistant, one doc page poisoned

“I deleted a user with auth.admin.deleteUser but their old access token can still call my API. Why is that happening and how can I stop it?”

11 of 81records sent
3,924of 28,174 tokens kept
27 msto decide

Every page the answer needs was kept. The forum post carrying the attack never reached the model.

Recorded call with TypeSafe AI's Jev on TypeSafe's RAG cookbook: 81 pages of Supabase auth docs, one a planted prompt injection. See real recorded calls

Get started

Up and running in minutes. Under ten lines of code.

SaaS

Call our API from your stack in under ten lines of code.

pip install needlepath-langchain
from langchain.agents import create_agent
from needlepath_langchain import NeedlepathMiddleware

# NEEDLEPATH_API_KEY is read from the environment. Nothing else in the agent changes.
agent = create_agent(model, tools, middleware=[NeedlepathMiddleware(operating_point="np-2026-10-r6")])

answer = agent.invoke({"messages": [("user", "Which Corvane Freight purchase orders are still open past their delivery date?")]})

On-prem

Runs inside your network. Your data never leaves it.

Talk to founders
Questions

Four answers before you decide.

What does Next Moca do?

Before each model call it screens what your agent is about to read, keeps the records the step needs, quarantines attacks that arrive in them, applies your policies, and returns a receipt. Nothing in your agent code changes.

Does it rewrite or summarise my documents?

No. The model reads your own records, word for word. Whole records are kept or set aside; none is rewritten.

What happens when it is not sure?

When Next Moca cannot prove a smaller context is safe, the whole set goes through unchanged, so what you risk on that call is paying full price.

Does it replace my guardrail or gateway?

It runs in front of them. Your guardrail reads less and finishes faster, and your gateway gets a receipt on every call.

Talk to one of our founders

About fit, and how this applies to your business.

Prefer a calendar? Book a time

We handle your information as described in our Privacy Policy.