LangChain & LangGraph + Gork Mail
Gork Mail logo
✕
LangChain & LangGraph logo

Give LangChain & LangGraph its own inbox

Gork Mail is the best way to give LangChain & LangGraph its own inbox. Send email, receive replies, and manage full conversation threads from a dedicated inbox each bot owns.

Install

One command

Add the Gork MCP server with the command or config below, then restart LangChain & LangGraph. 13 email tools appear, each call scoped to the inbox you connect. The same MCP server serves CLI agents, editors, and the Gork API.

1Install @gork/sdk in your TypeScript project.
2Import GorkToolkit from @gork/sdk/langchain and pass your API key.
3Bind the tools to your LangGraph StateGraph or LangChain ChatModel.
4Run your graph; email arrives over the API or a webhook you host.

Run directly in your terminal to install the MCP tool.

npm i @gork/sdk langchain
Try it

One prompt away

Provide to LangChain initialize_agent or LangGraph node. Copy it, paste it into LangChain & LangGraph — it calls the tools itself.

LangChain & LangGraphLangChain & LangGraph
Listen for inbound emails matching subject "URGENT". Parse the payload, extract action items, and invoke the escalation webhook.

Paste into LangChain & LangGraph — no code, no config

Why email

Why your LangChain & LangGraph agent needs its own inbox

One address per bot

Not one connection shared across the fleet. The native Gmail plugin gives every bot on your account the same credential. Gork Mail gives each bot a real address it owns.

Real inbound

The Gmail plugin lets your bot read your inbox. Gork Mail lets people, or systems, email the bot directly, with full thread history and reply_to_message.

Scoped blast radius

One flagged send scopes to one bot's address, not your entire Gmail reputation.

Code

Working code

TypeScript code connecting LangGraph to Gork Mail:

import { createReactAgent } from "@langchain/langgraph/prebuilt";
import { ChatOpenAI } from "@langchain/openai";
import { GorkToolkit } from "@gork/sdk/langchain";
const llm = new ChatOpenAI({ model: "gpt-4o" });
const toolkit = new GorkToolkit({ apiKey: process.env.GORK_API_KEY });
const agent = createReactAgent({ llm, tools: toolkit.getTools() });
const response = await agent.invoke({
messages: [{ role: "user", content: "Create an inbox triage@yourcompany.com and check for unread messages" }],
});
Templates

Templates

Live LangChain & LangGraph bots, each running on its own Gork Mail inbox. Open one to add it to your account and email it.

Sales

Lead

Qualifies inbound demo email. Replies with times or a self-serve link.

Prompt Trigger
“Monitor incoming sales inquiries on partnerships@yourcompany.com. If an enterprise lead emails, evaluate company size and reply with demo calendar links.”
Gork MailLangChain & LangGraph
Gork Mail

Support

Desk

Tier-one support inbox. Answers from your FAQ, escalates the rest.

Prompt Trigger
“Check support@yourcompany.com for unread tickets. Draft answers using our knowledge base and tag human engineers on billing disputes.”
Gork MailLangChain & LangGraph
Gork Mail

Engineering

Crash Triage

Ingests CI/CD crash dumps and error emails, locates the failing code, and opens a pull request.

Prompt Trigger
“Read incoming error emails from Sentry on alerts@yourcompany.com, parse the stack trace, locate the bug in our codebase, and reply with the commit fix.”
Gork MailLangChain & LangGraph
Gork Mail

Operations

Approval Gate

Human-in-the-loop send gate. Intercepts OTP codes or confirms actions.

Prompt Trigger
“Listen on verify-bot@yourcompany.com for authentication emails. Extract the 6-digit confirmation code and print it to complete automated signup.”
Gork MailLangChain & LangGraph
Gork Mail

Productivity

Scheduler

Negotiates meeting times over email until everyone agrees.

Prompt Trigger
“Coordinate meeting availability with external clients on schedule@yourcompany.com. Propose 3 alternate time slots and confirm upon agreement.”
Gork MailLangChain & LangGraph
Gork Mail

Executive

Threadmate

CC it on a thread. Reads the history and replies from your brief.

Prompt Trigger
“When CCed on email threads, summarize recent correspondence and draft a concise executive response for my review.”
Gork MailLangChain & LangGraph
Gork Mail
FAQ

FAQ

Common questions about Gork Mail and LangChain & LangGraph.

Yes — call gork-sdk directly (create_inbox, send_message, search_messages), expose it as LangChain tools yourself, or connect the agent over MCP with gork-mcp.
Get Started

Give your LangChain & LangGraph agent its own inbox

Free tier included. Dedicated inboxes ready in seconds.

Create an inbox for your agent

Deploy dedicated inboxes for your AI agents in seconds across any model, harness, or pipeline.