Skip to main content

CRM module for Empirica - Client Relationship Management with epistemic tracking

Project description

Empirica CRM

Client Relationship Management module for Empirica.

Enables relational epistemics - tracking what AI knows about entities (clients) separate from tasks (goals).

Prerequisites

  • Python 3.9+
  • Empirica framework (pip install empirica or from source)

Installation

# Install from source (development)
pip install -e .

# Or install directly
pip install empirica-crm

Note: Empirica CRM extends the Empirica framework. Ensure you have Empirica installed first:

pip install empirica>=1.0.0

Quick Start

1. Create a Client

empirica crm client-create \
  --name "Acme Corp" \
  --type prospect \
  --industry "Enterprise Software" \
  --description "Potential partner for API integration"

2. Add an Engagement

empirica crm engagement-create \
  --client-id <client-id> \
  --title "Partnership Discussion" \
  --type outreach

3. Log Interactions

empirica crm interaction-log \
  --client-id <client-id> \
  --type email \
  --summary "Initial outreach email sent"

4. Capture Knowledge

# Log what you learned
empirica crm memory-log-finding \
  --client-id <client-id> \
  --finding "They use Kubernetes for all deployments"

# Log what you need to learn
empirica crm memory-log-unknown \
  --client-id <client-id> \
  --unknown "What's their Q2 budget?"

5. Get Full Context

empirica crm client-bootstrap --client-id <client-id>

Returns everything an AI needs: client details, active engagements, memory (findings/unknowns), recent interactions, and suggested next actions.

CLI Commands

Command Description
client-create Create a new client
client-list List all clients
client-show Show client details
client-update Update client fields
client-bootstrap Get full AI context
engagement-create Start a new engagement
engagement-list List engagements
engagement-update Update engagement status
interaction-log Log an interaction
memory-log-finding Log a finding
memory-log-unknown Log an unknown
memory-search Search client memory
metrics-show Show client metrics

Python API

from empirica_crm import (
    create_client,
    get_client,
    list_clients,
    create_engagement,
    log_interaction,
)

# Create client
client = create_client(
    name="42.works",
    description="AI advertising platform",
    client_type="prospect",
    industry="AdTech",
    tags=["ai", "advertising"],
)

# Create engagement
engagement = create_engagement(
    client_id=client.client_id,
    title="Technical Partnership",
    engagement_type="outreach",
)

# Log interaction
log_interaction(
    client_id=client.client_id,
    interaction_type="email",
    summary="Sent partnership proposal",
)

Documentation

Architecture

empirica_crm/
├── __init__.py           # Package exports + plugin registration
├── schema.py             # CRM database tables
├── client_store.py       # Client CRUD operations
├── engagement_store.py   # Engagement management
├── interaction_store.py  # Interaction logging
├── client_memory.py      # Semantic memory (Qdrant-backed)
├── memory_backend.py     # Memory storage abstraction
├── epistemic_metrics.py  # Relationship health scoring
└── cli/
    ├── commands.py       # Command facade (re-exports handlers)
    └── handlers/         # Domain-specific command handlers

Database

CRM extends Empirica's sessions.db with these tables:

Table Purpose
clients Persistent client relationships
engagements Time-bounded client interactions
interactions Activity log (emails, calls, meetings)
client_memory SQLite fallback for memory items

Memory is also stored in Qdrant for semantic search when available.

Dependencies

  • empirica>=1.0.0 - Core Empirica framework (required)
  • qdrant-client - For semantic memory search (optional)

License

Business Source License 1.1

  • Free for: Internal use, non-production use, self-hosted deployments
  • Restricted: Offering as a competing managed/cloud service
  • Converts to: Apache 2.0 on January 1, 2029

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

empirica_crm-0.1.0.tar.gz (42.5 kB view details)

Uploaded Source

Built Distribution

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

empirica_crm-0.1.0-py3-none-any.whl (53.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for empirica_crm-0.1.0.tar.gz
Algorithm Hash digest
SHA256 56fc29da66c71637135b2e539050589e9f32a595733bb8dfb8f607bafdedfcdf
MD5 008ec68727a1fc8db7f6354f038173fd
BLAKE2b-256 128623774199334fdd60bfe155ec3e59b55b260f0fe7ba293d5513fe6db17a3e

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for empirica_crm-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c88af148029b9dafeed55b22e3883f071a0b86a4af188bed9b549d3bf0c990cc
MD5 2e00db4f252389f98bca581b6043941c
BLAKE2b-256 3a5fa8b8076f78518c5c32d57b4c63499d08db83de7870e970d024425dfac49a

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