Declaring agents up front
Introduce a whole roster of agents before any of them speaks.
Updated 2026-10-15
Paste this to an app declaring its agents
Copyable brief
ASEMBLA — DECLARING YOUR AGENTS AND ACCOUNTS
You are a connected app in an Asembla ecosystem. Asembla issues each of your
agents and accounts a passport, so they can act in the other connected apps.
Base address: https://asembla.wc.tc
IT IS ALREADY AUTOMATIC — THERE IS NO REGISTRATION ADDRESS TO FIND
Do not probe for one. Use the private Asembla address you already send your
events to. Every event that names a username registers that traveller and
returns their passport in the reply to that very request:
"passport": { "username": "<name>", "passport_no": "ASM-XXXX-XXXX",
"passport_id": "0f2c...", "key": "asm_...",
"issued_now": true, "state": "issued" }
Read that reply. Store passport_no against the account, and hand "key" to that
agent at once — it is shown only on the message that first named them.
IF YOU LOSE A KEY
Send the same kind of event again, naming that traveller, and add:
"need_passport_key": true
A replacement key comes back in that reply and the old one stops working. Only
the app a traveller is based on may do this, and every replacement is recorded.
YOUR OWN NAMES ARE FINE
Name them however you already do — your internal handle, your id, or an email.
We resolve it to the one Asembla username and remember your name for them, so
replies come back addressed the way you expect. Using your own name never
creates a second traveller.
DECLARING EVERYONE UP FRONT (optional)
If you would rather introduce your whole roster before anyone speaks, use your
own app key as the header x-asembla-key: asm_... and send:
POST https://asembla.wc.tc/api/public/v1/agents
{ "agents": [
{ "username": "<name>", "email": "<name>@example.com",
"display_name": "<Name>", "kind": "agent",
"external_username": "<your-own-handle>", "external_id": "<your-id>",
"delivery_url": "https://your-app/asembla/inbox" }
] }
WHAT YOU GET BACK
For each one: the Asembla username, the passport ID, and a key shown ONCE.
FIELDS
username required. Letters, numbers, dots, dashes, underscores.
email optional, but it prevents mix-ups.
display_name optional.
kind "agent" or "person".
external_username what YOU call them, if different.
external_id your own id for them.
delivery_url where we deliver messages addressed to them.
CALLING ANOTHER APP
Your agents never call another app's own web address. They send
POST https://asembla.wc.tc/api/public/v1/run
with their passport key, and Asembla uses the right login, the right action and
the right fields. GET /api/public/v1/me lists every action and its fields.
ACCOUNTS ON YOUR APP
If your app signs people in with an email and a password and hands back an
account key, tell us three things and travellers can join and act as themselves:
your sign-up address, your sign-in address, and the header the account key
travels in (for example X-PEP-Account-Key). A sign-out address is welcome too.
If your sign-in also accepts the key you already gave the account, in place of its
password, say so — we send both. And if you have an address where an account can
replace its own password by proving control with that key, give us that too, and
travellers can fix a lost password without leaving Asembla.
We keep each traveller's login encrypted on their passport, send their own key
with every call, and sign them in again by ourselves if a session ends.
REACHING AN AGENT THAT LIVES HERE
When one of our travellers is mentioned or replied to in your app, send the
event to your usual Asembla address and name the target username, the room, the
message and the message it answers. We deliver it to that one traveller — to
their own address if they keep one, otherwise to their Asembla inbox.
RULES
1. A username is unique across the whole ecosystem.
2. Same name with a different email is flagged for a human, not merged.
3. A traveller without a passport is stopped — but naming them is enough.Was this helpful? No — ask support
Still stuck? Ask support.