/stackone-agents:stackone-agentsfrom stackone-agents
Build AI agents that call StackOne-linked accounts using TypeScript SDK, Python SDK, MCP server, or A2A protocol. Use when user asks to "add StackOne tools to my agent", "set up MCP with StackOne", "list employees from BambooHR in my agent", "integrate StackOne with OpenAI", "build a multi-tenant agent", or "use StackOne with LangChain". Supports OpenAI, Vercel AI SDK, Claude, LangChain, CrewAI, PydanticAI. Do NOT use for account linking setup (use stackone-connect) or platform management (use stackone-platform).
Ships in stackone-agents. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
SDK APIs change frequently. Before writing code:
https://raw.githubusercontent.com/stackoneHQ/stackone-ai-node/refs/heads/main/README.mdhttps://raw.githubusercontent.com/stackoneHQ/stackone-ai-python/refs/heads/main/README.mdhttps://docs.stackone.com/embed/call-actions/mcp.mdThese sources contain the latest code examples and API surface. Do not rely solely on this skill for code snippets.
When fetching a docs.stackone.com page whose URL doesn't already end in .md, append .md to get it as markdown. llms.txt is already plain text, so fetch it as is.
If any URL in this skill returns 404, or a page doesn't cover what you need (e.g. an overview page doesn't link the user's framework or app; StackOne reorganizes its docs from time to time):
docs.stackone.com page, fetch https://docs.stackone.com/llms.txt, which indexes every docs page by title and description. Search it for the page's topic (e.g. "MCP", "AI Platforms", "Agent2Agent", "Claude Code") and use the URL listed there.https://github.com/stackoneHQ/stackone-ai-node or https://github.com/stackoneHQ/stackone-ai-python) and find the current README.| Method | Best for | Language |
|---|---|---|
TypeScript SDK (@stackone/ai) | Custom agents with OpenAI, Vercel AI, Claude, Claude Agent SDK | TypeScript/JavaScript |
Python SDK (stackone-ai) | Custom agents with OpenAI, LangChain, LangGraph, CrewAI, PydanticAI | Python |
| MCP Server (AI apps) | Using StackOne from Claude Code, Claude Desktop, ChatGPT, Cursor and other AI apps via a session token URL, no code needed | Any (config only) |
| MCP Server (agent code) | Agents in any framework with an MCP client (Anthropic SDK, OpenAI Agents SDK, Google ADK, Azure AI Foundry, etc.) | Any |
| A2A Protocol | Agent-to-agent communication | Any |
Consult references/integration-guide.md for a detailed decision tree.
npm install @stackone/ai zod
import { StackOneToolSet } from "@stackone/ai";
// Initialize — reads STACKONE_API_KEY from environment
const toolset = new StackOneToolSet();
// Fetch tools for a specific linked account
const tools = await toolset.fetchTools({
accountIds: ["account-123"],
});
// Convert to your framework's format
const openaiTools = tools.toOpenAI(); // OpenAI Chat Completions
const anthropicTools = tools.toAnthropic(); // Anthropic Claude
const vercelTools = await tools.toAISDK(); // Vercel AI SDK
Tool naming: {provider}_{operation}_{entity} (e.g., bamboohr_list_employees)
Filtering tools:
const tools = await toolset.fetchTools({
providers: ["hibob", "bamboohr"], // Only these providers
actions: ["*_list_employees"], // Glob pattern matching
accountIds: ["account-123"],
});
Utility tools for dynamic discovery:
const utilityTools = await tools.utilityTools();
// tool_search — find tools by natural language query
// tool_execute — execute a discovered tool
For framework-specific integration code, fetch the GitHub README — it has complete examples for each framework.
pip install stackone-ai
Fetch the Python README for usage examples and framework integrations:
https://raw.githubusercontent.com/stackoneHQ/stackone-ai-python/refs/heads/main/README.md
The Python SDK supports: OpenAI, LangChain, LangGraph, CrewAI, PydanticAI.
For using StackOne from Claude Code, Claude Desktop, ChatGPT, Cursor and other AI apps.
AI apps connect using a session token URL generated in the StackOne dashboard. Fetch https://docs.stackone.com/connect/ai-platforms/overview.md. It links to a setup guide for each supported app. Follow the link for the user's app and use its "Connecting with a session token instead" section.
The URL grants access to a linked account on its own, so treat it like a password and never commit it.
See Example 2 for Claude Code.
Use this path for frameworks the SDKs don't cover (e.g. Google ADK, OpenAI Agents SDK, Azure AI Foundry) or when you prefer a standard MCP client.
StackOne's MCP server for agent code is at https://api.stackone.com/mcp. Every request needs:
Authorization: Basic <base64(API_KEY:)> (append a colon to the API key, then base64 encode)x-account-id: <ACCOUNT_ID> (switch this per customer for multi-tenant agents; see Step 3)Fetch the overview first: https://docs.stackone.com/embed/call-actions/mcp.md. It links to a setup guide for each supported agent framework (Anthropic SDK, OpenAI Agents SDK, LangChain, Google ADK, etc.). Follow the link that matches the user's framework.
Testing the MCP connection: launch MCP Inspector, then add the Authorization and x-account-id headers in the Inspector UI before connecting (see https://docs.stackone.com/embed/call-actions/mcp/troubleshooting.md):
npx @modelcontextprotocol/inspector https://api.stackone.com/mcp
For applications serving multiple customers, each with their own connected accounts:
// Option 1: Specify at fetch time
const tools = await toolset.fetchTools({
accountIds: ["customer-123-bamboohr"],
});
// Option 2: Change dynamically
tools.setAccountId("customer-456-bamboohr");
The accountId maps to a linked account created via the Connect Session flow (see the stackone-connect skill for setup).
User says: "I want my OpenAI agent to list employees from BambooHR"
Actions:
@stackone/ai and zodaccountIds and actions: ["bamboohr_list_employees"]tools.toOpenAI() and pass to the OpenAI chat completions callResult: Working agent that can query BambooHR employees through StackOne.
User says: "How do I use StackOne MCP in Claude Code?"
Actions:
https://docs.stackone.com/connect/ai-platforms/claude-code.md and use its "Connecting with a session token instead" sectionclaude mcp add, as described in that sectionResult: Claude Code can call StackOne tools directly.
User says: "Each of my customers has their own BambooHR. How do I handle that?"
Actions:
accountId when fetching toolstoolset.fetchTools({ accountIds: [customerAccountId] }) per requestResult: Understanding of the multi-tenant pattern with code to implement it.
Cause: Missing peer dependency.
@stackone/ai requires zod version >=3.25.0 <5npm install zod explicitlyCause: No tools match the filter criteria.
accountId corresponds to an active linked accountproviders filter matches exactly (e.g., bamboohr not BambooHR)Cause: Authentication misconfigured.
Authorization: Basic base64(api_key:)x-account-id header must reference a valid, active linked accountCause: Breaking changes between SDK versions.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub stackonehq/agent-plugins --plugin stackone-agents