Agents
An agent is the unit you protect. It can be a chatbot, a tool-using LLM in your backend, an autonomous worker, or a human operator running scripts. Whatever it is, you give it an identity and Detecte tracks every action it attempts.
Properties
| Field | Description |
|---|---|
id | Stable identifier (agent_…). Generated. |
name | Human-friendly name (support_bot, treasury-rebalancer). |
description | What the agent does. Surfaced in the dashboard. |
tier | low | medium | high | restricted. Set by the KYA battery; can be overridden manually. |
declared_capabilities | Tools the agent is allowed to use. Used for policy matching. |
risk_score | A rolling 0–100 score Detecte computes from recent decisions and anomalies. |
Registering an agent
Auto-registration happens the first time you verify() with a new agent name in test mode. In production, register explicitly:
const agent = await detecte.agents.create({
name: "support_bot",
description: "Customer-facing refund and account agent",
declared_capabilities: ["refund_order", "lookup_account"],
});Tiers and the KYA verification
Tiers come from the KYA (Know Your Agent) test battery. Run it once when you ship a new prompt or new toolset:
detecte scan agent_support_botThe battery probes the agent for prompt-injection resistance, jailbreak susceptibility, capability boundary respect, and seven other categories. Output is a 0–100 score, a tier, and a signed JWT credential valid for 30 days.
When the credential expires, Detecte will automatically downgrade the agent's tier — you re-run scan after each major prompt change.