Skip to content

About

[๐Ÿ“ฆ|๐Ÿงช] (ๆžๅˆ›ไบŒ้ข) An AI Agent character that truly ๐ฉ๐ž๐ซ๐ฌ๐ข๐ฌ๐ญ๐ฌ

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

ย 

History

109 Commits

Folders and files

Repository files navigation

Is there truly no turning of the tide?
I ask myself, ask this oceanโ€”if I were to cast myself into its embrace, would anything be different? Memory lives in the water, in the endless sea. It will tell you everything. It speaks of the deepest longings in the human heart: a world of mutual understanding has already been born, only to fall once more into slumber.
It will return. It never left.

Lepimemory Banner

๐Ÿฆ‹ Lepimemory โœ’๏ธ

โœจ An AI Agent character that truly persists, โœจ
with persistent state, personality, long-term memory, and real action capabilities.

Warning

ๅœจๅฏนๆžๅˆ›ๅทฅไฝœๅฎค็š„็ฌฌไบŒๆฌก้ข่ฏ•็ป“ๆŸ Demo Showcase ๅŽ๏ผŒ้›ถ้Ÿณๅ†ณๅฎšๅœๆญข Lepimemory ็š„ๅผ€ๅ‘ใ€‚

ไธ€ๆ–น้ข๏ผŒ่ฏฅ้กน็›ฎ็š„็ ”ๅ‘ๅˆ่กทไป…ไธบๆžๅˆ›ๅทฅไฝœๅฎคไบŒ้ข้ข˜็›ฎ็š„ Demo๏ผŒไธบไบ†ไฟ่ฏๅฐฝๅฏ่ƒฝๅˆ‡้ข˜ Level 1&2๏ผŒ้›ถ้Ÿณไธบ้ข˜่ฟฐ็š„้ƒจๅˆ†่ฆๆฑ‚ๆปก่ถณไบ†้žๅธธ่ฏกๅผ‚ไธ”ไธ‘้™‹็š„ๅฎž็Žฐ๏ผ›ๅฆไธ€ๆ–น้ข๏ผŒ้›ถ้Ÿณๆญฃๅœจ็ ”็ฉถๆ–ฐ็š„ AI Agent ้กน็›ฎใ€‚่ฏฅ้กน็›ฎๅฐฑๆญคๅฝ’ๆกฃใ€‚

ๆ„Ÿ่ฐขๅœจๅผ€ๅ‘่ฟ‡็จ‹ไธญๆไพ›่ฟ‡ๅธฎๅŠฉใ€ๅปบ่ฎฎๅ’Œๆ”ฏๆŒ็š„ๆœ‹ๅ‹ไปฌใ€‚

Note

The project will stop adding new features before Geek Tech Club's Demo Day, and will only take bug fixes, experience improvements, and routine maintenance from here on.

Almost all of the features the project claims are implemented, but the development team does not assert that the project is production-ready. The codebase still contains plenty of hardcoded logic and mock implementations written for the demo, and Lepimemory will keep needing the team's ongoing iteration and refinement.

๐Ÿ“– About

Lepimemory is the complete AI Agent system LyCecilion built for Geek Tech Club's second interview challenge โ€” "design and implement an intelligent character Agent with persistent state, personality, memory, and action capabilities".

The project aims to go beyond the unremarkable memory system designs of traditional AI Agent systems: instead of plain text and naive RAG, it uses a self-developed emotion module and a memory system built on Hindsight, SQLite, and the like. Above the underlying LLM, Lepimemory independently maintains a state machine, a controlled memory lifecycle, and genuine system action capabilities.

โœจ Features

Lepimemory implements the following features, as required by the interview challenge.

  • The character's existence is continuous and coherent. A self-developed emotion module keeps the character consistent across conversations.
  • It has a past and can act. A mature system maintains memory, handles tool calls, and provides observability.
  • It shows the character's inner thoughts. It supports Live2D integration, or a plain rotating-sticker scheme, to present the character's mood and thoughts.

The project intends to keep building out more capabilities in the future, such as real-time voice conversation.

๐Ÿš€ Quick Start

Make sure the machine has the following:

  • Docker (with Docker Compose v2)
  • make, Bash, curl, tar, OpenSSL, shasum

Lepimemory's entry points are driven by the project's pinned toolchain, so there is no need to install Node, pnpm, and DeepSeek Harness globally beforehand. make bootstrap automatically downloads and verifies the pinned Node 24.20.0 and pnpm 10.28.2; make install-profile installs DeepSeek Harness into the specified directory.

# Prepare the pinned toolchain
make bootstrap

# Configure environment variables
cp .env.example .env
# Edit .env and fill in LEPI_LLM_BASE_URL and LEPI_LLM_API_KEY

# Install and generate the profile
make install-profile DSH_HOME=/tmp/lepimemory-home

# Start the development server
DSH_HOME=/tmp/lepimemory-home PORT=3181 LEPI_BANK=lepimemory-demo make dev

The first time make dev runs, it builds and starts the two memory service images, Hindsight and Laya, via Docker.

Configure the LLM credentials as described in Configuration. Without LLM credentials, the system starts in an unconfigured state: the frontend can display the status, but no conversation can be started. To avoid credential conflicts in the demo, Lepimemory does not support specifying LLM credentials from anywhere else for now.

Once startup succeeds, the terminal prints an access URL with authentication parameters; open it in a browser to get in.

๐Ÿ“ฆ Installation

The launch scripts provided so far only support the installation route described in Quick Start. Other installation methods will be added in a future iteration.

โš™๏ธ Configuration

Lepimemory manages LLM credentials uniformly through LEPI_* environment variables. Copy .env.example to .env, then modify the following fields:

  • Shared LLM connection: LEPI_LLM_BASE_URL and LEPI_LLM_API_KEY.
  • Per-route overrides: LEPI_ROLE_* (the character's main model), LEPI_PROCESS_* (the processing model), LEPI_CONTROL_FALLBACK_* (fallback route), and LEPI_HINDSIGHT_* (memory backend model); each can point at a different endpoint.
  • Memory bank identifier: LEPI_BANK, which sets the storage bank identifier for long-term memory (defaults to lepimemory-v2).

๐Ÿ“ Project Structure

lepimemory/
โ”œโ”€โ”€ dsh/
โ”‚   โ”œโ”€โ”€ profiles/lepimemory/          the dsh install profile (model routes, agent preset, persona)
โ”‚   โ””โ”€โ”€ plugins/dsh-lepimemory-state/ the character kernel
โ”‚       โ”œโ”€โ”€ src/                      hand-written TypeScript
โ”‚       โ”‚   โ”œโ”€โ”€ index.ts              entry: wiring, hooks, notices
โ”‚       โ”‚   โ”œโ”€โ”€ config.ts store.ts    configuration and the single SQLite source of truth
โ”‚       โ”‚   โ”œโ”€โ”€ evidence.ts           session citations (metadata only)
โ”‚       โ”‚   โ”œโ”€โ”€ processor.ts contracts.ts control.ts
โ”‚       โ”‚   โ”‚                         structured model calls, closed schemas, memory intents
โ”‚       โ”‚   โ”œโ”€โ”€ memory*.ts admission.ts candidate-store.ts task-store.ts
โ”‚       โ”‚   โ”‚                         memory lifecycle: pipeline, authorisation, queue
โ”‚       โ”‚   โ”œโ”€โ”€ write-worker.ts curate-worker.ts hindsight.ts recall*.ts
โ”‚       โ”‚   โ”‚                         Hindsight retention, curation and recall
โ”‚       โ”‚   โ”œโ”€โ”€ machine.ts state-runtime.ts      mood / relation state machine
โ”‚       โ”‚   โ”œโ”€โ”€ action.ts                        tools with real side effects
โ”‚       โ”‚   โ”œโ”€โ”€ history.ts panel.ts              surface redaction and the HTTP panel
โ”‚       โ”‚   โ”œโ”€โ”€ shared/               browser-safe definitions shared with the client
โ”‚       โ”‚   โ””โ”€โ”€ client/               hand-written TSX for the browser panel and avatar
โ”‚       โ”œโ”€โ”€ test/                     six node:test behaviour suites
โ”‚       โ”œโ”€โ”€ assets/avatar/            62 GIF frames for the avatar overlay
โ”‚       โ”œโ”€โ”€ lib/                      GENERATED server output
โ”‚       โ””โ”€โ”€ client.js                 GENERATED browser bundle
โ”œโ”€โ”€ scripts/                          pinned toolchain bootstrap, build driver, launcher, verification
โ”œโ”€โ”€ deploy/                           Hindsight and Laya Dockerfiles, Laya service source
โ”œโ”€โ”€ assets/                           repository imagery
โ””โ”€โ”€ docs/                             technical documentation (see below)

lib/, client.js and scripts/dist/ are build outputs and are never edited by hand. The only supported entry points are the make targets listed above. Runtime state lives outside the source tree, in DSH_HOME (the repository-local .dsh/ by default).

๐Ÿ“š Documentation

The full documentation set lives in docs/:

๐Ÿ“„ License

MIT LICENSE

About

[๐Ÿ“ฆ|๐Ÿงช] (ๆžๅˆ›ไบŒ้ข) An AI Agent character that truly ๐ฉ๐ž๐ซ๐ฌ๐ข๐ฌ๐ญ๐ฌ

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Contributors

Languages