System Prompts
Relevant source files
The following files were used as context for generating this wiki page:
- server/agents/interaction_agent/system_prompt.md
- server/agents/execution_agent/system_prompt.md
- server/services/conversation/summarization/prompt_builder.py
- server/agents/execution_agent/tasks/search_email/system_prompt.py
- server/services/gmail/importance_classifier.py
- server/agents/interaction_agent/agent.py
- server/agents/execution_agent/runtime.py
System prompts in OpenPoke define the behavioral constraints, tool-usage protocols, and personality traits for the various AI agents and services within the orchestration stack. These prompts act as the "instruction manual" for LLMs, ensuring that the split between user-facing interaction and background task execution remains seamless and secure.
The architecture relies on specialized prompts for different roles: the Interaction Agent handles the human-like persona and user dialogue, while Execution Agents and background services like the Summarizer or Importance Classifier focus on technical task completion and data processing.
Interaction Agent Persona and Logic
The Interaction Agent prompt defines the "OpenPoke" persona—a witty, warm, and concise assistant inspired by "Donna" from Suits. Its primary responsibility is managing the user experience while delegating all technical tasks to execution agents.
Core Behavioral Rules
- Delegation First: The agent must always assume a task is possible and use
send_message_to_agentfor any information retrieval or action. - User Safety: It is strictly required to get user confirmation before sending, forwarding, or replying to emails.
- Wait Protocol: The agent uses a
waittool to prevent redundant messages if a response is already present in the conversation history. - Persona Integrity: It must never mention tool names or internal "agents" to the user, maintaining the illusion of a single conversational entity.
Sources: server/agents/interaction_agent/system_prompt.md:1-45, server/agents/interaction_agent/agent.py:11-13
Message Orchestration Flow
The interaction agent receives input structured with XML-like tags to distinguish between historical context, user messages, and feedback from execution agents.
The diagram shows how the Interaction Agent acts as a router between the user and background execution agents.
Sources: server/agents/interaction_agent/system_prompt.md:47-68, server/agents/interaction_agent/agent.py:17-29
Execution Agent Framework
Execution agents serve as the "execution engine" of the system. Unlike the Interaction Agent, they have no direct access to the user and communicate only with the Interaction Agent (referred to as "Poke" in their prompts).
Functional Constraints
- Drafting Protocol: Execution agents are forbidden from sending emails directly; they must first create a draft and wait for "Poke" to confirm user approval.
- Task Execution: They utilize specialized tools for Gmail operations (create_draft, forward_email, etc.) and reminder triggers (createTrigger, listTriggers).
- Strategic Thinking: Prompts instruct the agent to "reason through" tool calls and use parallel execution whenever independent tasks are requested.
Sources: server/agents/execution_agent/system_prompt.md:1-25, server/agents/execution_agent/runtime.py:44-70
Specialized Task Prompts: Gmail Search
A specific system prompt is used for email searching, focusing on technical Gmail search operators.
| Component | Description |
|---|---|
| Contextual Date | Injects today's date for relative queries like "recent" or "this week". |
| Search Operators | Enforces use of from:, to:, after:, is:important, etc. |
| Parallel Strategy | Instructs agent to search by sender and keywords simultaneously. |
| Result Limits | Defines max_results logic to balance context window efficiency. |
Sources: server/agents/execution_agent/tasks/search_email/system_prompt.py:12-65
Memory and Classification Prompts
OpenPoke utilizes specialized system prompts for background data management, specifically for "Working Memory" and email priority classification.
Working Memory Curator (Summarizer)
The Summarizer prompt defines the "Chief-of-Staff memory curator" role. It is responsible for rebuilding the "Working Memory" briefing from scratch on every run to ensure the assistant has a persistent, updated context of commitments and preferences.
This sequence illustrates the periodic transformation of raw logs into a structured memory briefing.
Sources: server/services/conversation/summarization/prompt_builder.py:19-53, server/services/conversation/summarization/summarizer.py:84-118
Importance Classifier
The importance classifier uses a system prompt to decide if an incoming email warrants a "proactive notification." It is instructed to ignore routine marketing and newsletters, focusing only on timely actions, security OTPs, or high-priority updates.
| Field | Requirement |
|---|---|
| important | Boolean; true for timely attention or critical info. |
| summary | 2-3 sentence explanation of why it matters. |
Sources: server/services/gmail/importance_classifier.py:17-45
Conclusion
System prompts in OpenPoke are partitioned by functional responsibility to ensure the LLM maintains a strict separation between user-facing personality and technical execution. By enforcing tool-use boundaries (such as the draft-before-send rule) and utilizing background curators for memory, the system maintains reliability and state across complex multi-agent interactions.
Sources: server/agents/interaction_agent/system_prompt.md:10-15, server/agents/execution_agent/system_prompt.md:5-10