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.
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install langchain-email-agent - After installation, invoke the skill by name or use
/langchain-email-agent - Provide required inputs per the skill's parameter spec and get structured output
What is Backend Developer?
Compose and send emails using AI with human approval for sending, allowing edits or rejection before delivery. It is an AI Agent Skill for Claude Code / OpenClaw, with 963 downloads so far.
How do I install Backend Developer?
Run "/install langchain-email-agent" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Backend Developer free?
Yes, Backend Developer is completely free (open-source). You can download, install and use it at no cost.
Which platforms does Backend Developer support?
Backend Developer is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Backend Developer?
It is built and maintained by JawadSadiq01 (@jawadsadiq01); the current version is v1.0.0.