Backend Developer
/install langchain-email-agent
EmailAgent README
Overview
The EmailAgent class provides an AI-powered email composition and sending capability using LangChain with OpenAI's GPT model. It includes human-in-the-loop middleware that requires approval before emails are sent.
Configuration
Environment Variables
| Variable | Default | Description |
|---|---|---|
OPENAI_MODEL |
gpt-4o-mini |
OpenAI model to use |
Usage
import { EmailAgent } from './email.agent';
import { SendEmailDto } from '../dto/send-email.dto';
const agent = new EmailAgent();
const dto: SendEmailDto = {
email: '[email protected]',
name: 'John Doe',
subject: 'Meeting Request', // optional
body: 'Initial email content', // optional
instructions: 'Keep it formal' // optional
};
const result = await agent.sendEmail(dto);
Human-in-the-Loop Middleware
The agent uses humanInTheLoopMiddleware which interrupts execution on the EmailTool before sending emails. This allows for:
- approve - Send the email as composed
- edit - Modify the email before sending
- reject - Cancel the email operation
The readEmailTool is excluded from interruption (false), allowing read operations to proceed without approval.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
email |
string | Yes | Recipient email address |
name |
string | Yes | Recipient name |
subject |
string | No | Email subject line |
body |
string | No | Initial email body content |
instructions |
string | No | AI instructions for composing the email |
Return Value
Returns the final message content from the agent as a string.
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install langchain-email-agent - 安装完成后,直接呼叫该 Skill 的名称或使用
/langchain-email-agent触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Backend Developer 是什么?
Compose and send emails using AI with human approval for sending, allowing edits or rejection before delivery. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 963 次。
如何安装 Backend Developer?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install langchain-email-agent」即可一键安装,无需额外配置。
Backend Developer 是免费的吗?
是的,Backend Developer 完全免费(开源免费),可自由下载、安装和使用。
Backend Developer 支持哪些平台?
Backend Developer 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Backend Developer?
由 JawadSadiq01(@jawadsadiq01)开发并维护,当前版本 v1.0.0。