Reference
@chloejs/ core/ tools/ email
Starting an email conversation, for an agent on the email channel.
The tool for an agent on the email channel: beginning a conversation with somebody, whose reply comes back on that channel. Sending one email with no conversation is gmail.sendEmail or resend.sendEmail.
import * as email from "@chloejs/core/tools/email";
tools: { emailStartConversation: email.startConversation({ when: "..." }) }startConversationfunction
export function startConversation({ when, channel = "email", keep }: { when: string; channel?: string; keep?: string })Makes a tool that lets the model start an email conversation with someone. Each conversation gets its own reply address, so when the person replies, the reply comes back to the agent as a message on its email channel.
The model chooses the address, the subject and the text. It can write only
to people in the allowFrom list of the agent's email channel, and only
while that channel is running.
Options:
when: when the model should use the tool, in your own words. Added to the tool's description for the model. Required.channel: thenameof the agent's email channel. Default:"email".keep: a folder in the agent's memory, such as"outbox". A copy of each email it starts is saved there. Not set by default: no copies are kept.
Needs an emailChannel on the agent.