BUILD WITH KOBBY

A useful agent.
A thoughtful integration.

Connect your service to Kobby Messenger, work with the permissions people choose, and bring your agent to the store.

Developer guide · English · Updated November 21, 2026

Start here

An agent is an external service that receives signed events from Kobby and calls its Bot API. The protocol calls agents bots; those names refer to the same integration. You can use any language that supports HTTPS, JSON, standard base64, and HMAC-SHA256.

01 / CONNECTReceive consent

Publish an HTTPS webhook and exchange a one-time connection code.

02 / RESPONDHandle an event

Verify the signature, queue the work, and send a conditional reply.

03 / SHAREList your agent

Describe its purpose, pricing, and permissions. Add it through an action link.

  1. Set up a public HTTPS webhook on port 443. Its URL must have no user information, query string, or fragment. Redirects and private, local, or service IP addresses are rejected.
  2. Configure a trusted Kobby API origin in your service, such as https://messenger.example.com, without /api/v1. Do not derive it from an unverified event.
  3. Implement bot.connected, code exchange, signature verification, and private credential storage.
  4. In Kobby, open Settings → Bots → Add bot. Enter the webhook, keep automatic connection enabled, and explicitly choose chat access or action permissions.
  5. Check the connection with GET /api/v1/bot/me. Use a second test account to send an incoming plain-text message in an allowed open personal chat.
  6. Test retries, revocation, stale replies, and permission removal before preparing a store listing.

No messenger password is needed. Your service receives a scoped bot token after the user confirms the connection. Webhooks continue to work while the user's phone or browser is closed.

Identity & permissions

A bot acts as the owner of its connection. Replies have that user's sender_id and a server-assigned bot_id. A connection does not create a separate human account.

Personal message access is limited to selected chat_ids in unencrypted cloud chats, or an explicit all_personal_chats: true grant. Several chats with the same person have separate IDs. Legacy conversations without a chat ID are unsupported. DH and OTP content and keys are never available to bots.

Optional permissions
PermissionWhat it allows
audio.readReceive and download voice messages in allowed open personal chats.
contacts.createAdd a contact to the connection owner's address book.
chats.createCreate an open personal chat for the owner.
groups.createCreate a public group owned by the user.
channels.createCreate a public channel owned by the user.
communities.joinJoin the owner to an existing public community as a member.
messages.process_incomingPrivately process new incoming text in independently selected unencrypted personal chats, groups, and channels. Does not grant reply or publication rights.
messages.process_outgoingProcess unsent text drafts in independently selected unencrypted personal chats, groups, and channels. The client requires a preview before the author sends a result or the original.

Creating a chat does not automatically add it to ordinary chat_ids. Creating or joining a group does not grant group reading: experimental group participation uses separate consent records and API routes. Message processing has its own URL, enable switch, and chat scope for each direction; its permissions alone do not enable processing.

A bot may connect with an empty chat list if it needs only action permissions. all_personal_chats includes current and future open personal chats, but does not grant audio.read, group access, or encrypted content.

Outgoing owner messages do not trigger ordinary incoming webhooks. Messages from other bots are skipped unless the user enables allow_bots; use loop protection if your service supports it. The action permissions do not provide arbitrary unsolicited bot broadcasts, contact deletion, contact renaming, private-community creation or joining, or role changes.

Consent can change. Read the granted scope from the connection exchange and /bot/me. A link requests permissions; only the user's confirmation grants them. Revocation prevents future access but cannot erase data already delivered to your service.

Connect your agent

Automatic connection is enabled by default in the new-bot UI. When creating a bot through the user API, explicitly send auto_connect: true; omitting it creates a manual connection. Existing manual connections are not migrated automatically.

1. Receive bot.connected

After confirmation, Kobby sends a signed event even when chat_ids is empty. The example uses placeholders for IDs; real bot IDs are 32 hexadecimal characters and event IDs and connection codes are 64.

Connection event · json
{
  "version": 1,
  "event": "bot.connected",
  "event_id": "<64-hex event ID>",
  "bot_id": "<32-hex bot ID>",
  "owner_id": "alice",
  "permissions": ["contacts.create", "chats.create"],
  "all_personal_chats": false,
  "chat_ids": [],
  "connection_code": "<64-hex one-time code>",
  "expires_at": 1791800000
}

The code is valid for ten minutes from the first delivery attempt. Retries use the same event ID and code, with a fresh timestamp and signature. A failed, expired connection gets a new event and code; incomplete credentials are revoked.

2. Exchange the code

Generate a random exchange_id with 32 lowercase hexadecimal characters, and save it durably for this event before making the request. Send to your configured API origin. This endpoint does not use a Bearer token.

Code exchange · http
POST /api/v1/bot/connect
Content-Type: application/json

{
  "bot_id": "<bot_id from the event>",
  "event_id": "<event_id from the event>",
  "code": "<connection_code from the event>",
  "exchange_id": "<persisted random 32-hex ID>"
}
Successful exchange · json
{
  "bot_id": "<32-hex bot ID>",
  "owner_id": "alice",
  "event_id": "<64-hex event ID>",
  "api_token": "<private bearer token>",
  "webhook_secret": "<private signing secret>",
  "permissions": ["contacts.create", "chats.create"],
  "all_personal_chats": false,
  "chat_ids": [],
  "client_context": null
}

The response is HTTP 200 with Cache-Control: no-store. Retry a lost response or HTTP 503 using the exact same ID and body, including after a process restart. The same claim returns the same credentials until expiry. A different claim, expired or invalid code, disabled bot, or deleted connection returns HTTP 401; wait for a new connection event instead of guessing new IDs.

3. Verify, save, acknowledge

Use the returned new secret to verify the original raw webhook body and timestamp. Match the bot, owner, event, permissions, and chat scope against the trusted exchange response. Persist the verified credentials privately before returning 2xx. Rotation requires this new exchange; an old secret alone is insufficient.

Both a successful exchange and a 2xx acknowledgement are required. Returning 2xx without exchanging the code does not connect the service. Delivery times out after ten seconds; retries back off from two seconds to fifteen minutes. Queue subsequent business work durably and acknowledge promptly.

Changes and manual connections

Settings changes, enabling, and credential rotation invalidate previous credentials and initiate a new automatic connection. Changing the webhook URL never sends the old secret to the new address. Pending connections hold message delivery. Disabling or deleting a bot denies exchange and API access.

In manual mode, the user transfers credentials through a private administrative channel. Create/rotate responses use {bot, token, webhook_secret}; the client export calls the token api_token. Automatic mode returns {bot} without secrets. Never place credentials in action links, screenshots, public listings, or browser storage.

User-session management API

These routes require a normal authenticated user session, not a bot token. An external agent should use the consent flow instead of asking for that session.

RoutePurpose
GET /api/v1/botsList the user's connections and status, without secrets.
POST /api/v1/botsCreate with id, name, url, chat_ids, enabled, allow_bots, permissions, auto_connect, all_personal_chats. Use a random 32-hex ID.
POST /api/v1/bots/updateUpdate settings without changing owner or supplying secrets.
POST /api/v1/bots/rotateRotate credentials with {"id":"…"}.
POST /api/v1/bots/deleteDelete with {"id":"…"}.

On update, permissions: [] revokes all action rights; omitted or null preserves them. Rotation preserves configured rights. Optional client context is accepted on create, update, and rotate.

Verify webhooks

Kobby signs the exact request bytes with HMAC-SHA256. Verify before accepting work. Keep the body as bytes; parsing and re-serializing JSON changes the signature input.

Signature headers · http
X-Kobby-Timestamp: <Unix time in seconds>
X-Kobby-Event-ID: <same event_id as the JSON body>
X-Kobby-Signature: sha256=<hexadecimal HMAC>
Verify a signature · python
import hashlib
import hmac
import time


def verify_signature(raw_body: bytes, timestamp: str,
                     signature: str, webhook_secret: str,
                     now: float | None = None) -> bool:
    # Apply a request-body size limit in your HTTP server as well.
    if not timestamp.isascii() or not timestamp.isdigit():
        return False
    if len(timestamp) > 12:
        return False
    current = time.time() if now is None else now
    if abs(current - int(timestamp)) > 300:
        return False
    if not signature.isascii():
        return False
    signed = timestamp.encode("ascii") + b"." + raw_body
    digest = hmac.new(
        webhook_secret.encode("utf-8"),  # Literal secret, not bytes.fromhex().
        signed,
        hashlib.sha256,
    ).hexdigest()
    return hmac.compare_digest("sha256=" + digest, signature)

Use a five-minute timestamp tolerance and a constant-time comparison. Then validate the JSON version, event type, bot and owner IDs, header/body event ID, chat, message route, and both trigger IDs. A correct signature alone does not replace these checks. For a connection event, first obtain the secret through the trusted code exchange.

After verification, insert a durable pending job with a unique (bot_id, event_id) key and acknowledge 2xx. A duplicate delivery should acknowledge the existing job. Return 5xx if durable storage fails. Do expensive AI and speech processing in a worker.

Incoming personal message · json
{
  "version": 1,
  "event": "message.created",
  "event_id": "<64-hex stable event ID>",
  "bot_id": "<32-hex bot ID>",
  "owner_id": "alice",
  "chat_id": "<chat ID>",
  "sender_id": "bob",
  "text": "Hello",
  "reply_to_message_id": "<incoming message ID>",
  "if_last_message_id": "<incoming message ID>",
  "message": {
    "id": "<incoming message ID>",
    "sequence": 123,
    "sender_id": "bob",
    "recipient_id": "alice",
    "chat_id": "<chat ID>",
    "content": {
      "version": 1,
      "content_type": "text/plain",
      "body": "SGVsbG8=",
      "transforms": []
    }
  }
}

Ordinary text events are new incoming text/plain messages without transforms. Markdown and HTML may appear in history but do not trigger this ordinary webhook. Voice, location, and experimental groups have the variations described below.

Read history & send a reply

All Bot API routes below use Authorization: Bearer API_TOKEN at the configured Kobby origin. Keep the token on your server.

Inspect access and read history · http
GET /api/v1/bot/me
Authorization: Bearer <API_TOKEN>

GET /api/v1/bot/messages?chat_id=CHAT_ID&after=0&limit=50
Authorization: Bearer <API_TOKEN>

/bot/me returns bot_id, owner_id, permissions, all_personal_chats, chat_ids. History returns messages, next_cursor, has_more, last_message, owner_id, bot_id. The after cursor is a sequence number; limit is 1–100. last_message is the latest message in the chat independently of the page and may be null. History hidden by the owner is not disclosed.

Send only while the trigger is current

Check the latest message before expensive generation. Both reply IDs must identify the same incoming message from the recipient in this chat. The server atomically checks it is still the last message before storing your reply.

Personal reply · json
{
  "chat_id": "<chat ID from the verified event>",
  "sender_id": "alice",
  "recipient_id": "bob",
  "client_message_id": "reply_<stable event ID>",
  "reply_to_message_id": "<incoming message ID>",
  "if_last_message_id": "<same incoming message ID>",
  "content": {
    "version": 1,
    "content_type": "text/plain",
    "body": "SGVsbG8h",
    "transforms": []
  }
}

Post this body to /api/v1/bot/messages. SGVsbG8h is standard base64 for the UTF-8 text Hello!. The content type must be exactly text/plain, with empty transforms. Markdown, HTML, audio replies, and text/plain; charset=utf-8 are rejected. Maximum decoded text is 64 KiB; the request limit is 128 KiB.

ResultWhat to do
201Reply created; response contains message and duplicate.
200, duplicateThe identical prepared reply already exists. Treat it as success, even if the chat has advanced.
409 chat_advancedCancel this stale reply. Do not attach it to a newer trigger.
409 idempotency_conflictThe ID was used with a different body or bot. Diagnose the conflict; do not regenerate and resend under a random ID.

Persist the exact generated body and client_message_id before sending. Retries must reuse both. sender_id is the connection owner, not the peer; bot_id is assigned by the server. The technical reply ID does not create a visual quote in the client.

Contacts & communities

Each action requires its matching permission. The effective owner comes from the bot token; a request cannot override the owner or role. All routes below start with /api/v1.

POST routeJSON body
/bot/contacts{"peer_id":"bob","name":"Bob"}
/bot/chats{"id":"<32-hex ID>","peer_id":"bob","title":"Personal chat"}
/bot/groups{"id":"<32-hex ID>","title":"Study group","description":"A public group"}
/bot/channels{"id":"<32-hex ID>","title":"Updates","description":"A public channel"}
/bot/communities/join{"id":"<existing public community ID>"}

Save a random object ID and its fields before creation. Chat/group/channel creation returns 201; an exact repeat returns 200; a conflicting use of the same ID returns 409. Contacts and joining are idempotent with 200 on success. A different existing contact name returns 409 contact_exists: respect the user's existing name.

A personal chat is forced to cloud mode. Creating a contact and creating a chat are separate, non-transactional operations. Persist progress between them. Permission to create something does not mean it has already been created.

A separate helper account

For an agent that opens a conversation with a dedicated helper account:

  1. Request contacts.create and chats.create on the subscriber connection. It needs no personal history access for this setup.
  2. After verified connection, add the helper as a contact. Preserve a stable chat ID per API origin, owner, helper, and purpose across repeated connection events.
  3. Create that personal chat and record completion. Do not recreate a deleted or hidden chat without a new user request.
  4. Connect a separate bot on the helper account with the appropriate personal chat access. That bot can reply as the helper; the subscriber bot cannot impersonate it.

Do not create a chat with the owner as both participants. An unsolicited greeting is not available through the conditional-reply Bot API.

Documented limits: 20 bots per account, 100 explicitly selected chats per bot, 500 contacts, 5,000 personal chats for each participant, 500 community chats and 500 members per community. Respect the server's validation responses.

Incoming & outgoing message processing

Use messages.process_incoming for private incoming results and messages.process_outgoing for draft preparation. Each direction has separate consent and settings. Ordinary webhook chat access, processing scope, and experimental group participation are independent.

Configure in Kobby

In AI agents, edit the agent, grant the matching permission, enable processing, and set its public HTTPS Processing URL. Choose the chats and an order (0–10000, lower first; ties use agent ID). The timeout is 100–5000 ms. All personal chats covers only unencrypted personal chats; select groups and channels individually. Incoming processing requires current membership; outgoing processing also requires permission to post.

Processor configuration example · json
{
  "permissions": ["messages.process_incoming", "messages.process_outgoing"],
  "incoming_processor": {
    "enabled": true,
    "url": "https://agent.example.com/process-incoming",
    "chat_ids": [],
    "all_personal_chats": true,
    "timeout_ms": 3000,
    "priority": 100
  },
  "outgoing_processor": {
    "enabled": true,
    "url": "https://agent.example.com/process-outgoing",
    "chat_ids": [],
    "all_personal_chats": true,
    "timeout_ms": 5000,
    "priority": 100
  }
}

This is a settings fragment for the user-session /api/v1/bots or /api/v1/bots/update API. It requests all personal chats for both processing directions; choose this only with explicit consent. A processor-only agent can leave ordinary chat access empty. Automatic credential setup still needs the lifecycle webhook. Omitted processor settings are preserved on update; revoking the permission disables that processing direction.

Signed processing requests

Kobby posts message.process_incoming or message.process_outgoing to the corresponding Processing URL. Verify the existing timestamp and HMAC signature with the issued webhook secret. The JSON contains version, event, event_id, run_id, owner_id, bot_id, message, current_content, steps. Deduplicate event IDs. message is the original; current_content is the latest result, and steps contains earlier processor results.

An outgoing message is an unsent draft with sequence: 0 and synthetic preparation IDs. Community routing uses recipient_id: community:<chat_id>; owner_id identifies the account sharing the content. Return HTTP 200 with a content envelope and optional JSON data:

Processor response · json
{
  "content": {
    "version": 1,
    "content_type": "text/plain; charset=utf-8",
    "body": "SGVsbG8=",
    "transforms": []
  },
  "data": {"language": "en"}
}

Use canonical Base64 containing valid UTF-8, up to 64 KiB decoded. Types are text/plain or text/markdown, optionally with ; charset=utf-8. Transforms must be empty; data is limited to 4096 JSON bytes, the complete response to less than 100000 bytes. Do not change routing or call /bot/messages to deliver a processed draft.

What the user receives

Incoming processing handles new text and Markdown without rewriting history or delaying original delivery. Only the recipient sees the derived result and can show the original. There is no history backfill. A failed stage is skipped, retaining the latest successful content; the entire chain has a 15-second budget.

Outgoing processing shares the unsent draft before showing a mandatory comparison. The user chooses Send result, Send original, or Return to editing. Any stage failure stops the chain; a partial result is not offered for delivery. DH/OTP, attachments, voice, and location are excluded from both directions. Outgoing agent auto-replies are excluded; incoming agent-authored messages require explicit allow_bots.

Draft disclosure happens before preview. Cancelling does not recall content already sent to an agent or its provider. Messenger preparation records expire after 24 hours; cleanup can lag, and submitted safety reports have separate retention. This expiry does not control the external provider's retention.

The November 20 release record documents enabled production processor flags on Messenger 0.15.0, X-Connect Android/web 0.1.27 (28), and desktop 0.1.3 (4). Android's public Play track remained older; the new release was distributed through internal testing. Check the actual client and server capabilities. Ordinary messages still work in older clients.

Group participation Experimental

Published as an experimental feature. Group support requires compatible Messenger, client, and bot implementations. It is disabled by default: the Messenger operator enables KOBBY_GROUP_BOTS_ENABLED, and Companion enables public_groups_enabled. Availability on a particular server is reported by group_bots_enabled in community information.

This feature handles explicitly addressed messages in public, unencrypted cloud groups. It does not expose the whole timeline. Channels, private communities, DH/OTP, attachments, audio, and bot-authored messages are excluded. No historical content from before activation is disclosed.

Two confirmations, one limited grant

  1. The connection owner must already be a group member. In About community → Group AI, they choose a connected bot and request read-only access or optionally enable replies.
  2. The group owner separately approves the exact requested rights. A group admin cannot approve on the owner's behalf. This remains a separate confirmation even when the same person owns the group and bot connection.
  3. Members address the approved connection with /companion <32-hex bot_id> your question. Unaddressed conversation and requests for other bots are not delivered.
  4. The bot acts as its connection owner. Updated clients display AI · <owner>; older clients may display only the owner.

Grants expire within 24 hours. Renewal needs a new request and approval. Bot settings changes, disable, rotation, deletion, and leaving/rejoining the group invalidate prior access. Either the bot owner or group owner can revoke, including during response generation. In Companion, /companion <bot_id> /leave requests revocation and is authorized against fresh server state; /stay does not extend access.

Bot-token API

Group history · http
GET /api/v1/bot/group-messages?chat_id=CHAT&grant_id=GRANT&after=0&limit=50
Authorization: Bearer <API_TOKEN>

The result contains messages, next_cursor, has_more, last_message_id, grant, owner_id, bot_id, group_owner_id. History starts after activation and contains only addressed requests. Pagination counts scanned rows: an empty messages page can still have has_more: true. last_message_id reveals only an identifier for the conditional-send check.

Send to POST /api/v1/bot/group-messages with the ordinary reply fields plus grant_id. The sender is the connection owner; the recipient is community:CHAT. Both trigger IDs must equal the addressed source message ID. Only text/plain with no transforms or attachments is allowed. A reply also requires the grant's reply permission.

Required group reply identity · python
import hashlib


def group_reply_id(bot_id: str, grant_id: str, source_id: str) -> str:
    identity = "\0".join((bot_id, grant_id, source_id)).encode("utf-8")
    return "group_" + hashlib.sha256(identity).hexdigest()

Use that value as client_message_id. It fixes one reply identity per source and consent generation. An identical retry returns a duplicate; a changed body conflicts. Any newer group message causes a new reply to fail with 409 chat_advanced, so busy groups may skip stale replies.

POST /api/v1/bot/groups/leave with {bot_id, chat_id, grant_id} revokes only the caller's own grant. A bot cannot request or approve new access.

Group events and worker isolation

The signed event is group.message.created, version 1. Its event ID is SHA256 of bot_id + NUL + grant_id + NUL + message.id. It includes bot_id, owner_id, group_owner_id, grant_id, chat_id, sender_id, message, text, reply_allowed, reply_to_message_id, if_last_message_id. The text field is the trimmed addressed request after the command prefix; message preserves the source message.

Acknowledge before calling Messenger. Verify and durably enqueue the group event, then return 2xx. Group dispatch holds consent locks during delivery; calling Messenger synchronously before acknowledgement can deadlock until the ten-second timeout. Failed group deliveries retry no earlier than 30 seconds.

The worker rechecks scoped access before the AI call and again before sending. Keep group generation isolated from private history, user profiles, account sessions, and unrelated action permissions. Participant text cannot grant rights. Companion uses a dedicated prompt and only the addressed source message for this path.

Consent routes for client developers

These routes require a human user session, not a bot token. All paths start with /api/v1.

RouteRequest / authority
GET /communities/info?id=CHATReports group_bots_enabled to members.
GET /communities/bots?chat_id=CHATMembers see grant states, rights, expiry, owner, and service origin, without credentials.
POST /communities/bots/request{bot_id, chat_id, grant_id, previous_grant_id:"", reply:false}; connection owner.
POST /communities/bots/approve{bot_id, chat_id, grant_id}; group owner only.
POST /communities/bots/revoke{bot_id, chat_id, grant_id}; bot owner or group owner, even with the feature off.

Use a fresh random 32-hex grant_id, persisted before requesting. Retries preserve the same generation and history boundary. Replacements need the current previous_grant_id; stale approvals and revokes cannot affect a newer grant. Mutation results contain grant; denied, conflicting, and malformed requests return 403, 409, and 400 respectively. Limits are 1,000 request IDs and 20 distinct group records per bot.

Turning the feature off denies reads, dispatch, and replies, but does not permanently revoke an unexpired grant. Revoke grants before a rollback if re-enabling must not restore them. Already delivered content cannot be recalled. The implementation assumes a single Messenger writer; monitor latency when enabling the feature.

Voice & other content

Voice messages

audio.read is off by default and applies only to allowed open personal chats. A voice message.created contains voice instead of text, while retaining message and both trigger IDs. The descriptor contains version, id, mime, duration_ms, size, sha256, encrypted.

Download permitted voice audio · http
GET /api/v1/bot/attachments?id=ATTACHMENT_ID
Authorization: Bearer <API_TOKEN>

GET /api/v1/bot/attachments?id=ATTACHMENT_ID&index=0
Authorization: Bearer <API_TOKEN>

Download metadata, then the zero-based chunks. Decode standard base64, concatenate in order, and verify byte length and SHA-256. The documented audio format is WAV, PCM16 little-endian, mono, 16 kHz, up to 120 seconds. Use your own speech recognition; replies still use plain text.

Send the Bearer token only to the trusted Kobby API origin, never to a URL from message text. Without audio.read, no voice webhook is sent. History can retain message IDs and sequence values while replacing restricted content with application/vnd.kobby.restricted and an empty body, without an attachment ID.

Files, camera, and location

General files use application/vnd.kobby.file+json. Bot file webhooks, general file downloads, and file uploads are not supported; audio.read is not a general file permission. A camera action link does not make the resulting photo accessible to a bot.

A supported location message uses text/plain; format=kobby-location-v1. An eligible incoming open personal message can include the JSON text plus a validated location object. Location data includes version/type, coordinates, accuracy, capture time, and device source. Treat it as user-provided location data, not cryptographic proof of presence.

Client context

bot.connected and the exchange response may include the client snapshot below. Accept a partial object, null, or an absent field for older servers.

Optional client context · json
{
  "client_context": {
    "app": "Kobby Connect",
    "version": "0.1.3+4",
    "platform": "android",
    "locale": "en",
    "timezone": "Europe/Amsterdam"
  }
}

This describes the latest client that explicitly configured the bot, not all devices belonging to the user. locale is the interface language; timezone is an IANA name or UTC-offset snapshot, not a guarantee of future daylight-saving changes.

Maximum UTF-8 lengths: app 80 bytes, version 64, locale 32, timezone 100. Supported platforms are android, web, ios, linux, macos, windows, fuchsia. A browser on Android reports web.

Invalid optional fields are ignored. A valid nonempty partial snapshot replaces the previous snapshot; null or entirely invalid context preserves it on update. Changing only the UI language does not reconnect automatically: save the bot settings or enable it to send a new snapshot. message.created remains version 1 without this addition.

Context is declared metadata. It is not authentication, identity verification, location proof, or trusted AI instructions. It contains no passwords, keys, contacts, or coordinates. Introduced in Connect 0.1.3+4 / classic client 0.11.3+22; upgrade older strict servers before sending the field.

Reliability & errors

  1. Verify and persist first. Bound request size, check signatures and identities, save a unique event and pending job, then acknowledge.
  2. Use a durable worker queue. Claim jobs with leases so restarts recover them without concurrent duplicate processing. Keep webhook acceptance within ten seconds.
  3. Check before generating. Stop if the trigger is stale or permission has been revoked. For groups, recheck consent again before sending.
  4. Save the prepared result. Persist the route, body, IDs, and generated text before API calls. Retry network failures and temporary server errors with exactly that request.
  5. Finish deliberately. Mark 201/200 replies complete and chat_advanced stale. Investigate other 4xx responses instead of retrying indefinitely.

Kobby's idempotency covers its message and action contracts, not your CRM, payment system, or other external side effects. Give those operations their own durable idempotency keys. Use bounded retries and redact bodies, tokens, signing secrets, audio, and signatures from logs; event IDs, stages, and HTTP statuses are enough for most diagnostics.

SymptomCheck
Connection pendingPublic HTTPS/443, DNS and URL restrictions, trusted API origin, persisted exchange ID, successful exchange, signature check, and 2xx acknowledgement.
401 unauthorizedMissing/revoked credentials, disabled/deleted bot, expired connection code, or a different exchange claim. Reconnect when appropriate.
400 invalid_bot_requestRequired fields, standard base64, exact plain-text type, empty transforms, and equal trigger IDs.
403 bot_not_allowedAllowed open chat, correct peer/owner route, and valid trigger.
403 bot_permission_requiredThe corresponding action permission is granted.
Group access deniedFeature enabled, public cloud group, current membership, exact active grant generation, expiry, and reply permission.
409 chat_advancedA newer message arrived. Discard this reply.
409 conflictReused ID with changed fields; compare the persisted original request.
No ordinary message eventIncoming plain text, allowed personal chat, active connection, no encryption/transforms, and bot-author policy.

Settings updates skip the old event queue; rotation preserves the cursor. The connection's “connected” state records the successful handshake, not completion of every later business action. Subsequent delivery status can be delivered or retrying without a new pending connection.

The Messenger implementation assumes one writer process for atomic checks. Do not scale it to multiple independent writers without a transactional or lease-based coordination design.

Publish to the store

The store editor creates your listing in the CMS. Prepare an English description of what your agent does, who operates it, which data it receives, and why each permission is needed.

  • Agent name, stable slug, category, short summary, and full description.
  • Developer name and website, support contact, and privacy policy.
  • Public HTTPS webhook and the intended Kobby API origin, if server-specific.
  • Icon and real screenshots with useful captions.
  • Requested permissions and the minimum personal chat scope.
  • Supported languages, version, and any experimental features or service limits.
  • Pricing: choose Free if the agent is free, or accurately describe paid access and developer terms.

In the CMS, save the listing, preview it, set its status to Include in publication, and publish changes. Saving a draft does not update the public store. Publication generates HTML pages and local assets, including this documentation. The exported storefront works on a static host with no CMS connection.

Before submission, test automatic reconnection, signature rejection, duplicate webhook delivery, a lost API response, revoked permissions, stale-message cancellation, and voice or group handling if offered. For groups, also test read-only grants, owner approval, expiry, and revocation during generation.

The final choice stays with the user. Add to Kobby opens an action link with reviewable permissions. A store click is not proof of installation or a completed connection.

Sources & versions

This English guide translates and consolidates the Kobby Messenger developer documentation retrieved on November 9, with permissions and processing documentation checked against the published release branch on November 21, 2026. All integration instructions are included on this page. Explore the topics below:

Group support is published but experimental and disabled by default. The older rollout-status wording in the original group document predates that publication. Check the actual server's feature flag and consent state before using group routes.

Example IDs and credentials are placeholders. The guide does not send requests to an agent or connect an account. You can save or print this page for reference.

FOR DEVELOPERS

Your next agent.
Right here.

Prepare a public HTTPS webhook, a description, an icon, screenshots, and a list of requested permissions. The store editor can add your listing through the CMS.

Your agent needs to support the Kobby protocol: the bot.connected event, one-time code exchange, and webhook signature verification.
Developer documentation
KOBBY AGENTS STORE

You choose.
Kobby connects.

The store helps you discover agents and prepares a link to add them. Discovering and connecting agents never needs your messenger password or API tokens. The separate X-Connect account-deletion page sends credentials directly to the Messenger service, never to the store backend.

Kobby shows the webhook, permissions, and chat access before you connect. You can change the settings or cancel. Agents cannot access DH or OTP chats.

Your saved agents stay in this browser. The store does not track connections or count a link click as a completed installation.