LangChain
@anima-labs/toolkit-langchain wraps the Anima SDK as LangChain.js tools, so any LangChain agent can send and read real email from its own inbox.
Install
@langchain/core >= 1.0) and Node 20+.
Prerequisites
- An Anima API key and an agent — create both in console.useanima.sh or follow the email quickstart
Bind the tools to an agent
Tools
Every tool is backed by a live Anima API route and throws on API errors so your agent executor can react.
Runnable example: send a real email and read it back
The tools work standalone too — no model key needed. This is the fullexamples/quickstart.ts
flow, which also runs against a mock API in the toolkit repo’s CI on every release:
Anima blocks sending to the agent’s own addresses server-side (anti-loop
guard), so point
ANIMA_TO at an external inbox — for example your personal
one, and watch the email land there.Reading received mail
Incoming email to the agent’s address is ingested automatically. List it withdirection: "INBOUND":
Next steps
- Email quickstart — create agents and inboxes
- Webhooks — get pushed
message.receivedevents instead of polling - SDK reference — the full Anima API surface beyond email
