Skip to main content

No project description provided

Project description

context-use

Turn your data exports into portable AI memory.

Features

  • Ingest — parse provider export ZIPs into structured threads; no cloud upload required
  • Quickstart — zero-database preview mode; results written to data/output/ with no setup beyond an OpenAI key
  • Full pipeline — persistent storage in PostgreSQL with pgvector; full archive history, batch API for cost-efficient memory generation
  • Semantic searchmemories search queries your memory store by meaning, not just keywords
  • MCP server — expose memories and semantic search to Claude Desktop, Cursor, or any MCP client
  • Personal agent — multi-turn agent that synthesises higher-level pattern memories, generates a first-person profile, or runs ad-hoc queries against your memory store

Supported providers

Provider Status Data types Export guide
ChatGPT Available Conversations Export your data
Instagram Available Stories, Reels, Posts Download your data
WhatsApp Coming soon
Google Takeout Coming soon

Getting your export

  1. Follow the export guide for your provider in the table above. The export is delivered as a ZIP file — do not extract it.
  2. Move or copy the ZIP into data/input/ inside the cloned repo:
context-use/
└── data/
    └── input/
        └── chatgpt-export.zip   ← place it here

Both quickstart and pipeline scan data/input/ for exports on startup and prompt you to pick one if multiple are present.

Install

git clone https://github.com/onfabric/context-use.git
cd context-use
uv sync
source .venv/bin/activate

Set your OpenAI API key:

context-use config set-key
# or: export OPENAI_API_KEY=sk-...

Quick start

A zero-setup preview that requires no database.

context-use quickstart

The CLI prompts for the export and provider. Memory generation uses the OpenAI real-time API — fast for small slices but susceptible to rate limits on large exports. By default only the last 30 days are processed; use --full to include the complete history (the CLI warns you before proceeding).

The output is a snapshot: memories are written to data/output/ as Markdown and JSON, then discarded. Nothing is stored in a database, so the memories are not queryable, searchable, or available to the MCP server after the command exits.

The full pipeline is the intended way to use context-use beyond this initial preview.

Full pipeline

For persistent storage, semantic search, and the MCP server.

1. Set up PostgreSQL (one-time)

context-use config set-store postgres

Prompts to start a local container via Docker, then saves connection details to ~/.config/context-use/config.toml. Skip Docker if you're bringing your own PostgreSQL instance.

2. Run the pipeline

context-use pipeline

Ingests the export and generates memories via the OpenAI batch API — significantly cheaper and more rate-limit-friendly than the real-time API used by quickstart. Typical runtime: 2–10 minutes. Memories are stored in PostgreSQL and persist across sessions, enabling semantic search, the MCP server, and the personal agent.

3. Explore your memories

context-use memories list
context-use memories search "hiking trips in 2024"

MCP server

Requires the full pipeline (PostgreSQL).

python -m context_use.ext.mcp_use.run
# use --transport stdio for clients that prefer stdio

Add to your MCP client config (Claude Desktop, Cursor, etc.):

{
  "mcpServers": {
    "context-use": {
      "command": "python",
      "args": ["-m", "context_use.ext.mcp_use.run", "--transport", "stdio"]
    }
  }
}

Claude Desktop config path: ~/Library/Application Support/Claude/claude_desktop_config.json. Cursor: Settings → MCP.

Personal agent

A multi-turn agent that operates over your full memory store. Requires PostgreSQL.

context-use config set-agent adk
context-use agent synthesise          # generate higher-level pattern memories
context-use agent profile             # compile a first-person profile
context-use agent ask "What topics do I keep coming back to across all my conversations?"

Configuration

Config file: ~/.config/context-use/config.toml. Run context-use config show to see all active values and where each comes from (env var, file, or built-in default).

Setting CLI command Env var Default
OpenAI API key config set-key OPENAI_API_KEY
Model edit config file OPENAI_MODEL gpt-5.2
Embedding model edit config file OPENAI_EMBEDDING_MODEL text-embedding-3-large
Store backend config set-store postgres|memory CONTEXT_USE_STORE memory
PostgreSQL host config set-store postgres POSTGRES_HOST localhost
PostgreSQL port config set-store postgres POSTGRES_PORT 5432
PostgreSQL database config set-store postgres POSTGRES_DB context_use
PostgreSQL user config set-store postgres POSTGRES_USER postgres
PostgreSQL password config set-store postgres POSTGRES_PASSWORD postgres
Agent backend config set-agent adk CONTEXT_USE_AGENT_BACKEND
Data directory edit config file ./data

Adding new providers and pipes

See AGENTS.md for context-use's architecture and how to add new providers and pipes.

Contributing

See CONTRIBUTING.md for how to contribute to the context-use project.

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

context_use-0.1.0.tar.gz (92.0 kB view details)

Uploaded Source

Built Distribution

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

context_use-0.1.0-py3-none-any.whl (145.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: context_use-0.1.0.tar.gz
  • Upload date:
  • Size: 92.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for context_use-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2b9004de02c11a40a0da3c328afecb76ff803a213e5c4c58a3d042532f964422
MD5 dea050591dfb503fcc91dbdf5a60966f
BLAKE2b-256 e540a8664ae41f0716ceea6fbad1522d90014f7a14fd4973f82d7d7402287b36

See more details on using hashes here.

File details

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

File metadata

  • Download URL: context_use-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 145.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for context_use-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ccf6cfc70ba1f07a1c2fc5b253a5cba6682528cba3d819b2e9b1f7e0dc8bfe9b
MD5 34b82f98436e70fa3a12ab848ea488e2
BLAKE2b-256 746bd95b3795c6df41ee4162da9127640f7b8ea8c87e1ddcb8b653cf8c8de3de

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