DataMind
Store at inference time. Retrieve with evidence.
A shared data plane for agents — writable during the conversation, useful on the very next question.
Quick start · Tutorial · API · 中文
StoreAgent writes on the warm path. RetrieveAgent reads across the shared data plane and returns evidence.
v1.0.0 — stable native backend + local profile storage. SDK/CCR and remote database adapters are supported integration paths; validate them in your own environment.
The idea
Most agent systems can retrieve knowledge, but they have nowhere to put the new fact they just learned. DataMind gives the runtime two explicit roles:
message / file / CSV / relationship
│
▼
StoreAgent ─────── write receipt ───────▶ KB · DB · Graph · Skills · Memory
│
│ next question
▼
RetrieveAgent ◀──── evidence + answer ──── shared data plane
This is inference-time data: not model training data, not a batch ETL pipeline, and not an unbounded chat transcript. It is scoped, inspectable state that can change while an agent is running.
Two agents. One hard boundary.
The split is enforced in code, before tools reach the model. RetrieveAgent sees
19 read/utility tools; StoreAgent sees 11 write tools. Every call also passes
through PathAllowlistHook, DestructiveSqlHook, and AuditLogHook.
Five surfaces, one answer
- KB / RAG — documents, notes, policies, semantic search
- Database — exact numbers, filters, joins, aggregations
- Knowledge Graph — entities, relationships, multi-hop facts
- Skills — reusable procedures and safe utilities
- Memory — preferences and durable facts, scoped to
global,profile, orsession
Default providers are Chroma + BM25, SQLAlchemy (SQLite / MySQL / PostgreSQL),
NetworkX, profile-scoped SKILL.md, and SQLite memory.
Quick start
pip install datamind
export DATAMIND__LLM__API_BASE=https://your-gateway.example.com
export DATAMIND__LLM__API_KEY=sk-...
export DATAMIND__LLM__PROTOCOL=anthropic # or openai_chat_completions
export DATAMIND__LLM__MODEL=claude-sonnet-4-6
datamind chat
Or open the local UI:
python -m uvicorn datamind.server:app --port 8000
# http://127.0.0.1:8000
The protocol is explicit and shared by the outer loop and internal generation (NL2SQL, multi-query retrieval, Memory, and graph extraction).
Optional providers and extras
pip install 'datamind[mysql]'
pip install 'datamind[postgres]'
pip install 'datamind[voyage]'
pip install 'datamind[huggingface]'
pip install 'datamind[dev]'
A 60-second end-to-end demo
git clone https://github.com/OpenDCAI/DataMind.git
cd DataMind
python -m venv .venv && source .venv/bin/activate
pip install -e .
cp .env.datamind.example .env.datamind
$EDITOR .env.datamind # set DATAMIND__LLM__API_KEY
python -m datamind.scripts.hello_sdk
python -m datamind.scripts.seed_enterprise_demo
DATAMIND__DATA__PROFILE=enterprise_demo \
python -m datamind.scripts.hello_enterprise
The bundled dataset contains 17 documents, 64 graph nodes, 6 tables, and 101 rows. To use the browser UI, run:
DATAMIND__DATA__PROFILE=enterprise_demo \
python -m uvicorn datamind.server:app --port 8000
Drop in .md, .csv, or .txt, ask a question, and watch the role-scoped
tools work. The full walkthrough is in GETTING_STARTED.md.
Data can change during the conversation
you → "Import sales-q2.csv as table q2_sales"
StoreAgent → db_import_csv(...) → write receipt
you → "Which sales rep has the largest Q2 pipeline?"
RetrieveAgent → db_query_sql(...) → answer + table evidence
The same flow works for a document, a graph fact, or a profile skill.
Choose your runtime
The built-in native loop is the stable default. The optional sdk loop adds
Claude Agent SDK features such as Subagents and Compaction.
| Backend | Protocol | Status |
|---|---|---|
native |
Anthropic /v1/messages |
Stable |
native |
OpenAI /v1/chat/completions |
Stable |
sdk |
Anthropic | Integration |
sdk |
OpenAI-compatible via CCR | Integration |
Set both switches explicitly:
DATAMIND__AGENT__BACKEND=native
DATAMIND__LLM__PROTOCOL=anthropic
Read the complete native / SDK support matrix. For SDK + OpenAI-compatible gateways, CCR is the local Anthropic ↔ OpenAI protocol bridge.
Python and HTTP APIs
from datamind.agent import build_datamind
from datamind.config import Settings
async def answer() -> str:
system = await build_datamind(Settings())
try:
await system.ingest("Remember that weekly reports use Chinese.")
result = await system.query("What language should weekly reports use?")
return result["answer"]
finally:
await system.aclose()
The bundled FastAPI server exposes GET /api/health, GET /api/tools,
POST /api/ask, POST /api/store, POST /api/chat (SSE), and
POST /api/upload. See the stable API contract.
Safe to embed, not safe to expose naked
DataMind expects your authentication and authorization layer at the edge. Before deploying publicly:
- bind local deployments to loopback;
- add authentication, authorization, TLS, and rate limits;
- isolate profile/storage directories and upload paths;
- treat evidence provenance as metadata, never as a permission grant.
See public deployment security boundaries.
Verify locally
pytest
python -m datamind.scripts.verify_sqlite_demo
The repository's CI runs the no-network test suite and the deterministic SQLite demo. Benchmark and checkpoint/resume details live in docs/BENCHMARK_RUNNER.md.
Explore the docs
|
Build with it |
Understand it |
More architecture notes and tutorials are available in
DataMind-Doc. The supported v1.x
package lives under datamind/; the original v0.1 prototype remains in-tree
for comparison.
License
DataMind is released under the Apache License 2.0.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file datamind-1.0.0.tar.gz.
File metadata
- Download URL: datamind-1.0.0.tar.gz
- Upload date:
- Size: 184.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
64f1ce5afc6a6a28f298517d4fcbf83472c162baecb0f55120ea5c572987d7f0
|
|
| MD5 |
ae16ddc6ca7a67171c622efdf58208ab
|
|
| BLAKE2b-256 |
c4ebc6e29626713beaa97e113d24b3e04af59710620fa407b824b4c8e16d7ca3
|
Provenance
The following attestation bundles were made for datamind-1.0.0.tar.gz:
Publisher:
python-publish.yml on OpenDCAI/DataMind
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
datamind-1.0.0.tar.gz -
Subject digest:
64f1ce5afc6a6a28f298517d4fcbf83472c162baecb0f55120ea5c572987d7f0 - Sigstore transparency entry: 2711605700
- Sigstore integration time:
-
Permalink:
OpenDCAI/DataMind@01a481f3448e2b37e5d6ac3b275c37f9ae2d9332 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/OpenDCAI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@01a481f3448e2b37e5d6ac3b275c37f9ae2d9332 -
Trigger Event:
release
-
Statement type:
File details
Details for the file datamind-1.0.0-py3-none-any.whl.
File metadata
- Download URL: datamind-1.0.0-py3-none-any.whl
- Upload date:
- Size: 218.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b82b49de2472bcf1c1484a1a112ddc5157bb611432eb967e8c0b4f6b6aae8cf
|
|
| MD5 |
30fd697bf9f5c889dd55d290c5388d26
|
|
| BLAKE2b-256 |
fe5ddfa018835a16412e63f3ab30ff0f02aa6b271f5800ebe0ac72ad4343bc86
|
Provenance
The following attestation bundles were made for datamind-1.0.0-py3-none-any.whl:
Publisher:
python-publish.yml on OpenDCAI/DataMind
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
datamind-1.0.0-py3-none-any.whl -
Subject digest:
1b82b49de2472bcf1c1484a1a112ddc5157bb611432eb967e8c0b4f6b6aae8cf - Sigstore transparency entry: 2711606004
- Sigstore integration time:
-
Permalink:
OpenDCAI/DataMind@01a481f3448e2b37e5d6ac3b275c37f9ae2d9332 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/OpenDCAI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@01a481f3448e2b37e5d6ac3b275c37f9ae2d9332 -
Trigger Event:
release
-
Statement type: