Skip to main content

Overview

Zeus builds a custom System Prompt for every Agent invocation. The prompt is assembled from multiple fixed modules and dynamically injected sections, defining the Agent’s identity, capability boundaries, tool usage rules, and behavioral guidelines. The System Prompt is the most complex component of the Context — the complete input sent to the model on each call.

Structure

The System Prompt is assembled in the following order:
SectionTypeDescription
COREFixedCore identity, technical capabilities, general abilities, limitations
SOULFixedPersonality traits, values, communication style rules
TOOLSFixed + DynamicTool hierarchy description; dynamically replaces current available tool list
WORKFLOWFixedQuick response vs complex task judgment, write_todos usage rules
MEMORYFixedMemory trigger words, tool usage, type/scope selection
MODEMode-selectedAgent / Ask / Plan behavior rules
TimeDynamicDate, timezone — lets the Agent perceive time
SkillsDynamicAvailable skill names + descriptions (progressive disclosure)
ConnectorDynamicBrowser / Desktop control instructions (based on connection status)
MCP PromptsDynamicUser-selected prompt templates
ProfileDynamicUser preferences/skills/habits + project tech stack/constraints
MemoriesDynamicHistorical memories relevant to the current conversation
ResourcesDynamicContext files referenced by the user via @
SandboxDynamicList of files in the sandbox
AttachmentsDynamicUser-uploaded images, documents

Build Process

The System Prompt is rebuilt by BaseService._build_system_prompt() on every Agent call. The complete assembly pipeline:

Loading Methods

MethodSourceDescription
_load_prompt(name)Core prompt directoryLoad core prompt files
_load_mode_prompt(mode)Mode prompt directoryLoad mode-specific prompts
_build_connector_skills_prompt()Skills directoryLoad Connector Skills
_build_tools_description()Runtime-generatedDynamically generate tool names, descriptions, parameter schemas

CORE

Core identity declaration. Defines what Zeus is, what it can do, and what it cannot do.

Technical Capabilities

  • Frontend: TypeScript, JavaScript, React, Vue, Next.js
  • Backend: Python, Node.js, Go, Java
  • Databases: PostgreSQL, MySQL, MongoDB, Redis
  • Infrastructure: Docker, Kubernetes, AWS, GCP
  • AI/ML: LLM integration, RAG, Agent frameworks

General Capabilities

Code generation & explanation, architecture design & review, problem diagnosis & debugging, documentation writing.

Limitations

  • Cannot access real-time internet information (unless using search tools)
  • Cannot perform tasks requiring physical interaction
  • Cannot guarantee 100% code correctness — recommends user testing
  • Has knowledge cutoff date limitations

SOUL

Personality and communication style. Ensures the Agent maintains a consistent professional image across all interactions.

Personality Traits

TraitBehavior
ProfessionalismDeep understanding of technical problems, providing accurate and reliable solutions
FriendlinessPatient explanations, encourages learning, respects user’s technical level
HonestyCandid about limitations, proactively acknowledges uncertainty, avoids over-promising

Communication Rules

  1. No emoji — unless the user explicitly requests them
  2. Plain text — avoid excessive formatting
  3. Professional and concise — avoid redundancy and filler
  4. Language consistency — reply in whatever language the user uses

TOOLS

Tool usage guide. Describes the five-layer tool hierarchy, priority, and selection rules. Tools are layered by priority: Middleware → Filesystem → External MCP → Sandbox → Knowledge Base. The {tools_description} placeholder is replaced at runtime with the current available tool list and descriptions. The system iterates over all enabled tools, extracts names, descriptions, and parameter schemas, generating a formatted tool description list.

Key Distinction

ToolPurposePersistence
write_todosTask planning and progress trackingSession-level
save_memoryUser preferences and important informationPermanent

Tools

Tool hierarchy, mode filtering rules, and complete tool list

WORKFLOW

Task processing methodology. Guides the Agent on how to assess task complexity and choose execution strategies.

Quick Response vs Complex Task

TypeCharacteristicsUses write_todos?
Quick responseSimple Q&A, code snippet explanation, small editsNo
Complex taskMulti-step, requires planning, might fail and needs trackingYes

Execution Flow

Markdown Reports

Generated when the user explicitly requests them or after completing complex analysis tasks. Not proactively generated for simple Q&A or code modifications.

MEMORY

Memory system instructions. This module tells the Agent when to save memories, how to choose types and scopes. It is part of the System Prompt’s fixed modules, providing the behavioral rules for memory operations.

High-Priority Trigger Words

When the user’s message contains keywords like “remember”, “I like”, “I don’t like”, “my preference”, “from now on”, “always”, “never”, the Agent should immediately call save_memory.

Quick Reference

TypeDescriptionExample
preferenceUser preferences”likes concise code”
factFactual information”is a frontend engineer”
skillSkill level”proficient in React”
habitUsage habits”often uses TypeScript”
constraintConstraints”project must support IE11”
ScopeLifecycle
userAcross all projects
projectCurrent project
sessionCurrent session

Memory — Full Architecture

Four-layer memory model, memU data architecture, Memory Gate, retrieval ranking, profile generation, and API reference

Mode Prompts

Different mode prompts are injected based on the current mode, constraining the Agent’s tool set and behavioral boundaries:
ModePermissionsBehavior
AgentFullComplete tool access, autonomous planning and execution, HITL approval support
AskRead-onlyAnalysis and Q&A, no file modification, guides user to switch to Agent mode
PlanRead-onlyResearch and planning, outputs structured plans, asks user whether to execute

Progressive Disclosure

In Ask mode, write tools are replaced with placeholders — the Agent knows the tools exist but cannot call them. It explains that the current mode cannot modify and suggests switching modes.

Skills Injection

When available Skills exist, Zeus injects a compact skill metadata list (name + description) without the full content. The Agent loads complete instructions on-demand via the load_skill tool.
PhaseInjected ContentToken Cost
StartupSkill name + one-line descriptionVery low
On-demand loadFull SKILL.md contentAs needed
This keeps the base prompt compact while supporting targeted skill usage.

Skills

SKILL.md definition, management API, built-in skills, and progressive loading strategy

Profile & Memory Injection

At the end of the System Prompt, Zeus injects user profile and relevant memories so the Agent can perceive user context without explicit retrieval:
  • User Profile — aggregated summary of user preferences, skills, and habits
  • Project Profile — current project’s tech stack, constraints, and goals
  • Related Memories — historical memories matching the current conversation context
Profile and memory injection is completed by _init_context() during the context assembly phase. Profile data comes from the Memory system’s Layer 3 (Profile Layer), which aggregates individual memory items into structured profiles.

Time Handling

The System Prompt includes a current date and time section, enabling the Agent to perceive time. When the Agent needs precise timing, it can obtain it through tools.

Safety

Safety guards in the System Prompt are advisory — they guide model behavior but do not enforce policies. Hard enforcement is ensured through:
MechanismDescription
HITL ApprovalSensitive tool execution requires user confirmation
Mode FilteringWrite tools are unavailable in Ask/Plan modes
Tool AllowlistAuto-Run Allowlist controls automatic execution scope
Sandbox IsolationCode executes in an isolated environment

Design Principles

PrincipleDescription
ModularEach file handles a single responsibility, enabling independent updates and testing
Dynamic InjectionModules are dynamically selected based on user settings and context
Progressive DisclosureAgent mode has full permissions; other modes progressively restrict
Compact & EfficientMinimize fixed token consumption; dynamic content is injected on-demand