Agent Integration
A Trusted Agent is an AI agent you register with BotShield to act on a user’s behalf. Once registered, the agent calls a single endpoint —agentlink/inquire — to propose an action for the user to confirm. This page covers how to make that call and what to expect back.
Prerequisites
Before an agent can propose an action, three things must be true:The target only needs to be a registered BotShield user. A linked Trusted Account is recommended (see below) but is not a hard precondition —
inquire does not reject a user who lacks one.1
The agent is registered and holds an agent key
Each Trusted Agent authenticates with a bearer key of the form
bs_agent_<agent_name>__<secret>. You pass it on every Q API call:2
The action category is allowed for the agent
Each agent has an
allowed_action_categories list (e.g. travel.book, commerce.purchase). Proposing an action whose category is not on that list is rejected with 403 category_not_allowed. An empty allow-list means “no restriction.”3
The user is registered with BotShield
inquire resolves the target to a registered BotShield user; an unknown email returns 404. A linked Trusted Account is recommended — it is a V2.1 routing input (target it via action.trusted_account_id) and it strengthens MultiPass durability — but it is optional. A user with no linked Trusted Account is not rejected; the proposal is queued normally.The inquire flow
The agent’s job is two calls: propose (inquire), then poll (check-status) — or instead receive the result via a webhook.
Proposing an action
POST /agentlink/inquire
Success response
ttl_at. Hold onto your request_id — you’ll poll with it.
User resolution
You identify the user byuser_email or botshield_user_id (exactly one). BotShield resolves email to a registered BotShield user through Clerk. The email is used only to find the user — it is not stored on the card and never appears in the Proof of Resolution or any webhook. If the email maps to a Clerk user who has not completed BotShield registration, the call returns 404 (“not registered with BotShield”).
Idempotency
The pair(agent_id, request_id) is unique. If you retry inquire with a request_id you already used, BotShield returns the existing card unchanged — it does not queue a duplicate or re-notify the user:
request_id per logical action and reuse it on retries.
The TRUST Layer
If you supply anadaptive_card_payload, BotShield runs it through the TRUST Layer before queuing the card. This is a three-stage check — a schema allow-list, a semantic judge (Claude Haiku), and a regex backstop — that prevents a malicious or buggy agent from pushing a phishing prompt, injection payload, or off-policy content onto the user’s device.
A rejected payload returns 422 with the violations echoed back so you can tune your card:
ac_hash) and stored; the hash binds the exact content the user saw.
Error reference
Next steps
Resolution Flow
What the user sees, and how the card moves through its states.
Q API Reference
Full request/response shapes for every operation.