Component Kit
An API that exposes a connected user's integrations as actions your code calls and as tools a language model calls.
AI ComponentKit is an API that exposes what a connected user has connected as operations you run under that user's own credentials. One API covers every integration, so your backend acts through the user's ByteChef connections without per-integration code. Developers use it to call third-party operations from their own code or to give a language model tools.
It exposes the same operations to two callers: actions for your code and tools for a model.
Actions and tools
An action is the unit ByteChef executes: one operation on one component, such as Slack's sendChannelMessage. Your code names it, supplies its input, and gets the result.
A tool is an action projected for a language model. A component publishes selected actions as tools; the platform gives each one a flat name, a description, and a JSON Schema, hands that catalogue to your model, and the model chooses.
The execution and the connection are the same for both. The two surfaces differ as follows:
| Action | Tool | |
|---|---|---|
| Who chooses it | Your code, before the call | The model, at inference time |
| Endpoint | POST /{externalUserId}/components/{componentName}/versions/{componentVersion}/actions/{actionName} | POST /{externalUserId}/tools |
| Address | Component, version and action name, in the path | One flat name in the body, for example SLACK_SEND_CHANNEL_MESSAGE |
| Coverage | Every action the component defines | Only the actions the component publishes as tools |
| Versioning | Pinned in the path | Resolved server-side, always the component's current version |
| Discovery | None. Your code already knows what it calls. | GET /{externalUserId}/tools, scoped to that user |
| Request body | { "input": { ... } } | { "name": ..., "parameters": { ... } } |
| Response | { "result": ... } | The result, unwrapped |
| File input | Binary and form-data uploads supported | Not supported |
Use tools when a model chooses the operation. Call the action when your code has already decided.
Both live under /api/embedded/v1 and authenticate with an embedded API key (Authorization: Bearer). The optional X-Environment header selects DEVELOPMENT, STAGING or PRODUCTION and defaults to PRODUCTION. Your code never sees the user's credential: ByteChef resolves it from the connected user. If that user has more than one instance of the same integration, the optional X-Instance-Id header selects one.
The same tool catalogue is also reachable over MCP. An MCP Server exposes the same actions, and also whole workflows, to agents that speak that protocol. ComponentKit is the plain-HTTP path; MCP is the protocol path.
Listing a user's tools
GET /tools returns the tools grouped by the component they belong to, each already in function-calling shape:
{
"slack": [
{
"type": "function",
"function": {
"name": "SLACK_SEND_CHANNEL_MESSAGE",
"description": "Sends a message to a public channel.",
"parameters": "{\"type\":\"object\",\"properties\":{ ... }}"
}
}
]
}Note two details of that shape:
parametersis a JSON Schema carried as a string, not a nested object. Parse it before handing it to your model client.- A tool name is an address, not a label. It is the component name uppercased, then the action name in
SCREAMING_SNAKE_CASE:sendChannelMessageonslackbecomesSLACK_SEND_CHANNEL_MESSAGE. Executing a tool splits that name back apart to find the component and the action, which is why the call carries no component field and no version.
Narrow the catalogue with the categories, components and tools query parameters, for example when a conversation should reach only some of the user's integrations.
What ends up in the catalogue
- Only actions published as tools. A component opts its actions in one at a time; an action it does not opt in never appears in
GET /tools, though your own code can still call it as an action. - Only integrations that user has connected. The catalogue is derived from that user's own integration instances, so it differs per user and grows as soon as they connect something new, with no redeploy on your side.
- Actions, not workflows. To let an agent run a whole workflow, expose it through an MCP server or trigger it with an App Event.
Running a tool
POST /api/embedded/v1/{externalUserId}/tools
Authorization: Bearer <api-key>
X-Environment: PRODUCTION
Content-Type: application/json
{
"name": "SLACK_SEND_CHANNEL_MESSAGE",
"parameters": { "channel": "#general", "text": "Deploy finished." }
}The response is the provider's own response, returned as-is.
Every tool call is recorded as an external invocation on the API (Tool) source, whether it succeeds or fails.
Calling an action
When your code has already decided what to run, address the action directly. The input goes under input, and the result comes back wrapped in result:
POST /api/embedded/v1/{externalUserId}/components/slack/versions/1/actions/sendChannelMessage
Authorization: Bearer <api-key>
X-Environment: PRODUCTION
Content-Type: application/json
{
"input": { "channel": "#general", "text": "Deploy finished." }
}This is also the surface to use when an operation takes a file: set bodyContentType to BINARY or FORM_DATA in the input and the endpoint resolves the referenced content into a file entry before the action runs. The tools endpoint has no equivalent, so file-bearing operations stay in your code rather than in the model's hands.
Every action call is recorded as an external invocation on the API (Action) source. Your backend reads a user's tool and action calls with GET /api/embedded/v1/{externalUserId}/external-invocations; see the API reference.
ComponentKit in the Sample App
The Sample App includes a "ComponentKit Playground" that calls a single action directly, and a tool-based AI chat page that runs the full catalogue-and-choose flow.
Sample projects
- ComponentKit + Vercel AI SDK (TypeScript) - the
/toolsendpoints consumed from a TypeScript app through the Vercel AI SDK. - ComponentKit + Spring AI (Java) - the same tools bound into a Spring AI
ChatClient.
How is this guide?
Last updated on