agent-memory-brain 0.2.0__py3-none-any.whl
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.
- agent_memory_brain-0.2.0.dist-info/METADATA +98 -0
- agent_memory_brain-0.2.0.dist-info/RECORD +54 -0
- agent_memory_brain-0.2.0.dist-info/WHEEL +4 -0
- agent_memory_brain-0.2.0.dist-info/entry_points.txt +3 -0
- agent_memory_brain-0.2.0.dist-info/licenses/LICENSE +67 -0
- devmem/__init__.py +3 -0
- devmem/ado.py +433 -0
- devmem/agent_colors.py +74 -0
- devmem/cli.py +500 -0
- devmem/db.py +1069 -0
- devmem/dispatch.py +478 -0
- devmem/embed.py +111 -0
- devmem/filelock.py +53 -0
- devmem/git_sync.py +261 -0
- devmem/guard.py +214 -0
- devmem/hook_log.py +49 -0
- devmem/ingest/__init__.py +1 -0
- devmem/ingest/claude.py +87 -0
- devmem/ingest/codex.py +175 -0
- devmem/ingest/runner.py +318 -0
- devmem/ingest/subagents.py +250 -0
- devmem/maintenance.py +801 -0
- devmem/mcp_server.py +542 -0
- devmem/messages.py +684 -0
- devmem/panel/__init__.py +1 -0
- devmem/panel/app.py +971 -0
- devmem/panel/state.py +358 -0
- devmem/panel/static/base.css +27 -0
- devmem/panel/static/brain.css +473 -0
- devmem/panel/static/brain.js +1118 -0
- devmem/panel/static/brain3d.js +600 -0
- devmem/panel/static/chat.js +18 -0
- devmem/panel/static/common.js +208 -0
- devmem/panel/static/site.css +508 -0
- devmem/panel/static/tokens.css +19 -0
- devmem/panel/templates/ado.html +62 -0
- devmem/panel/templates/agents.html +35 -0
- devmem/panel/templates/audit.html +19 -0
- devmem/panel/templates/base.html +42 -0
- devmem/panel/templates/brain.html +101 -0
- devmem/panel/templates/maintenance.html +32 -0
- devmem/panel/templates/memory.html +71 -0
- devmem/panel/templates/message_thread.html +49 -0
- devmem/panel/templates/messages.html +8 -0
- devmem/panel/templates/overview.html +109 -0
- devmem/panel/templates/project.html +48 -0
- devmem/panel/templates/projects.html +21 -0
- devmem/panel/templates/session.html +49 -0
- devmem/panel/templates/sessions.html +67 -0
- devmem/panel/templates/subagent.html +27 -0
- devmem/procs.py +10 -0
- devmem/projects.py +17 -0
- devmem/secrets.py +9 -0
- devmem/skills.py +105 -0
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: agent-memory-brain
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Brain: local long-term memory, agent messages and a localhost dashboard for coding agents (MCP server)
|
|
5
|
+
Author: Benjamin Breznik
|
|
6
|
+
License-Expression: LicenseRef-PolyForm-Small-Business-1.0.0
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
Keywords: ai-agents,claude-code,codex,mcp,memory
|
|
9
|
+
Classifier: Environment :: Console
|
|
10
|
+
Classifier: Operating System :: OS Independent
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
14
|
+
Requires-Python: >=3.12
|
|
15
|
+
Requires-Dist: fastapi<1,>=0.115
|
|
16
|
+
Requires-Dist: fastembed<0.10,>=0.9.1
|
|
17
|
+
Requires-Dist: jinja2<4,>=3.1
|
|
18
|
+
Requires-Dist: mcp<2,>=1.9
|
|
19
|
+
Requires-Dist: uvicorn<1,>=0.30
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
|
|
22
|
+
# Brain
|
|
23
|
+
|
|
24
|
+
Brain gives coding agents durable, local context: long-term project memory, agent-to-agent messages, and a localhost dashboard through an MCP server. It works with Claude Code and Codex, while keeping the Python import name and existing `devmem` command available for compatibility.
|
|
25
|
+
|
|
26
|
+
Windows, macOS, and Linux are supported. Windows is supported natively starting with this release.
|
|
27
|
+
|
|
28
|
+
## Install
|
|
29
|
+
|
|
30
|
+
Install Brain as a tool:
|
|
31
|
+
|
|
32
|
+
```sh
|
|
33
|
+
uv tool install agent-memory-brain
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Or use pipx:
|
|
37
|
+
|
|
38
|
+
```sh
|
|
39
|
+
pipx install agent-memory-brain
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
If `brain` is not yet on your `PATH`, run `uv tool update-shell`, follow its shell instructions, and open a new terminal. Until then, use the absolute executable path from `uv tool dir --bin`.
|
|
43
|
+
|
|
44
|
+
## Connect an agent
|
|
45
|
+
|
|
46
|
+
Register the MCP server for Claude Code:
|
|
47
|
+
|
|
48
|
+
```sh
|
|
49
|
+
claude mcp add brain -s user -- brain mcp
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
If `brain` is not on `PATH`, replace it in that command with the absolute executable path from `uv tool dir --bin`.
|
|
53
|
+
|
|
54
|
+
For Codex, add this to `~/.codex/config.toml` (use the absolute path if needed). The MCP server's internal name remains `devmem` for compatibility:
|
|
55
|
+
|
|
56
|
+
```toml
|
|
57
|
+
[mcp_servers.devmem]
|
|
58
|
+
command = "brain"
|
|
59
|
+
args = ["mcp"]
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
To include a compact project briefing at the start of a Claude Code session, optionally configure a SessionStart hook that runs:
|
|
63
|
+
|
|
64
|
+
```sh
|
|
65
|
+
brain context --hook
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Dashboard
|
|
69
|
+
|
|
70
|
+
Start the local panel:
|
|
71
|
+
|
|
72
|
+
```sh
|
|
73
|
+
brain panel
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Then open <http://127.0.0.1:8765>. The dashboard shows activity, projects, sessions, memories, messages, and optional integrations.
|
|
77
|
+
|
|
78
|
+
## Memory that stays useful
|
|
79
|
+
|
|
80
|
+
Use the MCP tools to save decisions, preferences, snippets, notes, and follow-ups. Search combines keywords with local semantic embeddings when enabled; `brain embed` backfills embeddings and `DEVMEM_EMBED=0` keeps operation keyword-only. The CLI also offers `brain search`, `brain context`, and `brain audit`.
|
|
81
|
+
|
|
82
|
+
Changes and deletions retain revision history (`memory_history` and `memory_restore`). Pin only the facts needed in every session, and use typed memory links rather than repeating related context. `brain maintain --dry-run` previews optional maintenance work before it changes anything.
|
|
83
|
+
|
|
84
|
+
## Privacy and network
|
|
85
|
+
|
|
86
|
+
All memory data stays in `~/.devmem/devmem.db`, and the panel binds only to localhost. Brain reads, but never modifies, logs in `~/.claude/projects` and `~/.codex/sessions`.
|
|
87
|
+
|
|
88
|
+
On first embedding use, FastEmbed may download its model into `~/.devmem/models`; set `DEVMEM_EMBED=0` to disable embeddings. The following features are off unless configured: the Azure DevOps panel (requires `~/.devmem/ado.json` and a user-created token file), git sync (a user-configured git remote), automatic maintenance (runs local `codex exec` or `claude -p`), and panel chat dispatch (runs local Claude or Codex CLIs).
|
|
89
|
+
|
|
90
|
+
## Configuration
|
|
91
|
+
|
|
92
|
+
Configuration names deliberately remain compatible: environment variables continue to use the `DEVMEM_*` prefix and data/configuration paths remain under `~/.devmem/`. Common settings include `DEVMEM_DB`, `DEVMEM_EMBED`, `DEVMEM_MAX_CONTENT`, `DEVMEM_PANEL_PORT`, `DEVMEM_MAINTAIN`, and `DEVMEM_ADO_CONFIG`.
|
|
93
|
+
|
|
94
|
+
## License
|
|
95
|
+
|
|
96
|
+
Brain is free for individuals and small businesses under the PolyForm Small Business License 1.0.0. Larger companies can contact the author for a commercial license via the PyPI project page.
|
|
97
|
+
|
|
98
|
+
The paid Agensi skill pack teaches agents to use Brain well.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
devmem/__init__.py,sha256=gypy6oJJmPEetJpA1pTs2eOPXPdbLWqKHRXOYHVDx00,82
|
|
2
|
+
devmem/ado.py,sha256=Rvw2djvJYiyXlWMrYDAMvu6vVoVm178rqm4FySlxEW8,20678
|
|
3
|
+
devmem/agent_colors.py,sha256=GERARdrF1bugDQSxIScCjToQdv17-R5tpk4hB8IzyKQ,3167
|
|
4
|
+
devmem/cli.py,sha256=68DD_mHDDB905of8IhONaP9NyjKumhXXXpgZNKpHMgE,26271
|
|
5
|
+
devmem/db.py,sha256=Bzum68nwHI60VyAG3BFzuMVTEHDmC-8IK13TwSractQ,55104
|
|
6
|
+
devmem/dispatch.py,sha256=FSOF5T1tB6_mnA0inucihj_0ToMb3IDVH6GKFof4xbw,25309
|
|
7
|
+
devmem/embed.py,sha256=MRuCHIIoCD-_Je8ZeoAbBKktrN_MXAoZDeF4Fwc4Gos,4361
|
|
8
|
+
devmem/filelock.py,sha256=TYef1zyBT9qq0unXPbGKVUml1oFaqLh4zW3uqNsVRj0,1739
|
|
9
|
+
devmem/git_sync.py,sha256=7M1ycMnLHtjBlp4G4ngHDMZtZw44yTkxPSgfZDouGnQ,14629
|
|
10
|
+
devmem/guard.py,sha256=rO0GivnuxV_ayE_40onSAodwxFDHzBK4emhEgPaZsiQ,11487
|
|
11
|
+
devmem/hook_log.py,sha256=i3XQ_EP4Oggbk5Rm4VecaSYyriHsg4pg1RUGTf5JQsE,1935
|
|
12
|
+
devmem/maintenance.py,sha256=2mYlrJXbp06cLidWQKC357_I-paq9xI8PVGHdMJLc8c,58986
|
|
13
|
+
devmem/mcp_server.py,sha256=-GeZDRkJh1YbfMTCLij9xyf_ZGlgTrz0kno1vY0atFQ,32329
|
|
14
|
+
devmem/messages.py,sha256=aCr6ECSr52m5FVIr5woQCItdFAcJjedb0IUTJl_Feqw,45108
|
|
15
|
+
devmem/procs.py,sha256=YL0frMTM2j4K-LExahr6kqq1QpLGJzD0tgejkraAbOs,301
|
|
16
|
+
devmem/projects.py,sha256=qKXoV8aNpCSbBEr0ffp7cFkU_1v6ezzDhegflpl06wk,548
|
|
17
|
+
devmem/secrets.py,sha256=EZm-L3-9wp6t3mT0GhRosUUD6YH25Ccr7ah0CGfM1FI,550
|
|
18
|
+
devmem/skills.py,sha256=kgNx6VxQ1cyWIlFl1JQVX3S_Xe91V6LilKZGkDzfKpY,4148
|
|
19
|
+
devmem/ingest/__init__.py,sha256=WytS2Qo3CvpyG14ntGxcREq3Bkm0hZ6I7wUaMuR1os0,45
|
|
20
|
+
devmem/ingest/claude.py,sha256=VzqLobyf9VRlpBWFxSsGb6cWw69KOdblZ--ncpYY34c,3412
|
|
21
|
+
devmem/ingest/codex.py,sha256=ytryDtR7zVUVFYVGeKqeGrrikqrRfZ2PG33jvUzMtZs,8678
|
|
22
|
+
devmem/ingest/runner.py,sha256=P0pnQD7V0OJXs-6CA1h8w3oiz76aTG9xkokGUF_eLzA,15563
|
|
23
|
+
devmem/ingest/subagents.py,sha256=snaJ-0kbu37__TCqgEDKSyRe1ZJJr-zX4wo7ltSdJuY,16833
|
|
24
|
+
devmem/panel/__init__.py,sha256=vzSjnBVkyTjW8laBqpfHja_etJPo2M1FXgHROYfVTrk,42
|
|
25
|
+
devmem/panel/app.py,sha256=Kc1pBSP4du6z7xe7Cc6k6OGQLxtUhbCue_r2S7ttN3k,45391
|
|
26
|
+
devmem/panel/state.py,sha256=lmHSqOj35422h-BxTZLwWlOcM2im9KRR_Pw-cXM8iCQ,19277
|
|
27
|
+
devmem/panel/static/base.css,sha256=qfsn9aRBFruWtHmbHtgOE7zz0Q5Oe3E23Wvuj1DIYU4,2777
|
|
28
|
+
devmem/panel/static/brain.css,sha256=zEw4ozHgxzTPOYDCzeIlC7U_8nfMwlb_fdXNhPfOWSY,19271
|
|
29
|
+
devmem/panel/static/brain.js,sha256=dMo3Iy_JjFbcVPNbPK4ub-IuLHk5TINr5Iid02NAF4I,51860
|
|
30
|
+
devmem/panel/static/brain3d.js,sha256=bxxu1NpfSgGF5Z7VdGlqqS83DSzP-vzll4uAXXwPgUs,28384
|
|
31
|
+
devmem/panel/static/chat.js,sha256=LtugE63FvWEFWtSe9jrNCFX3ZAMpQJg7Z9bdIEDiHZg,5663
|
|
32
|
+
devmem/panel/static/common.js,sha256=OA_-CyHXBTdGZLeZecn2UT8-u3-3Ag3-pSQYKNI0Qlg,9797
|
|
33
|
+
devmem/panel/static/site.css,sha256=Q4jVJKsyWKPAXJn0tTSNIU_DnU2CNucL0YCj7AHm__o,29596
|
|
34
|
+
devmem/panel/static/tokens.css,sha256=LEkZG-rreCcNNeruEPf9ROpmAJvpEE-1bgPJn8hqvJw,1793
|
|
35
|
+
devmem/panel/templates/ado.html,sha256=gtmkQuzbWe5KSVS2WgMLjE5TJI7OlWf0vlFPJZrHNnk,4390
|
|
36
|
+
devmem/panel/templates/agents.html,sha256=ZKELx4VzSCkwTX6bkkXL85q37LpfsDq98mT4qYqr0Hs,1219
|
|
37
|
+
devmem/panel/templates/audit.html,sha256=Vda9TTP9mAsD6YI4JVPpmo9OSeSOLuc-9Tmly0nNekw,651
|
|
38
|
+
devmem/panel/templates/base.html,sha256=R2t-UhtKfqAM7cw9yuAIwdkDa1OO8aD60J4KGATCTO4,2443
|
|
39
|
+
devmem/panel/templates/brain.html,sha256=cseJNylHvg_5itlQ2SQ9_T6mMTGRPnT8Ldc1VIAxghA,5695
|
|
40
|
+
devmem/panel/templates/maintenance.html,sha256=2BNO0gCY85Z__7KKzm29ZxQqayz6tvuhvI8YSg4xd6U,3426
|
|
41
|
+
devmem/panel/templates/memory.html,sha256=AmoYn3UUVVArWvWZyCq6oPkwzpef6pEsP_qzCPNAvO8,2781
|
|
42
|
+
devmem/panel/templates/message_thread.html,sha256=Ql_pxS1-vTagoxiE7Fofi5QbUDqaDgjzVj0A-4KMKzI,2974
|
|
43
|
+
devmem/panel/templates/messages.html,sha256=v-fHiLNpkyI7tzTsXAzoTZAt6mPgEP4k5MJqMMQbme0,2972
|
|
44
|
+
devmem/panel/templates/overview.html,sha256=0gAy-55g6ZJ81d5jNtIRCXP3JXt_hMmbVNloBy2ITfc,4313
|
|
45
|
+
devmem/panel/templates/project.html,sha256=AQSoSPTCFj2EfyQQl2K7mJ72WWOkyMuA14ZOyuXex_Y,1435
|
|
46
|
+
devmem/panel/templates/projects.html,sha256=PEGQRlbSPArxgnnqVqXHZ7XYSGLVR11_8FjlaRuHYB8,726
|
|
47
|
+
devmem/panel/templates/session.html,sha256=t7pX4Sat79vV2BwX6lHh2UPOwCcRo5LisAzLoYT3Bs0,1775
|
|
48
|
+
devmem/panel/templates/sessions.html,sha256=mHkvrMcnwcR_7VLiGjSLDXADY6WKY_2Amsv55wN3wWQ,3470
|
|
49
|
+
devmem/panel/templates/subagent.html,sha256=Ce_KOHy8E9UPceViellOUtZcwouH6-0IhIa48Bx5Ajs,2408
|
|
50
|
+
agent_memory_brain-0.2.0.dist-info/METADATA,sha256=E5Gbf-weq3-qVwKIZVCMqQkXOAiVmdmlOBh0U5lMh60,4172
|
|
51
|
+
agent_memory_brain-0.2.0.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
|
|
52
|
+
agent_memory_brain-0.2.0.dist-info/entry_points.txt,sha256=_8tm-wQ2cyQqTc0bGSyAzZcEX2-lod45PgL6SDTcj8c,67
|
|
53
|
+
agent_memory_brain-0.2.0.dist-info/licenses/LICENSE,sha256=aYvkpFz94bu535cKe4MBLlRrSCLRjnHkGV0TR-w3KiM,4443
|
|
54
|
+
agent_memory_brain-0.2.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
Required Notice: Copyright (c) 2026 Benjamin Breznik
|
|
2
|
+
|
|
3
|
+
# PolyForm Small Business License 1.0.0
|
|
4
|
+
|
|
5
|
+
<https://polyformproject.org/licenses/small-business/1.0.0>
|
|
6
|
+
|
|
7
|
+
## Acceptance
|
|
8
|
+
|
|
9
|
+
In order to get any license under these terms, you must agree to them as both strict obligations and conditions to all your licenses.
|
|
10
|
+
|
|
11
|
+
## Copyright License
|
|
12
|
+
|
|
13
|
+
The licensor grants you a copyright license for the software to do everything you might do with the software that would otherwise infringe the licensor's copyright in it for any permitted purpose. However, you may only distribute the software according to [Distribution License](#distribution-license) and make changes or new works based on the software according to [Changes and New Works License](#changes-and-new-works-license).
|
|
14
|
+
|
|
15
|
+
## Distribution License
|
|
16
|
+
|
|
17
|
+
The licensor grants you an additional copyright license to distribute copies of the software. Your license to distribute covers distributing the software with changes and new works permitted by [Changes and New Works License](#changes-and-new-works-license).
|
|
18
|
+
|
|
19
|
+
## Notices
|
|
20
|
+
|
|
21
|
+
You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these terms or the URL for them above, as well as copies of any plain-text lines beginning with `Required Notice:` that the licensor provided with the software. For example:
|
|
22
|
+
|
|
23
|
+
> Required Notice: Copyright Yoyodyne, Inc. (http://example.com)
|
|
24
|
+
|
|
25
|
+
## Changes and New Works License
|
|
26
|
+
|
|
27
|
+
The licensor grants you an additional copyright license to make changes and new works based on the software for any permitted purpose.
|
|
28
|
+
|
|
29
|
+
## Patent License
|
|
30
|
+
|
|
31
|
+
The licensor grants you a patent license for the software that covers patent claims the licensor can license, or becomes able to license, that you would infringe by using the software.
|
|
32
|
+
|
|
33
|
+
## Fair Use
|
|
34
|
+
|
|
35
|
+
You may have "fair use" rights for the software under the law. These terms do not limit them.
|
|
36
|
+
|
|
37
|
+
## Small Business
|
|
38
|
+
|
|
39
|
+
Use of the software for the benefit of your company is use for a permitted purpose if your company has fewer than 100 total individuals working as employees and independent contractors, and less than 1,000,000 USD (2019) total revenue in the prior tax year. Adjust this revenue threshold for inflation according to the United States Bureau of Labor Statistics' consumer price index for all urban consumers, U.S. city average, for all items, not seasonally adjusted, with 1982–1984=100 reference base.
|
|
40
|
+
|
|
41
|
+
## No Other Rights
|
|
42
|
+
|
|
43
|
+
These terms do not allow you to sublicense or transfer any of your licenses to anyone else, or prevent the licensor from granting licenses to anyone else. These terms do not imply any other licenses.
|
|
44
|
+
|
|
45
|
+
## Patent Defense
|
|
46
|
+
|
|
47
|
+
If you make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company.
|
|
48
|
+
|
|
49
|
+
## Violations
|
|
50
|
+
|
|
51
|
+
The first time you are notified in writing that you have violated any of these terms, or done anything with the software not covered by your licenses, your licenses can nonetheless continue if you come into full compliance with these terms, and take practical steps to correct past violations, within 32 days of receiving notice. Otherwise, all your licenses end immediately.
|
|
52
|
+
|
|
53
|
+
## No Liability
|
|
54
|
+
|
|
55
|
+
***As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.***
|
|
56
|
+
|
|
57
|
+
## Definitions
|
|
58
|
+
|
|
59
|
+
The **licensor** is the individual or entity offering these terms, and the **software** is the software the licensor makes available under these terms.
|
|
60
|
+
|
|
61
|
+
**You** refers to the individual or entity agreeing to these terms.
|
|
62
|
+
|
|
63
|
+
**Your company** is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization. **Control** means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.
|
|
64
|
+
|
|
65
|
+
**Your licenses** are all the licenses granted to you for the software under these terms.
|
|
66
|
+
|
|
67
|
+
**Use** means anything you do with the software requiring one of your licenses.
|
devmem/__init__.py
ADDED