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
- MCP Protocol Support: Native Model Context Protocol server for AI-native access
- 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
- Installation Guide
- Quick Start Guide
- MCP Integration
- Backend Comparison
- Backend Recommendations
- State Schema Reference
- Architecture Overview
Examples
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file uass-0.2.0.tar.gz.
File metadata
- Download URL: uass-0.2.0.tar.gz
- Upload date:
- Size: 22.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c58e43824f8b797cea49cd317f0122937a7710ff1750d553c3abd9f1b3155291
|
|
| MD5 |
3be25eca4a875f794c319bdebc73d08b
|
|
| BLAKE2b-256 |
42196000c64fe4bcc2d295c868d5e859a9db5c5956dbb79732ba6b03cc12fbc5
|
File details
Details for the file uass-0.2.0-py3-none-any.whl.
File metadata
- Download URL: uass-0.2.0-py3-none-any.whl
- Upload date:
- Size: 29.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
244c6358790b7dde4481684c80c3f405807b441ae30c43a0ce48017699773ec2
|
|
| MD5 |
71b6138023b21fdb88605d64a37cd12d
|
|
| BLAKE2b-256 |
b243732ad3d282846708a277f733c58be511365f25870e94deff9d1bf781da56
|