An AI-driven testing and prototyping tool for AI personal assistants. UES provides a simple web-based UI and comprehensive REST API for simulating a variety of input modalities, enabling customizable and reproducible testing of AI agent capabilities.
- Multi-Modal Simulation: Email, SMS, Calendar, Chat, Location, Weather, and more
- REST API: 95 endpoints for complete control over simulation state
- API Access Control: Key-based authentication with fine-grained permissions
- Real-time Updates: WebSocket and Webhook support for event notifications
- Python Client Library: Sync and async support for easy integration
- Web UI: Modern React-based interface for interactive scenario design
- Scenario Management: Save, export, and replay test scenarios
- Time Control: Manual, event-driven, or auto-advance simulation modes
- Agent Testing Harness: Evaluate AI agent performance with customizable criteria
- Multi-Agent Coordination: Hold system for synchronizing concurrent agents
# Using pip
pip install ues
# Using uv (recommended)
uv add ues# Using the CLI
ues server
# With auto-reload for development
ues server --reload
# Or directly with uvicorn
uvicorn main:app --reloadThe API is now available at:
- API Server: http://localhost:8000
- Interactive Docs: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
Note: When the server starts, an admin API key is printed to the console. Save this key for authentication.
from ues.client import UESClient
# Connect to the server with your API key
client = UESClient("http://localhost:8000", api_key="ues_your_key_here...")
# Get current simulation time
time_state = client.time.get_state()
print(f"Simulator time: {time_state.current_time}")
# Simulate receiving an email
client.email.receive(
from_addr="[email protected]",
to_addr="[email protected]",
subject="Meeting Tomorrow",
body="Don't forget our 9am meeting!"
)
# Check email state
email_state = client.email.get_state()
print(f"Inbox has {len(email_state.inbox)} emails")
# Advance time by 1 hour
client.time.advance(hours=1)- Python 3.12+
- uv (recommended) or pip
- Node.js 18+ (for Web UI)
# Clone the repository
git clone https://github.com/JBoggsy/ues.git
cd ues
# Install Python dependencies
uv sync
# Install Web UI dependencies
cd webapp && npm install# Terminal 1: Start API server with auto-reload
uv run ues server --reload
# Terminal 2: Start Web UI
cd webapp && npm run devAccess:
- API: http://localhost:8000/docs
- Web UI: http://localhost:5173
# Run all tests
uv run pytest
# Run specific test file
uv run pytest tests/api/modalities/test_email_routes.py -v
# Run with coverage
uv run pytest --cov=api --cov=models| Document | Description |
|---|---|
| Documentation Index | Full documentation table of contents |
| REST API Reference | Complete API endpoint documentation |
| Authentication | API key authentication and permissions |
| Modality Routes | Modality-specific endpoint patterns |
| Python Client | Client library usage guide |
| Agent Integration | Integrating AI agents with UES |
| Agent Testing | Testing harness for evaluating AI agents |
| Scenarios | Saving and loading test scenarios |
| WebSocket | Real-time event notifications |
| Webhooks | HTTP callback notifications |
| Modality | Status | Description |
|---|---|---|
| โ Complete | Inbox, folders, threads, labels (19 operations) | |
| SMS/RCS | โ Complete | Text messaging with reactions (13 actions) |
| Calendar | โ Complete | Events, recurrence, invitations |
| Chat | โ Complete | Conversational interface |
| Location | โ Complete | GPS coordinates, named places |
| Weather | โ Complete | Conditions, temperature, forecasts |
| Contacts | ๐ Planned | Contact database |
| File System | ๐ Planned | Directory tree, file operations |
| Discord/Slack | ๐ Planned | Messaging platforms |
| Social Media | ๐ Planned | Posts, feeds, interactions |
UES uses an event-sourcing architecture where simulation state progresses through discrete events:
src/ues/ # Main Python package
โโโ models/ # Data models (events, modalities, etc.)
โโโ api/ # FastAPI REST endpoints
โโโ client/ # Python client library
โโโ agent_testing/ # Testing harness for AI agents
tests/ # Pytest test suite
webapp/ # React + TypeScript web UI
docs/ # Documentation
examples/ # Example agents and scenarios
SimulationEngine (Orchestrator)
โโโ Environment (Current state)
โ โโโ SimulatorTime (Virtual time tracking)
โ โโโ ModalityStates (Email, Location, Calendar, etc.)
โโโ EventQueue (Scheduled events)
โโโ SimulationLoop (Auto-advance threading)
- Manual Mode: Time advances only via explicit API calls
- Event-Driven Mode: Time skips directly to next scheduled event
- Auto-Advance Mode: Real-time or accelerated time progression
See docs/models/SIMULATION_ENGINE.md for detailed architecture documentation.
All API endpoints require an API key via the X-API-Key header:
curl -H "X-API-Key: ues_your_key_here..." http://localhost:8000/simulation/statusAn admin key with full permissions is generated at server startup. See Authentication docs for key management and permissions.
GET /simulator/time # Get current time state
POST /simulator/time/advance # Advance time by duration
POST /simulator/time/set # Jump to specific time
POST /simulator/time/pause # Freeze time
POST /simulator/time/resume # Resume time
GET /events # List events with filters
POST /events # Schedule new event
POST /events/immediate # Execute event immediately
GET /{modality}/state # Get current state
POST /{modality}/query # Query with filters
POST /{modality}/* # Modality-specific actions
Full API documentation: http://localhost:8000/docs (when server is running)
UES is designed as an agent-interactable simulation platform:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ UES Core (Pure Simulation) โ
โ โข Deterministic scenario execution โ
โ โข State management & event scheduling โ
โ โข REST API + WebSocket โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโ
โ โ โ
Simulator-Side User-Side Agent Developer
Agent (external) (being tested) (Web UI)
โ โ โ
โโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโ
All use the same REST API
Use Cases:
- Reactive Agents: Monitor for sent emails, generate replies
- Content Generation: Use LLMs to create realistic test data
- Trigger-based Events: Watch for conditions and schedule events
- Character Simulation: Maintain personalities that respond consistently
The examples/agents/ directory contains complete, runnable agent implementations:
| Example | Description |
|---|---|
| simple_email_summary | Basic email summarization agent |
| email_reply_generator | Generates contextual email replies |
| calendar_conflict_resolver | Resolves scheduling conflicts |
| sms_group_chat | Multi-character SMS conversation simulator |
| party_planner | Full integration example with testing harness |
Evaluate AI agent performance with the built-in testing framework:
from ues.agent_testing import EvalRunner
runner = EvalRunner(
scenario_path="./scenario.ues-scenario.json",
criteria_path="./test_criteria.json",
)
report = await runner.run()
runner.print_report() # Terminal scoreboard with gradesSee docs/agent-testing/AGENT_TESTING.md for complete documentation.
We welcome contributions! See CONTRIBUTING.md for guidelines.
- Fork the repository
- Create a feature branch (`git checkout -b feature/amazing-feature`)
- Make your changes with tests
- Commit (`git commit -m 'Add amazing feature'`)
- Push (`git push origin feature/amazing-feature`)
- Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.