DocsGovern AI agentsEvaluate: the one call

Evaluate: the one call

Whatever built your agent, this is the integration surface. One call, one verb back.

http
POST /v1/workspaces/:ws/evaluate
Authorization: Bearer mnx_ask_...
json
{
  "action": "payment.refund",
  "resource": { "type": "customer", "id": "c_481" },
  "principal": "sarah@acme.test",
  "amount": 4500,
  "reason": "duplicate charge reported in ticket 8812",
  "reads": ["evt_9f21"]
}
json
{
  "decision": "escalate",
  "reason": "no rule forbids this, but payment.refund of 4500 is somebody's to authorize: the Finance Manager approves refunds up to 5000",
  "approvers": [
    {
      "id": "manager@acme.test",
      "because": "the Finance Manager approves refunds up to 5000",
      "limit": 5000
    }
  ],
  "policies": ["fact_7c1e"],
  "context": [{ "id": "evt_9f21", "content": "..." }],
  "constraints": ["never refund without a ticket"],
  "missingContext": [],
  "withheld": 0
}

The caller never has to model the organization to use this. An agent platform, a one-file script and a bought-in AI worker all integrate the same way.

The six answers

Decision

allow

Proceed

deny

A rule forbids it. Final, and nothing widens it

ask

Approval is required and nobody is named

escalate

Approval is required and the organization names who gives it

delegate

The actor may act but may not know. Somebody who can, owns it

clarify

Context is missing and nobody available can supply it. Go and ask

Three layers, and none speaks for another

  1. 1

    The runtime decides whether a rule forbids it

    Deterministic, with no model in the path. Its refusal is final and nothing above widens it.

  2. 2

    The organization decides who could authorize it

    From verified authority facts, at the size the action actually is. Only verified facts count; a candidate authorizes nothing.

  3. 3

    The clearance decides how much of the answer you are told

    Filtered to what this grant, narrowed to its principal, is entitled to know.

This is why an action can be allowed by every rule and still come back as an escalation. No policy file knows that refunds above five thousand are the Finance Manager's to authorize. The organization does.

The fields that carry weight

Field

amount

Compared against two things: an authority's ceiling here, and any aboveAmount rule in the runtime. Omit it and the ceiling matches anything while the rule applies anyway, because an action that will not say how big it is cannot prove it is small

principal

Who the agent acts for on this call. Decides whether it may act alone

reads

Fact ids the action relies on. Checked against the clearance, which is what produces delegate and clarify

withheld

How much bearing evidence you were not shown. Non-zero means ask a person

constraints

Limits to carry into whatever you do next, from the grant and from policy

The open-source client

bash
npm install @memnox/organization
ts
import { MemnoxOrganization, mayProceed } from "@memnox/organization";
 
const memnox = new MemnoxOrganization({
  token: process.env.MEMNOX_GRANT,
  workspace: "acme",
});
 
const answer = await memnox.evaluate({
  action: "payment.refund",
  resource: { type: "customer", id: "c_481" },
  principal: "sarah@acme.test",
  amount: 4500,
  reads: factIds,
});
 
if (mayProceed(answer)) {
  await stripe.refunds.create({ /* ... */ });
}

Apache-2.0, and deliberately thin. It is the protocol and nothing else: no tools, no execution, no copy of the organization. It never fails open, so a call that cannot reach Memnox throws rather than returning a permissive default.

Three ways in

Which one you use depends on what you already have, not on what Memnox prefers.

  1. 1

    HTTP or the SDK

    For an agent that already knows how to reach its tools. Send identity, intent and resource; act on the verb. Nothing else changes.

  2. 2

    MCP

    For an AI-native agent. Point it at POST /v1/workspaces/:ws/mcp and it gains the tools below without anybody writing an integration.

  3. 3

    Ask grants per agent

    Every agent gets its own credential, with its own ceiling, its own principal and its own stated restrictions. Revoking one takes effect on that agent's next question.

Memnox does not need your agent's connectors. It needs to know who is asking, who they represent, what they intend and what they are relying on.

The tools an agent sees over MCP

Tool

organization_context

What the company knows that bears on a question

who_owns

Who owns a system or an area, and through which decision

what_was_decided

Approved decisions on a topic, so an agent does not re-decide one

get_policy

The verified rules for a subject, with who confirmed each

get_person

What somebody may authorize, what they own, how they stand to others

check_permission

Should this happen. Also how approval is requested

which_agent_should_handle

Which agents this company runs for an action, tightest remit first

what_happened_last_time

How the same action was routed before, and to whom

can_i_share

May this be repeated to this person, answered against their clearance

Precedent is the one of these that reads the organization's own behaviour rather than its statements. A decision is what the company wrote down; this is what kept happening. Three escalations to the same person is a rule nobody got round to writing, and an agent that can see it stops re-litigating a settled question. It reports the verb, who it went to, and the reason each asker gave, never what any of those answers contained.

The client, in full

bash
npm install @memnox/organization

Call

evaluate

Should this happen, and what may I know while doing it

context

What does the company know that bears on this

owner

Who owns this, and through which decision

decisions

What has already been decided about this topic

policy

Which verified rules apply here

person

What may this person authorize, and up to what

agentsFor

Which agents this company runs for an action

precedent

What happened the last times this action was asked about

canShare

May I repeat this to them

require

Evaluate, and throw unless it is a plain allow

Nothing there writes, and it never fails open: a call that cannot reach Memnox throws rather than returning a permissive default.

Every one of them is a read. There is no tool that writes: an MCP server that could change the organization would be an agent, and Memnox governs agents rather than being one.

Everything is recorded before the runtime sees it

Each question and each routing appends to the ledger with the agent, its principal, what was asked, and how much was withheld. The question is kept in the agent's own words; the answer is only counted, because a ledger that quoted answers would be a second copy of everything sensitive a reader was allowed to see.

POST/v1/workspaces/:ws/evaluateagent

Should this happen, and what should the agent know

POST/v1/workspaces/:ws/mcpagent

The same answers over the Model Context Protocol

POST/v1/workspaces/:ws/ask/grantsadmin

Mint an agent's credential. Returned once

DELETE/v1/workspaces/:ws/ask/grants/:idadmin

Revoke it. Takes effect on the next question

GET/v1/workspaces/:ws/ledgerviewer

What agents asked, and where their work went

When somebody has to take it

An escalation or a delegation opens a handoff: the work waits for the person it names, and they are told. It is deliberately not an approval. An approval asks whether an action may proceed and the runtime owns that; a handoff asks whether somebody will take it. An approval that lapses blocks an action, a handoff that lapses is a person who never picked something up, and counting them together would hide the second behind the first.

Only somebody it was offered to may answer, and only once.

GET/v1/workspaces/:ws/handoffsviewer

Work waiting on a person, opened by routing

POST/v1/workspaces/:ws/handoffs/:idviewer

Accept, finish or decline work handed to you

See Organizational state for where the authority behind an escalation comes from, and Need to know for what decides how much of an answer an agent is given.