Local-first AI context engine. Access your local data to provide context for any agent.
Project description
AIContext
Local-first AI context engine. Your Claude Code agent automatically pulls from your local data — coding sessions, browser history, AI conversations — before asking you for context.
No cloud. No uploads. Everything stays on your machine.
Install
pip install sophonme-aicontext && aicontext install
aicontext install scans your machine for supported data sources, asks for consent per source type, ingests the data into a local SQLite database, and installs a subagent into Claude Code.
Scanning for local data sources...
[found] Claude Code sessions
/Users/you/.claude/projects
Include? [Y/n] y
-> included
[found] Chrome browser history
/Users/you/Library/Application Support/Google/Chrome/Default/History
Include? [Y/n] y
-> included
Ingesting data...
Ingested: 24803 new records, 0 updated
Done.
The sophon-me-context-engine agent is now active in Claude Code.
Your data syncs automatically every hour.
How it works
After install, Claude Code has a sophon-me-context-engine subagent. Claude automatically invokes it before asking you for context — querying your local activity database to surface relevant history for whatever task you're working on.
A background sync service (launchd on macOS) re-ingests your data every hour, so context stays fresh without any manual steps.
~/.aicontext/
├── SKILL.md
├── data/
│ ├── activity.db — unified timeline
│ └── reference_data/ — full session content
├── reference/ — per-source schema docs
└── scripts/
└── query.py — read-only SQL query tool
The agent reads from ~/.aicontext/ using a read-only SQL query script. It never writes to your data, and never sends anything outside your machine.
Supported sources
| Source | Data |
|---|---|
| Claude Code | Session history, prompts, project paths |
| Codex | Session history, prompts |
| Chrome | Browser visits, downloads |
| Edge | Browser visits, downloads |
| Safari | Browser visits |
More sources coming soon.
Supported agents
| Agent | Status |
|---|---|
| Claude Code | Supported |
| Others | Coming soon |
Privacy
All data is stored locally at ~/.aicontext/. Nothing is sent to any server. The agent only reads from this directory.
Contributing
Contributions are welcome — new data sources are the most impactful place to start.
Each source is a single file in aicontext/sources/ that implements two methods: ingest_activity() returns a list of ActivityRecord, and ingest_reference() returns full session content. See sources/claude_code.py as a reference.
Ideas for new sources: Firefox, Arc, VS Code history, Obsidian, Zotero, Spotify, shell history.
If this project is useful to you, consider giving it a star — it helps others find it.
Project details
Release history Release notifications | RSS feed
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 sophonme_aicontext-0.1.1.tar.gz.
File metadata
- Download URL: sophonme_aicontext-0.1.1.tar.gz
- Upload date:
- Size: 25.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ec92c1ba89a499e9bfae935beffad5624ce433198f1617cf1ba3af79be4cb390
|
|
| MD5 |
70d513b9fc844e9af1b8290a50847a37
|
|
| BLAKE2b-256 |
0829b59528eb3322eb1578f77e9fc4342468cdd9752cecda5cea8e91ed2f5cae
|
File details
Details for the file sophonme_aicontext-0.1.1-py3-none-any.whl.
File metadata
- Download URL: sophonme_aicontext-0.1.1-py3-none-any.whl
- Upload date:
- Size: 33.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
379005af9b6cdb249dca8ad91a36f1f445a2834f99c952586ec77889858b64f7
|
|
| MD5 |
574c6360e4ca4fb9be747420fce6b431
|
|
| BLAKE2b-256 |
4d698f41cc8ee2d18ab797eefe60945e33ff80ede6120b80addea885fe3ba12b
|