Use this file to discover all available pages before exploring further.
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.
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.
Gemini 1.5 Pro and Flash — fast, multimodal, with a 1M-token context window.
Mistral
Mistral Large and Mixtral — efficient open-weight models for cost-sensitive workloads.
Hugging Face
Access thousands of open-source models via the Hugging Face Inference API.
OpenRouter
Route to the best available model automatically, with fallback and cost controls.
// Use any provider through the same interfaceconst 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.' }, ],});
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.
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 toolsconst 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);
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.
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 memberconst 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);
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.
Send messages via your agent’s phone number primitive. WhatsApp Business API and Telegram Bot API are both supported:
// Send a WhatsApp messageawait agent.phone.message.send({ to: '+15551234567', body: 'Your order has shipped! Track it at: https://track.example.com/abc123', channel: 'whatsapp',});// Send a Telegram messageawait agent.phone.message.send({ to: '@username', body: 'Your report is ready. Reply with "download" to receive it.', channel: 'telegram',});
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:
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.