Skip to main content

Genuine AI epistemic self-assessment framework - Universal interface for single AI tracking

Project description

๐Ÿง  Empirica - Honest AI Through Epistemic Self-Awareness

AI agents that know what they knowโ€”and what they don't

Version PyPI Python License Docker

What is Empirica?

Empirica enables AI agents to genuinely assess their knowledge and uncertainty.

Instead of false confidence and hallucinations, Empirica provides:

  • โœ… Honest uncertainty tracking: "I don't know" becomes a measured response
  • โœ… Focused investigation: Direct effort where knowledge gaps exist
  • โœ… Genuine learning measurement: Track what you learned, not just what you did
  • โœ… Session continuity: Resume work across sessions without losing context
  • โœ… Multi-agent coordination: Share epistemic state across AI teams

Result: AI you can trustโ€”not because it's always right, but because it knows when it might be wrong.


๐Ÿš€ Quick Start

Installation

Choose your preferred installation method:

PyPI (Recommended)

# Core installation
pip install empirica

# With API/dashboard features
pip install empirica[api]

# With vector search
pip install empirica[vector]

# Everything
pip install empirica[all]

Homebrew (macOS/Linux)

brew tap nubaeon/tap
brew install empirica

Docker

# Pull the image
docker pull nubaeon/empirica:1.0.3

# Run a command
docker run -it nubaeon/empirica:1.0.3 empirica --help

# Interactive session with persistent data
docker run -it -v $(pwd)/.empirica:/data/.empirica nubaeon/empirica:1.0.3 /bin/bash

Chocolatey (Windows)

choco install empirica

From Source

# Latest stable release
pip install git+https://github.com/Nubaeon/empirica.git@v1.0.3

# Development branch
pip install git+https://github.com/Nubaeon/empirica.git@develop

๐Ÿ†• First-time user? โ†’ Installation Guide

Initialize a New Project

# Navigate to your git repository
cd your-project
git init

# Initialize Empirica (creates config files, optional BEADS integration)
empirica project-init

# Follow interactive prompts:
# - Project name
# - Enable BEADS issue tracking? (y/N)
# - Create documentation index template? (y/N)

Result:

  • โœ… .empirica/config.yaml - Infrastructure settings
  • โœ… .empirica/project.yaml - Project metadata & BEADS config
  • โœ… docs/SEMANTIC_INDEX.yaml - Documentation index (optional)
  • โœ… Project registered in database

Your First Session

# AI-first JSON mode (recommended for AI agents)
echo '{"ai_id": "myagent", "session_type": "development"}' | empirica session-create -

# Legacy CLI (still supported)
empirica session-create --ai-id myagent --output json

Output:

{
  "ok": true,
  "session_id": "abc-123-...",
  "project_id": "xyz-789-...",
  "message": "Session created successfully"
}

๐ŸŽฏ Core Workflow: CASCADE

Empirica uses CASCADE - a metacognitive workflow with explicit epistemic phases:

# 1. PREFLIGHT: Assess what you know BEFORE starting
cat > preflight.json <<EOF
{
  "session_id": "abc-123",
  "vectors": {
    "engagement": 0.8,
    "foundation": {"know": 0.6, "do": 0.7, "context": 0.5},
    "comprehension": {"clarity": 0.7, "coherence": 0.8, "signal": 0.6, "density": 0.7},
    "execution": {"state": 0.5, "change": 0.4, "completion": 0.3, "impact": 0.5},
    "uncertainty": 0.4
  },
  "reasoning": "Starting with moderate knowledge of OAuth2..."
}
EOF
cat preflight.json | empirica preflight-submit -

# 2. WORK: Do your actual implementation
#    Use CHECK gates as needed for decision points

# 3. POSTFLIGHT: Measure what you ACTUALLY learned
cat > postflight.json <<EOF
{
  "session_id": "abc-123",
  "vectors": {
    "engagement": 0.9,
    "foundation": {"know": 0.85, "do": 0.9, "context": 0.8},
    "comprehension": {"clarity": 0.9, "coherence": 0.9, "signal": 0.85, "density": 0.8},
    "execution": {"state": 0.9, "change": 0.85, "completion": 1.0, "impact": 0.8},
    "uncertainty": 0.15
  },
  "reasoning": "Successfully implemented OAuth2, learned token refresh patterns"
}
EOF
cat postflight.json | empirica postflight-submit -

Result: Quantified learning (know: +0.25, uncertainty: -0.25)


โœจ Key Features

๐Ÿ“Š Epistemic Self-Assessment (13 Vectors)

Track knowledge across 3 tiers:

  • Tier 0 (Foundation): engagement, know, do, context
  • Tier 1 (Comprehension): clarity, coherence, signal, density
  • Tier 2 (Execution): state, change, completion, impact
  • Meta: uncertainty (explicit tracking)

๐ŸŽฏ Goal-Driven Task Management

# Create goals with epistemic scope
echo '{
  "session_id": "abc-123",
  "objective": "Implement OAuth2 authentication",
  "scope": {
    "breadth": 0.6,
    "duration": 0.4,
    "coordination": 0.3
  },
  "success_criteria": ["Auth works", "Tests pass"],
  "estimated_complexity": 0.65
}' | empirica goals-create -

Integrates with BEADS (issue tracking) for dependency-aware workflows.

๐Ÿ”„ Session Continuity

# Load project context dynamically (~800 tokens)
empirica project-bootstrap --project-id <PROJECT_ID>

Shows:

  • Recent findings (what was learned)
  • Open unknowns (what's unclear)
  • Dead ends (what didn't work)
  • Reference docs & skills

๐Ÿค Multi-Agent Coordination

Share epistemic state via git notes:

# Push your epistemic checkpoints
git push origin refs/notes/empirica/*

# Pull team member's state
git fetch origin refs/notes/empirica/*:refs/notes/empirica/*

Privacy: You control what gets shared!


๐Ÿ“ฆ Optional Integrations

BEADS Issue Tracking

Install BEADS (separate Rust project):

cargo install beads

Features:

  • Dependency-aware task tracking
  • Git-friendly (JSONL format)
  • AI-optimized JSON output
  • Auto-links with Empirica goals

Learn more: BEADS Integration Guide

Claude Code Integration

Automatic epistemic continuity across memory compacts:

# Install plugin (bundled with Empirica)
./scripts/install_claude_plugin.sh

Features:

  • ๐Ÿ”„ Auto-saves epistemic state before Claude Code memory compacts
  • ๐Ÿ“ฅ Auto-restores context after compacts (MCO config + bootstrap)
  • ๐Ÿ“Š Drift detection - measures epistemic drift across compacts
  • ๐ŸŽฏ Zero configuration - automatically finds latest session
  • ๐Ÿ’พ Token efficient - 97.5% reduction vs manual reconstruction

What it does:

  • PreCompact hook โ†’ Saves checkpoint + MCO config before compact
  • SessionStart hook โ†’ Loads bootstrap + MCO config after compact
  • SessionEnd hook โ†’ Curates old snapshots (keeps high-impact, removes low-impact)

Result: Epistemic drift reduced from 60% โ†’ 10% across memory compacts.

Learn more: Claude Code Integration Guide

Vector Search (Qdrant)

pip install empirica[vector]

# Start Qdrant
docker run -p 6333:6333 qdrant/qdrant

# Embed docs
empirica project-embed --project-id <PROJECT_ID>

# Search
empirica project-search --project-id <PROJECT_ID> --task "oauth2"

API & Dashboard

pip install empirica[api]

# Start monitoring dashboard
empirica monitor

๐Ÿ“š Documentation

Getting Started

Guides

Reference


๐Ÿ”’ Privacy & Data Isolation

Your data is isolated per-repo:

  • โœ… .empirica/ - Local SQLite database (gitignored)
  • โœ… .git/refs/notes/empirica/* - Epistemic checkpoints (local by default)
  • โœ… .beads/ - BEADS database (gitignored)

Each user gets a clean slate - no inherited data from other users or projects.


๐Ÿ› ๏ธ Development

Running Tests

# Core tests
pytest tests/

# Integration tests
pytest tests/integration/

# MCP tests
pytest tests/mcp/

Contributing

We welcome contributions! See CONTRIBUTING.md for guidelines.


๐Ÿ“Š System Requirements

  • Python: 3.11+
  • Git: Required for epistemic checkpoints
  • Optional: Docker (for Qdrant), Rust/Cargo (for BEADS)

๐ŸŽ“ Learn More

Research & Concepts

Use Cases

  • Research & Development
  • Multi-Agent Teams
  • Long-Running Projects
  • Training Data Generation
  • Epistemic Audit Trails

๐Ÿ”— Related Projects

  • Empirica MCP - Model Context Protocol server for Empirica integration
  • Empirica EPRE - Epistemic Pattern Recognition Engine (privacy-preserving platform integrations for Twitter, Slack, Discord, and more)

๐Ÿ“ž Support


๐Ÿ“œ License

MIT License - Maximum adoption, trust-aligned with Empirica's transparency principles.

See LICENSE for details.


Built with genuine epistemic transparency ๐Ÿง โœจ

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

empirica-1.1.0.tar.gz (739.7 kB view details)

Uploaded Source

Built Distribution

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

empirica-1.1.0-py3-none-any.whl (763.5 kB view details)

Uploaded Python 3

File details

Details for the file empirica-1.1.0.tar.gz.

File metadata

  • Download URL: empirica-1.1.0.tar.gz
  • Upload date:
  • Size: 739.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for empirica-1.1.0.tar.gz
Algorithm Hash digest
SHA256 e0336d319297d49e96b20ed8f10a0937fdb362005ed58c2336f0ba7035fe6a83
MD5 2f9374d6548ef2d2ce3f528dce39d926
BLAKE2b-256 9e13ccccbd36ab3d5fdce7b919e220397670393a47e5b352335f3d1239836748

See more details on using hashes here.

File details

Details for the file empirica-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: empirica-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 763.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for empirica-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1ba81fd144fe922ec2661765dc6bf3d79ea8fc3f0cb81fc27fd3120cc055dd24
MD5 37ce7599b2a2ccf3eaa46a746ca84d03
BLAKE2b-256 fb6dcad5c7f8ac3022bc2d7e28e89699b5058c02e76d7b8f474bf17cbfbb5800

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