Metadata-Version: 2.4
Name: sessionweave
Version: 0.1.0
Summary: Local-first context memory engine for AI-agent workflows.
Author: Adi Bisoyi
License: MIT
Project-URL: Homepage, https://github.com/adibisoyi/SessionWeave
Project-URL: Repository, https://github.com/adibisoyi/SessionWeave
Project-URL: Issues, https://github.com/adibisoyi/SessionWeave/issues
Project-URL: Documentation, https://github.com/adibisoyi/SessionWeave/tree/main/docs
Keywords: ai-agents,context,memory,llm,local-first,agent-workflows
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

  <p align="center">
    <a href="https://github.com/adibisoyi/SessionWeave">
      <img src="docs/logo-text.svg" width="320" height="72" alt="SessionWeave"/>
    </a>
  </p>

  <p align="center">
    <a href="README.md">English</a>
  </p>

  <p align="center">
    <a href="https://github.com/adibisoyi/SessionWeave/actions/workflows/ci.yml">
      <img src="https://github.com/adibisoyi/SessionWeave/actions/workflows/ci.yml/badge.svg?branch=main" alt="CI"/>
    </a>
    <a href="https://github.com/adibisoyi/SessionWeave/actions/workflows/security.yml">
      <img src="https://github.com/adibisoyi/SessionWeave/actions/workflows/security.yml/badge.svg?branch=main" alt="Security"/>
    </a>
    <a href="https://github.com/adibisoyi/SessionWeave/blob/main/LICENSE">
      <img src="https://img.shields.io/badge/license-MIT-blue" alt="MIT License"/>
    </a>
    <a href="https://pypi.org/project/sessionweave/">
      <img src="https://img.shields.io/pypi/v/sessionweave" alt="PyPI"/>
    </a>
    <a href="https://www.npmjs.com/package/sessionweave">
      <img src="https://img.shields.io/npm/v/sessionweave" alt="npm"/>
    </a>
  </p>


  **A local memory layer for AI coding agents.**

  SessionWeave gives Codex, Claude Code, Cursor, Gemini, GitHub Copilot, and ChatGPT persistent project memory that survives across sessions.

  Instead of repeating the same decisions, constraints, rejected ideas, and implementation context every time, you record durable memory once. SessionWeave stores it locally in `.sessionweave/`, builds a
  lightweight memory graph, and routes only the relevant context back to your coding agent.

  > AI coding agents forget. SessionWeave gives them repo-local memory.

  ```bash
  sessionweave install --platform codex
  sessionweave start-session --id demo
  sessionweave route --task "continue the auth refactor"
  ```

  ```text
  .sessionweave/
  ├── graph.db                 local memory graph
  ├── journal/                 append-only session journals
  ├── pages/context-packet.md  compact routed context for the current task
  ├── commits/                 Git-like memory commits
  └── instructions/            adapter instructions for coding agents
  ```

  Print a copy-pasteable first-run guide:

  ```bash
  sessionweave quickstart
  sessionweave quickstart --output SESSIONWEAVE_QUICKSTART.md
  ```

  ## What SessionWeave Solves

  AI coding agents are powerful, but they lose project continuity.

  They forget:

  - why a decision was made
  - what ideas were rejected
  - which files matter for a task
  - what happened in the previous session
  - what context should not be revived

  SessionWeave fixes that with explicit, local, task-routed memory.

  ## How It Works

  SessionWeave runs as a local CLI in your repo.

  1. Start a session.
  2. Record important decisions and constraints.
  3. Route compact context for the current task.
  4. Close the session to create a memory commit.
  5. Your next agent session starts from durable project memory, not raw chat history.

  ```bash
  sessionweave start-session --id feature-x
  sessionweave record --id feature-x --role user --text "<sessionweave-memory block>"
  sessionweave route --task "continue feature-x implementation"
  sessionweave close-session --id feature-x --summary "Finished routing layer"
  ```

  ## Strict Memory, Not Guesswork

  SessionWeave does not infer durable memory from random prose.

  Durable memory is explicit:

  ```json
  {
    "nodes": [
      {
        "type": "decision",
        "title": "Use local SQLite storage",
        "summary": "Keep project memory local-first and dependency-light.",
        "temperature": "hot",
        "importance": 5
      },
      {
        "type": "anti_memory",
        "title": "Do not dump full chat history",
        "summary": "Route compact task context instead of loading raw sessions.",
        "temperature": "pinned",
        "importance": 5
      }
    ],
    "edges": []
  }
  ```

  This keeps memory auditable and prevents the agent from inventing project history.

  ## Platform Support

  | Platform | Generated files |
  |---|---|
  | Codex | `AGENTS.md`, `.sessionweave/instructions/codex.md` |
  | Claude Code | `CLAUDE.md`, `.sessionweave/instructions/claude-skill/SKILL.md` |
  | Cursor | `.cursor/rules/sessionweave.mdc` |
  | Gemini CLI | `GEMINI.md`, `.sessionweave/instructions/gemini.md` |
  | GitHub Copilot Chat | `.github/copilot-instructions.md` |
  | ChatGPT | `.sessionweave/instructions/chatgpt.md` |

  Install all adapters:

  ```bash
  sessionweave install
  ```

  Install only Codex:

  ```bash
  sessionweave install --platform codex
  ```

  ## Real-World Smoke Test

  SessionWeave was tested on a real `django/django` checkout.

  ```text
  Initial after install:
  nodes=0, edges=0, sessions=0, commits=0

  After recording Django URL resolver memory:
  nodes=4, edges=7, session=open

  After linking real code references:
  nodes=9, edges=11, session=open

  After route + close-session:
  nodes=9, edges=11, sessions=closed=1, commits=1, uncommitted=no
  ```

  The routed context selected relevant Django URL resolver memory and kept anti-memory separate instead of loading the whole repository.

  ```mermaid
  graph TD
    S["Session: django_codex_real"]
    P["Django real-world codebase"]
    D["Use Codex adapter in Django checkout"]
    T["Investigate Django URL resolver workflow"]
    A["Do not dump the whole Django repository"]
    F1["file: django/urls/resolvers.py"]
    F2["file: tests/urlpatterns_reverse/tests.py"]
    F3["file: docs/topics/http/urls.txt"]
    C["commit: 017d7f6"]

    S --> P
    S --> D
    S --> T
    S --> A
    P --> D
    P --> T
    T --> A
    T --> F1
    T --> F2
    T --> F3
    T --> C
  ```

  ## Diagnostics

  SessionWeave ships with release and local health checks:

  ```bash
  sessionweave doctor
  sessionweave lint
  sessionweave dogfood
  sessionweave release-check
  ```

  ## Install

  After public release:

  ```bash
  uv tool install sessionweave
  sessionweave install
  ```

  or:

  ```bash
  pipx install sessionweave
  sessionweave install
  ```

  or:

  ```bash
  npm install -g sessionweave
  sessionweave install
  ```

  From source:

  ```bash
  git clone https://github.com/adibisoyi/SessionWeave
  cd SessionWeave
  python -m pip install -e .
  sessionweave install
  ```

  ## Privacy

  SessionWeave is local-first.

  - Memory is stored in `.sessionweave/`.
  - No hosted service is required.
  - No telemetry.
  - No vector database required.
  - No model account modification.
  - Adapter installers write local instruction files only.

  ## Current Limits

  - SessionWeave is local-first alpha software.
  - It does not run an always-on daemon.
  - It does not provide hosted sync, team permissions, or enterprise governance.
  - Adapter installers are local instruction generators, not official marketplace integrations.
  - Durable memory must be explicit structured memory.

  ## Current Status

  SessionWeave is public-alpha software.

