arango-memory 0.1.0rc1__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.
- arango_memory-0.1.0rc1/.dockerignore +18 -0
- arango_memory-0.1.0rc1/.gitignore +110 -0
- arango_memory-0.1.0rc1/Dockerfile +54 -0
- arango_memory-0.1.0rc1/LICENSE +201 -0
- arango_memory-0.1.0rc1/Makefile +92 -0
- arango_memory-0.1.0rc1/NOTICE +10 -0
- arango_memory-0.1.0rc1/PKG-INFO +154 -0
- arango_memory-0.1.0rc1/README.md +91 -0
- arango_memory-0.1.0rc1/pyproject.toml +122 -0
- arango_memory-0.1.0rc1/scripts/latency_bench.py +175 -0
- arango_memory-0.1.0rc1/scripts/mcp_floor_smoke.py +54 -0
- arango_memory-0.1.0rc1/src/arango_memory/__init__.py +10 -0
- arango_memory-0.1.0rc1/src/arango_memory/api/__init__.py +4 -0
- arango_memory-0.1.0rc1/src/arango_memory/api/app.py +1263 -0
- arango_memory-0.1.0rc1/src/arango_memory/api/limits.py +145 -0
- arango_memory-0.1.0rc1/src/arango_memory/check.py +83 -0
- arango_memory-0.1.0rc1/src/arango_memory/client.py +194 -0
- arango_memory-0.1.0rc1/src/arango_memory/config.py +376 -0
- arango_memory-0.1.0rc1/src/arango_memory/crewai/__init__.py +48 -0
- arango_memory-0.1.0rc1/src/arango_memory/crewai/shim.py +61 -0
- arango_memory-0.1.0rc1/src/arango_memory/crewai/storage.py +161 -0
- arango_memory-0.1.0rc1/src/arango_memory/crewai/unified.py +460 -0
- arango_memory-0.1.0rc1/src/arango_memory/embedding.py +133 -0
- arango_memory-0.1.0rc1/src/arango_memory/embedding_cache.py +240 -0
- arango_memory-0.1.0rc1/src/arango_memory/entity_api.py +152 -0
- arango_memory-0.1.0rc1/src/arango_memory/eval/__init__.py +20 -0
- arango_memory-0.1.0rc1/src/arango_memory/eval/benchmark.py +191 -0
- arango_memory-0.1.0rc1/src/arango_memory/eval/halu.py +198 -0
- arango_memory-0.1.0rc1/src/arango_memory/eval/handoff.py +209 -0
- arango_memory-0.1.0rc1/src/arango_memory/eval/locomo.py +241 -0
- arango_memory-0.1.0rc1/src/arango_memory/eval/locomo_convert.py +128 -0
- arango_memory-0.1.0rc1/src/arango_memory/eval/longmemeval.py +781 -0
- arango_memory-0.1.0rc1/src/arango_memory/eval/longmemeval_convert.py +196 -0
- arango_memory-0.1.0rc1/src/arango_memory/eval/musique_convert.py +150 -0
- arango_memory-0.1.0rc1/src/arango_memory/eval/plot_recall_curve.py +80 -0
- arango_memory-0.1.0rc1/src/arango_memory/eval/pool_diag.py +184 -0
- arango_memory-0.1.0rc1/src/arango_memory/eval/recall_curve.py +259 -0
- arango_memory-0.1.0rc1/src/arango_memory/eval/scaling_profile.py +149 -0
- arango_memory-0.1.0rc1/src/arango_memory/generation.py +89 -0
- arango_memory-0.1.0rc1/src/arango_memory/graph_api.py +54 -0
- arango_memory-0.1.0rc1/src/arango_memory/ingest/__init__.py +6 -0
- arango_memory-0.1.0rc1/src/arango_memory/ingest/conflicts.py +48 -0
- arango_memory-0.1.0rc1/src/arango_memory/ingest/entities.py +927 -0
- arango_memory-0.1.0rc1/src/arango_memory/ingest/extract.py +546 -0
- arango_memory-0.1.0rc1/src/arango_memory/ingest/procedural.py +136 -0
- arango_memory-0.1.0rc1/src/arango_memory/ingest/prospective.py +24 -0
- arango_memory-0.1.0rc1/src/arango_memory/ingest/queue.py +398 -0
- arango_memory-0.1.0rc1/src/arango_memory/ingest/store.py +510 -0
- arango_memory-0.1.0rc1/src/arango_memory/ingest/temporal.py +49 -0
- arango_memory-0.1.0rc1/src/arango_memory/ingest/vector_cache.py +84 -0
- arango_memory-0.1.0rc1/src/arango_memory/ingest/worker.py +383 -0
- arango_memory-0.1.0rc1/src/arango_memory/langchain/__init__.py +28 -0
- arango_memory-0.1.0rc1/src/arango_memory/langchain/graph.py +147 -0
- arango_memory-0.1.0rc1/src/arango_memory/langchain/history.py +140 -0
- arango_memory-0.1.0rc1/src/arango_memory/langchain/retriever.py +75 -0
- arango_memory-0.1.0rc1/src/arango_memory/lifecycle/__init__.py +6 -0
- arango_memory-0.1.0rc1/src/arango_memory/lifecycle/community.py +105 -0
- arango_memory-0.1.0rc1/src/arango_memory/lifecycle/conflict.py +48 -0
- arango_memory-0.1.0rc1/src/arango_memory/lifecycle/decay.py +79 -0
- arango_memory-0.1.0rc1/src/arango_memory/lifecycle/dream.py +200 -0
- arango_memory-0.1.0rc1/src/arango_memory/lifecycle/facts.py +116 -0
- arango_memory-0.1.0rc1/src/arango_memory/lifecycle/ontology.py +175 -0
- arango_memory-0.1.0rc1/src/arango_memory/lifecycle/salience.py +88 -0
- arango_memory-0.1.0rc1/src/arango_memory/lifecycle/short_forms.py +276 -0
- arango_memory-0.1.0rc1/src/arango_memory/lifecycle/supersession.py +201 -0
- arango_memory-0.1.0rc1/src/arango_memory/mcp/__init__.py +5 -0
- arango_memory-0.1.0rc1/src/arango_memory/mcp/__main__.py +6 -0
- arango_memory-0.1.0rc1/src/arango_memory/mcp/server.py +315 -0
- arango_memory-0.1.0rc1/src/arango_memory/mcp/tools.py +137 -0
- arango_memory-0.1.0rc1/src/arango_memory/models.py +28 -0
- arango_memory-0.1.0rc1/src/arango_memory/ops.py +286 -0
- arango_memory-0.1.0rc1/src/arango_memory/redis_client.py +51 -0
- arango_memory-0.1.0rc1/src/arango_memory/repeats.py +21 -0
- arango_memory-0.1.0rc1/src/arango_memory/retrieve/__init__.py +7 -0
- arango_memory-0.1.0rc1/src/arango_memory/retrieve/decompose.py +84 -0
- arango_memory-0.1.0rc1/src/arango_memory/retrieve/enrich.py +116 -0
- arango_memory-0.1.0rc1/src/arango_memory/retrieve/prime.py +197 -0
- arango_memory-0.1.0rc1/src/arango_memory/retrieve/rerank.py +112 -0
- arango_memory-0.1.0rc1/src/arango_memory/retrieve/search.py +1336 -0
- arango_memory-0.1.0rc1/src/arango_memory/schema/__init__.py +6 -0
- arango_memory-0.1.0rc1/src/arango_memory/schema/collections.py +353 -0
- arango_memory-0.1.0rc1/src/arango_memory/schema/migrations.py +93 -0
- arango_memory-0.1.0rc1/src/arango_memory/security/__init__.py +16 -0
- arango_memory-0.1.0rc1/src/arango_memory/security/auth.py +96 -0
- arango_memory-0.1.0rc1/src/arango_memory/security/forget.py +183 -0
- arango_memory-0.1.0rc1/src/arango_memory/security/jwt_auth.py +117 -0
- arango_memory-0.1.0rc1/src/arango_memory/security/redact.py +129 -0
- arango_memory-0.1.0rc1/src/arango_memory/security/worm.py +25 -0
- arango_memory-0.1.0rc1/src/arango_memory/sim/__init__.py +13 -0
- arango_memory-0.1.0rc1/src/arango_memory/sim/runner.py +125 -0
- arango_memory-0.1.0rc1/src/arango_memory/sim/scenario.py +60 -0
- arango_memory-0.1.0rc1/src/arango_memory/stats.py +36 -0
- arango_memory-0.1.0rc1/src/arango_memory/telemetry/__init__.py +234 -0
- arango_memory-0.1.0rc1/src/arango_memory/telemetry/logging.py +148 -0
- arango_memory-0.1.0rc1/src/arango_memory/transport.py +195 -0
- arango_memory-0.1.0rc1/tests/__init__.py +0 -0
- arango_memory-0.1.0rc1/tests/conftest.py +142 -0
- arango_memory-0.1.0rc1/tests/data/handoff_smoke.json +75 -0
- arango_memory-0.1.0rc1/tests/data/locomo_smoke.json +40 -0
- arango_memory-0.1.0rc1/tests/data/longmemeval_smoke.json +42 -0
- arango_memory-0.1.0rc1/tests/data/recall_curve_smoke.json +33 -0
- arango_memory-0.1.0rc1/tests/data/sim_scenario.json +55 -0
- arango_memory-0.1.0rc1/tests/test_api.py +142 -0
- arango_memory-0.1.0rc1/tests/test_api_concurrency.py +165 -0
- arango_memory-0.1.0rc1/tests/test_auth.py +120 -0
- arango_memory-0.1.0rc1/tests/test_authz_agents.py +106 -0
- arango_memory-0.1.0rc1/tests/test_authz_reads.py +146 -0
- arango_memory-0.1.0rc1/tests/test_authz_writes.py +134 -0
- arango_memory-0.1.0rc1/tests/test_benchmark.py +77 -0
- arango_memory-0.1.0rc1/tests/test_best_match_many.py +82 -0
- arango_memory-0.1.0rc1/tests/test_bitemporal.py +74 -0
- arango_memory-0.1.0rc1/tests/test_candidate_pool_knob.py +70 -0
- arango_memory-0.1.0rc1/tests/test_community.py +122 -0
- arango_memory-0.1.0rc1/tests/test_concurrency.py +107 -0
- arango_memory-0.1.0rc1/tests/test_config_validation.py +37 -0
- arango_memory-0.1.0rc1/tests/test_corroboration.py +93 -0
- arango_memory-0.1.0rc1/tests/test_crewai.py +156 -0
- arango_memory-0.1.0rc1/tests/test_crewai_unified.py +187 -0
- arango_memory-0.1.0rc1/tests/test_decay.py +103 -0
- arango_memory-0.1.0rc1/tests/test_decompose.py +69 -0
- arango_memory-0.1.0rc1/tests/test_degradation.py +107 -0
- arango_memory-0.1.0rc1/tests/test_dream.py +115 -0
- arango_memory-0.1.0rc1/tests/test_dream_endpoint.py +37 -0
- arango_memory-0.1.0rc1/tests/test_durable_queue.py +117 -0
- arango_memory-0.1.0rc1/tests/test_edge_tenant_id.py +95 -0
- arango_memory-0.1.0rc1/tests/test_embedding.py +97 -0
- arango_memory-0.1.0rc1/tests/test_embedding_cache.py +144 -0
- arango_memory-0.1.0rc1/tests/test_enrich.py +78 -0
- arango_memory-0.1.0rc1/tests/test_entities.py +115 -0
- arango_memory-0.1.0rc1/tests/test_entity_api.py +129 -0
- arango_memory-0.1.0rc1/tests/test_entity_names.py +142 -0
- arango_memory-0.1.0rc1/tests/test_entity_summaries.py +64 -0
- arango_memory-0.1.0rc1/tests/test_eval_answer_f1.py +42 -0
- arango_memory-0.1.0rc1/tests/test_eval_smoke.py +27 -0
- arango_memory-0.1.0rc1/tests/test_event_time.py +49 -0
- arango_memory-0.1.0rc1/tests/test_ewa_weight.py +86 -0
- arango_memory-0.1.0rc1/tests/test_extract.py +68 -0
- arango_memory-0.1.0rc1/tests/test_extract_tier.py +183 -0
- arango_memory-0.1.0rc1/tests/test_fact_keys.py +178 -0
- arango_memory-0.1.0rc1/tests/test_forget.py +155 -0
- arango_memory-0.1.0rc1/tests/test_forget_coverage.py +278 -0
- arango_memory-0.1.0rc1/tests/test_full_mode.py +69 -0
- arango_memory-0.1.0rc1/tests/test_generation.py +66 -0
- arango_memory-0.1.0rc1/tests/test_graph_api.py +49 -0
- arango_memory-0.1.0rc1/tests/test_graph_conflicts.py +184 -0
- arango_memory-0.1.0rc1/tests/test_graph_expansion.py +118 -0
- arango_memory-0.1.0rc1/tests/test_halu.py +91 -0
- arango_memory-0.1.0rc1/tests/test_handoff_eval.py +54 -0
- arango_memory-0.1.0rc1/tests/test_health_probe.py +130 -0
- arango_memory-0.1.0rc1/tests/test_integration.py +73 -0
- arango_memory-0.1.0rc1/tests/test_jwt_auth.py +238 -0
- arango_memory-0.1.0rc1/tests/test_langchain.py +178 -0
- arango_memory-0.1.0rc1/tests/test_limits.py +77 -0
- arango_memory-0.1.0rc1/tests/test_locomo_convert.py +72 -0
- arango_memory-0.1.0rc1/tests/test_logging.py +57 -0
- arango_memory-0.1.0rc1/tests/test_longmemeval.py +581 -0
- arango_memory-0.1.0rc1/tests/test_mcp.py +118 -0
- arango_memory-0.1.0rc1/tests/test_mcp_http.py +198 -0
- arango_memory-0.1.0rc1/tests/test_metrics.py +132 -0
- arango_memory-0.1.0rc1/tests/test_migrations.py +56 -0
- arango_memory-0.1.0rc1/tests/test_mmr.py +90 -0
- arango_memory-0.1.0rc1/tests/test_multi_agent_retrieval.py +80 -0
- arango_memory-0.1.0rc1/tests/test_multi_evidence_recall.py +35 -0
- arango_memory-0.1.0rc1/tests/test_multihop.py +100 -0
- arango_memory-0.1.0rc1/tests/test_musique_convert.py +122 -0
- arango_memory-0.1.0rc1/tests/test_neighbor_turns.py +108 -0
- arango_memory-0.1.0rc1/tests/test_ontology.py +155 -0
- arango_memory-0.1.0rc1/tests/test_ops.py +123 -0
- arango_memory-0.1.0rc1/tests/test_perf_invariants.py +91 -0
- arango_memory-0.1.0rc1/tests/test_pool_diag.py +99 -0
- arango_memory-0.1.0rc1/tests/test_prime.py +98 -0
- arango_memory-0.1.0rc1/tests/test_procedural.py +56 -0
- arango_memory-0.1.0rc1/tests/test_prospective.py +44 -0
- arango_memory-0.1.0rc1/tests/test_queue.py +84 -0
- arango_memory-0.1.0rc1/tests/test_ranking.py +94 -0
- arango_memory-0.1.0rc1/tests/test_read_path.py +211 -0
- arango_memory-0.1.0rc1/tests/test_recall_curve.py +89 -0
- arango_memory-0.1.0rc1/tests/test_redaction_paths.py +197 -0
- arango_memory-0.1.0rc1/tests/test_redis_cache.py +94 -0
- arango_memory-0.1.0rc1/tests/test_redis_limits.py +81 -0
- arango_memory-0.1.0rc1/tests/test_repeated_writes.py +115 -0
- arango_memory-0.1.0rc1/tests/test_rerank.py +257 -0
- arango_memory-0.1.0rc1/tests/test_rerank_retrieve.py +100 -0
- arango_memory-0.1.0rc1/tests/test_round_trips.py +186 -0
- arango_memory-0.1.0rc1/tests/test_salience.py +51 -0
- arango_memory-0.1.0rc1/tests/test_scaling_profile.py +54 -0
- arango_memory-0.1.0rc1/tests/test_security.py +59 -0
- arango_memory-0.1.0rc1/tests/test_short_forms.py +398 -0
- arango_memory-0.1.0rc1/tests/test_sim.py +96 -0
- arango_memory-0.1.0rc1/tests/test_spacy_extractor.py +122 -0
- arango_memory-0.1.0rc1/tests/test_store_many.py +95 -0
- arango_memory-0.1.0rc1/tests/test_supersession.py +259 -0
- arango_memory-0.1.0rc1/tests/test_sync_flush.py +121 -0
- arango_memory-0.1.0rc1/tests/test_telemetry.py +275 -0
- arango_memory-0.1.0rc1/tests/test_topic_trigger.py +78 -0
- arango_memory-0.1.0rc1/tests/test_transport.py +300 -0
- arango_memory-0.1.0rc1/tests/test_vector.py +103 -0
- arango_memory-0.1.0rc1/tests/test_vector_cache.py +126 -0
- arango_memory-0.1.0rc1/tests/test_worker.py +400 -0
- arango_memory-0.1.0rc1/tests/test_working_memory.py +68 -0
- arango_memory-0.1.0rc1/tests/test_write_entities_many.py +304 -0
- arango_memory-0.1.0rc1/uv.lock +6267 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Build context hygiene. The Dockerfile COPYs explicit paths, but anything not excluded here is
|
|
2
|
+
# still sent to the daemon — and a future `COPY . .` would bake it into a published image.
|
|
3
|
+
# Secrets
|
|
4
|
+
.env
|
|
5
|
+
.env.*
|
|
6
|
+
!.env.example
|
|
7
|
+
# Local benchmark data + run artifacts (externally licensed, large)
|
|
8
|
+
/*.json
|
|
9
|
+
/*.jsonl
|
|
10
|
+
bench_runs/
|
|
11
|
+
# Caches / build output
|
|
12
|
+
.venv/
|
|
13
|
+
**/__pycache__/
|
|
14
|
+
.pytest_cache/
|
|
15
|
+
.mypy_cache/
|
|
16
|
+
.ruff_cache/
|
|
17
|
+
dist/
|
|
18
|
+
*.log
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# ─── Secrets / credentials — NEVER commit ───────────────────
|
|
2
|
+
# Env files (allow only the committed template)
|
|
3
|
+
.env
|
|
4
|
+
.env.*
|
|
5
|
+
*.env
|
|
6
|
+
!.env.example
|
|
7
|
+
env/.env*
|
|
8
|
+
|
|
9
|
+
# Keys, certificates, tokens
|
|
10
|
+
*.pem
|
|
11
|
+
*.key
|
|
12
|
+
*.crt
|
|
13
|
+
*.cer
|
|
14
|
+
*.p12
|
|
15
|
+
*.pfx
|
|
16
|
+
*.keystore
|
|
17
|
+
*.jks
|
|
18
|
+
id_rsa
|
|
19
|
+
id_ed25519
|
|
20
|
+
*.ppk
|
|
21
|
+
|
|
22
|
+
# Cloud / provider credentials
|
|
23
|
+
.aws/
|
|
24
|
+
.gcp/
|
|
25
|
+
*service-account*.json
|
|
26
|
+
*-credentials.json
|
|
27
|
+
*credentials*.json
|
|
28
|
+
gha-creds-*.json
|
|
29
|
+
.netrc
|
|
30
|
+
.npmrc
|
|
31
|
+
.pypirc
|
|
32
|
+
|
|
33
|
+
# ArangoGraph / database connection dumps
|
|
34
|
+
*.dump
|
|
35
|
+
secrets.*
|
|
36
|
+
*secret*
|
|
37
|
+
*.secrets
|
|
38
|
+
config.local.*
|
|
39
|
+
local.settings.json
|
|
40
|
+
|
|
41
|
+
# API key / token files commonly created by tools
|
|
42
|
+
.anthropic
|
|
43
|
+
.openai
|
|
44
|
+
*.token
|
|
45
|
+
*token*.txt
|
|
46
|
+
.notebooklm/
|
|
47
|
+
|
|
48
|
+
# Python
|
|
49
|
+
__pycache__/
|
|
50
|
+
*.py[cod]
|
|
51
|
+
.venv/
|
|
52
|
+
venv/
|
|
53
|
+
.uv/
|
|
54
|
+
*.egg-info/
|
|
55
|
+
dist/
|
|
56
|
+
build/
|
|
57
|
+
.pytest_cache/
|
|
58
|
+
.mypy_cache/
|
|
59
|
+
.ruff_cache/
|
|
60
|
+
.coverage
|
|
61
|
+
htmlcov/
|
|
62
|
+
|
|
63
|
+
# Node / TypeScript
|
|
64
|
+
node_modules/
|
|
65
|
+
packages/*/dist/
|
|
66
|
+
*.tsbuildinfo
|
|
67
|
+
.pnpm-store/
|
|
68
|
+
|
|
69
|
+
# ArangoDB local data
|
|
70
|
+
.arangodb-data/
|
|
71
|
+
|
|
72
|
+
# Local Claude Code settings (personal)
|
|
73
|
+
.claude/settings.local.json
|
|
74
|
+
|
|
75
|
+
# OS / editor
|
|
76
|
+
.DS_Store
|
|
77
|
+
# iCloud/Finder conflict copies (this tree may live under synced Documents)
|
|
78
|
+
* [0-9].*
|
|
79
|
+
*.swp
|
|
80
|
+
.idea/
|
|
81
|
+
.vscode/*
|
|
82
|
+
!.vscode/extensions.json
|
|
83
|
+
|
|
84
|
+
# Logs
|
|
85
|
+
*.log
|
|
86
|
+
|
|
87
|
+
# LoCoMo benchmark data — externally licensed + large, never commit (DESIGN §23).
|
|
88
|
+
# The committed smoke slice (core/tests/data/locomo_smoke.json) is exempt.
|
|
89
|
+
locomo10.json
|
|
90
|
+
**/locomo_raw*.json
|
|
91
|
+
**/locomo_converted*.json
|
|
92
|
+
converted.json
|
|
93
|
+
core/converted.json
|
|
94
|
+
|
|
95
|
+
# MuSiQue benchmark data — externally licensed + large, never commit (BX-1, §23).
|
|
96
|
+
/core/musique*.json
|
|
97
|
+
/core/musique*.jsonl
|
|
98
|
+
/core/converted*.json
|
|
99
|
+
|
|
100
|
+
# LongMemEval benchmark data — externally licensed + large, never commit (LME-1, §23).
|
|
101
|
+
# Anchored to core/ so the committed smoke slice (core/tests/data/*_smoke.json) stays tracked.
|
|
102
|
+
/core/longmemeval_*.json
|
|
103
|
+
/core/lme.json
|
|
104
|
+
# Benchmark run artifacts (converted slices, checkpoints, logs) — derived from the licensed
|
|
105
|
+
# datasets above, and kept out of /tmp so a checkpoint survives a reboot (RQ-3).
|
|
106
|
+
/core/bench_runs/
|
|
107
|
+
|
|
108
|
+
# ─── Local presentation assets (never commit) ───────────────
|
|
109
|
+
presentation-screenshots/
|
|
110
|
+
presentation-prompt.md
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Digest-pinned for reproducible, supply-chain-safe builds (python:3.14.10-slim).
|
|
2
|
+
# Pin the multi-arch *index* digest, not a per-arch manifest: a manifest digest locks the
|
|
3
|
+
# build to one architecture, so arm64 hosts silently get an emulated amd64 image. The
|
|
4
|
+
# index still pins exact content — Docker just resolves the right platform from it.
|
|
5
|
+
# 3.14 (not the library's 3.11 floor) because it's the oldest line with no fixable High
|
|
6
|
+
# advisories against the CPython interpreter itself (IMG-1); the wheel still supports >=3.11.
|
|
7
|
+
FROM python@sha256:f57c4c23b985d95deea5bc5249e2f9c8a512b4cc9d5d3fd31900cbd2f5f0a604
|
|
8
|
+
|
|
9
|
+
# Debian security updates newer than the pinned base (e.g. OpenSSL), and drop the base
|
|
10
|
+
# image's system pip: the app runs from the uv venv and never uses it.
|
|
11
|
+
RUN apt-get update && apt-get -y upgrade && rm -rf /var/lib/apt/lists/* \
|
|
12
|
+
&& python -m pip uninstall -y pip
|
|
13
|
+
|
|
14
|
+
# uv for fast, reproducible installs
|
|
15
|
+
COPY --from=ghcr.io/astral-sh/uv:latest /uv /usr/local/bin/uv
|
|
16
|
+
|
|
17
|
+
WORKDIR /app
|
|
18
|
+
COPY pyproject.toml README.md ./
|
|
19
|
+
COPY src ./src
|
|
20
|
+
|
|
21
|
+
# The `mcp` extra lets this one image also run the MCP server over Streamable HTTP
|
|
22
|
+
# (a different command; see docs/adapters/mcp.md). It adds ~9 small packages.
|
|
23
|
+
# `extraction-spacy` makes EXTRACTION_PROVIDER=spacy work (the default stays `fake`, which
|
|
24
|
+
# never imports it).
|
|
25
|
+
RUN uv sync --no-dev --extra mcp --extra extraction-spacy
|
|
26
|
+
|
|
27
|
+
# spaCy's English model isn't on PyPI, so it is installed from its release, pinned by hash. Its
|
|
28
|
+
# minor version must match spaCy's (bounded in pyproject.toml).
|
|
29
|
+
RUN echo "en_core_web_sm @ https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.8.0/en_core_web_sm-3.8.0-py3-none-any.whl --hash=sha256:1932429db727d4bff3deed6b34cfc05df17794f4a52eeb26cf8928f7c1a0fb85" > /tmp/spacy-model.txt \
|
|
30
|
+
&& uv pip install --python .venv/bin/python --require-hashes --no-deps -r /tmp/spacy-model.txt \
|
|
31
|
+
&& rm /tmp/spacy-model.txt
|
|
32
|
+
|
|
33
|
+
# Import from src directly so uvicorn finds the package regardless of the
|
|
34
|
+
# editable-install state (uv's src-layout editable .pth can be flaky).
|
|
35
|
+
ENV PYTHONPATH=/app/src
|
|
36
|
+
# The app venv first on PATH, so `python -m arango_memory.mcp …` (the MCP role) and any
|
|
37
|
+
# ad-hoc `python` run inside the container use the synced environment, not the base image's.
|
|
38
|
+
ENV PATH=/app/.venv/bin:$PATH
|
|
39
|
+
|
|
40
|
+
# Run as an unprivileged user (least privilege); own the app dir + venv.
|
|
41
|
+
RUN useradd --create-home --uid 10001 app && chown -R app:app /app
|
|
42
|
+
USER app
|
|
43
|
+
|
|
44
|
+
EXPOSE 8080
|
|
45
|
+
|
|
46
|
+
# Liveness: the process answers /health (always 200 when up; not gated on the DB).
|
|
47
|
+
# Orchestrators should additionally wire a readiness probe to /ready (core only).
|
|
48
|
+
# HEALTHCHECK_URL points it elsewhere when this image runs the MCP server instead
|
|
49
|
+
# (e.g. http://localhost:8000/health).
|
|
50
|
+
ENV HEALTHCHECK_URL=http://localhost:8080/health
|
|
51
|
+
HEALTHCHECK --interval=30s --timeout=3s --start-period=20s --retries=3 \
|
|
52
|
+
CMD python -c "import os,urllib.request,sys; sys.exit(0 if urllib.request.urlopen(os.environ['HEALTHCHECK_URL'], timeout=2).status==200 else 1)"
|
|
53
|
+
|
|
54
|
+
CMD ["uv", "run", "--no-sync", "uvicorn", "arango_memory.api.app:app", "--host", "0.0.0.0", "--port", "8080"]
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2026 Michael Fonseca
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# Core dev tasks. Bakes in two env settings so every command is robust:
|
|
2
|
+
# UV_PROJECT_ENVIRONMENT -> keep the venv OUTSIDE iCloud-synced Documents
|
|
3
|
+
# (iCloud creates "name 2.ext" copies that corrupt .venv)
|
|
4
|
+
# PYTHONPATH=src -> import the package regardless of editable-install state
|
|
5
|
+
#
|
|
6
|
+
# For ad-hoc `uv` commands outside make, export the same:
|
|
7
|
+
# export UV_PROJECT_ENVIRONMENT="$HOME/.venvs/arango-memory"
|
|
8
|
+
export UV_PROJECT_ENVIRONMENT := $(HOME)/.venvs/arango-memory
|
|
9
|
+
export PYTHONPATH := src
|
|
10
|
+
|
|
11
|
+
UVRUN := uv run --no-sync
|
|
12
|
+
|
|
13
|
+
.PHONY: sync dev check test lint type ci clean-venv benchmark longmemeval handoff-eval recall-curve spacy-model test-crewai mcp-floor
|
|
14
|
+
|
|
15
|
+
# LoCoMo benchmark (§23). Override DATASET/MODE/K; needs a running ArangoDB and, for a
|
|
16
|
+
# real run, real providers (EMBEDDING_PROVIDER=openai GENERATION_PROVIDER=anthropic + keys).
|
|
17
|
+
DATASET ?= tests/data/locomo_smoke.json
|
|
18
|
+
MODE ?= lite
|
|
19
|
+
K ?= 10
|
|
20
|
+
RERANK ?= # set RERANK=--rerank to cross-encoder rerank the fused pool (RQ-2b)
|
|
21
|
+
EXTRACT ?= # set EXTRACT=--extract to build the entity graph while ingesting (LME-1b)
|
|
22
|
+
|
|
23
|
+
sync: ## Install/update deps into the relocated venv
|
|
24
|
+
uv sync --extra dev
|
|
25
|
+
|
|
26
|
+
dev: ## Run the core API with autoreload
|
|
27
|
+
$(UVRUN) uvicorn arango_memory.api.app:app --reload --port 8080
|
|
28
|
+
|
|
29
|
+
check: ## Connection/round-trip probe (set ARANGO_TARGET for cloud)
|
|
30
|
+
$(UVRUN) python -m arango_memory.check
|
|
31
|
+
|
|
32
|
+
test: ## Run the test suite
|
|
33
|
+
$(UVRUN) pytest
|
|
34
|
+
|
|
35
|
+
# The CrewAI adapter against a REAL crewai (CW-1). Own venv: syncing the `crewai` extra into
|
|
36
|
+
# the shared one would prune its other extras (rerank, spaCy).
|
|
37
|
+
test-crewai: export UV_PROJECT_ENVIRONMENT := $(HOME)/.venvs/arango-memory-crewai
|
|
38
|
+
test-crewai: ## CrewAI adapter tests + types against a real crewai install
|
|
39
|
+
uv sync --extra dev --extra crewai
|
|
40
|
+
$(UVRUN) pytest tests/test_crewai.py tests/test_crewai_unified.py
|
|
41
|
+
$(UVRUN) mypy src/arango_memory/crewai
|
|
42
|
+
|
|
43
|
+
# Keep in step with the `mcp>=…,<2` range in pyproject.toml. Both runs resolve everything else
|
|
44
|
+
# fresh (no lockfile), like a user's `pip install arango-memory[mcp]` — which is what catches
|
|
45
|
+
# upstream breaks such as pydantic 2.14 (old mcp) or mcp 2.0 (FastMCP renamed).
|
|
46
|
+
MCP_FLOOR ?= 1.21.1
|
|
47
|
+
MCP_RANGE ?= mcp>=$(MCP_FLOOR),<2
|
|
48
|
+
mcp-floor: ## MCP Streamable HTTP smoke against the lowest AND newest allowed mcp release
|
|
49
|
+
uv run --no-project --with "mcp==$(MCP_FLOOR)" --with httpx --with uvicorn \
|
|
50
|
+
python scripts/mcp_floor_smoke.py src
|
|
51
|
+
uv run --no-project --with "$(MCP_RANGE)" --with httpx --with uvicorn \
|
|
52
|
+
python scripts/mcp_floor_smoke.py src
|
|
53
|
+
|
|
54
|
+
lint: ## Ruff lint
|
|
55
|
+
$(UVRUN) ruff check .
|
|
56
|
+
|
|
57
|
+
type: ## Mypy type-check
|
|
58
|
+
$(UVRUN) mypy src
|
|
59
|
+
|
|
60
|
+
ci: lint type test ## Everything CI runs
|
|
61
|
+
|
|
62
|
+
benchmark: ## LoCoMo benchmark vs §23 (DATASET=… MODE=lite|full|multihop K=…)
|
|
63
|
+
$(UVRUN) python -m arango_memory.eval.benchmark $(DATASET) --mode $(MODE) --k $(K) $(RERANK)
|
|
64
|
+
|
|
65
|
+
HANDOFF_DATASET ?= tests/data/handoff_smoke.json
|
|
66
|
+
handoff-eval: ## Multi-agent handoff eval vs §23 (MA-5; HANDOFF_DATASET=…)
|
|
67
|
+
$(UVRUN) python -m arango_memory.eval.handoff $(HANDOFF_DATASET)
|
|
68
|
+
|
|
69
|
+
# LongMemEval end-to-end answer-accuracy benchmark (LME-1, §23). BYO dataset: convert the
|
|
70
|
+
# official longmemeval_s.json first, then run. Reuses MODE/RERANK/EXTRACT (its own LME_K: 20); a real run needs
|
|
71
|
+
# EMBEDDING_PROVIDER=openai + GENERATION_PROVIDER=anthropic (+ keys) for answers + judge.
|
|
72
|
+
# Graph-on (LME-1b): EXTRACT=--extract with a REAL EXTRACTION_PROVIDER (spacy|haiku) — never the
|
|
73
|
+
# default `fake` (every capitalized span → a junk Concept node, which lowers accuracy).
|
|
74
|
+
LME_DATASET ?= tests/data/longmemeval_smoke.json
|
|
75
|
+
LME_K ?= 20
|
|
76
|
+
longmemeval: ## LongMemEval QA-accuracy benchmark (LME-1; LME_DATASET=… MODE=… LME_K=… RERANK=… EXTRACT=…)
|
|
77
|
+
$(UVRUN) python -m arango_memory.eval.longmemeval $(LME_DATASET) --mode $(MODE) --k $(LME_K) $(RERANK) $(EXTRACT)
|
|
78
|
+
|
|
79
|
+
# Fetch spaCy's small English NER model for EXTRACTION_PROVIDER=spacy (LME-1b graph-on run).
|
|
80
|
+
# Needs the `extraction-spacy` (or `extraction`) extra installed first.
|
|
81
|
+
spacy-model: ## Download spaCy en_core_web_sm for EXTRACTION_PROVIDER=spacy (LME-1b)
|
|
82
|
+
$(UVRUN) python -m spacy download en_core_web_sm
|
|
83
|
+
|
|
84
|
+
# Recall-vs-corpus-size curve (RCV-1). Input is a POOLED MuSiQue file
|
|
85
|
+
# (musique_convert --pooled). Real curve needs EMBEDDING_PROVIDER=openai + a key.
|
|
86
|
+
CURVE_DATASET ?= tests/data/recall_curve_smoke.json
|
|
87
|
+
CURVE_CSV ?= recall_curve.csv
|
|
88
|
+
recall-curve: ## Recall vs corpus size — fused vs vector-only vs BM25 (RCV-1; CURVE_DATASET=…)
|
|
89
|
+
$(UVRUN) python -m arango_memory.eval.recall_curve $(CURVE_DATASET) --csv $(CURVE_CSV)
|
|
90
|
+
|
|
91
|
+
clean-venv: ## Rebuild the relocated venv from scratch
|
|
92
|
+
rm -rf "$(UV_PROJECT_ENVIRONMENT)" && uv sync --extra dev
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
arango-agentic-memory
|
|
2
|
+
Copyright 2026 Michael Fonseca
|
|
3
|
+
|
|
4
|
+
This product includes software developed by Michael Fonseca.
|
|
5
|
+
|
|
6
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
you may not use this file except in compliance with the License.
|
|
8
|
+
You may obtain a copy of the License at
|
|
9
|
+
|
|
10
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: arango-memory
|
|
3
|
+
Version: 0.1.0rc1
|
|
4
|
+
Summary: Agentic memory core for ArangoDB — ingestion, retrieval, consolidation, decay
|
|
5
|
+
Project-URL: Homepage, https://github.com/mikefons/arango-agentic-memory
|
|
6
|
+
Project-URL: Repository, https://github.com/mikefons/arango-agentic-memory
|
|
7
|
+
Project-URL: Changelog, https://github.com/mikefons/arango-agentic-memory/blob/main/CHANGELOG.md
|
|
8
|
+
Project-URL: Issues, https://github.com/mikefons/arango-agentic-memory/issues
|
|
9
|
+
Author: Michael Fonseca
|
|
10
|
+
License-Expression: Apache-2.0
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
License-File: NOTICE
|
|
13
|
+
Keywords: agentic-memory,arangodb,knowledge-graph,llm,rag,retrieval
|
|
14
|
+
Classifier: Development Status :: 4 - Beta
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Topic :: Database
|
|
18
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
19
|
+
Classifier: Typing :: Typed
|
|
20
|
+
Requires-Python: >=3.11
|
|
21
|
+
Requires-Dist: anthropic>=0.47.0
|
|
22
|
+
Requires-Dist: fastapi>=0.118.0
|
|
23
|
+
Requires-Dist: httpx>=0.27.0
|
|
24
|
+
Requires-Dist: numpy>=1.26.0
|
|
25
|
+
Requires-Dist: openai>=1.54.0
|
|
26
|
+
Requires-Dist: opentelemetry-api>=1.28.0
|
|
27
|
+
Requires-Dist: opentelemetry-sdk>=1.28.0
|
|
28
|
+
Requires-Dist: pydantic-settings>=2.6.0
|
|
29
|
+
Requires-Dist: pydantic>=2.9.0
|
|
30
|
+
Requires-Dist: pyjwt[crypto]>=2.14.0
|
|
31
|
+
Requires-Dist: python-arango>=8.1.0
|
|
32
|
+
Requires-Dist: tiktoken>=0.8.0
|
|
33
|
+
Requires-Dist: uvicorn[standard]>=0.32.0
|
|
34
|
+
Provides-Extra: crewai
|
|
35
|
+
Requires-Dist: crewai>=0.80.0; (python_version < '3.14') and extra == 'crewai'
|
|
36
|
+
Provides-Extra: dev
|
|
37
|
+
Requires-Dist: fakeredis>=2.25.0; extra == 'dev'
|
|
38
|
+
Requires-Dist: langchain-core>=0.3.0; extra == 'dev'
|
|
39
|
+
Requires-Dist: langgraph>=0.2.0; extra == 'dev'
|
|
40
|
+
Requires-Dist: mcp<2,>=1.21.1; extra == 'dev'
|
|
41
|
+
Requires-Dist: mypy>=1.13.0; extra == 'dev'
|
|
42
|
+
Requires-Dist: pytest-asyncio>=0.24.0; extra == 'dev'
|
|
43
|
+
Requires-Dist: pytest>=8.3.0; extra == 'dev'
|
|
44
|
+
Requires-Dist: redis>=5.0.0; extra == 'dev'
|
|
45
|
+
Requires-Dist: ruff>=0.7.0; extra == 'dev'
|
|
46
|
+
Requires-Dist: testcontainers>=4.8.0; extra == 'dev'
|
|
47
|
+
Provides-Extra: extraction
|
|
48
|
+
Requires-Dist: gliner>=0.2.0; extra == 'extraction'
|
|
49
|
+
Requires-Dist: glirel>=1.0.0; extra == 'extraction'
|
|
50
|
+
Requires-Dist: spacy>=3.8.0; extra == 'extraction'
|
|
51
|
+
Provides-Extra: extraction-spacy
|
|
52
|
+
Requires-Dist: spacy<3.9,>=3.8.0; extra == 'extraction-spacy'
|
|
53
|
+
Provides-Extra: langchain
|
|
54
|
+
Requires-Dist: langchain-core>=0.3.0; extra == 'langchain'
|
|
55
|
+
Requires-Dist: langgraph>=0.2.0; extra == 'langchain'
|
|
56
|
+
Provides-Extra: mcp
|
|
57
|
+
Requires-Dist: mcp<2,>=1.21.1; extra == 'mcp'
|
|
58
|
+
Provides-Extra: redis
|
|
59
|
+
Requires-Dist: redis>=5.0.0; extra == 'redis'
|
|
60
|
+
Provides-Extra: rerank
|
|
61
|
+
Requires-Dist: sentence-transformers>=3.0.0; extra == 'rerank'
|
|
62
|
+
Description-Content-Type: text/markdown
|
|
63
|
+
|
|
64
|
+
# arango-memory (core)
|
|
65
|
+
|
|
66
|
+
The Python core of the ArangoDB Agentic Memory system. Houses all memory
|
|
67
|
+
intelligence: schema management, ingestion, retrieval, consolidation, and decay.
|
|
68
|
+
Exposes a language-agnostic API consumed in-process (Python adapters) and over
|
|
69
|
+
HTTP (the Vercel TS adapter).
|
|
70
|
+
|
|
71
|
+
See [`../docs/DESIGN.md`](../docs/DESIGN.md) for the authoritative spec.
|
|
72
|
+
|
|
73
|
+
## Layout
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
src/arango_memory/
|
|
77
|
+
client.py ArangoDB client + connection abstraction
|
|
78
|
+
config.py Settings (env-driven)
|
|
79
|
+
embedding.py Pluggable embedder (fake / OpenAI)
|
|
80
|
+
embedding_cache.py Embedding cache (in-process; Redis-backed when REDIS_URL set)
|
|
81
|
+
generation.py Pluggable generator (fake / Anthropic)
|
|
82
|
+
redis_client.py Optional shared layer — cross-instance rate limit + embedding cache
|
|
83
|
+
entity_api.py Semantic-memory reads (get/list entities, seed)
|
|
84
|
+
graph_api.py Tenant knowledge-graph read
|
|
85
|
+
stats.py Per-tenant graph health counts
|
|
86
|
+
ops.py Maintenance CLI (vector-rebuild, embeddings-migrate, replay, explain)
|
|
87
|
+
schema/ Collection / view / index definitions
|
|
88
|
+
ingest/ Extraction, conflict detection, prospective, durable write queue + worker
|
|
89
|
+
retrieve/ Hybrid search (BM25 + vector + graph) → RRF/MMR → token budget;
|
|
90
|
+
multihop decompose (decompose.py), cross-encoder rerank (rerank.py),
|
|
91
|
+
task-briefing prime (prime.py), HyDE/enrich (enrich.py)
|
|
92
|
+
lifecycle/ Decay, bi-temporal/Supersedes, Dream State consolidation
|
|
93
|
+
security/ PII redaction, WORM, right-to-be-forgotten, auth (bearer + OIDC/JWT)
|
|
94
|
+
telemetry/ OpenTelemetry spans + MemoryMetrics emitter + structured logging
|
|
95
|
+
api/ FastAPI service — the boundary (/v1/*)
|
|
96
|
+
mcp/ MCP server adapter (in-process)
|
|
97
|
+
langchain/ LangChain / LangGraph adapter
|
|
98
|
+
crewai/ CrewAI adapter
|
|
99
|
+
eval/ Benchmarks & profilers — LoCoMo + MuSiQue converters, benchmark runner,
|
|
100
|
+
handoff/halu evals, pool-miss diagnostic, SC-1 scaling profiler
|
|
101
|
+
sim/ Deterministic agentic simulation harness
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## Develop
|
|
105
|
+
|
|
106
|
+
Use the `Makefile` — it bakes in the two env settings every command needs
|
|
107
|
+
(relocated venv + `PYTHONPATH=src`), so you don't have to remember them:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
make sync # install/update deps (into ~/.venvs/arango-memory)
|
|
111
|
+
make dev # run the core API with autoreload on :8080
|
|
112
|
+
make check # connection/round-trip probe
|
|
113
|
+
make test # pytest
|
|
114
|
+
make ci # lint + type + test
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
For ad-hoc `uv` commands outside make, export the same venv path first:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
export UV_PROJECT_ENVIRONMENT="$HOME/.venvs/arango-memory"
|
|
121
|
+
uv run --no-sync pytest
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
> **Why the relocated venv:** if this repo lives under an iCloud-synced
|
|
125
|
+
> `Documents` folder, iCloud creates `name 2.ext` conflict copies inside the
|
|
126
|
+
> virtualenv, which corrupt packages (e.g. a duplicate
|
|
127
|
+
> `tiktoken_ext/openai_public 2.py` breaks tiktoken). Keeping the venv at
|
|
128
|
+
> `$HOME/.venvs/arango-memory` (outside the synced tree) avoids this entirely.
|
|
129
|
+
> If you ever see corruption: `make clean-venv`.
|
|
130
|
+
|
|
131
|
+
## Connection targets (local Docker vs ArangoGraph)
|
|
132
|
+
|
|
133
|
+
The core connects to either a local Docker container or ArangoGraph (Arango's
|
|
134
|
+
managed cloud), selected entirely via environment. Verify connectivity with a
|
|
135
|
+
real store→retrieve probe:
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
# local Docker (default)
|
|
139
|
+
PYTHONPATH=src uv run python -m arango_memory.check
|
|
140
|
+
|
|
141
|
+
# ArangoGraph
|
|
142
|
+
ARANGO_TARGET=arangograph \
|
|
143
|
+
ARANGO_URL=https://<deployment-id>.arangodb.cloud:8529 \
|
|
144
|
+
ARANGO_PASSWORD=<root-password> \
|
|
145
|
+
PYTHONPATH=src uv run python -m arango_memory.check
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
The probe connects, bootstraps the schema, stores and retrieves under an
|
|
149
|
+
isolated `__healthcheck__` tenant, then cleans up. See `.env.example` for the
|
|
150
|
+
full ArangoGraph variable set.
|
|
151
|
+
|
|
152
|
+
> Note: ArangoGraph is a managed service, so the `--vector-index` startup flag
|
|
153
|
+
> isn't user-settable there. The BM25 path works today; confirm vector-index
|
|
154
|
+
> availability on your ArangoGraph tier before relying on it (DESIGN.md §7).
|