Skip to main content

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 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.

GitHub stars

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sophonme_aicontext-0.1.0.tar.gz (25.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sophonme_aicontext-0.1.0-py3-none-any.whl (33.2 kB view details)

Uploaded Python 3

File details

Details for the file sophonme_aicontext-0.1.0.tar.gz.

File metadata

  • Download URL: sophonme_aicontext-0.1.0.tar.gz
  • Upload date:
  • Size: 25.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for sophonme_aicontext-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4b51beeadb0d343dadbfc491e3b261732b30282a728ffeb2a1b65423d9fa922b
MD5 c2a4a4c88ab4ea3b3080ad5c1753a143
BLAKE2b-256 f18ce41560a538e66b90710d59a1cf6ceb6b0166c9785bb068196a8017b5152a

See more details on using hashes here.

File details

Details for the file sophonme_aicontext-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for sophonme_aicontext-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0a5e19513a3642b893351d8814bee1182dced8e79610012a842c9810ee4d00bf
MD5 bf088dd46094bce9af159f2cd1567a9f
BLAKE2b-256 d9179ee738861dee3c95dd5c2aef569cb1a91c3759710f09960ccd277c231049

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page