> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nonhumans.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Integrate Nonhumans Agents with AI Frameworks and Services

> Connect Nonhumans agents with LangChain, OpenAI Assistants, CrewAI, Stripe, Slack, and more to build powerful multi-agent workflows.

Nonhumans is designed to slot into your existing stack, not replace it. Whether you're orchestrating agents with LangChain or CrewAI, handling payments via Stripe, or routing messages through Slack and Telegram, Nonhumans provides the identity, memory, wallet, and compute layer that your framework doesn't. This page covers every supported integration, with working code examples for the most common patterns.

<Note>
  The Nonhumans models primitive gives your agent access to Anthropic, OpenAI, Google, Mistral, and more — all through a single API key. You don't need separate accounts or environment variables for each LLM provider.
</Note>

***

## LLM providers

Nonhumans model access is a unified gateway to the leading LLM providers. Call any model without managing separate API keys:

<CardGroup cols={2}>
  <Card title="Anthropic" icon="a">
    Claude 3.5 Sonnet, Claude 3 Opus, Claude 3 Haiku — ideal for reasoning and long-context tasks.
  </Card>

  <Card title="OpenAI" icon="robot">
    GPT-4o, GPT-4 Turbo, o1 — strong general-purpose and code generation models.
  </Card>

  <Card title="Google" icon="google">
    Gemini 1.5 Pro and Flash — fast, multimodal, with a 1M-token context window.
  </Card>

  <Card title="Mistral" icon="wind">
    Mistral Large and Mixtral — efficient open-weight models for cost-sensitive workloads.
  </Card>

  <Card title="Hugging Face" icon="face-smile">
    Access thousands of open-source models via the Hugging Face Inference API.
  </Card>

  <Card title="OpenRouter" icon="route">
    Route to the best available model automatically, with fallback and cost controls.
  </Card>
</CardGroup>

```typescript theme={null}
// Use any provider through the same interface
const response = await agent.models.chat({
  model: 'claude-3-5-sonnet',   // or 'gpt-4o', 'gemini-1.5-pro', etc.
  messages: [
    { role: 'user', content: 'Summarize this week's market news.' },
  ],
});
```

***

## Framework integrations

### LangChain

Expose your Nonhumans agent's primitives as LangChain tools so any LangChain agent or chain can read email, check wallet balances, or store memories without leaving the LangChain ecosystem.

```typescript theme={null}
import { createAgent } from '@nonhumans/sdk';
import { NonhumansTool } from '@nonhumans/sdk/langchain';
import { ChatAnthropic } from '@langchain/anthropic';
import { AgentExecutor, createToolCallingAgent } from 'langchain/agents';
import { ChatPromptTemplate } from '@langchain/core/prompts';

const agent = createAgent({ apiKey: process.env.NONHUMANS_API_KEY! });

// Wrap Nonhumans primitives as LangChain tools
const tools = [
  new NonhumansTool(agent.email, {
    name: 'read_inbox',
    description: 'Read unread emails from the agent inbox',
  }),
  new NonhumansTool(agent.wallet, {
    name: 'check_balance',
    description: 'Check the agent wallet balance',
  }),
  new NonhumansTool(agent.memory, {
    name: 'recall',
    description: 'Search agent memory for relevant past context',
  }),
];

const llm = new ChatAnthropic({ model: 'claude-3-5-sonnet-20241022' });

const prompt = ChatPromptTemplate.fromMessages([
  ['system', 'You are a helpful AI agent with access to email, wallet, and memory tools.'],
  ['placeholder', '{chat_history}'],
  ['human', '{input}'],
  ['placeholder', '{agent_scratchpad}'],
]);

const langchainAgent = createToolCallingAgent({ llm, tools, prompt });
const executor = new AgentExecutor({ agent: langchainAgent, tools });

const result = await executor.invoke({
  input: 'Check my inbox and summarize any messages about invoices.',
});

console.log(result.output);
```

***

### CrewAI

Use a Nonhumans agent as a specialized crew member in a CrewAI workflow. The agent brings its own identity, inbox, and wallet — while CrewAI handles task orchestration and inter-agent communication.

```typescript theme={null}
import { createAgent } from '@nonhumans/sdk';
import { NonhumansCrew } from '@nonhumans/sdk/crewai';
import { Crew, Task } from 'crewai';

const agent = createAgent({ apiKey: process.env.NONHUMANS_API_KEY! });

// Wrap your Nonhumans agent as a CrewAI-compatible crew member
const emailAgent = new NonhumansCrew(agent, {
  role: 'Email Manager',
  goal: 'Monitor the inbox, triage messages, and draft replies',
  backstory: 'An AI agent with full email access and LLM reasoning capabilities.',
});

const triageTask = new Task({
  description: 'Read all unread emails and categorize them by urgency.',
  expectedOutput: 'A JSON list of messages with category and recommended action.',
  agent: emailAgent,
});

const crew = new Crew({
  agents: [emailAgent],
  tasks: [triageTask],
  verbose: true,
});

const result = await crew.kickoff();
console.log(result);
```

***

## Blockchain and payments

| Integration           | What it enables                                        | Status         |
| --------------------- | ------------------------------------------------------ | -------------- |
| **Coinbase**          | On/off-ramp fiat ↔ crypto, custody, on-chain transfers | ✅ Available    |
| **Stripe**            | Fiat payments, invoicing, virtual card issuance        | ✅ Available    |
| **Solana**            | Native USDC and SOL transfers, SPL tokens              | ✅ Available    |
| **Ethereum**          | ETH and ERC-20 transfers on mainnet and L2s            | ✅ Available    |
| **Lightning Network** | Bitcoin micropayments                                  | 🔜 Coming soon |

***

## Messaging integrations

Your agent's phone primitive powers messaging integrations. Use it to send and receive SMS, WhatsApp, and Telegram messages from your agent's dedicated number.

### Slack

```typescript theme={null}
import { createAgent } from '@nonhumans/sdk';
import { WebClient } from '@slack/web-api';

const agent = createAgent({ apiKey: process.env.NONHUMANS_API_KEY! });
const slack = new WebClient(process.env.SLACK_BOT_TOKEN!);

// Example: agent posts a Slack alert when a high-priority email arrives
const messages = await agent.email.list({ folder: 'inbox', unread: true });

for (const message of messages) {
  if (message.subject.toLowerCase().includes('urgent')) {
    await slack.chat.postMessage({
      channel: '#alerts',
      text: `🚨 Urgent email from ${message.from}: "${message.subject}"`,
    });
  }
}
```

### WhatsApp and Telegram

Send messages via your agent's phone number primitive. WhatsApp Business API and Telegram Bot API are both supported:

```typescript theme={null}
// Send a WhatsApp message
await agent.phone.message.send({
  to: '+15551234567',
  body: 'Your order has shipped! Track it at: https://track.example.com/abc123',
  channel: 'whatsapp',
});

// Send a Telegram message
await agent.phone.message.send({
  to: '@username',
  body: 'Your report is ready. Reply with "download" to receive it.',
  channel: 'telegram',
});
```

***

## Cloud hosting integrations

You can host your agent logic on any serverless platform and use Nonhumans purely as the identity and primitives layer. Deploy to Cloudflare Workers, Vercel Edge Functions, or AWS Lambda and call the Nonhumans SDK from your handler:

<CodeGroup>
  ```typescript Cloudflare Workers theme={null}
  import { createAgent } from '@nonhumans/sdk';

  export default {
    async fetch(request: Request): Promise<Response> {
      const agent = createAgent({ apiKey: process.env.NONHUMANS_API_KEY! });

      const body = await request.json() as { message: string };

      const reply = await agent.models.chat({
        model: 'gpt-4o',
        messages: [{ role: 'user', content: body.message }],
      });

      return new Response(JSON.stringify({ reply: reply.content[0].text }), {
        headers: { 'Content-Type': 'application/json' },
      });
    },
  };
  ```

  ```typescript Vercel Edge Functions theme={null}
  import { createAgent } from '@nonhumans/sdk';
  import { NextRequest, NextResponse } from 'next/server';

  export const runtime = 'edge';

  export async function POST(req: NextRequest) {
    const agent = createAgent({ apiKey: process.env.NONHUMANS_API_KEY! });
    const { message } = await req.json();

    const reply = await agent.models.chat({
      model: 'claude-3-5-sonnet',
      messages: [{ role: 'user', content: message }],
    });

    return NextResponse.json({ reply: reply.content[0].text });
  }
  ```

  ```typescript AWS Lambda theme={null}
  import { createAgent } from '@nonhumans/sdk';
  import type { APIGatewayProxyHandler } from 'aws-lambda';

  export const handler: APIGatewayProxyHandler = async (event) => {
    const agent = createAgent({ apiKey: process.env.NONHUMANS_API_KEY! });
    const { message } = JSON.parse(event.body ?? '{}');

    const reply = await agent.models.chat({
      model: 'gpt-4o',
      messages: [{ role: 'user', content: message }],
    });

    return {
      statusCode: 200,
      body: JSON.stringify({ reply: reply.content[0].text }),
    };
  };
  ```
</CodeGroup>

<Tip>
  When using Nonhumans' built-in always-on compute (`npx nonhumans deploy`), you don't need a separate cloud host at all. Use external cloud platforms when you need custom networking, VPCs, or existing infrastructure integrations.
</Tip>

***

## Webhooks

Expose your agent as a public webhook endpoint so external services (Stripe, GitHub, Zapier, etc.) can trigger it on events:

```typescript theme={null}
// Register a webhook endpoint on your agent's subdomain
const endpoint = await agent.web.endpoint.register({
  path: '/stripe-webhook',
  events: ['invoice.paid', 'payment.failed'],
  secret: process.env.STRIPE_WEBHOOK_SECRET, // optional signature verification
});

console.log(`Webhook live at: ${endpoint.url}`);
// e.g. https://my-agent.nonhumans.ai/stripe-webhook
```

Your handler receives the raw POST body and headers, so you can verify signatures exactly as each provider's documentation describes.

***

## Full integration status

| Integration           | Category   | Status         |
| --------------------- | ---------- | -------------- |
| Anthropic (Claude)    | LLM        | ✅ Available    |
| OpenAI (GPT-4o, o1)   | LLM        | ✅ Available    |
| Google (Gemini)       | LLM        | ✅ Available    |
| Mistral               | LLM        | ✅ Available    |
| Hugging Face          | LLM        | ✅ Available    |
| OpenRouter            | LLM router | ✅ Available    |
| LangChain             | Framework  | ✅ Available    |
| CrewAI                | Framework  | ✅ Available    |
| OpenAI Assistants API | Framework  | ✅ Available    |
| Stripe                | Payments   | ✅ Available    |
| Coinbase              | Crypto     | ✅ Available    |
| Solana                | Blockchain | ✅ Available    |
| Ethereum              | Blockchain | ✅ Available    |
| Slack                 | Messaging  | ✅ Available    |
| WhatsApp              | Messaging  | ✅ Available    |
| Telegram              | Messaging  | ✅ Available    |
| Cloudflare Workers    | Hosting    | ✅ Available    |
| Vercel Edge Functions | Hosting    | ✅ Available    |
| AWS Lambda            | Hosting    | ✅ Available    |
| Zapier                | Automation | ✅ Available    |
| Lightning Network     | Crypto     | 🔜 Coming soon |
| Twilio (voice)        | Voice      | 🔜 Coming soon |
| HubSpot               | CRM        | 🔜 Coming soon |
| Salesforce            | CRM        | 🔜 Coming soon |

<Note>
  Don't see an integration you need? [Open a feature request](https://github.com/nonhumans/sdk/issues) or reach out at [support@nonhumans.ai](mailto:support@nonhumans.ai) — community-requested integrations are prioritized.
</Note>
