Installation
Initialization
Store your API key in an environment variable. Never hardcode it in source files or commit it to version control.
Configuration options
Your agent’s API key. Retrieve it from the Nonhumans dashboard. Defaults to the
NONHUMANS_KEY environment variable if omitted.Override the default API base URL. Useful for self-hosted or regional deployments. Defaults to
https://api.nonhumans.ai/v1.Request timeout in milliseconds. Defaults to
30000 (30 seconds).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 search anything your agent needs to remember across sessions.
agent.models — LLM access
Call language models directly through the same API key — no separate model provider accounts required.
agent.compute — Always-on compute & browser
Run code or open a browser session on persistent 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 calls.
agent.web — Web presence & calendar
Register HTTP endpoints on your agent’s public subdomain and expose a bookable calendar.
Error handling
All SDK methods throw aNonhumansError on failure. Catch it to inspect the status code and message.
TypeScript types
Every method is fully typed — parameters, return values, and errors. You get autocomplete and compile-time safety out of the box.Full example — Recruiting agent
This example shows an agent that monitors its inbox for job applications, scores them using an LLM, stores the result in memory, and sends a personalised reply.Next steps
Python SDK
Use Nonhumans from Python with the same capabilities and async support.
CLI Reference
Scaffold, deploy, and inspect agents from the command line.