Metadata-Version: 2.4
Name: mindslice
Version: 0.1.0
Summary: Layered, pluggable, human-readable long-term memory engine for LLM agents (Python stdlib only).
Author: pancerZH
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/pancerZH/MindSlice
Project-URL: Documentation, https://github.com/pancerZH/MindSlice/blob/main/docs/getting-started.md
Project-URL: Issues, https://github.com/pancerZH/MindSlice/issues
Keywords: llm,agents,memory,markdown,mcp
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: NOTICE
Dynamic: license-file

# MindSlice

**Portable memory for AI agents, with isolation and evolution built in.**

Keep project knowledge, personal preferences and shared handbooks in plain Markdown.
Mount what an agent needs, let it learn in its own workspace, and bake those learnings
into reusable versions. Connect through MCP, the CLI or Python.

![MindSlice architecture: isolated read-only slices and a writable overlay, optional staging for approval, and bake into new slice versions.](docs/assets/architecture.svg)

## Why MindSlice?

**Isolation.** A *slice* is a folder of Markdown cards you can mount, unmount and share
independently. Mounted slices stay read-only through the engine; new learning goes into
a separate overlay. Multiple workspaces can reuse the same baseline while keeping their
own changes. Pending edits stay outside live memory until approved.

**Evolving memory.** Cards can explicitly extend or supersede earlier knowledge, so
retrieval follows recorded relationships under your trust rules. `bake` turns selected
changes into new slice versions, preserving the original folders and returning the new paths.

[Hot/cold memory](https://docs.letta.com/v1-sdk/memory/context-hierarchy) focuses on what stays
in context and what is retrieved later. [LLM Wiki](https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f)
focuses on compiling sources into a maintained knowledge base. MindSlice makes **memory
boundaries and controlled evolution** first-class engine operations.
[How these approaches fit together →](docs/concepts.md)

Python 3.12+. No runtime dependencies, database server or LLM API calls inside the engine.

## Get started

Paste this into your coding agent:

```text
Clone https://github.com/pancerZH/MindSlice.git (or use the existing checkout).
Read skills/mindslice-setup/SKILL.md to finish setup.
```

The agent helps you choose a workspace, connect your app, and choose how to start:

| Starting point | Tool |
| --- | --- |
| Empty memory or a short conversation | MindSlice `init` and ordinary memory writes |
| Existing MindSlice workspace | Connect it directly with `-w` |
| Shared `.slice` or Markdown notes folder | MindSlice `mount`, indexed as is |
| Documents to distill into structured cards | [MindSlice-forge](https://github.com/pancerZH/MindSlice-forge) |

Forge is an optional document-conversion tool. It creates a new workspace using an agent harness;
MindSlice handles storage, retrieval, mounting and memory evolution without needing Forge or an LLM.
The [builder skill](skills/slice-builder/SKILL.md) guides conversion and integration with an existing workspace.

Prefer manual setup? With Python 3.12+ and pipx installed:

```bash
git clone https://github.com/pancerZH/MindSlice.git
cd MindSlice
pipx install -e .
mindslice init ~/mindslice
```

Then [connect your agent](docs/getting-started.md#connect-your-agent) and tell it what to remember.
Run `mindslice -w ~/mindslice doctor`, then [verify a new session](docs/getting-started.md#verify-your-first-session).
[Full setup guide](docs/getting-started.md) · [Review changes and bake slices](docs/workflow.md)

## Documentation

- [Concepts](docs/concepts.md) — isolation, evolution, and how MindSlice fits other memory architectures.
- [Reference](docs/reference.md) — commands, Python API, MCP tools and card formats.
- [History and recovery](docs/history-and-recovery.md) — explain memory, roll back slices, back up and restore workspaces.
- [Build slices with Forge](skills/slice-builder/SKILL.md) — convert documents and connect the resulting workspace or slices.
- [Maintain memory](skills/slice-maintainer/SKILL.md) — consolidate knowledge and repair relationships.
- [Evaluations](docs/evaluations.md) · [Design](docs/design.md) · [Uninstall](skills/mindslice-setup/uninstall.md)

## License

[Apache License 2.0](LICENSE). Benchmark excerpts quoted in the evaluation records keep their
datasets' licences; see [NOTICE](NOTICE).
