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

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.0.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.0-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: echostate-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 2b45d0b58d5ab03273d51b53afbde36d02e4946ca134996f5a91e7353cb08752
MD5 c7e8b40539dd09dd337cb387f3f3cd08
BLAKE2b-256 ce0c74d428aaee3e63136d6714b00f3bf840bc8e17691bb52a0fa5296dec563a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: echostate-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.6 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b2d83873ae0cc876baa256e80a8b11166a90204f6b8fc9cca24e59f384b1f85a
MD5 1b30bf13645971f9c147c20eaafd722b
BLAKE2b-256 9050de08b8c877ad2ad2002a5788ae3537954638fd3068d75c2beb890d304244

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