Skip to main content

Spark

License: MIT + Commons Clause Python 3.12+ PyPI CI Quality Gate Security Rating Reliability Rating Maintainability Rating Vulnerabilities Bugs

Spark is a secure, multi-provider AI research kit with a modern web interface. It connects to AI models from Anthropic, AWS Bedrock, Google Gemini, Ollama, and X.AI, with features like MCP tool integration, intelligent context management, persistent memory, and autonomous scheduled actions.

Features

Conversations

  • Multi-Provider LLM Support -- Claude, Gemini, Grok, Llama, Mistral, and more
  • Real-Time Streaming -- Server-Sent Events for token-by-token responses
  • Dark/Light Theme -- Cognisn design system with theme persistence
  • Context Compaction -- LLM-driven summarisation when approaching context limits
  • Conversation Linking -- Share context between related conversations
  • Favourites -- Star conversations for quick access
  • Global System Instructions -- Define persistent instructions applied to all conversations (Settings > Conversation)
  • Voice Conversation Mode -- Hands-free AI interaction via the headset button with text-to-speech output and voice selection
  • Speech-to-Text Input -- Dictate messages using the microphone button

Tools

  • MCP Integration -- Connect external tool servers via stdio, HTTP, or SSE; edit server configurations and view tools from the dashboard
  • Built-in Tools -- Filesystem, documents (Word/Excel/PDF/PowerPoint), web search, archives, email, system commands
  • Document Creation -- Create Word (.docx), Excel (.xlsx), PowerPoint (.pptx), and PDF documents with advanced formatting (headings, tables, lists, images, styles)
  • Email Tools -- Send and draft emails via SMTP with HTML/plain text, attachments, and cc/bcc; SMTP test connection button
  • Memory Tools -- Persistent semantic memory across conversations
  • Per-Conversation Control -- Enable/disable tools at the server or individual level
  • 4-Level Tool Approval -- Deny, Approve Once, Always (Conversation), Always (Global) with category-based grouping
  • Resizable Sidecar -- Tools and Agents tabs with drag-to-resize handle; entries grouped by date with collapsible headers; width persists in session
  • Agent Spawning -- Spawn independent sub-agents for parallel research, analysis, and data gathering with dedicated Agents tab; supports orchestrator-workers and chain modes
  • Tool Documentation -- Built-in get_tool_documentation tool for querying tool usage information
  • Web Search Engines -- DuckDuckGo, Brave, Google/SerpAPI, Bing/Azure, SearXNG
  • System Commands -- Execute shell commands and CLI tools (git, docker, aws, etc.) with OS-aware execution and configurable approval prompts

Memory

  • Persistent Storage -- Facts, preferences, projects, instructions, relationships
  • Semantic Search -- Vector embeddings for relevant recall
  • Auto-Retrieval -- Relevant memories silently injected into context
  • Import/Export -- JSON format for backup and sharing

Autonomous Actions

  • Scheduled Tasks -- Cron or one-off schedules via APScheduler with local timezone support
  • AI-Assisted Creation -- Describe what you want and the AI builds the action
  • Create from Conversation -- Turn any conversation into an autonomous action with AI-guided setup
  • Run Now -- Execute any action immediately from the Actions page
  • Background Daemon -- System tray icon (macOS/Windows) runs actions independently with sleep/wake recovery
  • Run History -- Track execution status, results, tool activity log, and token usage

Dashboard

  • Provider Models Modal -- Click any provider on the dashboard to view its available models
  • MCP Tools View -- View tools provided by each MCP server directly from the dashboard
  • Provider Setup Guides -- In-app step-by-step setup guides for all LLM providers

Security

  • Prompt Inspection -- Pattern and keyword-based threat detection
  • Secret Management -- API keys stored in OS keychain, never in config files
  • Settings Lock -- Password-protect the settings page
  • Tool Permissions -- Per-conversation, per-tool approval system

Updates

  • Auto-Update Checker -- Checks GitHub releases for new versions; update from the Help menu

Installation

Download (Standalone)

Pre-built binaries with an embedded Python runtime and a native splash screen for first-run setup. Dependencies are downloaded from PyPI on first launch (~30-60 seconds, requires internet).

Platform Architecture Format Download
macOS ARM64 (Apple Silicon) Signed + notarised DMG Download
macOS x86_64 (Intel) Signed + notarised DMG Download
Windows x86_64 Signed NSIS installer Download
Linux Any pip install (see below) --

Install from PyPI

pip install cognisn-spark

Run with uv

uv can install and run Spark from PyPI:

uv tool install cognisn-spark    # then run:
spark

uv tool install keeps Spark and its (large) dependencies installed between runs, which is what you want. For a throwaway run, uvx cognisn-spark works too but re-downloads everything each time.

On a headless server, disable the browser auto-open and pin a port:

SPARK__INTERFACE__OPEN_BROWSER=false SPARK__INTERFACE__PORT=8765 spark

Optional database drivers

pip install cognisn-spark[postgresql]   # PostgreSQL
pip install cognisn-spark[mysql]        # MySQL
pip install cognisn-spark[mssql]        # SQL Server
pip install cognisn-spark[all-databases] # All drivers

Quick Start

spark

On first launch, Spark creates a configuration file, starts the web server on a random port, and opens your browser. Follow the welcome page to configure an LLM provider and start chatting.

Configuration

Spark stores its configuration in platform-standard locations:

Platform Config Data Logs
macOS ~/Library/Application Support/spark/ ~/Library/Application Support/spark/ ~/Library/Logs/spark/
Linux ~/.config/spark/ ~/.local/share/spark/ ~/.local/state/spark/logs/
Windows %APPDATA%/spark/ %APPDATA%/spark/ %LOCALAPPDATA%/spark/logs/

API keys are stored in the OS keychain (macOS Keychain, Windows Credential Locker, Linux Secret Service) via the cognisn-konfig library.

Architecture

graph TB
    subgraph UI ["Web Interface"]
        FE["FastAPI + SSE + Bootstrap 5 (Cognisn)"]
        Voice["Voice / Speech-to-Text"]
        Sidecar["Tool Activity Sidecar"]
    end

    subgraph Core ["Conversation Manager"]
        CM["Context Compaction / Memory / RAG / Tool Routing"]
    end

    subgraph Providers ["LLM Providers"]
        Bedrock["AWS Bedrock"]
        Anthropic["Anthropic"]
        Ollama["Ollama"]
        Gemini["Google Gemini"]
        XAI["X.AI"]
    end

    subgraph Tools ["Tools"]
        MCP["MCP Servers"]
        Builtin["Built-in Tools"]
        Memory["Memory"]
        WebSearch["Web Search"]
        EmailTool["Email (SMTP)"]
        DocCreate["Document Creation"]
        Agents["Sub-Agents"]
        SysCmd["System Commands"]
    end

    subgraph Foundation ["cognisn-konfig"]
        Settings["Settings"]
        Secrets["Secrets"]
        Logging["Logging"]
    end

    UI --> Core
    Core --> Providers
    Core --> Tools
    Core --> Foundation

Keyboard Shortcuts

Shortcut Action
Ctrl/Cmd + K Go to Conversations
Ctrl/Cmd + N New Conversation
Ctrl/Cmd + , Open Settings
Enter Send message
Shift + Enter New line

Development

git clone https://github.com/Cognisn/spark.git
cd spark
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
pytest

Changelog

See CHANGELOG.md.

Licence

MIT License with Commons Clause -- free for personal and educational use. Commercial use requires a licence from the author. See LICENSE.

Author

Matthew Westwood-Hill / Cognisn

Metadata

Release files for cognisn-spark 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for cognisn-spark 0.2.1
File Interpreter ABI Platform Actions
cognisn_spark-0.2.1-py3-none-any.whl Python 3 none any Details for cognisn_spark-0.2.1-py3-none-any.whl

Release files / cognisn_spark-0.2.1-py3-none-any.whl

Download URL cognisn_spark-0.2.1-py3-none-any.whl
Size 434.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
160bfca419f49bfbb14758f88c4689ff084ad714c159a637e61aa4820ee823e4
BLAKE2b-256 checksum
How to use checksums
68247377def582ee5224dd588ed7157bd0576d9452d8a134dab794b0041379cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.

Transparency log

Security for cognisn-spark 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 1 file in this release has been uploaded with provenance metadata.

Attestation for cognisn_spark-0.2.1-py3-none-any.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.1 This release

1 release file Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page