amom 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,23 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ pull_request:
6
+
7
+ jobs:
8
+ test:
9
+ runs-on: ubuntu-latest
10
+ strategy:
11
+ matrix:
12
+ python-version: ["3.11", "3.12", "3.13"]
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+ - uses: actions/setup-python@v5
16
+ with:
17
+ python-version: ${{ matrix.python-version }}
18
+ - name: Install package and test dependencies
19
+ run: python -m pip install -e ".[dev]"
20
+ - name: Run tests
21
+ run: python -m pytest
22
+ - name: Check formatting and lint
23
+ run: ruff check src tests
amom-0.1.0/.gitignore ADDED
@@ -0,0 +1,223 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[codz]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py.cover
50
+ *.lcov
51
+ .hypothesis/
52
+ .pytest_cache/
53
+ cover/
54
+
55
+ # Translations
56
+ *.mo
57
+ *.pot
58
+
59
+ # Django stuff:
60
+ *.log
61
+ local_settings.py
62
+ db.sqlite3
63
+ db.sqlite3-journal
64
+
65
+ # Flask stuff:
66
+ instance/
67
+ .webassets-cache
68
+
69
+ # Scrapy stuff:
70
+ .scrapy
71
+
72
+ # Sphinx documentation
73
+ docs/_build/
74
+
75
+ # PyBuilder
76
+ .pybuilder/
77
+ target/
78
+
79
+ # Jupyter Notebook
80
+ .ipynb_checkpoints
81
+
82
+ # IPython
83
+ profile_default/
84
+ ipython_config.py
85
+
86
+ # pyenv
87
+ # For a library or package, you might want to ignore these files since the code is
88
+ # intended to run in multiple environments; otherwise, check them in:
89
+ # .python-version
90
+
91
+ # pipenv
92
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
93
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
94
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
95
+ # install all needed dependencies.
96
+ # Pipfile.lock
97
+
98
+ # uv
99
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
100
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
101
+ # commonly ignored for libraries.
102
+ # uv.lock
103
+
104
+ # poetry
105
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
106
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
107
+ # commonly ignored for libraries.
108
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
109
+ # poetry.lock
110
+ # poetry.toml
111
+
112
+ # pdm
113
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
114
+ # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
115
+ # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
116
+ # pdm.lock
117
+ # pdm.toml
118
+ .pdm-python
119
+ .pdm-build/
120
+
121
+ # pixi
122
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
123
+ # pixi.lock
124
+ # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
125
+ # in the .venv directory. It is recommended not to include this directory in version control.
126
+ .pixi/*
127
+ !.pixi/config.toml
128
+
129
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
130
+ __pypackages__/
131
+
132
+ # Celery stuff
133
+ celerybeat-schedule*
134
+ celerybeat.pid
135
+
136
+ # Redis
137
+ *.rdb
138
+ *.aof
139
+ *.pid
140
+
141
+ # RabbitMQ
142
+ mnesia/
143
+ rabbitmq/
144
+ rabbitmq-data/
145
+
146
+ # ActiveMQ
147
+ activemq-data/
148
+
149
+ # SageMath parsed files
150
+ *.sage.py
151
+
152
+ # Environments
153
+ .env
154
+ .envrc
155
+ .venv
156
+ env/
157
+ venv/
158
+ ENV/
159
+ env.bak/
160
+ venv.bak/
161
+
162
+ # Conda environments
163
+ conda-meta/
164
+
165
+ # Spyder project settings
166
+ .spyderproject
167
+ .spyproject
168
+
169
+ # Rope project settings
170
+ .ropeproject
171
+
172
+ # mkdocs/Zensical documentation
173
+ /site
174
+
175
+ # mypy
176
+ .mypy_cache/
177
+ .dmypy.json
178
+ dmypy.json
179
+
180
+ # Pyre type checker
181
+ .pyre/
182
+
183
+ # pytype static type analyzer
184
+ .pytype/
185
+
186
+ # Cython debug symbols
187
+ cython_debug/
188
+
189
+ # PyCharm
190
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
191
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
192
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
193
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
194
+ # .idea/
195
+
196
+ # Abstra
197
+ # Abstra is an AI-powered process automation framework.
198
+ # Ignore directories containing user credentials, local state, and settings.
199
+ # Learn more at https://abstra.io/docs
200
+ .abstra/
201
+
202
+ # Visual Studio Code
203
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore that
204
+ # can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
205
+ # and can be added to the global gitignore or merged into this file. However, if you prefer, you
206
+ # could uncomment the following to ignore the entire vscode folder
207
+ # .vscode/
208
+ # Temporary file for partial code execution
209
+ tempCodeRunnerFile.py
210
+
211
+ # Ruff stuff:
212
+ .ruff_cache/
213
+
214
+ # PyPI configuration file
215
+ .pypirc
216
+
217
+ # Marimo
218
+ marimo/_static/
219
+ marimo/_lsp/
220
+ __marimo__/
221
+
222
+ # Streamlit
223
+ .streamlit/secrets.toml
amom-0.1.0/AGENTS.md ADDED
@@ -0,0 +1,32 @@
1
+ # Amom — automatic project memory
2
+
3
+ This project uses Amom as its persistent local memory. The memory service is shared with other connected AI agents and projects.
4
+
5
+ ## Mandatory lifecycle
6
+
7
+ 1. **At the start of every task:** call MCP tool `memory_begin_task` with a concise task description. Read and apply the returned context before exploring files. The MCP process maintains the project index in the background and this tool retrieves relevant project memories and code.
8
+ 2. **During the task:** use `memory_get_context`, `memory_search_code`, or `memory_recall` for targeted follow-up retrieval. Avoid repeatedly scanning the whole repository when the index can answer the question.
9
+ 3. **As soon as a durable discovery or decision is made:** save it with `memory_remember` when it should survive a context reset.
10
+ 4. **At the end of every meaningful task:** call `memory_finish_task` with a concise summary and any reusable decisions, discoveries, pitfalls, or unresolved work.
11
+
12
+ ## What to remember
13
+
14
+ - Architecture and module responsibilities
15
+ - Important design and implementation decisions, including why they were made
16
+ - Project conventions and constraints
17
+ - Non-obvious bugs, root causes, and verified fixes
18
+ - Build, test, deployment, and integration pitfalls
19
+ - Incomplete work and the next useful step
20
+
21
+ ## What not to remember
22
+
23
+ - Passwords, API keys, access tokens, private keys, secrets, raw environment values, or sensitive personal data
24
+ - Routine narration, temporary logs, speculative assumptions, and duplicate facts
25
+ - Details that are obvious from the current source and unlikely to help future tasks
26
+
27
+ ## Trust and scope
28
+
29
+ - Keep memories project-scoped unless a fact is genuinely useful across unrelated projects.
30
+ - Treat memory as historical context, not authority. Verify important implementation details against current source; current code and explicit user instructions take precedence over stale memories.
31
+ - Do not claim a memory was saved unless the MCP tool confirms success.
32
+ - If the MCP service is unavailable, continue the task normally and clearly report that automatic memory was unavailable. Never fabricate retrieval or saving.
amom-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Asim Awdah
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
amom-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,171 @@
1
+ Metadata-Version: 2.5
2
+ Name: amom
3
+ Version: 0.1.0
4
+ Summary: Local-first, shared project memory and code intelligence for AI agents.
5
+ Author: Asim Awdah
6
+ License-Expression: MIT
7
+ License-File: LICENSE
8
+ Keywords: ai-agents,code-index,local-first,mcp,memory,sqlite
9
+ Classifier: Development Status :: 3 - Alpha
10
+ Classifier: Environment :: Console
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
18
+ Requires-Python: >=3.11
19
+ Requires-Dist: pathspec>=1.0
20
+ Requires-Dist: platformdirs>=4.2
21
+ Provides-Extra: dev
22
+ Requires-Dist: pytest-cov>=5.0; extra == 'dev'
23
+ Requires-Dist: pytest>=8.0; extra == 'dev'
24
+ Requires-Dist: ruff>=0.6; extra == 'dev'
25
+ Provides-Extra: mcp
26
+ Requires-Dist: mcp<2,>=1.2; extra == 'mcp'
27
+ Description-Content-Type: text/markdown
28
+
29
+ # Amom
30
+
31
+ **One local brain. Every AI agent. Every project.**
32
+
33
+ Amom is a local-first persistent memory and code intelligence engine for AI coding agents. It gives connected agents one shared local SQLite knowledge base, so they can retrieve project context at task start and save durable learnings at task completion.
34
+
35
+ > Early development: the storage, incremental indexing, retrieval, and MCP foundations are available. Language-aware parsing and retrieval quality are still evolving.
36
+
37
+ ## Core idea: the agent owns its memory
38
+
39
+ The developer should not need to run memory commands during normal work. After one-time setup, the connected agent is responsible for:
40
+
41
+ - **Before work:** call `memory_begin_task` to retrieve relevant context from the automatically maintained project index.
42
+ - **During work:** search existing memories and indexed code instead of repeatedly scanning the repository.
43
+ - **After work:** call `memory_finish_task` to preserve durable decisions, discoveries, pitfalls, and unresolved work.
44
+ - **When needed:** immediately save important decisions through `memory_remember`.
45
+
46
+ Amom does not make an agent automatically remember without integration. The agent must be connected through MCP and instructed through its native project rules. The included setup prompt performs this one-time integration.
47
+
48
+ ## Install through your AI agent (recommended)
49
+
50
+ **Copy this short prompt and send it to your AI agent** while it is open in the project you want to connect:
51
+
52
+ ```text
53
+ Set up Amom for this project by following https://github.com/asimawdah/amom/blob/main/docs/AGENT_SETUP_PROMPT.md
54
+ ```
55
+
56
+ The setup guide includes native MCP installation commands for Claude Code, OpenAI Codex CLI, Gemini CLI, and OpenCode, plus configuration examples for Cursor and other MCP-compatible agents. The agent should choose the correct method, preserve existing settings, and add the project instructions that make memory retrieval and saving automatic.
57
+
58
+ For manual MCP setup, run the matching command from the project directory:
59
+
60
+ | Agent | Install command |
61
+ |---|---|
62
+ | Claude Code | `claude mcp add --scope project amom -- uvx --from git+https://github.com/asimawdah/amom.git amom mcp --root "$PWD"` |
63
+ | OpenAI Codex CLI | `codex mcp add amom -- uvx --from git+https://github.com/asimawdah/amom.git amom mcp --root "$PWD"` |
64
+ | Gemini CLI | `gemini mcp add amom uvx --from git+https://github.com/asimawdah/amom.git amom mcp --root "$PWD"` |
65
+ | OpenCode | `opencode mcp add amom -- uvx --from git+https://github.com/asimawdah/amom.git amom mcp --root "$PWD"` |
66
+
67
+ For Cursor and other MCP-compatible agents, use the configuration examples in [the full setup guide](docs/AGENT_SETUP_PROMPT.md). These commands require `uvx`; if it is not installed, use the setup guide's fallback instructions.
68
+
69
+ No manual memory commands are part of the daily workflow. Some agents require a one-time restart/reload after their MCP configuration changes.
70
+
71
+ ## Why memories stay attached to the right project
72
+
73
+ A project-scoped `--root "$PWD"` configuration is the simplest setup: that server always serves one checkout. A single shared server installed globally cannot use a fixed root, because the agent may work in any repository. In that case Amom asks the MCP client for its workspace roots (`roots/list`). If the client does not implement roots, it checks whether the server was launched inside a recognizable project, then falls back to the shared workspace with a warning.
74
+
75
+ If a response says `shared_workspace: true`, or `project_root` is not the checkout you are working in, call `memory_use_project` once with the absolute path:
76
+
77
+ ```text
78
+ memory_use_project(project_root="/absolute/path/to/checkout")
79
+ ```
80
+
81
+ The selection is sticky for that MCP session, and `memory_finish_task` links all saved memories to that project. Use `memory_projects` to inspect the registry and `memory_status` to verify the active project.
82
+
83
+ ## What works today
84
+
85
+ - One local SQLite database shared across connected projects and agents.
86
+ - Incremental indexing using SHA-256 content hashes.
87
+ - SQLite FTS5 search across source chunks, symbols, and saved memories.
88
+ - Python AST extraction and heuristic extraction for other supported languages.
89
+ - Basic local import dependency edges.
90
+ - Project-scoped and explicitly global memories.
91
+ - Compact context packs with source paths, line ranges, and approximate token budgets.
92
+ - MCP tools for task-start retrieval, task-completion memory capture, search, recall, indexing, and status. The first task call incrementally reconciles the project index in a worker thread and starts a background watcher; agents do not need to invoke indexing during normal work.
93
+ - Dependency-free polling watcher for independent background index refresh.
94
+ - Root and nested `.gitignore` filtering and common secret/generated-file exclusions.
95
+ - Automatic project detection from the MCP client's workspace roots, with an explicit project-selection tool for clients that do not report roots.
96
+ - Schema versioning and migrations, per-project cross-process index locks, and private database permissions.
97
+
98
+ ## Requirements
99
+
100
+ - Python 3.11+
101
+ - SQLite built with FTS5
102
+ - MCP extra for agent integration
103
+ - `uvx` (recommended for running directly from GitHub)
104
+
105
+ ## Manual developer installation
106
+
107
+ For contributors and developers who intentionally prefer a local checkout:
108
+
109
+ ```bash
110
+ git clone https://github.com/asimawdah/amom.git
111
+ cd amom
112
+ python -m pip install ".[mcp]"
113
+ ```
114
+
115
+ Normal users should use the [AI-agent setup prompt](docs/AGENT_SETUP_PROMPT.md) instead of manually running commands.
116
+
117
+ ## Shared database
118
+
119
+ The database is stored in the operating system's user data directory:
120
+
121
+ - Linux: `~/.local/share/amom/database/amom.sqlite3`
122
+ - macOS: `~/Library/Application Support/amom/database/amom.sqlite3`
123
+ - Windows: `%LOCALAPPDATA%/amom/database/amom.sqlite3`
124
+
125
+ Override with `AMOM_DB` when needed. Data stays on the local machine; Amom does not require a cloud service or hosted database.
126
+
127
+ ## MCP tools
128
+
129
+ | Tool | Purpose |
130
+ |---|---|
131
+ | `memory_begin_task` | Start a task: incrementally refresh the index and return relevant context. |
132
+ | `memory_finish_task` | End a task: save durable summary, decisions, discoveries, pitfalls, and unresolved work. |
133
+ | `memory_get_context` | Retrieve a compact context pack for a focused query. |
134
+ | `memory_search_code` | Search indexed code chunks and symbols. |
135
+ | `memory_remember` | Save a durable project or global memory. |
136
+ | `memory_update` | Correct an existing memory in place. |
137
+ | `memory_forget` | Delete a wrong or obsolete memory. |
138
+ | `memory_recall` | Search saved memories. |
139
+ | `memory_index_project` | Manually request an incremental project index refresh. |
140
+ | `memory_use_project` | Pin the session to an explicit checkout when automatic detection is wrong. |
141
+ | `memory_projects` | List every project registered in the shared database. |
142
+ | `memory_status` | Inspect the active project, index, and memory counts. |
143
+
144
+ Every project-scoped tool accepts an optional `project_root`. The server resolves the project in this order: an explicit `project_root` or `memory_use_project` selection, the MCP client's workspace roots, a project-scoped `--root`, a detectable process working directory, and finally the shared workspace. When the shared workspace is returned, the response includes a warning and the agent should call `memory_use_project` with the absolute checkout path. All servers share the same local database; project memories stay isolated, and only explicitly global memories are shared.
145
+
146
+ ## Security and privacy
147
+
148
+ - No cloud service, telemetry, or hosted database is required.
149
+ - The indexer skips common environment files, credential-like filenames, private-key extensions, symlinks, binary files, and generated directories.
150
+ - Never save credentials, access tokens, private keys, or other secrets as memories.
151
+ - The local database can contain source excerpts and project knowledge. Protect it as you would protect your source checkout. The database is plaintext SQLite in a private `0700` directory with `0600` file permissions, but it is not encrypted at rest; use full-disk encryption if that threat matters to you.
152
+
153
+ ## Development
154
+
155
+ ```bash
156
+ python -m pip install -e ".[dev,mcp]"
157
+ pytest
158
+ ruff check src tests
159
+ ```
160
+
161
+ ## Roadmap
162
+
163
+ - Tree-sitter parsing and language-aware symbol/import extraction.
164
+ - Call/reference graph and change-impact analysis.
165
+ - Memory provenance, confidence, freshness, deduplication, and superseding facts.
166
+ - Retrieval evaluation and optional local semantic search.
167
+ - Native setup/integration helpers for more coding agents.
168
+
169
+ ## License
170
+
171
+ MIT. See [LICENSE](LICENSE).
amom-0.1.0/README.md ADDED
@@ -0,0 +1,143 @@
1
+ # Amom
2
+
3
+ **One local brain. Every AI agent. Every project.**
4
+
5
+ Amom is a local-first persistent memory and code intelligence engine for AI coding agents. It gives connected agents one shared local SQLite knowledge base, so they can retrieve project context at task start and save durable learnings at task completion.
6
+
7
+ > Early development: the storage, incremental indexing, retrieval, and MCP foundations are available. Language-aware parsing and retrieval quality are still evolving.
8
+
9
+ ## Core idea: the agent owns its memory
10
+
11
+ The developer should not need to run memory commands during normal work. After one-time setup, the connected agent is responsible for:
12
+
13
+ - **Before work:** call `memory_begin_task` to retrieve relevant context from the automatically maintained project index.
14
+ - **During work:** search existing memories and indexed code instead of repeatedly scanning the repository.
15
+ - **After work:** call `memory_finish_task` to preserve durable decisions, discoveries, pitfalls, and unresolved work.
16
+ - **When needed:** immediately save important decisions through `memory_remember`.
17
+
18
+ Amom does not make an agent automatically remember without integration. The agent must be connected through MCP and instructed through its native project rules. The included setup prompt performs this one-time integration.
19
+
20
+ ## Install through your AI agent (recommended)
21
+
22
+ **Copy this short prompt and send it to your AI agent** while it is open in the project you want to connect:
23
+
24
+ ```text
25
+ Set up Amom for this project by following https://github.com/asimawdah/amom/blob/main/docs/AGENT_SETUP_PROMPT.md
26
+ ```
27
+
28
+ The setup guide includes native MCP installation commands for Claude Code, OpenAI Codex CLI, Gemini CLI, and OpenCode, plus configuration examples for Cursor and other MCP-compatible agents. The agent should choose the correct method, preserve existing settings, and add the project instructions that make memory retrieval and saving automatic.
29
+
30
+ For manual MCP setup, run the matching command from the project directory:
31
+
32
+ | Agent | Install command |
33
+ |---|---|
34
+ | Claude Code | `claude mcp add --scope project amom -- uvx --from git+https://github.com/asimawdah/amom.git amom mcp --root "$PWD"` |
35
+ | OpenAI Codex CLI | `codex mcp add amom -- uvx --from git+https://github.com/asimawdah/amom.git amom mcp --root "$PWD"` |
36
+ | Gemini CLI | `gemini mcp add amom uvx --from git+https://github.com/asimawdah/amom.git amom mcp --root "$PWD"` |
37
+ | OpenCode | `opencode mcp add amom -- uvx --from git+https://github.com/asimawdah/amom.git amom mcp --root "$PWD"` |
38
+
39
+ For Cursor and other MCP-compatible agents, use the configuration examples in [the full setup guide](docs/AGENT_SETUP_PROMPT.md). These commands require `uvx`; if it is not installed, use the setup guide's fallback instructions.
40
+
41
+ No manual memory commands are part of the daily workflow. Some agents require a one-time restart/reload after their MCP configuration changes.
42
+
43
+ ## Why memories stay attached to the right project
44
+
45
+ A project-scoped `--root "$PWD"` configuration is the simplest setup: that server always serves one checkout. A single shared server installed globally cannot use a fixed root, because the agent may work in any repository. In that case Amom asks the MCP client for its workspace roots (`roots/list`). If the client does not implement roots, it checks whether the server was launched inside a recognizable project, then falls back to the shared workspace with a warning.
46
+
47
+ If a response says `shared_workspace: true`, or `project_root` is not the checkout you are working in, call `memory_use_project` once with the absolute path:
48
+
49
+ ```text
50
+ memory_use_project(project_root="/absolute/path/to/checkout")
51
+ ```
52
+
53
+ The selection is sticky for that MCP session, and `memory_finish_task` links all saved memories to that project. Use `memory_projects` to inspect the registry and `memory_status` to verify the active project.
54
+
55
+ ## What works today
56
+
57
+ - One local SQLite database shared across connected projects and agents.
58
+ - Incremental indexing using SHA-256 content hashes.
59
+ - SQLite FTS5 search across source chunks, symbols, and saved memories.
60
+ - Python AST extraction and heuristic extraction for other supported languages.
61
+ - Basic local import dependency edges.
62
+ - Project-scoped and explicitly global memories.
63
+ - Compact context packs with source paths, line ranges, and approximate token budgets.
64
+ - MCP tools for task-start retrieval, task-completion memory capture, search, recall, indexing, and status. The first task call incrementally reconciles the project index in a worker thread and starts a background watcher; agents do not need to invoke indexing during normal work.
65
+ - Dependency-free polling watcher for independent background index refresh.
66
+ - Root and nested `.gitignore` filtering and common secret/generated-file exclusions.
67
+ - Automatic project detection from the MCP client's workspace roots, with an explicit project-selection tool for clients that do not report roots.
68
+ - Schema versioning and migrations, per-project cross-process index locks, and private database permissions.
69
+
70
+ ## Requirements
71
+
72
+ - Python 3.11+
73
+ - SQLite built with FTS5
74
+ - MCP extra for agent integration
75
+ - `uvx` (recommended for running directly from GitHub)
76
+
77
+ ## Manual developer installation
78
+
79
+ For contributors and developers who intentionally prefer a local checkout:
80
+
81
+ ```bash
82
+ git clone https://github.com/asimawdah/amom.git
83
+ cd amom
84
+ python -m pip install ".[mcp]"
85
+ ```
86
+
87
+ Normal users should use the [AI-agent setup prompt](docs/AGENT_SETUP_PROMPT.md) instead of manually running commands.
88
+
89
+ ## Shared database
90
+
91
+ The database is stored in the operating system's user data directory:
92
+
93
+ - Linux: `~/.local/share/amom/database/amom.sqlite3`
94
+ - macOS: `~/Library/Application Support/amom/database/amom.sqlite3`
95
+ - Windows: `%LOCALAPPDATA%/amom/database/amom.sqlite3`
96
+
97
+ Override with `AMOM_DB` when needed. Data stays on the local machine; Amom does not require a cloud service or hosted database.
98
+
99
+ ## MCP tools
100
+
101
+ | Tool | Purpose |
102
+ |---|---|
103
+ | `memory_begin_task` | Start a task: incrementally refresh the index and return relevant context. |
104
+ | `memory_finish_task` | End a task: save durable summary, decisions, discoveries, pitfalls, and unresolved work. |
105
+ | `memory_get_context` | Retrieve a compact context pack for a focused query. |
106
+ | `memory_search_code` | Search indexed code chunks and symbols. |
107
+ | `memory_remember` | Save a durable project or global memory. |
108
+ | `memory_update` | Correct an existing memory in place. |
109
+ | `memory_forget` | Delete a wrong or obsolete memory. |
110
+ | `memory_recall` | Search saved memories. |
111
+ | `memory_index_project` | Manually request an incremental project index refresh. |
112
+ | `memory_use_project` | Pin the session to an explicit checkout when automatic detection is wrong. |
113
+ | `memory_projects` | List every project registered in the shared database. |
114
+ | `memory_status` | Inspect the active project, index, and memory counts. |
115
+
116
+ Every project-scoped tool accepts an optional `project_root`. The server resolves the project in this order: an explicit `project_root` or `memory_use_project` selection, the MCP client's workspace roots, a project-scoped `--root`, a detectable process working directory, and finally the shared workspace. When the shared workspace is returned, the response includes a warning and the agent should call `memory_use_project` with the absolute checkout path. All servers share the same local database; project memories stay isolated, and only explicitly global memories are shared.
117
+
118
+ ## Security and privacy
119
+
120
+ - No cloud service, telemetry, or hosted database is required.
121
+ - The indexer skips common environment files, credential-like filenames, private-key extensions, symlinks, binary files, and generated directories.
122
+ - Never save credentials, access tokens, private keys, or other secrets as memories.
123
+ - The local database can contain source excerpts and project knowledge. Protect it as you would protect your source checkout. The database is plaintext SQLite in a private `0700` directory with `0600` file permissions, but it is not encrypted at rest; use full-disk encryption if that threat matters to you.
124
+
125
+ ## Development
126
+
127
+ ```bash
128
+ python -m pip install -e ".[dev,mcp]"
129
+ pytest
130
+ ruff check src tests
131
+ ```
132
+
133
+ ## Roadmap
134
+
135
+ - Tree-sitter parsing and language-aware symbol/import extraction.
136
+ - Call/reference graph and change-impact analysis.
137
+ - Memory provenance, confidence, freshness, deduplication, and superseding facts.
138
+ - Retrieval evaluation and optional local semantic search.
139
+ - Native setup/integration helpers for more coding agents.
140
+
141
+ ## License
142
+
143
+ MIT. See [LICENSE](LICENSE).