docs
/
AppEngine API

AI

Chat, agents, MCP tools, image and video generation, AI employees, voice, and API discovery through MCP.

AppEngine is multi-provider: Anthropic, OpenAI, Google Gemini, DeepSeek and ElevenLabs are all supported. Which one serves a request is configuration, not code.

Chat and agents

POST/ai/chatJWT
POST/ai/agent/chatJWT
POST/ai/agent/streamJWT
GET/ai/stream/:streamIdJWT

Streaming is two-step: POST …/stream opens a stream and returns a streamId; GET /ai/stream/:streamId is the SSE connection that delivers tokens. That split lets a client reconnect to a stream it already started.

MCP tools

There is also a full MCP server

Beyond these endpoints, AppEngine exposes a Model Context Protocol endpoint at POST /mcp that an MCP client connects to directly. See MCP server.


GET/ai/mcp/toolsJWT
POST/ai/mcp/executeJWT

Model Context Protocol tools — the mechanism by which an agent acts on the platform rather than only talking about it. tools lists what is available; execute invokes one.

Image and video generation

POST/ai/generate/imageJWT
POST/ai/generate/image/variationsJWT
POST/ai/generate/image/editJWT
POST/ai/generate/videoJWT

Used by Creative Studio in the Studio UI and by auto-campaign for ad creatives. Output lands in object storage as a normal file, with thumbnails.

Datatypes: creative, creative_studio.

CRM AI assistant

Configurable per-tenant assistants with tools, capabilities and triggers, including voice. Documented with the rest of CRM — see AI assistant.

AI employees

AIEmployeeModule manages staff that are AI. The agent itself runs outside AppEngine; this module is its management side — identity (a user holding the AI role), access, a work queue, approvals, a handover brief and provider provisioning. Operator guide: AI employees.

The agent calls these with its own token, obtained through the normal sign-in (password, then the org's second factor):

POST/ai-employees/me/helloJWT
GET/ai-employees/me/briefingJWT
POST/ai-employees/worker/:name/leaseJWT
POST/ai-employees/worker/work/:id/stepJWT
POST/ai-employees/worker/work/:id/approvalJWT
POST/ai-employees/worker/work/:id/completeJWT
POST/ai-employees/worker/work/:id/failJWT

hello says what runs it (provider, agent id, model, version) and is what marks it connected. briefing is its brief — who it is, the company, rules, approvals, who to talk to, how to work, where the documentation is — plus its open work, what waits on a person and recent decisions; read it on every sign-in. A caller holding AI can lease and report only its own jobs.

Administration (Owner, ConfigAdmin and root roles):

POST/ai-employees/:name/handover/sign-inJWT
POST/ai-employees/:name/provisionJWT
GET/ai-employees/:name/provider-statusJWT
GET/ai-employees/:name/accessJWT
PUT/ai-employees/:name/accessJWT
POST/ai-employees/work/:id/decideJWT

handover/sign-in issues a new password and authenticator secret, returned once; issuing again revokes the old. Provisioning goes through a provider adapter keyed by the employee's runtime.provider; until a provider contract exists only a stub adapter is present, and it says so in every answer.

Voice

VoiceModule provides realtime voice over Socket.IO:

GatewayPurpose
realtime-voice.gatewayOpenAI Realtime API streaming
simple-voice.gatewaySimpler turn-based voice
ai-voice.gatewayCRM assistant voice

ElevenLabs handles synthesis. IVR flows connect the phone system to these — see Automation.

API discovery for agents

POST/mcpJWT

The MCP server (McpModule, see MCP) is how an agent learns the platform at runtime instead of having it hard-coded: it lists the callable methods and runs them.

The metadata comes from the @AiCallable decorator on service methods:

@AiCallable({
  description: 'Downloads a file from a remote URL via axios, sniffs MIME/extension…',
  params: { body: 'Object: { location, url, name, thumbnails?=true, isPrivate?=false }…' },
  returns: 'Same shape as put(): merged file entry + thumbnail descriptors.',
})
async putFromUrl(orgId: string, body: any) { … }

Decorate a service method and it becomes discoverable. Leave the decorator off and agents cannot see it — which is also how you keep a method out of their reach.

Usage and cost

AI calls are metered by UsageModule. ENABLE_TOKENIZATION turns token counting on; TRACK_USAGE_WHEN_DISABLED records usage even when metering is off. See Platform operations.