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).

16 stars

Best use case

stackone-agents is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

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).

Teams using stackone-agents should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/stackone-agents/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/ai-agents/stackone-agents/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/stackone-agents/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How stackone-agents Compares

Feature / Agentstackone-agentsStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

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).

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# StackOne Agents — AI Integration

## Important

SDK APIs change frequently. Before writing code:
1. For TypeScript: fetch `https://raw.githubusercontent.com/stackoneHQ/stackone-ai-node/refs/heads/main/README.md`
2. For Python: fetch `https://raw.githubusercontent.com/stackoneHQ/stackone-ai-python/refs/heads/main/README.md`
3. For MCP setup: fetch `https://docs.stackone.com/mcp/quickstart`

These sources contain the latest code examples and API surface. Do not rely solely on this skill for code snippets.

## Instructions

### Step 1: Choose an integration method

| 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 LangChain, CrewAI, PydanticAI, Google ADK | Python |
| **MCP Server** | Claude Code, Claude Desktop, ChatGPT, Cursor, Windsurf — no code needed | Any (config only) |
| **A2A Protocol** | Agent-to-agent communication | Any |

Consult `references/integration-guide.md` for a detailed decision tree.

### Step 2a: TypeScript SDK path

```bash
npm install @stackone/ai zod
```

```typescript
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**:
```typescript
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:
```typescript
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.

### Step 2b: Python SDK path

```bash
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, CrewAI, PydanticAI, Google ADK.

### Step 2c: MCP Server path (no code required)

StackOne's MCP server is at `https://api.stackone.com/mcp`.

For client-specific setup instructions, fetch the relevant guide:
- Claude Code: `https://docs.stackone.com/mcp/framework-guides/claude-code`
- Claude Desktop: `https://docs.stackone.com/mcp/app-guides/claude-desktop`
- Other clients: fetch `https://docs.stackone.com/llms.txt` and search for the client name

**Testing the MCP connection**:
```bash
npx @modelcontextprotocol/inspector https://api.stackone.com/mcp
```

### Step 3: Handle multi-tenant access

For applications serving multiple customers, each with their own connected accounts:

```typescript
// 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).

## Examples

### Example 1: User wants to add StackOne to an OpenAI agent

User says: "I want my OpenAI agent to list employees from BambooHR"

Actions:
1. Confirm they have a StackOne API key and a linked BambooHR account
2. Install `@stackone/ai` and `zod`
3. Fetch tools with `accountIds` and `actions: ["bamboohr_list_employees"]`
4. Convert with `tools.toOpenAI()` and pass to the OpenAI chat completions call
5. Fetch the TypeScript GitHub README for the complete OpenAI example

Result: Working agent that can query BambooHR employees through StackOne.

### Example 2: User wants to set up MCP with Claude Code

User says: "How do I use StackOne MCP in Claude Code?"

Actions:
1. Fetch `https://docs.stackone.com/mcp/framework-guides/claude-code` for the setup guide
2. Walk through adding the MCP server config with their API key and account ID
3. Test with `npx @modelcontextprotocol/inspector` first

Result: Claude Code can call StackOne tools directly.

### Example 3: User is building a multi-tenant SaaS

User says: "Each of my customers has their own BambooHR. How do I handle that?"

Actions:
1. Explain the account-per-customer model: each customer links their own BambooHR via Connect Sessions
2. Show how to pass the customer's `accountId` when fetching tools
3. Recommend using `toolset.fetchTools({ accountIds: [customerAccountId] })` per request

Result: Understanding of the multi-tenant pattern with code to implement it.

## Troubleshooting

### Error: "Cannot find module 'zod'"
**Cause**: Missing peer dependency.
- `@stackone/ai` requires `zod` version >=3.25.0 <5
- Run `npm install zod` explicitly

### fetchTools returns empty array
**Cause**: No tools match the filter criteria.
- Check that the `accountId` corresponds to an active linked account
- Verify the provider name in `providers` filter matches exactly (e.g., `bamboohr` not `BambooHR`)
- Try without filters first to see all available tools

### MCP server returns 401
**Cause**: Authentication misconfigured.
- MCP uses Basic auth: `Authorization: Basic base64(api_key:)`
- The `x-account-id` header must reference a valid, active linked account
- Test with MCP Inspector to isolate auth vs. config issues

### SDK version mismatch with framework
**Cause**: Breaking changes between SDK versions.
- Always fetch the latest GitHub README for current compatibility
- Pin specific SDK versions in production
- Check the npm/PyPI changelog for migration guides

Related Skills

manage-agents

16
from diegosouzapw/awesome-omni-skill

Create, modify, and manage Claude Code subagents with specialized expertise. Use when you need to "work with agents", "create an agent", "modify an agent", "set up a specialist", "I need an agent for [task]", or "agent to handle [domain]". Covers agent file format, YAML frontmatter, system prompts, tool restrictions, MCP integration, model selection, and testing.

langchain-agents

16
from diegosouzapw/awesome-omni-skill

Expert guidance for building LangChain agents with proper tool binding, memory, and configuration. Use when creating agents, configuring models, or setting up tool integrations in LangConfig.

kramme:agents-md

16
from diegosouzapw/awesome-omni-skill

This skill should be used when the user asks to "update AGENTS.md", "add to AGENTS.md", "maintain agent docs", or needs to add guidelines to agent instructions. Guides discovery of local skills and enforces structured, keyword-based documentation style.

git-commit-for-ai-agents

16
from diegosouzapw/awesome-omni-skill

Commit changes to a git repository. Use whenever a git commit is to be executed.

dispatching-parallel-agents

16
from diegosouzapw/awesome-omni-skill

Use when facing 3+ independent failures that can be investigated without shared state or dependencies. Dispatches multiple Claude agents to investigate and fix independent problems concurrently.

custom-sub-agents

16
from diegosouzapw/awesome-omni-skill

Guidance for creating and organizing custom sub-agents in local repos, including folder conventions, per-agent structure, and AGENTS.md indexing. Use when asked where to store sub-agents or how to document them.

custom-agents

16
from diegosouzapw/awesome-omni-skill

GitHub Custom Agent File Format

creating-agents

16
from diegosouzapw/awesome-omni-skill

Create and review agent definition files (agents.md) that give AI coding agents a clear persona, project knowledge, executable commands, code style examples, and explicit boundaries. Use when a user asks to create an agent, define an agent persona, write an agents.md file, set up a custom Copilot agent, review an existing agent definition, or improve agent quality. Covers the six core areas: commands, testing, project structure, code style, git workflow, and boundaries.

create-agents-md

16
from diegosouzapw/awesome-omni-skill

Create or rewrite AGENTS.md files for Open Mercato packages and modules. Use this skill when adding a new package, creating a new module, or when an existing AGENTS.md needs to be created or refactored. Ensures prescriptive tone, MUST rules, checklists, and consistent structure across all agent guidelines.

building-agents

16
from diegosouzapw/awesome-omni-skill

Expert at creating and modifying Claude Code agents (subagents). Auto-invokes when the user wants to create, update, modify, enhance, validate, or standardize agents, or when modifying agent YAML frontmatter fields (especially 'model', 'tools', 'description'), needs help designing agent architecture, or wants to understand agent capabilities. Also auto-invokes proactively when Claude is about to write agent files (*/agents/*.md), create modular agent architectures, or implement tasks that involve creating agent components.

audit-agents-md

16
from diegosouzapw/awesome-omni-skill

Audit AGENTS.md files for token efficiency, completeness, scope hygiene, and actionability. Also considers skills and Cursor rules for redundancy. Use when the user wants to review, optimize, or restructure project agent instructions.

ai-coding-agents

16
from diegosouzapw/awesome-omni-skill

Comprehensive guide for using Codex CLI (OpenAI) and Claude Code CLI (Anthropic) - AI-powered coding agents. Use when orchestrating CLI commands, automating tasks, configuring agents, or troubleshooting issues.