You write a rule, permissions or a budget in your own words.
You write one sentence, in any language. Paidwen translates it into an exact rule, permissions or a budget, reads it back to you, and replays it on the actions of the last 30 days. Nothing changes until you confirm. A model writes the draft, and it never decides an action: the decision point evaluates the exact rule, as for any rule you write in CEL.
The rule form takes a sentence or the code.
In Rules, Create rule opens two fields:
- Plain language. Type your sentence, then Translate. The exact condition in CEL appears in Condition, with the verdict and the approval group. For example:
Faire valider par Finance tout remboursement au-dessus de 500 $- Condition. Write the condition in CEL yourself, then Check. Paidwen reads it back and replays it without the model, and a check never counts in the drafts of the day.
Under the condition, both show:
- the reading, written from the exact rule by fixed code, never by the model;
- the actions of the last 30 days that the rule would have touched, by agent and by tool;
- the warnings: a rule that would have touched half of the actions or more, a rule that would have touched none, actions that do not carry a field that the condition reads, and a tool that no action used.
A change to the condition, the verdict or the group hides the reading until the next Check. Create rule creates the rule in the mode you choose, active by default. In observation, the rule records what it would do and blocks nothing. The rule keeps your sentence in source_text, unless you changed the code after the translation.
The Permissions tab of an agent and its budget in Settings take a sentence the same way. A draft of permissions shows what it adds and what it removes, and the past actions that it would have refused. A draft of a budget shows the days its limits would have stopped the agent.
The API returns the same draft.
POST /v1/drafts
Content-Type: application/json
{"text": "Refunds over $1,000 must be approved by Finance"}{
"kind": "rule",
"text": "Refunds over $1,000 must be approved by Finance",
"rule": {
"name": "Refunds above 1000 need Finance",
"condition": "tool.name == \"payments.refund\" && params.amount > 1000",
"verdict": "require_approval",
"mode": "active",
"approval_group_id": "0199f1c2-0000-7000-8000-00000000f001",
"source_text": "Refunds over $1,000 must be approved by Finance"
},
"reading": "When the tool is `payments.refund` and the parameter `amount` is greater than 1000, Paidwen asks `Finance` to approve the action before it runs.",
"complete": true,
"preview": {"scanned": 4812, "matched": 37, "failed": 2, "truncated": false},
"warnings": [
{"code": "absent_field", "text": "On 2 actions, the condition reads a field that the action does not carry, so the rule does not apply to them."}
]
}Send rule to POST /v1/rules to create the rule, permissions to PUT /v1/agents/{agent_id}/permissions, or budget to PATCH /v1/agents/{agent_id}. Add agent_id to the request when the sentence is about one agent.
To check a rule written in CEL, send it in rule instead of text. The answer is the same draft, with an empty text:
POST /v1/drafts
Content-Type: application/json
{"rule": {"condition": "tool.name == \"payments.refund\" && params.amount > 1000", "verdict": "block"}}A sentence that Paidwen cannot write exactly gets 422, with the reason, and a rule that does not compile gets 400. An organization writes up to 100 drafts from a sentence a day, then gets 429 until the next day in UTC. When the model does not answer, the API returns 503: write the condition in CEL instead.
The model sees your vocabulary, never your data.
The model receives the names of your agents, teams, approval groups and tools, and the names of the parameters of your tools. It never receives the value of a parameter, a line of the journal or a key. Paidwen uses gpt-oss-120b through Groq, whose terms forbid training on the inputs and outputs.
Writing in plain words has six limits.
- The model can be wrong. The reading and the replay show the mistake before you confirm, but only you confirm.
- The model does not know the values of your parameters: "in euros" becomes
"EUR"by guess. The replay shows whether past actions carry that value. - With more than 100 agents, the model receives only the agents that your sentence names.
- The replay reads at most the last 100,000 decisions of the 30 days.
- The reading is in English. A part of a condition that it cannot say stays in CEL.
- The drafts of all organizations share the limits of the model: when it is busy, the API returns
503.