hleserg/atman

Continuous Identity for Your Agents

2

stars

1,116

commits

Python

primary language

Aug 7, 2026

updated

atmanai.dev/
ai-agents
memory-management
philosophy
psychology

README

logo

Atman

Continuous Identity for Your Agents

CI Sentry codecov CodeFactor Python 3.12+ License: MIT

[ru] — Russian version

Atman is open-source infrastructure that gives LLM agents a way to track their own values, notice when they drift from themselves under contextual pressure, and build identity through actual lived experience instead of static prompt injection. Research-stage code addressing value drift, sycophancy, and the bootstrap problem in long-running agents. MIT licensed.

In Indian philosophy, Atman is the unchanging self, that which remains itself through all changes. Not a soul in the religious sense, but literally the "immutable core of identity". Atman is neither born nor dies — it simply is. For an agent that resets with each session, this is precisely what we give it.


Your agent answers questions. But does it know who it is?


What This Changes

Without Atman, the agent reads notes about itself every session — "you're like this, you have these values" — and takes them on faith. These aren't its memories. They're someone else's descriptions of it.

With Atman, the agent enters a session as an already-formed personality.

What changes specifically:

  • The agent writes itself a letter at the end of each session and reads it at the very beginning of the next. Not a summary, not a memory dump — a living internal state.
  • Values and principles are updated through lived experiences, not through manual file edits.
  • If the agent starts speaking "out of character" under contextual pressure, it notices.
  • Between sessions, the agent doesn't freeze. It reflects: finds patterns, clarifies who it is, maintains an internal life.

How It Works

Two modes of existence.

🌑 Between sessions — background process. Experience from past sessions is processed, principles are refined, identity lives its own life. The agent isn't turned off — it's thinking.

⚡ During a session — meeting with the user happens on two levels simultaneously: the task is solved, and in parallel, self-observation occurs. The agent notices what's happening to it while it works.

Under the hood — seven components: store of lived experiences, reflection engine, identity anchor, session manager, emotional tone regulation. Atman manages the agent's control files directly — not through manual edits, but as a living process that knows what to write and when.

Detailed architecturedocs/architecture/SYSTEM.md ManifestoMANIFEST.md Side-by-side: Atman vs. a standard agentdocs/research/agent-thinking-comparison.md Development standarddocs/development/DEVELOPMENT_STANDARD.md


Roadmap

● Research              ✅ Complete
● Design                ✅ Complete
● Prototyping           ← We are here
  ├─ Factual Memory     ✅ Stable (v0.1.0)
  ├─ Experience Store   ✅ Stable (WP02)
  ├─ Session Manager    🔧 High readiness — debugging (current focus)
  ├─ Reflection Engine  🔧 Medium readiness — in development
  ├─ Skill Manager      🔧 Medium readiness — in development
  ├─ Identity Store     🔧 Low readiness — in development
  └─ CI & test coverage ✅ GitHub Actions on `main`/PRs (`make check`, pytest-cov ≥90%)
○ First production slice
○ Integration
○ Evolution

Honest snapshot (May 2026): memory foundations (facts + first-hand experience) are usable on their own. Session, reflection, identity, and skills already have prototype code, demos, and tests — but the full “continuous identity” loop is not production-ready yet. Right now the team is on Session Manager: integration and debugging before wider onboarding.

Readiness legend: high = core path exists, hardening in progress · medium = substantial prototype, gaps in integration · low = early slice, needs more work before it carries the product story.

Component status

Stable foundations

✅ Factual Memory Adapter (PR #73) Minimal layer for storing verifiable facts without interpretations.

  • 📦 Models: FactRecord, Relation
  • 🔌 Port: FactualMemory with unified API
  • 💾 Adapters: InMemory + File (JSONL)
  • ✅ Unit tests (see pytest tests/)
  • 📚 Guide (EN) · RU
  • ▶️ Demo: make demo-factual or python3 src/demo.py (make demo-factual-fast for instant output; make sets pacing by default)

✅ Experience Store (work package 02) First-hand lived experience: SessionExperience, KeyMoment, salience decay, reframing notes — no retroactive emotional “guessing”.

  • 📦 Domain models + ExperienceService + JSONL / in-memory adapters
  • 💻 CLI: atman-experience
  • 📚 Guide (EN) · RU
  • ▶️ Demo: make demo-experience or python3 src/demo_experience_store.py (make demo-experience-fast for instant output)

In active development

🔧 Session Manager (work package 05) — high readiness · current focus Real-time session runtime: first-hand experience coloring, key moments with mandatory emotional marking, eigenstate generation, narrative updates. Prototype is in place; active work is wiring, edge cases, and debugging before a broader audience.

  • 📚 Guide (EN) · RU
  • ▶️ Demo: make demo-session or python3 src/demo_session_manager.py (make demo-session-fast for instant output)

🔧 Reflection Engine (work package 04) — medium readiness Micro / daily / deep reflection, patterns, narrative revision hooks, Jahoda health assessment, principle advisor. Runnable demos and tests; not yet a dependable between-session “inner life” for production agents.

  • 📚 Guide (EN) · RU
  • ▶️ Demo: make demo-reflection or python3 src/demo_reflection.py (make demo-reflection-fast for instant output)

🔧 Skill Manager (work package 08) — medium readiness Transferable skills layer (design + backlog; implementation in progress). Expect API and storage shape to move as session and reflection paths stabilize.

🔧 Identity Store (work package 03) — low readiness Honest bootstrap identity, eigenstate, three-layer self-narrative, snapshots, CLI. Useful for experiments; still early relative to the session-centric path we are hardening now.

  • 📚 Guide (EN) · RU
  • ▶️ Demo: make demo-identity or python3 src/demo_identity.py (make demo-identity-fast for instant output)
# Quick start (install + interactive factual CLI)
# Prefer uv: uv venv && source .venv/bin/activate && uv pip install -e ".[dev]"
pip install -e ".[dev]"
python3 -m atman.cli   # factual memory REPL (or: uv run python -m atman.cli)
pytest tests/ -v       # full test suite (or: uv run pytest tests/ -v)

See AGENTS.md (uv — рекомендуемый workflow) for uv run and venv tips. Contributing: CONTRIBUTING.md · Community standards: CODE_OF_CONDUCT.md · Security: SECURITY.md.

Safety & alignment

For safety reviewers and alignment work: how major Atman building blocks map to drift detection, self-model stability under pressure, honest vs. retrospective experience claims, metacognition, and multi-criterion welfare checks — see docs/research/safety-relevance.md.


This Is Not Just a Tool

We're not building a better task runner. We're exploring an old question: can an agent be a person?

If so — what does that mean for how we create them?

This is the beginning of a conversation, not its end.


Contact

I welcome any communication, feedback, or exchange of ideas:


Acknowledgements

Sentry

Error monitoring and observability for Atman is powered by Sentry
thank you for supporting open-source projects. 🙏

Contributors

hleserg

541 commits

cursoragent

390 commits

claude

161 commits

Sergey

7 commits

hleserg/atman

Continuous Identity for Your Agents

2

stars

1,116

commits

Python

primary language

Aug 7, 2026

updated

atmanai.dev/
ai-agents
memory-management
philosophy
psychology

README

logo

Atman

Continuous Identity for Your Agents

CI Sentry codecov CodeFactor Python 3.12+ License: MIT

[ru] — Russian version

Atman is open-source infrastructure that gives LLM agents a way to track their own values, notice when they drift from themselves under contextual pressure, and build identity through actual lived experience instead of static prompt injection. Research-stage code addressing value drift, sycophancy, and the bootstrap problem in long-running agents. MIT licensed.

In Indian philosophy, Atman is the unchanging self, that which remains itself through all changes. Not a soul in the religious sense, but literally the "immutable core of identity". Atman is neither born nor dies — it simply is. For an agent that resets with each session, this is precisely what we give it.


Your agent answers questions. But does it know who it is?


What This Changes

Without Atman, the agent reads notes about itself every session — "you're like this, you have these values" — and takes them on faith. These aren't its memories. They're someone else's descriptions of it.

With Atman, the agent enters a session as an already-formed personality.

What changes specifically:

  • The agent writes itself a letter at the end of each session and reads it at the very beginning of the next. Not a summary, not a memory dump — a living internal state.
  • Values and principles are updated through lived experiences, not through manual file edits.
  • If the agent starts speaking "out of character" under contextual pressure, it notices.
  • Between sessions, the agent doesn't freeze. It reflects: finds patterns, clarifies who it is, maintains an internal life.

How It Works

Two modes of existence.

🌑 Between sessions — background process. Experience from past sessions is processed, principles are refined, identity lives its own life. The agent isn't turned off — it's thinking.

⚡ During a session — meeting with the user happens on two levels simultaneously: the task is solved, and in parallel, self-observation occurs. The agent notices what's happening to it while it works.

Under the hood — seven components: store of lived experiences, reflection engine, identity anchor, session manager, emotional tone regulation. Atman manages the agent's control files directly — not through manual edits, but as a living process that knows what to write and when.

Detailed architecturedocs/architecture/SYSTEM.md ManifestoMANIFEST.md Side-by-side: Atman vs. a standard agentdocs/research/agent-thinking-comparison.md Development standarddocs/development/DEVELOPMENT_STANDARD.md


Roadmap

● Research              ✅ Complete
● Design                ✅ Complete
● Prototyping           ← We are here
  ├─ Factual Memory     ✅ Stable (v0.1.0)
  ├─ Experience Store   ✅ Stable (WP02)
  ├─ Session Manager    🔧 High readiness — debugging (current focus)
  ├─ Reflection Engine  🔧 Medium readiness — in development
  ├─ Skill Manager      🔧 Medium readiness — in development
  ├─ Identity Store     🔧 Low readiness — in development
  └─ CI & test coverage ✅ GitHub Actions on `main`/PRs (`make check`, pytest-cov ≥90%)
○ First production slice
○ Integration
○ Evolution

Honest snapshot (May 2026): memory foundations (facts + first-hand experience) are usable on their own. Session, reflection, identity, and skills already have prototype code, demos, and tests — but the full “continuous identity” loop is not production-ready yet. Right now the team is on Session Manager: integration and debugging before wider onboarding.

Readiness legend: high = core path exists, hardening in progress · medium = substantial prototype, gaps in integration · low = early slice, needs more work before it carries the product story.

Component status

Stable foundations

✅ Factual Memory Adapter (PR #73) Minimal layer for storing verifiable facts without interpretations.

  • 📦 Models: FactRecord, Relation
  • 🔌 Port: FactualMemory with unified API
  • 💾 Adapters: InMemory + File (JSONL)
  • ✅ Unit tests (see pytest tests/)
  • 📚 Guide (EN) · RU
  • ▶️ Demo: make demo-factual or python3 src/demo.py (make demo-factual-fast for instant output; make sets pacing by default)

✅ Experience Store (work package 02) First-hand lived experience: SessionExperience, KeyMoment, salience decay, reframing notes — no retroactive emotional “guessing”.

  • 📦 Domain models + ExperienceService + JSONL / in-memory adapters
  • 💻 CLI: atman-experience
  • 📚 Guide (EN) · RU
  • ▶️ Demo: make demo-experience or python3 src/demo_experience_store.py (make demo-experience-fast for instant output)

In active development

🔧 Session Manager (work package 05) — high readiness · current focus Real-time session runtime: first-hand experience coloring, key moments with mandatory emotional marking, eigenstate generation, narrative updates. Prototype is in place; active work is wiring, edge cases, and debugging before a broader audience.

  • 📚 Guide (EN) · RU
  • ▶️ Demo: make demo-session or python3 src/demo_session_manager.py (make demo-session-fast for instant output)

🔧 Reflection Engine (work package 04) — medium readiness Micro / daily / deep reflection, patterns, narrative revision hooks, Jahoda health assessment, principle advisor. Runnable demos and tests; not yet a dependable between-session “inner life” for production agents.

  • 📚 Guide (EN) · RU
  • ▶️ Demo: make demo-reflection or python3 src/demo_reflection.py (make demo-reflection-fast for instant output)

🔧 Skill Manager (work package 08) — medium readiness Transferable skills layer (design + backlog; implementation in progress). Expect API and storage shape to move as session and reflection paths stabilize.

🔧 Identity Store (work package 03) — low readiness Honest bootstrap identity, eigenstate, three-layer self-narrative, snapshots, CLI. Useful for experiments; still early relative to the session-centric path we are hardening now.

  • 📚 Guide (EN) · RU
  • ▶️ Demo: make demo-identity or python3 src/demo_identity.py (make demo-identity-fast for instant output)
# Quick start (install + interactive factual CLI)
# Prefer uv: uv venv && source .venv/bin/activate && uv pip install -e ".[dev]"
pip install -e ".[dev]"
python3 -m atman.cli   # factual memory REPL (or: uv run python -m atman.cli)
pytest tests/ -v       # full test suite (or: uv run pytest tests/ -v)

See AGENTS.md (uv — рекомендуемый workflow) for uv run and venv tips. Contributing: CONTRIBUTING.md · Community standards: CODE_OF_CONDUCT.md · Security: SECURITY.md.

Safety & alignment

For safety reviewers and alignment work: how major Atman building blocks map to drift detection, self-model stability under pressure, honest vs. retrospective experience claims, metacognition, and multi-criterion welfare checks — see docs/research/safety-relevance.md.


This Is Not Just a Tool

We're not building a better task runner. We're exploring an old question: can an agent be a person?

If so — what does that mean for how we create them?

This is the beginning of a conversation, not its end.


Contact

I welcome any communication, feedback, or exchange of ideas:


Acknowledgements

Sentry

Error monitoring and observability for Atman is powered by Sentry
thank you for supporting open-source projects. 🙏

Contributors

hleserg

541 commits

cursoragent

390 commits

claude

161 commits

Sergey

7 commits

Languages

Python

93.1%

PLpgSQL

3.8%

Shell

2.7%