Skip to content

Agent.teach

POST /{namespace}/agents/{agent}/teach

Teach adds a rule to a Customer’s own minted Agent that binds only that Customer’s Tenant.

Noun
Agent
Mode
do
Event
Agent.taught

Inputs

InputTypeRequiredDescription
agentAgentrequiredThe minted Agent.
ruletextrequiredThe rule, in plain words.
casetextrequiredA case the rule must pass, kept with the Tenant’s cases.

Outputs

OutputTypeRequiredDescription
agentAgentrequiredThe Agent with the rule.

Effects

FactValue
Action classNone: no approval rule names it, so it runs within its seat's Permissions and Limits
StakesCustomers, who may act
DoorTwo-way: it runs at once
Modestry previews it and stores nothing; send returns a pending Action; do (default) waits for the result
IdempotentOnly with a key: a repeat with the same Idempotency-Key and input returns the first Action, the same key with other input is refused with 409, and a repeat without a key runs again
UndoAction.undo reverses it
EmitsAgent.taught
Performed byThe Engineering Lead
  • Refuses a rule that would widen what the product’s Role contract allows.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operationforbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.
A rule that would widen what the product’s Role contract allowsrefusedClear what the check names, then call it again.None.
agent is missing, or is not a agentinvalid-inputSend agent as a agent, then call it again.None.
rule is missing, or is not a textinvalid-inputSend rule as a text, then call it again.None.
case is missing, or is not a textinvalid-inputSend case as a text, then call it again.None.
The Idempotency-Key was sent before with another operation or other inputidempotency-mismatchSend a new key for new input; reuse a key only to retry the same request.None.

When it waits

GateDefault
Decision classLow: two-way, no delay window
Delay windowNone: it runs once review passes.
LimitThe call Limit of the Permission it runs under.
Over the LimitIt waits pending for an Approval, which a Human answers: the owner of record, or a Human they named to approve for the Founder seat. Approved, it runs; refused, it ends refused with limit-exceeded; unanswered by its deadline, it ends canceled.

To retry, send the same Idempotency-Key: the retry returns the first Action and runs nothing twice. A new key runs the call again.