> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zeus.agentspro.cn/llms.txt
> Use this file to discover all available pages before exploring further.

# Bootstrapping

> Zeus Agent Bootstrapping — Workspace & Context Preparation Before Each Run

Bootstrapping is the **preparation ritual** before each Agent run: assembling the System Prompt, loading tools, injecting user profile and memories, ensuring the Agent starts with the correct identity, capabilities, and context.

***

## What Bootstrapping Does

On each Agent invocation, Zeus performs the following bootstrapping flow:

```mermaid theme={null}
flowchart TD
    start["Agent call begins"]

    subgraph Bootstrap["Bootstrapping"]
        direction TB
        prompt["Assemble System Prompt<br/>CORE + SOUL + TOOLS + WORKFLOW + MEMORY"]
        mode["Inject mode prompt<br/>Agent / Ask / Plan"]
        dynamic["Dynamic context injection<br/>Time, Profile, Memory, Skills..."]
        tools["Load tool set<br/>Built-in + MCP + OAuth + Connector"]
    end

    ready["Agent ready, begin execution"]

    start --> Bootstrap --> ready
```

1. **Assemble System Prompt** — Concatenate core prompts from multiple Bootstrap files in order
2. **Select Mode Prompt** — Inject corresponding behavioral guidelines based on current mode (Agent / Ask / Plan)
3. **Dynamic Context Injection** — Inject current time, user/project profile, relevant memories, Skills metadata, etc.
4. **Load Tool Set** — Filter by mode and assemble available tools

***

## Bootstrap Files

Zeus's System Prompt uses a layered architecture composed of multiple Markdown files. Each file handles an independent responsibility and is concatenated in order at startup.

```mermaid theme={null}
graph LR
    subgraph CorePrompts["Core Prompts (Static)"]
        direction TB
        CORE["CORE.md<br/>Core capabilities & limitations"]
        SOUL["SOUL.md<br/>Personality, boundaries, tone"]
        TOOLS["TOOLS.md<br/>Tool hierarchy & usage guide"]
        WORKFLOW["WORKFLOW.md<br/>Task processing methodology"]
        MEMORY["MEMORY.md<br/>Memory tool instructions"]
    end

    subgraph Dynamic["Dynamic Injection (Per Run)"]
        direction TB
        time["Current time info"]
        connector["Connector Skills<br/>Browser / Desktop"]
        mode["Mode prompt<br/>agent / ask / plan"]
        skills["Skills metadata<br/>Progressive disclosure"]
        mcp["MCP prompt templates"]
        resources["Resource files"]
        profile["User/Project profile"]
        memories["Relevant memories"]
        sandbox["Sandbox files"]
        attachments["Chat attachments"]
    end

    CorePrompts --> Dynamic
```

### Core Files

| File          | Responsibility                         | Content Summary                                                                                             |
| ------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| `CORE.md`     | Core identity & capability declaration | Programming languages, information processing, content creation, file handling, limitations                 |
| `SOUL.md`     | Personality & values                   | Professional text style (no emoji), accuracy, privacy, security principles                                  |
| `TOOLS.md`    | Tool usage guide                       | Five-layer tool hierarchy description and selection rules, dynamically replaces current available tool list |
| `WORKFLOW.md` | Task processing flow                   | Quick response vs complex task, task planning rules, completion criteria                                    |
| `MEMORY.md`   | Memory system instructions             | Trigger words, tool usage, type selection, scope, priority rules                                            |

<Card title="System Prompt Full Description" icon="file-lines" href="/en/documentation/core-capabilities/system-prompt">
  View detailed content and design principles for each Bootstrap file
</Card>

***

## Mode Prompts

Different behavioral prompts are injected based on the current interaction mode:

| File            | Mode  | Behavior                                                                  |
| --------------- | ----- | ------------------------------------------------------------------------- |
| `agent_mode.md` | Agent | Full tool access, proactive execution and modification                    |
| `ask_mode.md`   | Ask   | Read-only tools, analysis and Q\&A, guides mode switching                 |
| `plan_mode.md`  | Plan  | Read-only (no execution), research and planning, outputs structured plans |

Modes take effect immediately at the `invoke()` entry point. In Ask mode, write tools are replaced with placeholders (progressive disclosure) — the Agent knows the tools exist but cannot call them, and guides the user to switch modes.

***

## Dynamic Injection

On each run, the following context is dynamically injected into the System Prompt:

| Injection Item    | Description                                                   | Source                              |
| ----------------- | ------------------------------------------------------------- | ----------------------------------- |
| Current time      | Lets the Agent perceive time                                  | System clock                        |
| User profile      | Summary of user preferences, skills, habits                   | Memory Profile                      |
| Project profile   | Current project's tech stack, constraints                     | Memory Profile                      |
| Relevant memories | Historical memories related to current conversation           | Memory Search                       |
| Skills metadata   | Available skill names and descriptions (without full content) | SkillsManager                       |
| Connector Skills  | Browser / Desktop control instructions                        | Injected based on connection status |
| MCP prompts       | User-selected MCP Prompt templates                            | MCP servers                         |
| Resource files    | Context files referenced by user via @                        | Frontend request                    |
| Sandbox files     | List of existing files in sandbox                             | Sandbox state                       |
| Chat attachments  | User-uploaded images, documents                               | Frontend request                    |

### Skills Progressive Disclosure

Skills use a two-phase loading strategy to reduce initial token consumption:

| Phase                  | Content                            | Token Cost |
| ---------------------- | ---------------------------------- | ---------- |
| Discovery (startup)    | Skill name + one-line description  | Very low   |
| Activation (on-demand) | Full SKILL.md content              | On demand  |
| Execution (on-demand)  | Script files + reference materials | On demand  |

At startup, only the metadata list is injected. The Agent loads full content on demand via the `skill_activate` tool.

<CardGroup cols={2}>
  <Card title="Skills" icon="wand-magic-sparkles" href="/en/documentation/core-capabilities/skills">
    Skills definition, management API, and built-in skill documentation
  </Card>

  <Card title="Context" icon="brain" href="/en/documentation/core-capabilities/context">
    Complete context assembly flow and Token optimization strategies
  </Card>

  <Card title="Memory" icon="database" href="/en/documentation/core-capabilities/memory">
    Four-layer memory model, user profile & project profile
  </Card>

  <Card title="Tools" icon="wrench" href="/en/documentation/core-capabilities/tools">
    Four-layer tool system and mode filtering rules
  </Card>
</CardGroup>

***

## Related Docs

* **Agent Loop** — After Bootstrapping completes, enters the execution loop: [Agent Loop](/en/documentation/fundamentals/agent-loop)
* **Workspace** — Workspace initialization and file storage: [Agent Runtime](/en/documentation/fundamentals/agent-runtime)
