Introduction

When a DeepSeek Harness (DSH) agent executes tasks, it usually pays attention only to the current conversation context. If the agent needs to simulate a role with long-term memory, or needs to make decisions in a continuously evolving world, the existing context mechanism is no longer sufficient.

dsh-simulated-life is a plugin that provides “simulated life context” to DSH agents. In each conversation turn, it automatically reads “life events” from the workspace within the recent 24 hours and injects them into the context. It also provides the life_react tool, allowing the agent to write back feelings, thoughts, and actions to its own life journal. This enables the agent to “live in” a continuously evolving world.

Core Features and Behavior

  • Automatic Injection: The first step in each conversation turn (step === 1) injects events once. If there are no new events or changes in that turn, the process is skipped silently.
  • Time Window: Only events whose time falls within [now − 24h, now + 5min] are read, sorted in ascending time order.
  • Intelligent Deduplication: The plugin computes a SHA-256 fingerprint for event content (including reactions). An already injected event is not injected again if its content has not changed. Deduplication state is kept in memory (LRU, capped at 200 sessions).
  • Zero Intrusion: If there is no .life/ directory in the workspace, the plugin remains completely silent and does not consume resources. If a read fails or JSON is corrupted, entries are skipped one by one and do not affect other files.
  • World Status: It reads the world_summary with the latest date and injects it as well.

Installation and Activation

Install it with the official command:

dsh plugin --profile web add dsh-simulated-life

After installation, the plugin automatically mounts its bundled cordis.patch.yml configuration file, so no manual configuration changes are needed. As long as .life/ data exists in the workspace, the plugin takes effect in every conversation turn.

Configuration

Enable the plugin in the DSH configuration and set the window duration:

- id: simulated-life
  name: dsh-simulated-life
  config:
    windowHours: 24   # 可选:事件回溯滑动窗口时长(小时,默认 24)
    enabled: true     # 可选:false 时完全停用

Data Protocol and Usage

Data is stored in .life/<yymmdd>/events.json files.

Data Structure

Each date directory has one JSON file containing date, timezone, world_summary, and an events list.

{
  "date": "260915",
  "timezone": "Asia/Shanghai",
  "world_summary": "初秋微雨,市中心图书馆举办旧书市集,整座城市笼罩在湿漉漉的宁静中。",
  "events": [
    {
      "id": "evt-260915-001",
      "time": "2026-09-15T08:30:00+08:00",
      "type": "encounter",
      "title": "晨间雨中散步与偶遇",
      "description": "清晨去面包店买羊角面包时,在拐角处避雨遇到了老书店老板陈伯……",
      "actors": ["陈伯"],
      "location": "转角面包店外檐下",
      "impact": "获得了一把格子伞,得知了旧诗集情报",
      "react": {
        "feeling": "感到意外而温暖",
        "thought": "旧诗集很可能是绝版初版,下午有空去看看",
        "action": "向陈伯道谢并借了伞,决定下午前往集市",
        "updated_at": "2026-09-15T14:20:00+08:00"
      }
    }
  ]
}

Tool Invocation

An agent can call the life_react tool to record its reaction to an event. The tool writes the reaction into the corresponding event’s react field (implemented by temporary file + atomic rename).

Accompanying Workflows and Notes

  • World Evolution: This plugin does not generate event data by itself; it acts as the reader side. World evolution must be driven by an external Skill (for example, create-simulated-events). That Skill reads the previous day’s reactions to settle causal consequences, generates today’s events, and writes them to files.
  • Permissions: The plugin requires workspace read/write permissions. It writes only to files under the .life/ directory and does not initiate any network requests.
  • Dependency Versions: The plugin depends on @deepseek-ai/cordis and dsh-tools. According to the README, there are conflicting version numbers (4.0.2 vs 4.0.4, 0.1.2-rc.1 vs 0.1.7-rc.2), so environment compatibility must be verified before installation.
  • Use Cases: Suitable for agent applications that build long-term role-playing, simulate digital life, or require persistent life journals.

Summary

As a lightweight plugin, dsh-simulated-life addresses the issue that agents lack long-term life background. It uses the file system as a memory layer to close the loop between event injection and reaction write-back. When used with external Skills, it can build agent worlds with continuous evolution capabilities.

Directory: DeepSeek Harness Plugin Directory
Repository: GitHub