Skip to content
For engineers

How Senri works

The architecture, the policy language, and answers to the questions engineers ask most — everything we'd put in the docs, before the docs go public.

How it works

It runs in front of your agents, not inside them

Senri is a lightweight proxy that runs on the same machine as your agent. Every request passes through it first, gets checked against your rules, and is allowed, flagged, or blocked.Your agent code doesn't need to know it's there.

1
Your agent
makes its normal calls
every request
2
Senri
checks your policy
if allowed
3
The internet
only what you permit

Senri sits in the path every request already takes. It checks each one against your policy and decides allow, alert, or block — before it ever leaves the machine.

Under the hood

It stands in the middle. When your agent starts, it picks up Senri automatically — there's nothing to install inside the agent itself. From then on, every connection it opens runs through Senri first. The agent behaves exactly as before; it just can't reach the network without passing your rules.

It can read encrypted traffic. Normally HTTPS is sealed from end to end. Senri opens it inside your own environment — like a mail room that checks each package and reseals it — applies your rules, then sends it on, encrypted as usual. The keys that let it do this never leave your machine, and you can supply your own.

Write the rules they run by

Your policy is a file you can read, review, and check into git. Senri checks every request against all your rules at once, and when more than one matches, the strictest action wins.

rules.yaml
# block one risky call — everything else is allowed
rules:
  - id: block-pr-merge
    when:
      host_suffix: api.github.com
      method: PUT
      path: /repos/*/pulls/*/merge
    action: { type: block_http, status: 403 }
01
block-pr-merge

Let the agent use the whole GitHub API, but never merge a pull request.

Senri Managed Policies

Coming soon

Don't want to write rules? Subscribe to a managed policy and stay protected on autopilot, with a curated baseline kept current for you.

Match on anything in a request

Filter on the method, host, port, path, headers, or body. Use exact matches, prefixes, suffixes, or regular expressions, combine conditions with AND and OR, and negate any of them.

Allow, alert, or block

When a rule matches, Senri can let the request through, raise an alert, or close the connection on the spot.

Keep a record of what matters

Body capture is off by default. Turn it on per rule and Senri saves matched requests with credential and PII values redacted, in storage you own with retention you control.

A few things you're probably wondering

Does it slow my agents down?

Not noticeably. Senri keeps connections open and reuses them, so most requests pass through in well under a millisecond. The only real cost is when it has to read through a large request body, which adds a few milliseconds.

How can it read encrypted traffic?

HTTPS is normally unreadable in transit. Senri can read it because it sits inside your own environment as a trusted middleman: it unlocks each request, checks it against your rules, and locks it back up before sending it on. The keys that make this work never leave your machine, and you can bring your own.

What happens if Senri stops working?

Senri can fail open or fail closed, and you choose. For local development, teams usually fail open so agents keep running even if Senri is unreachable. For sensitive environments, you can fail closed so requests stop whenever Senri isn’t watching.

What does it run on?

Linux, using Docker or a one-time install. It works with almost anything that makes normal network calls — Python, Node.js, and the tools built on them. A couple of things slip past: programs that bundle their own networking (some Go and Rust binaries) and browser-style apps, which need one extra setting.

Where does my traffic go?

Wherever you decide. Run Senri yourself and send everything to your own database or just to your logs, and nothing leaves the machine. Or connect it to our hosted backend if you’d like a dashboard and alerts without running the storage yourself.

Do I have to change my agent?

No. There’s no SDK to add and no code to write. Senri watches the network calls your agent already makes, so it works the same whether you built the agent yourself or pulled it off the shelf.

Early access

Try it on your own agents

We're onboarding a small group of early users. Get early access and we'll help you get set up.