Skip to main content

Unified Agent State System - Cross-framework state management for AI agents

Project description

UASS - Unified Agent State System

A universal state management system that enables cross-framework communication between AI agent frameworks (LangGraph, AutoGen, CrewAI, etc.) through a unified state store.

Architecture

┌─────────────────────────────────────────────────────────────┐
│                    Framework Layer                           │
│  ┌──────────┐  ┌──────────┐  ┌──────────┐  ┌──────────┐   │
│  │LangGraph │  │ AutoGen  │  │ CrewAI   │  │  Custom  │   │
│  └────┬─────┘  └────┬─────┘  └────┬─────┘  └────┬─────┘   │
│       │             │              │             │          │
│       └─────────────┴──────────────┴─────────────┘          │
│                          │
└─────────────────────────────────────────────────────────────┘
                          │
                          ▼
┌─────────────────────────────────────────────────────────────┐
│                    UASS SDK Layer                            │
│  ┌──────────────────────────────────────────────────────┐   │
│  │         Unified State API (Python/TypeScript)        │   │
│  └──────────────────────────────────────────────────────┘   │
└─────────────────────────────────────────────────────────────┘
                          │
                          ▼
┌─────────────────────────────────────────────────────────────┐
│                    Backend Layer                             │
│  ┌──────────┐  ┌──────────┐  ┌──────────┐                  │
│  │  Redis   │  │PostgreSQL│  │  Memory  │  (pluggable)     │
│  └──────────┘  └──────────┘  └──────────┘                  │
└─────────────────────────────────────────────────────────────┘

Features

  • Unified State Schema: Standardized state format across all frameworks
  • Cross-Framework Communication: Any node from any framework can read/write state
  • Pluggable Backends: Redis, PostgreSQL, in-memory, etc.
  • Framework Adapters: Easy integration with LangGraph, AutoGen, CrewAI
  • Type Safety: Full type definitions for state structures
  • Session Management: Multi-session support with isolation
  • State Versioning: Track state changes over time

🚀 Try it in 30 Seconds (Zero Setup)

Want to see it in action without installing Redis? Run our zero-setup quickstart script:

python3 quickstart.py

This simulates two agents talking to each other using the in-memory backend.

Quick Start (Production)

from uass import UASSClient, RedisBackend

# Initialize client
client = UASSClient(backend=RedisBackend(host='localhost', port=6379))

# Write state from any framework
client.write_state(
    session_id="session_123",
    agent_id="agent_1",
    framework="langgraph",
    state={"tokens": 100, "context": "processing..."}
)

# Read state from any other framework
state = client.read_state("session_123", "agent_1")

Backend Options

UASS supports multiple backends - choose based on your needs:

Redis (Default - Best for Real-time)

from uass import UASSClient, RedisBackend
client = UASSClient(backend=RedisBackend())

Best for: Real-time access, high-frequency updates, pub/sub events

PostgreSQL (Best for Analytics)

from uass import UASSClient, PostgreSQLBackend
client = UASSClient(backend=PostgreSQLBackend())

Best for: Complex queries, large states, analytics, ACID transactions

Hybrid (Best of Both Worlds)

from uass import UASSClient, RedisBackend, PostgreSQLBackend, HybridBackend
redis = RedisBackend()
postgres = PostgreSQLBackend()
client = UASSClient(backend=HybridBackend(redis, postgres))

Best for: Production systems needing both speed and analytics

Memory (Testing Only)

from uass import UASSClient, MemoryBackend
client = UASSClient(backend=MemoryBackend())

Best for: Development and testing

See Backend Comparison Guide for detailed recommendations.

Installation

Basic Installation

pip install uass

This installs UASS with Redis support (default backend).

Optional Dependencies

# With PostgreSQL support
pip install uass[postgresql]

# With hybrid backend (Redis + PostgreSQL)
pip install uass[hybrid]

# With test dependencies (includes LangGraph for integration tests)
pip install uass[test]

# With all optional dependencies
pip install uass[all]

For Development

# Clone repository
git clone https://github.com/yourusername/uass.git
cd uass

# Install in development mode
pip install -e .

# Install test dependencies (includes LangGraph, etc.)
pip install -r requirements-test.txt

See INSTALL.md for detailed installation instructions.

Testing

Unit Tests (No Dependencies)

pytest tests/unit/ -v

Integration Tests (Requires Frameworks)

# Install test dependencies first
pip install -r requirements-test.txt

# Run integration tests
pytest tests/integration/ -v

Documentation

Examples

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

uass-0.1.0.tar.gz (19.5 kB view details)

Uploaded Source

Built Distribution

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

uass-0.1.0-py3-none-any.whl (26.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for uass-0.1.0.tar.gz
Algorithm Hash digest
SHA256 afc52a3fd5ad59acdfe51ee4e8cc040fc0f4556877c837263f44387302564651
MD5 5aab53dbf27749a741f3ab175ac9e786
BLAKE2b-256 3bf55587e81e5ce4d21177a02245ea7e450596591fdc883fc76b25a4f620bffe

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for uass-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 efdee25cc97af6efbea348941a16295960369ec38713e6146347f55684b54d2f
MD5 186a9574f145af372977fcb46621740a
BLAKE2b-256 7d212b58dd0405f73075a28faa900bac1d27c63863cad90f227e019c04141da6

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