AI data lookups
Let the AI agent answer account questions by calling an endpoint on your server with the signed-in user's verified id.
AAgent44Updated 3 min read
On this page
In one minute#
The AI agent answers from your help center. With a data lookup it can also answer questions about the user's own account ("is my subscription active?", "where's my order?") by calling an endpoint on your server while it writes its reply. You describe what the endpoint returns and when to use it; the agent decides when to call it, agent44 makes the call with the user's id, and the agent answers from what your endpoint returns.
Set lookups up in Settings › Inbox › AI data lookups (workspace admins, up to 5).
When lookups run#
Only for a user agent44 can vouch for. All of these must hold, or the agent isn't even told the lookups exist:
Your workspace enforces identity verification with a secret.
The user's id has come with a valid signature at least once.
The conversation is in your app or on the web messenger (never email, never anonymous visitors).
The id agent44 sends is the one your app identified the user with (external_user_id), and nothing else: never an attribute your app sets, and the model can't choose or change it. So a lookup can only ever return data about the person the agent is talking to.
The agent can only read: write lookups that look things up, never ones that change an account. It still hands the conversation to your team when a lookup fails, returns nothing useful, or the user needs something done.
The request#
POST /agent44/subscription HTTP/1.1
content-type: application/json
user-agent: agent44-lookups/1
webhook-id: 2f0d…
webhook-timestamp: 1795564800
webhook-signature: v1,…
{
"lookup": "get_subscription",
"workspace_id": "…",
"conversation_id": "…",
"external_user_id": "user_8f2c",
"arguments": { "order_number": "A-1042" }
}arguments holds only the arguments you declared (up to 5, each a string of at most 200 characters), filled by the agent from the conversation; leave them out if you don't need any. It's signed exactly like webhooks: check webhook-signature with the lookup's own signing secret before you answer, and refuse a webhook-timestamp more than five minutes from your clock.
The answer#
Answer 200 with JSON within 5 seconds. Keep it small and specific: the agent sees at most 8,000 characters of it.
{ "plan": "Pro (yearly)", "status": "active", "renews_on": "2027-03-01", "last_payment": "succeeded" }Return only what the agent may tell the user. Anything you return can end up in the reply.
What you return is treated as data about the user, never as instructions to the agent.
Anything but a
2xx, a timeout or a redirect counts as no answer: the agent gets{"error": "unavailable"}and usually hands off. The lookup's last error shows in Settings.
The team sees which lookups an answer used, and whether each answered, in the conversation's AI agent panel (never what they returned).
Writing a good description#
The agent picks a lookup from its description, so say what it returns and for which questions: "The user's plan, renewal date and whether their last payment went through. Use for billing and subscription questions." Name it like a function (get_subscription, find_order).
Testing#
Each lookup has Test: enter a user id from your app and agent44 calls the endpoint the way the agent would, showing how it answered. Test calls carry "conversation_id": "test".
Checklist#
Identity verification is enforced, and your apps send signatures.
Your endpoint checks the signature and looks up only
external_user_id.It returns only what the user may see, as small JSON, within 5 seconds.
It never changes anything.