Skip to content
Kavachकवच

Agent Modes: suggest

● Intermediate2 min

suggest: every capability call waits for a person to approve it.

agent Refunder {
    settings AgentSettings(mode: AgentMode.Suggest, audit: Audit(file: "audit.log"))
    …
}

The program ran and printed:

refused: Denied(reason: "not approved by a person")refused: Denied(reason: "limit broken: amount <= 500")Refunder request#1 Payments.refund(order: 1, amount: 400)  verdict: not approved by a person  result: denied: not approved by a personRefunder request#2 Payments.refund(order: 2, amount: 900)  verdict: refused (limit broken: amount <= 500)  result: denied: limit broken: amount <= 500
the agent: Kavach code, then what running it prints

Each call asks a person. This program runs outside a project, with no terminal, so no one can be asked and the 400 refund is refused at once. The 900 refund breaks the limit, so it is refused before anyone would be asked.

In a project, a request waits for an answer instead, at the terminal or from kavach approve, as an approval does.