mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-05-04 22:50:54 +00:00
feat: Add email integration plugin with IMAP/Exchange polling and SMTP reply
This commit is contained in:
parent
1e3cad6911
commit
34f2354cb1
23 changed files with 1488 additions and 0 deletions
|
|
@ -0,0 +1,20 @@
|
|||
from helpers.extension import Extension
|
||||
from agent import LoopData
|
||||
from plugins._email_integration.helpers.dispatcher import CTX_EMAIL_HANDLER
|
||||
|
||||
|
||||
class EmailContextPrompt(Extension):
|
||||
|
||||
async def execute(
|
||||
self,
|
||||
system_prompt: list[str] = [],
|
||||
loop_data: LoopData = LoopData(),
|
||||
**kwargs,
|
||||
):
|
||||
if not self.agent:
|
||||
return
|
||||
|
||||
# Only inject email conversation context if this chat was started by email
|
||||
if self.agent.context.data.get(CTX_EMAIL_HANDLER):
|
||||
prompt = self.agent.read_prompt("agent.system.tool.email_reply.md")
|
||||
system_prompt.append(prompt)
|
||||
Loading…
Add table
Add a link
Reference in a new issue