mneia 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.
Files changed (92) hide show
  1. mneia-0.1.0/.gitignore +37 -0
  2. mneia-0.1.0/LICENSE +21 -0
  3. mneia-0.1.0/PKG-INFO +422 -0
  4. mneia-0.1.0/README.md +341 -0
  5. mneia-0.1.0/docs/cli-reference.md +298 -0
  6. mneia-0.1.0/docs/configuration.md +126 -0
  7. mneia-0.1.0/docs/connectors.md +468 -0
  8. mneia-0.1.0/docs/conversational-interface.md +129 -0
  9. mneia-0.1.0/docs/daemon-agents.md +171 -0
  10. mneia-0.1.0/docs/enrichment.md +78 -0
  11. mneia-0.1.0/docs/interactive-mode.md +94 -0
  12. mneia-0.1.0/docs/knowledge-pipeline.md +138 -0
  13. mneia-0.1.0/docs/marketplace.md +84 -0
  14. mneia-0.1.0/docs/mcp-integration.md +134 -0
  15. mneia-0.1.0/docs/safety.md +77 -0
  16. mneia-0.1.0/pyproject.toml +105 -0
  17. mneia-0.1.0/src/mneia/__init__.py +1 -0
  18. mneia-0.1.0/src/mneia/agents/__init__.py +0 -0
  19. mneia-0.1.0/src/mneia/agents/autonomous.py +175 -0
  20. mneia-0.1.0/src/mneia/agents/enrichment.py +215 -0
  21. mneia-0.1.0/src/mneia/agents/listener.py +175 -0
  22. mneia-0.1.0/src/mneia/agents/meta.py +69 -0
  23. mneia-0.1.0/src/mneia/agents/reasoning.py +158 -0
  24. mneia-0.1.0/src/mneia/agents/web_research.py +191 -0
  25. mneia-0.1.0/src/mneia/agents/worker.py +97 -0
  26. mneia-0.1.0/src/mneia/cli.py +1391 -0
  27. mneia-0.1.0/src/mneia/config.py +113 -0
  28. mneia-0.1.0/src/mneia/connectors/__init__.py +99 -0
  29. mneia-0.1.0/src/mneia/connectors/apple_notes.py +157 -0
  30. mneia-0.1.0/src/mneia/connectors/asana.py +214 -0
  31. mneia-0.1.0/src/mneia/connectors/audio_transcription.py +186 -0
  32. mneia-0.1.0/src/mneia/connectors/chrome_history.py +265 -0
  33. mneia-0.1.0/src/mneia/connectors/confluence.py +201 -0
  34. mneia-0.1.0/src/mneia/connectors/github.py +260 -0
  35. mneia-0.1.0/src/mneia/connectors/google_auth.py +116 -0
  36. mneia-0.1.0/src/mneia/connectors/google_calendar.py +198 -0
  37. mneia-0.1.0/src/mneia/connectors/google_drive.py +232 -0
  38. mneia-0.1.0/src/mneia/connectors/google_gmail.py +256 -0
  39. mneia-0.1.0/src/mneia/connectors/jira.py +207 -0
  40. mneia-0.1.0/src/mneia/connectors/linear.py +234 -0
  41. mneia-0.1.0/src/mneia/connectors/live_audio.py +243 -0
  42. mneia-0.1.0/src/mneia/connectors/notion.py +243 -0
  43. mneia-0.1.0/src/mneia/connectors/obsidian.py +261 -0
  44. mneia-0.1.0/src/mneia/connectors/slack.py +191 -0
  45. mneia-0.1.0/src/mneia/connectors/todoist.py +187 -0
  46. mneia-0.1.0/src/mneia/connectors/transcription_engine.py +90 -0
  47. mneia-0.1.0/src/mneia/connectors/web_scraper.py +116 -0
  48. mneia-0.1.0/src/mneia/connectors/zoom.py +222 -0
  49. mneia-0.1.0/src/mneia/context/__init__.py +0 -0
  50. mneia-0.1.0/src/mneia/context/templates/beliefs.j2 +12 -0
  51. mneia-0.1.0/src/mneia/context/templates/claude_md.j2 +70 -0
  52. mneia-0.1.0/src/mneia/context/templates/decisions.j2 +12 -0
  53. mneia-0.1.0/src/mneia/context/templates/people.j2 +21 -0
  54. mneia-0.1.0/src/mneia/context/templates/projects.j2 +21 -0
  55. mneia-0.1.0/src/mneia/context/watcher.py +91 -0
  56. mneia-0.1.0/src/mneia/conversation.py +297 -0
  57. mneia-0.1.0/src/mneia/core/__init__.py +0 -0
  58. mneia-0.1.0/src/mneia/core/agent.py +44 -0
  59. mneia-0.1.0/src/mneia/core/agent_stats.py +95 -0
  60. mneia-0.1.0/src/mneia/core/connector.py +89 -0
  61. mneia-0.1.0/src/mneia/core/lifecycle.py +343 -0
  62. mneia-0.1.0/src/mneia/core/llm.py +247 -0
  63. mneia-0.1.0/src/mneia/core/llm_setup.py +242 -0
  64. mneia-0.1.0/src/mneia/core/metrics.py +98 -0
  65. mneia-0.1.0/src/mneia/core/permissions_db.py +117 -0
  66. mneia-0.1.0/src/mneia/core/retry.py +46 -0
  67. mneia-0.1.0/src/mneia/core/safety.py +175 -0
  68. mneia-0.1.0/src/mneia/core/scheduler.py +47 -0
  69. mneia-0.1.0/src/mneia/core/watcher.py +63 -0
  70. mneia-0.1.0/src/mneia/interactive.py +1274 -0
  71. mneia-0.1.0/src/mneia/marketplace/__init__.py +0 -0
  72. mneia-0.1.0/src/mneia/marketplace/installer.py +55 -0
  73. mneia-0.1.0/src/mneia/marketplace/registry.py +142 -0
  74. mneia-0.1.0/src/mneia/mcp/__init__.py +1 -0
  75. mneia-0.1.0/src/mneia/mcp/resources.py +48 -0
  76. mneia-0.1.0/src/mneia/mcp/server.py +27 -0
  77. mneia-0.1.0/src/mneia/mcp/tools.py +269 -0
  78. mneia-0.1.0/src/mneia/memory/__init__.py +0 -0
  79. mneia-0.1.0/src/mneia/memory/embeddings.py +78 -0
  80. mneia-0.1.0/src/mneia/memory/graph.py +227 -0
  81. mneia-0.1.0/src/mneia/memory/persistent.py +205 -0
  82. mneia-0.1.0/src/mneia/memory/session_manager.py +92 -0
  83. mneia-0.1.0/src/mneia/memory/store.py +393 -0
  84. mneia-0.1.0/src/mneia/memory/vector_store.py +173 -0
  85. mneia-0.1.0/src/mneia/menubar.py +149 -0
  86. mneia-0.1.0/src/mneia/pipeline/__init__.py +0 -0
  87. mneia-0.1.0/src/mneia/pipeline/associate.py +68 -0
  88. mneia-0.1.0/src/mneia/pipeline/extract.py +142 -0
  89. mneia-0.1.0/src/mneia/pipeline/generate.py +112 -0
  90. mneia-0.1.0/src/mneia/pipeline/ingest.py +93 -0
  91. mneia-0.1.0/src/mneia/pipeline/summarize.py +127 -0
  92. mneia-0.1.0/src/mneia/tui.py +167 -0
mneia-0.1.0/.gitignore ADDED
@@ -0,0 +1,37 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ *$py.class
4
+ *.so
5
+ dist/
6
+ build/
7
+ *.egg-info/
8
+ *.egg
9
+ .eggs/
10
+ *.whl
11
+ .venv/
12
+ venv/
13
+ env/
14
+ .env
15
+ .env.*
16
+ *.db
17
+ *.sqlite
18
+ *.sqlite3
19
+ .mypy_cache/
20
+ .ruff_cache/
21
+ .pytest_cache/
22
+ htmlcov/
23
+ .coverage
24
+ *.log
25
+ .DS_Store
26
+ Thumbs.db
27
+ node_modules/
28
+ .idea/
29
+ .vscode/
30
+ *.swp
31
+ *.swo
32
+ *~
33
+ PLAN_mneia.md
34
+ .mneia/
35
+ credentials*.json
36
+ *_secret*.json
37
+ *.key
mneia-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Dimitris Sotiriou
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.
mneia-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,422 @@
1
+ Metadata-Version: 2.4
2
+ Name: mneia
3
+ Version: 0.1.0
4
+ Summary: Autonomous multi-agent personal knowledge system
5
+ Project-URL: Homepage, https://github.com/riverphoenix/mneia
6
+ Project-URL: Documentation, https://github.com/riverphoenix/mneia/tree/master/docs
7
+ Project-URL: Repository, https://github.com/riverphoenix/mneia
8
+ Project-URL: Issues, https://github.com/riverphoenix/mneia/issues
9
+ Project-URL: Changelog, https://github.com/riverphoenix/mneia/releases
10
+ Author-email: Dimitris Sotiriou <mneia@dsotiriou.dev>
11
+ License-Expression: MIT
12
+ License-File: LICENSE
13
+ Keywords: agents,ai,cli,knowledge,knowledge-graph,llm,memory,obsidian,ollama,personal,rag
14
+ Classifier: Development Status :: 3 - Alpha
15
+ Classifier: Environment :: Console
16
+ Classifier: Intended Audience :: Developers
17
+ Classifier: Intended Audience :: End Users/Desktop
18
+ Classifier: License :: OSI Approved :: MIT License
19
+ Classifier: Operating System :: MacOS
20
+ Classifier: Operating System :: POSIX :: Linux
21
+ Classifier: Programming Language :: Python :: 3
22
+ Classifier: Programming Language :: Python :: 3.10
23
+ Classifier: Programming Language :: Python :: 3.11
24
+ Classifier: Programming Language :: Python :: 3.12
25
+ Classifier: Programming Language :: Python :: 3.13
26
+ Classifier: Topic :: Office/Business :: Groupware
27
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
28
+ Classifier: Topic :: Text Processing :: Indexing
29
+ Classifier: Typing :: Typed
30
+ Requires-Python: >=3.10
31
+ Requires-Dist: aiosqlite>=0.20
32
+ Requires-Dist: httpx>=0.27
33
+ Requires-Dist: jinja2>=3.1
34
+ Requires-Dist: networkx>=3.0
35
+ Requires-Dist: prompt-toolkit>=3.0
36
+ Requires-Dist: pydantic>=2.0
37
+ Requires-Dist: rich>=13.0
38
+ Requires-Dist: textual>=0.80
39
+ Requires-Dist: typer[all]>=0.12
40
+ Requires-Dist: watchfiles>=0.21
41
+ Provides-Extra: all
42
+ Requires-Dist: atlassian-python-api>=3.0; extra == 'all'
43
+ Requires-Dist: chromadb>=0.5; extra == 'all'
44
+ Requires-Dist: crawl4ai>=0.4; extra == 'all'
45
+ Requires-Dist: faster-whisper>=1.0; extra == 'all'
46
+ Requires-Dist: google-api-python-client>=2.0; extra == 'all'
47
+ Requires-Dist: google-auth-oauthlib>=1.0; extra == 'all'
48
+ Requires-Dist: google-auth>=2.0; extra == 'all'
49
+ Requires-Dist: mcp>=1.0; extra == 'all'
50
+ Requires-Dist: notion-client>=2.0; extra == 'all'
51
+ Requires-Dist: playwright>=1.40; extra == 'all'
52
+ Requires-Dist: rumps>=0.4; extra == 'all'
53
+ Requires-Dist: sounddevice>=0.4; extra == 'all'
54
+ Provides-Extra: atlassian
55
+ Requires-Dist: atlassian-python-api>=3.0; extra == 'atlassian'
56
+ Provides-Extra: audio
57
+ Requires-Dist: faster-whisper>=1.0; extra == 'audio'
58
+ Requires-Dist: sounddevice>=0.4; extra == 'audio'
59
+ Provides-Extra: dev
60
+ Requires-Dist: mypy>=1.0; extra == 'dev'
61
+ Requires-Dist: pytest-asyncio>=0.24; extra == 'dev'
62
+ Requires-Dist: pytest>=8.0; extra == 'dev'
63
+ Requires-Dist: respx>=0.21; extra == 'dev'
64
+ Requires-Dist: ruff>=0.8; extra == 'dev'
65
+ Provides-Extra: google
66
+ Requires-Dist: google-api-python-client>=2.0; extra == 'google'
67
+ Requires-Dist: google-auth-oauthlib>=1.0; extra == 'google'
68
+ Requires-Dist: google-auth>=2.0; extra == 'google'
69
+ Provides-Extra: mcp
70
+ Requires-Dist: mcp>=1.0; extra == 'mcp'
71
+ Provides-Extra: menubar
72
+ Requires-Dist: rumps>=0.4; extra == 'menubar'
73
+ Provides-Extra: notion
74
+ Requires-Dist: notion-client>=2.0; extra == 'notion'
75
+ Provides-Extra: vector
76
+ Requires-Dist: chromadb>=0.5; extra == 'vector'
77
+ Provides-Extra: web
78
+ Requires-Dist: crawl4ai>=0.4; extra == 'web'
79
+ Requires-Dist: playwright>=1.40; extra == 'web'
80
+ Description-Content-Type: text/markdown
81
+
82
+ ```
83
+ _
84
+ _ __ ___ _ __ ___ (_) __ _
85
+ | '_ ` _ \| '_ \ / _ \ | |/ _` |
86
+ | | | | | | | | | __/ | | (_| |
87
+ |_| |_| |_|_| |_|\___| |_|\__,_|
88
+ ```
89
+
90
+ > *mneia (μνεία)* — Greek for "memory, reference"
91
+
92
+ Autonomous multi-agent personal knowledge system. mneia connects to your apps (read-only), learns about your work, and builds persistent local memory that powers AI assistants with deep personal context.
93
+
94
+ ## What it does
95
+
96
+ - **Connects** to 18 data sources (Calendar, Slack, GitHub, Notes, Chrome, Audio, and more) — read-only, always
97
+ - **Learns** by extracting entities, relationships, and patterns from your data via LLM
98
+ - **Remembers** everything locally in a knowledge graph with vector embeddings — nothing leaves your machine
99
+ - **Thinks** autonomously — identifies gaps, proposes connections, and surfaces insights
100
+ - **Generates** `.md` context files for Claude Code, Cursor, and other AI tools
101
+ - **Serves** as an MCP server so AI tools can query your knowledge directly
102
+ - **Converses** with you about your knowledge through a CLI/interactive interface
103
+
104
+ ## Quick Start
105
+
106
+ ```bash
107
+ # Install
108
+ pipx install mneia
109
+
110
+ # Prerequisites: local LLM via Ollama
111
+ brew install ollama
112
+ ollama pull phi3:mini
113
+ ollama pull nomic-embed-text
114
+
115
+ # Setup
116
+ mneia config setup
117
+
118
+ # Enable a connector
119
+ mneia connector enable obsidian
120
+ mneia connector setup obsidian
121
+
122
+ # Sync and start
123
+ mneia connector sync obsidian
124
+ mneia start
125
+ ```
126
+
127
+ ## Interactive Mode
128
+
129
+ Run `mneia` with no arguments to enter interactive mode:
130
+
131
+ ```
132
+ mneia › /help # See all commands
133
+ mneia › /search meetings # Search your knowledge
134
+ mneia › /stats # View memory statistics
135
+ mneia › What did I discuss with Alice last week? # Natural language query
136
+ ```
137
+
138
+ The interactive mode supports slash commands, natural language intent detection, and LLM-powered conversational queries with automatic command routing. Cross-session memory means mneia learns your preferences over time.
139
+
140
+ ## MCP Server
141
+
142
+ mneia exposes an MCP server for AI tool integration. Add it to your Claude Code config:
143
+
144
+ ```json
145
+ {
146
+ "mcpServers": {
147
+ "mneia": {
148
+ "command": "mneia",
149
+ "args": ["mcp", "serve"]
150
+ }
151
+ }
152
+ }
153
+ ```
154
+
155
+ Available MCP tools: `mneia_search`, `mneia_ask`, `mneia_list_connectors`, `mneia_connector_status`, `mneia_sync`, `mneia_graph_query`, `mneia_memory_stats`, `mneia_marketplace_search`.
156
+
157
+ ## CLI Commands
158
+
159
+ ### Daemon Management
160
+
161
+ ```bash
162
+ mneia start [--detach] [--connectors name1,name2] # Start the knowledge daemon
163
+ mneia stop # Stop gracefully
164
+ mneia status # Show agent states and stats
165
+ ```
166
+
167
+ ### Configuration
168
+
169
+ ```bash
170
+ mneia config setup # Interactive setup wizard
171
+ mneia config show # Show current configuration
172
+ mneia config set <key> <v> # Set a configuration value
173
+ mneia config reset # Reset to defaults
174
+ ```
175
+
176
+ ### Connectors
177
+
178
+ ```bash
179
+ mneia connector list # List connectors and status
180
+ mneia connector enable <name> # Enable a connector
181
+ mneia connector disable <name> # Disable a connector
182
+ mneia connector setup <name> # Interactive connector setup
183
+ mneia connector sync <name> # Trigger immediate sync
184
+ mneia connector start-agent <name> # Start a connector's listener agent
185
+ mneia connector stop-agent <name> # Stop a connector's listener agent
186
+ mneia connector agents # List running connector agents
187
+ ```
188
+
189
+ ### Memory & Search
190
+
191
+ ```bash
192
+ mneia memory stats # Show ingestion statistics
193
+ mneia memory search <query> # Full-text + vector search across all knowledge
194
+ mneia memory recent # Show recently ingested items
195
+ mneia memory purge [--source <name>] # Clear stored memory
196
+ ```
197
+
198
+ ### Knowledge Graph
199
+
200
+ ```bash
201
+ mneia graph show # Knowledge graph summary
202
+ mneia graph entities [--type person] # List entities, optionally by type
203
+ mneia graph person <name> # Show everything about a person
204
+ mneia graph topic <name> # Show everything about a topic
205
+ mneia graph export [--format json] # Export the knowledge graph
206
+ ```
207
+
208
+ ### Entity Extraction
209
+
210
+ ```bash
211
+ mneia extract [--limit 50] # Run entity extraction on unprocessed docs
212
+ ```
213
+
214
+ ### Context Generation
215
+
216
+ ```bash
217
+ mneia context generate # Generate .md context files
218
+ mneia context show # List generated context files
219
+ mneia context link <target-dir> # Symlink context to a project directory
220
+ ```
221
+
222
+ ### Conversational Query
223
+
224
+ ```bash
225
+ mneia ask <question> [--source <name>] # Single query with RAG
226
+ mneia chat # Multi-turn conversation mode
227
+ ```
228
+
229
+ ### Permissions
230
+
231
+ ```bash
232
+ mneia permission list # List granted permissions
233
+ mneia permission grant <operation> # Pre-approve an operation
234
+ mneia permission revoke <operation> # Revoke a permission
235
+ ```
236
+
237
+ ### Agent Dashboard & Logs
238
+
239
+ ```bash
240
+ mneia agents # Interactive TUI dashboard (Textual)
241
+ mneia logs [--level info] [--follow] # Tail daemon logs
242
+ ```
243
+
244
+ ### MCP Server
245
+
246
+ ```bash
247
+ mneia mcp serve # Start MCP server (stdio transport)
248
+ ```
249
+
250
+ ### Marketplace
251
+
252
+ ```bash
253
+ mneia marketplace list # List available connectors
254
+ mneia marketplace search <query> # Search marketplace
255
+ mneia marketplace install <name> # Install a connector
256
+ ```
257
+
258
+ ### Other
259
+
260
+ ```bash
261
+ mneia version # Show version
262
+ mneia update # Check for updates
263
+ ```
264
+
265
+ ## Interactive Mode Commands
266
+
267
+ All CLI commands are also available as slash commands in interactive mode:
268
+
269
+ | Command | Description |
270
+ |---------|-------------|
271
+ | `/help` | Show all available commands |
272
+ | `/status` | Show daemon and agent status |
273
+ | `/search <query>` | Search your knowledge |
274
+ | `/ask <question>` | Ask a question with RAG |
275
+ | `/stats` | Show memory statistics |
276
+ | `/recent` | Show recently ingested documents |
277
+ | `/connectors` | List connectors and status |
278
+ | `/sync <name>` | Sync a connector |
279
+ | `/connector-start <name>` | Start a connector agent |
280
+ | `/connector-stop <name>` | Stop a connector agent |
281
+ | `/agents` | List running agents |
282
+ | `/extract [limit]` | Run entity extraction |
283
+ | `/graph` | Show knowledge graph summary |
284
+ | `/graph-entities [type]` | List entities |
285
+ | `/graph-person <name>` | Show person details |
286
+ | `/graph-topic <name>` | Show topic details |
287
+ | `/context` | Generate context files |
288
+ | `/config` | Show configuration |
289
+ | `/start` | Start daemon in background |
290
+ | `/stop` | Stop the daemon |
291
+ | `/chat` | Enter multi-turn chat mode |
292
+ | `/logs [level]` | Show daemon logs |
293
+
294
+ Natural language is also supported — the LLM detects intent and can automatically route to the appropriate command.
295
+
296
+ ## Built-in Connectors
297
+
298
+ | Connector | Source | Auth | Mode |
299
+ |-----------|--------|------|------|
300
+ | Obsidian | Markdown vault | Local files | Watch |
301
+ | Google Calendar | Calendar events | OAuth2 (readonly) | Poll |
302
+ | Gmail | Email messages | OAuth2 (readonly) | Poll |
303
+ | Google Drive | Files, Docs, Sheets, Slides | OAuth2 (readonly) | Poll |
304
+ | Apple Notes | macOS Notes app | AppleScript | Poll |
305
+ | Asana | Projects & tasks | API token | Poll |
306
+ | JIRA | Tickets | API token | Poll |
307
+ | Confluence | Wiki pages | API token | Poll |
308
+ | Notion | Pages & databases | Bearer token | Poll |
309
+ | Zoom | Meeting recordings & transcripts | OAuth2 (S2S) | Poll |
310
+ | Chrome History | Browser history + page content | Local SQLite | Poll |
311
+ | Audio Transcription | Audio files (WAV, MP3, M4A) | Local (whisper) | Poll |
312
+ | Live Audio | Real-time meeting capture | Sounddevice | Watch |
313
+ | Slack | Channel messages | Bot token | Poll |
314
+ | GitHub | Issues & pull requests | PAT | Poll |
315
+ | Linear | Issues & projects | API key | Poll |
316
+ | Todoist | Tasks & projects | API token | Poll |
317
+
318
+ ## Architecture
319
+
320
+ ```
321
+ CLI / Interactive REPL ──── MCP Server (stdio)
322
+ |
323
+ Unix Socket IPC
324
+ |
325
+ AgentManager (daemon)
326
+ / | \ \ \
327
+ Listener Worker Meta Enrichment Autonomous
328
+ Agents Agent Agent Agent Agent
329
+ | | |
330
+ Connectors Pipeline ReasoningEngine
331
+ | Extract → Associate (LLM gap analysis)
332
+ | → Summarize → Generate
333
+ | |
334
+ MemoryStore (SQLite+FTS5) .md Context Files
335
+ VectorStore (ChromaDB) (~/.mneia/context/)
336
+ KnowledgeGraph (NetworkX)
337
+ PersistentMemory (cross-session)
338
+ ```
339
+
340
+ **Agent Types:**
341
+ - **ListenerAgent** — one per connector, polls or watches data sources in real-time
342
+ - **WorkerAgent** — entity extraction, association building, vector embedding
343
+ - **MetaAgent** — orchestrator, health monitoring, entity deduplication
344
+ - **EnrichmentAgent** — web research to enrich sparse entities
345
+ - **WebResearchAgent** — deep topic research with scraping and LLM synthesis
346
+ - **AutonomousAgent** — identifies knowledge gaps, proposes connections, generates insights
347
+
348
+ ## Memory Pipeline
349
+
350
+ 1. **Ingest** — Connectors fetch raw documents, normalize and store in SQLite with FTS5 + ChromaDB vectors
351
+ 2. **Extract** — LLM extracts entities (people, projects, topics, decisions) and relationships
352
+ 3. **Associate** — Cross-reference entities, merge duplicates, build graph edges
353
+ 4. **Summarize** — Generate rolling summaries per person, topic, and time period
354
+ 5. **Generate** — Render Jinja2 templates into `.md` context files (auto-regenerated on changes)
355
+
356
+ ## Search
357
+
358
+ mneia uses hybrid search combining:
359
+ - **Full-text search** (SQLite FTS5) for keyword matching
360
+ - **Vector search** (ChromaDB + nomic-embed-text) for semantic similarity
361
+ - **Knowledge graph** traversal for entity context
362
+
363
+ Results are merged and deduplicated for optimal relevance.
364
+
365
+ ## Safety
366
+
367
+ Operations are classified by risk level:
368
+ - **LOW** — auto-approved (searches, reads)
369
+ - **MEDIUM** — requires user consent (web scraping, sync)
370
+ - **HIGH** — requires explicit approval (live audio capture)
371
+ - **CRITICAL** — always prompts (data purge)
372
+
373
+ Pre-approve operations with `mneia permission grant <operation>`.
374
+
375
+ ## Resilience
376
+
377
+ - **Retry with backoff** — API calls retry automatically on transient failures
378
+ - **Circuit breaker** — LLM client pauses after repeated failures, auto-resets
379
+ - **Agent auto-restart** — crashed agents restart with exponential backoff (max 3 retries)
380
+ - **In-process metrics** — counters, gauges, and timers for observability
381
+
382
+ ## Core Principles
383
+
384
+ 1. **Read-only** — Connectors never modify your data. No sending, no editing, no deleting.
385
+ 2. **Local-only** — All data stays on your machine. No cloud sync. No telemetry.
386
+ 3. **Open source** — MIT licensed. Inspect every line. Fork and customize.
387
+ 4. **Lightweight** — Async agents, not heavy processes. Runs alongside your work.
388
+
389
+ ## Extending
390
+
391
+ Third-party connectors are pip packages using Python entry points:
392
+
393
+ ```bash
394
+ mneia marketplace search slack
395
+ mneia marketplace install slack
396
+ ```
397
+
398
+ Build your own: implement `BaseConnector` and publish as `mneia-connector-yourname`.
399
+
400
+ ## Development
401
+
402
+ ```bash
403
+ git clone https://github.com/riverphoenix/mneia.git
404
+ cd mneia
405
+ pip install -e ".[dev]"
406
+ pytest
407
+ ```
408
+
409
+ ### Testing
410
+
411
+ ```bash
412
+ pytest tests/unit/ # Unit tests (mocked, fast)
413
+ pytest tests/connectors/ # Connector tests with fixtures
414
+ pytest tests/integration/ # CLI integration tests
415
+ pytest -v # All tests with verbose output
416
+ ```
417
+
418
+ 439 tests covering all agents, connectors, pipeline stages, and core infrastructure.
419
+
420
+ ## License
421
+
422
+ MIT