Component Kit
A Java SDK that turns a connected user's component actions into AI tools your own LLM application can call.
AI ComponentKit is a backend Java SDK for AI-native products: it fetches the component actions a connected user has access to and exposes them as tools your own LLM application can call — so your agent acts through the user's ByteChef connections without you writing per-integration glue.
The tools it returns are the connected user's component actions — not their workflows. To let an agent run a whole workflow instead, expose the workflow through an MCP server or trigger it with an App Event.
ToolClient
The core client wraps the embedded execution API:
ToolClient toolClient = new ToolClient(apiKey, "https://your-bytechef-host.example.com", Environment.DEVELOPMENT);
// The connected user's available actions, as tool definitions (name, description, JSON-schema parameters),
// grouped by the component they belong to.
Map<String, List<ToolModel>> toolsByComponent = toolClient.getTools(externalUserId);
// Execute one tool with the connected user's own credentials.
Object result = toolClient.executeTool(externalUserId, toolName, Map.of(/* parameters */));- Authentication is an embedded API key (
Authorization: Bearer), created under Embedded → Settings → API Keys. Environmentselects the target environment (DEVELOPMENT,STAGING,PRODUCTION), sent as theX-Environmentheader.getToolsfetches fromGET /api/embedded/v1/{externalUserId}/toolsand returns the tools keyed by component name;executeToolPOSTs{ "name": ..., "parameters": ... }to the matching/toolsendpoint — each call runs the component action with the connected user's own credentials.
Spring AI integration
The ai-componentkit-spring module adapts the client to Spring AI, so the user's actions plug straight into a ChatClient as tools:
ToolCallbackProvider toolCallbackProvider = toolCallbackProviderFactory.create(externalUserId, Environment.PRODUCTION);
chatClient.prompt(userMessage)
.toolCallbacks(toolCallbackProvider)
.call();The LLM now sees every action the user has connected — send a Slack message, create a CRM contact — and invocations execute server-side in ByteChef under that user's connections.
ComponentKit in the Sample App
The Sample App includes a "ComponentKit Playground" and a tool-based AI chat page that demonstrate this exact flow end to end.
Sample projects
- ComponentKit + Spring AI (Java) — a Java LLM app calling a connected user's actions as Spring AI tools.
- ComponentKit + Vercel AI SDK (TypeScript) — the same tools consumed from a TypeScript app via the
/toolsREST endpoints and the Vercel AI SDK.
How is this guide?
Last updated on