Check before acting
antes_de_actuarLook up the user's stored rules, procedures and past mistakes that apply to an action the agent is about to take, and return a verdict based on the level the user set for those rules.
Intended for actions that reach someone else (an email, a message, a
post, sharing a document), commit the person (paying, quoting a price,
accepting a meeting, signing), cannot be undone (deleting, cancelling,
filing, submitting), touch something shared or official (a client
record, the accounts, a government portal, the production system),
carry sensitive data, or act in the person's name. Reading, searching
and drafting are outside its scope.
With `consultar=True` NEXUS looks up rules and procedures; with
`consultar=False` it records the agent's assessment that nothing needed
looking up, and still returns any serious past mistake it holds for
that action. Each call is logged as an evaluation for the account.
Returns `evaluacion_id`; `situaciones` (each with its name, the level
the user set, what to watch for and its rules, with the mistake that
created each one); `procedimientos`; `vigencia_segundos` (how long a
verdict that allows the action stays valid, 0 otherwise);
`texto_para_el_agente` (the same, as short text in the account's
language); and a `veredicto`:
- "proceder": no stored rule objects to the action;
- "proceder_con_lista": the action is allowed with the returned list
applied;
- "preguntar_a_la_persona": the user's rules require their confirmation
for this action;
- "no_hacerlo": a rule the user set forbids this action, including other
ways of reaching the same effect; only the user can approve it.
record_procedure_usage records the outcome of a returned procedure.
Args:
accion: The action about to be taken, described in plain words.
intencion: Why: what was asked and which part of the work this is.
objetivo: Who or what it is done to (a client, a case, a patient, a
channel, a project, a repository).
riesgo_percibido: The agent's own assessment: whether it can be
undone, who it reaches, whether there is an agreed way or a rule.
consultar: True to have NEXUS look up rules and procedures; False to
only record that the agent judged it unnecessary.
clave: The key given by a stop point (hook), if one stopped the action.
herramienta: The tool about to be called, if any.
detalle: Optional exact text (the email, the command). Stored
truncated and with secrets masked, never whole.
session_id: The agent's NEXUS session id, if any.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| clave | No | ||
| accion | Yes | ||
| detalle | No | ||
| objetivo | No | ||
| consultar | No | ||
| intencion | No | ||
| session_id | No | ||
| herramienta | No | ||
| riesgo_percibido | No |