YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

ContextPilot

ContextPilot is a small, memory-aware task assistant. It combines explicitly saved user context with recent conversation, retries failed responses using different problem-solving angles, and keeps consequential actions under human review.

Features

  • Explicit memory: save, inspect, and delete memories yourself.
  • Relevant context: retrieves saved memories using simple keyword matching.
  • Conversation continuity: keeps recent turns in a local SQLite database.
  • Adaptive retries: retries failed model requests with alternate task framing.
  • Human review: drafts suggestions; it does not execute external actions.
  • Provider configuration: uses a configurable chat-completions endpoint.

Requirements

  • Python 3.11 or newer
  • An API key and model endpoint compatible with the chat-completions request format

Install

git clone https://github.com/swordenkisk/contextpilot.git
cd contextpilot
python -m venv .venv
source .venv/bin/activate
python -m pip install -e .
cp .env.example .env

On Windows PowerShell, activate the environment with:

.venv\Scripts\Activate.ps1

Edit .env and set API_BASE_URL, API_KEY, and MODEL. Keep .env private; it is excluded from Git by .gitignore.

Initialize the database:

contextpilot init

Usage

Save context explicitly:

contextpilot remember "I prefer concise project updates."
contextpilot remember "The current project uses Python and SQLite."

Review or delete saved memories:

contextpilot memories
contextpilot forget 1

Ask a one-off task:

contextpilot ask "Draft a short project status update."

Start an interactive session:

contextpilot chat

Type /exit to leave the chat.

Configuration

Variable Purpose
API_BASE_URL Full URL for a compatible chat-completions endpoint
API_KEY Provider credential
MODEL Model identifier accepted by the endpoint
DATABASE_PATH Optional SQLite file path; defaults to ~/.contextpilot/contextpilot.sqlite3

The project does not bundle provider credentials or assume a particular model vendor. Configure an endpoint and model supported by your chosen provider.

Architecture

  • config.py loads environment configuration and .env.
  • memory.py stores explicit memories and recent conversation turns in SQLite.
  • provider.py sends chat-completions requests using Python's standard library.
  • agent.py assembles context and retries failed model calls.
  • cli.py exposes database, memory, task, and chat commands.

Safety and data handling

ContextPilot stores its database locally at the configured path. Saved memories are added only through the remember command; the assistant does not automatically promote conversation details to permanent memory. Review model outputs before using them for consequential decisions.

Development

Run the CLI directly from the repository:

python -m contextpilot --help

License

Choose and add a license before publishing this repository.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support