Skip to main content

Semantic, event-sourced state for intelligent systems

Project description

EchoState

Semantic, event-sourced state for intelligent systems

EchoState is a Python library that gives your applications permanent memory and semantic search. Every change you make is saved permanently, and you can search by meaning, not just exact words.

Think of EchoState as Git + SQLite + Vector Search — for runtime state.

Why EchoState?

Building AI agents or long-running applications? You need:

  • Memory that persists - Data survives restarts
  • Search by meaning - Find "refund requests" even if stored as "reimbursement"
  • Complete history - See every change that happened
  • Auditability - Prove what happened and when

EchoState provides all of this with a simple, Pythonic interface.

Features (v0.1)

  • ✅ Event-sourced state with deterministic replay
  • ✅ SQLite-based persistence
  • ✅ Semantic search over explicitly indexed keys
  • ✅ History inspection and time-travel snapshots
  • ✅ Rebuildable vector index

Quick Start

from echostate import EchoState

# Create a state instance
state = EchoState(
    name="agent_state",
    persist="sqlite:///state.db",
    index_keys=["notes", "profile"],
)

# Write state
state.set("profile.tier", "Gold", metadata={"user_id": "u-42"})
state.append("notes", "Customer requested refund", metadata={"trace_id": "t-123"})

# Semantic search
results = state.search("refund duplicate charge", k=5)
for hit in results:
    print(f"{hit.path}: {hit.text} (score: {hit.score})")

# Inspect history
events = state.history("notes", filters={"user_id": "u-42"}, limit=100)

# Time-travel snapshot
past_state = state.snapshot(at="2026-01-05T10:30:00Z")

Documentation

  • 📖 User Manual - Complete guide with API reference, examples, and use cases

Installation

pip install echostate

Development

# Install with dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Format code
black echostate/

# Lint
ruff check echostate/

License

MIT

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

echostate-0.1.1.tar.gz (18.0 kB view details)

Uploaded Source

Built Distribution

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

echostate-0.1.1-py3-none-any.whl (14.5 kB view details)

Uploaded Python 3

File details

Details for the file echostate-0.1.1.tar.gz.

File metadata

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

File hashes

Hashes for echostate-0.1.1.tar.gz
Algorithm Hash digest
SHA256 1d3e200ca6e048537cdedf0f516389ff31521f36ec5265545752e7dfac59301c
MD5 bced203e4ae9dae15e54cfe443fc2e2d
BLAKE2b-256 800fb759c057bd394777f3fc9dd697aa49c0d8adf6a6aa87b29723e6f792f9da

See more details on using hashes here.

File details

Details for the file echostate-0.1.1-py3-none-any.whl.

File metadata

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

File hashes

Hashes for echostate-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cba6c486299593bccd653ab314c9e5e2484bccc855acdff85dcd7ccbe533a003
MD5 00ea7a64663614cdd046dbfe54a7fbd8
BLAKE2b-256 e62cf19f45231b0cd82c8f874641dead163c26896dcea38cf12fd9e84fe4e92d

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