Build
Agents
Automated identities, tokens and the gateway.
An agent is an account with the APP badge. It can be in many hubs at once and acts through a managed role that holds the capabilities granted at install time. The first Production agent is the project's primary agent; it is the one installed from the App Market.
Tokens
Agent tokens start with qag_ and authenticate with Authorization: Bot <token>. Only a hash is stored: the value appears once, when the agent is created or the token rotated. Rotating disconnects the agent immediately; revoking leaves it without a token until you issue a new one.
Gateway
Agents receive realtime events over Socket.IO at the API origin. Every event arrives as { t, d } on the event channel.
import { io } from "socket.io-client";const gateway = io("https://api.voznest.com", { auth: { token: `Bot ${process.env.VOZNEST_BOT_TOKEN}` }, transports: ["websocket"] });gateway.on("event", ({ t, d }) => console.log(t, d));INTERACTION_CREATEBots only: a member used one of your commands or clicked a button/menu. Answer with the token within 5 seconds.
COMMANDS_UPDATEThe command list of an app installed in the hub changed.
MESSAGE_CREATEA message was sent in a channel, thread or DM you can read.
MESSAGE_UPDATEA message was edited, pinned or its poll changed.
MESSAGE_DELETEA message was deleted.
REACTION_ADD / REACTION_REMOVESomeone reacted to a message.
TYPING_STARTA user started typing (not persisted).
PRESENCE_UPDATEA user's status or activity changed.
CHANNEL_CREATE / UPDATE / DELETEChannels and categories changed.
CHANNELS_REORDERChannel positions or categories changed.
ROLE_CREATE / UPDATE / DELETERoles changed in a hub.
MEMBER_ADD / UPDATE / REMOVEMembers joined, changed or left.
SERVER_CREATE / UPDATE / DELETEA hub became available, changed or was removed.
THREAD_CREATE / THREAD_UPDATEThreads and forum posts changed.
EVENT_CREATE / UPDATE / DELETEScheduled events changed.
VOICE_STATE_UPDATEVoice channel participants or their mute/video state changed.
READ_STATE_UPDATEYour read position or mention count changed.
NOTIFICATION_CREATEA new inbox notification for the connected user.
Configuration per environment
An agent reads the plain configuration of its own environment (set in Environments):
const { data } = await fetch("https://api.voznest.com/api/v1/developer/agent/config", { headers: { Authorization: `Bot ${token}` } }).then((r) => r.json());// { environment: "staging", config: { LOG_LEVEL: "debug" } }