Skip to content

Plugins

Plugins are the way Crafted AI gives models safe, organisation-scoped skills. The plugin runtime exposes two kinds of plugin behind one surface:

  • First-party plugins - shipped by Crafted AI and run in-process, such as the WhatsApp plugin.
  • MCP-backed plugins - customer-installed MCP servers that expose tools over HTTP transports.

The gateway can inject plugin tools into a chat-completions request, let the model choose a tool call, execute the selected tool, and continue the model loop until a final assistant response is produced.

Plugins can be used in two MVP paths:

  1. Gateway API path - applications call POST /v1/chat/completions. If the organisation has plugins and the request does not include user tools[], Crafted AI can inject organisation plugins into the request.
  2. WhatsApp inbound path - the reply worker calls the gateway with the WhatsApp app’s selected enabledPluginIds, so only those plugins are visible to the assistant.

First-party plugins are built and operated by Crafted AI. They have stable slugs, stable tool names, and do not require you to host an MCP server.

The WhatsApp first-party plugin exposes Twilio-backed sending tools:

ToolPurpose
whatsapp__send_messageSend a WhatsApp text message, optionally with media URLs.
whatsapp__send_templateSend an approved Twilio Content API template.

Tool names are prefixed as <plugin-slug>__<tool-name> when injected into the gateway request. The prefix keeps tools from different plugins from colliding.

An MCP integration becomes a plugin after it is installed for an organisation. Crafted AI stores its endpoint, transport, optional credential reference, and cached tool catalog.

Read MCP integrations for installation details.

The gateway decides whether to run plugin orchestration per request.

Request stateBehaviour
No plugin runtime configuredRequest goes directly to the upstream model provider.
Request includes user tools[]Crafted AI does not execute plugins; tools are passed through to the provider/client flow.
Organisation has no pluginsRequest goes directly to the upstream provider.
Organisation has plugins and request omits tools[]Crafted AI may inject plugin tools and run the tool loop.
WhatsApp app supplies enabledPluginIdsOnly those plugin IDs are considered for the WhatsApp reply.

When plugin orchestration is active:

  1. Crafted AI lists available tools for the allowed plugins.
  2. Tool descriptors are converted into OpenAI-compatible function tools.
  3. Tool names are prefixed with the plugin slug.
  4. The gateway sends the request to the selected model.
  5. If the model returns tool calls, Crafted AI invokes the tools server-side.
  6. Tool results are appended to the conversation.
  7. The gateway repeats until the model returns a final answer or the loop cap is reached.

Tool calls are tracked as usage events so teams can audit plugin activity by organisation, plugin, model, and request.

  • Plugins are organisation-scoped.
  • Gateway keys identify the organisation for API calls.
  • WhatsApp reply flows receive only the plugins selected in the WhatsApp app.
  • MCP integration writes require owner access.
  • Plugin errors are scrubbed before they are returned to the model or logged.
  • MVP sandboxing is based on tool allowlists and per-tool rate limits.
GET /organizations/{organizationId}/plugins
Authorization: Bearer <control-panel-access-token>
X-Org-Id: <organization-uuid>
{
"data": [
{
"id": "550e8400-e29b-41d4-a716-446655440001",
"kind": "mcp",
"slug": "support-crm",
"displayName": "Support CRM",
"description": "Lookup customer records.",
"toolCount": 3
},
{
"id": "first_party:whatsapp",
"kind": "first_party",
"slug": "whatsapp",
"displayName": "WhatsApp",
"description": "Send WhatsApp messages and templates via Twilio.",
"toolCount": 2
}
]
}

Next: install an MCP integration or configure WhatsApp to control which plugins an inbound assistant can use.