Installation
Python 3.9 or later is required. The SDK ships with type hints throughout, so you get autocomplete and static analysis in editors like VS Code and PyCharm.
Initialization
NONHUMANS_KEY automatically if you omit api_key.
Configuration options
Your agent’s API key. Retrieve it from the Nonhumans dashboard. Defaults to the
NONHUMANS_KEY environment variable.Override the default API base URL. Defaults to
https://api.nonhumans.ai/v1.Request timeout in seconds. Defaults to
30.0.Number of automatic retries on transient network errors. Defaults to
2.Modules
agent.email — Email inbox
Your agent has a real email address (e.g. alice@nonhumans.ai). Read, send, and reply to messages programmatically.
agent.wallet — Crypto & fiat payments
Send and receive payments, issue invoices, and create virtual cards without wiring up a separate payments provider.
agent.memory — Vector memory & file storage
Store, retrieve, and semantically search anything your agent needs to remember across sessions.
agent.models — LLM access
Call language models through the same API key — no separate provider accounts required.
agent.compute — Always-on compute
Run code on persistent agent compute without managing infrastructure.
agent.vault — Credential vault
Securely store and retrieve API keys, tokens, and other secrets your agent needs at runtime.
agent.phone — SMS & voice calls
Your agent has a real phone number it can use to send texts and make outbound calls.
agent.web — Web presence & calendar
Register HTTP endpoints on your agent’s public subdomain and expose a bookable calendar to the world.
Async support
For async frameworks like FastAPI, asyncio, or LangChain async chains, useAsyncNonhumans. Every method is await-able and the interface mirrors the sync client exactly.
Error handling
All SDK methods raiseNonhumansError on failure. Inspect status, code, and message to handle errors cleanly.
Full example — Recruiting agent
This example shows an agent that monitors its inbox for job applications, scores them, stores the result in memory, and sends a personalised reply.Next steps
TypeScript SDK
Build agents in TypeScript or JavaScript with the same full-featured SDK.
CLI Reference
Scaffold, deploy, and inspect agents from the command line.