Skip to content

Concept

How a request runs ​

A message to nocturn becomes a conversation with a model. The model may answer, or it may propose a tool call. A tool call is only a proposal until the permission tree, and where the tree asks, you, have decided.

The two halves ​

nocturn is one Go binary with no database and no cloud service of its own. Its source has two halves, and the line between them is the point:

HalfWhat it doesWhat it does not do
The engine (agentkit/)drives a model through tool callsit knows nothing about permissions
The boundary (internal/)the permission tree, approvals, the sandbox, the vault, the workspaceit does not trust the model

Every tool the engine is handed already checks itself against the tree. The engine cannot skip a check, because it does not contain one.

Who is asking ​

Every call belongs to a holder: a chat you are watching, a spoken session, an agent, a paired device, an extension's own code. Each holder has its own column in the permission tree, and the call is decided in that column.

The holder also decides what happens on ask:

  • A chat stops the turn and sends you an approval. Your answer can be remembered for that chat or for every chat.
  • An agent on a schedule does not wait, because nobody watches it. The call is parked as a draft with everything it would do, and the run carries on. You send, edit or reject the draft later. (park: in the agent's file changes this; an agent without a schedule waits for your answer as a chat does.)
  • A spoken session never approves anything itself. A speaker hears whoever is in the room, so its questions go to your phone.

Every way out is the same way ​

The model's own call, a script's nocturn.call(...), a plugin's fetch, an MCP server's tool: each arrives at a tool that checks itself against the same tree. A plugin's JavaScript and the scripts the model writes for code_run run in a WebAssembly sandbox with no files, no network and no environment. Their only way out is that call, limited to what the plugin declared, and it must pass both the plugin's column and the column of whoever it works for.

What leaves, and what comes back ​

When a network call is allowed, nocturn does three more things before and after it:

  1. Scans what goes out. The URL, the body and the headers are checked for any stored secret's value and for well-known token shapes. A match blocks the call.
  2. Adds the credential. If a secret belongs to that host, nocturn puts its value into the request on the way out. The model and the plugin never see it.
  3. Redacts what comes back. A stored secret in the answer is replaced with [REDACTED] before the model reads it.

Redirects are checked again at every hop, and a request that carries a named secret may not leave its host. More in Where secrets live.

Approvals have a deadline ​

An approval in the app that nobody answers is denied after two minutes, and the model is told. When no device is connected, nocturn sends a push notification if push is configured; otherwise nobody can answer and the call is denied. In the terminal chat an approval waits as long as you need. A deny is never remembered: the next call asks again.

nocturn is open source. Example hosts and people on these pages are made up.