A universal system for discovering, translating, and managing AI agent capabilities
Project description
Universal Agent Context System (UACS)
Context Management Infrastructure for AI Agents
TL;DR: Universal context middleware for AI agents. One source of truth โ 5+ formats. Perfect recall with smart deduplication (15% savings). Package management for skills + MCP. Works with Claude, Cursor, Windsurf, Cline, or your own Python code.
Why UACS?
Building AI agent systems today means juggling multiple formats, wasting tokens, and losing context between sessions. UACS solves this.
In 30 seconds:
- ๐ Write once โ Deploy to Claude, Cursor, Cline, Gemini, Copilot
- ๐๏ธ Never lose context with automatic deduplication (15% immediate savings)
- ๐ก๏ธ NEW: Proactive compaction prevention for Claude Code (95%+ success rate)
- ๐ค NEW: Local LLM tagging via transformers (zero API cost, better quality)
- ๐ NEW: LangSmith-style trace visualization (debug any session)
- ๐ฆ Package management for skills + MCP servers (GitHub, Git, local)
- ๐ง Persistent memory across sessions (project + global)
- โก Python API + CLI + MCP server = works everywhere
What makes UACS different: It's middleware, not another agent tool. Claude Desktop gets better when you add UACS. So does Cursor. So does your custom Python agent.
Installation
Choose the installation method that best fits your workflow:
| Method | Best For | Prerequisite |
|---|---|---|
| Python (pip) | Developers integrating UACS into Python projects | Python 3.11+ |
| uvx | Quick, temporary usage without installing dependencies | uv installed |
| Binary | Standalone usage, no Python environment needed | None |
| Docker | Server deployments, team environments | Docker |
Quick Start (Python)
# Option 1: From source (Current - Week 1)
git clone https://github.com/kylebrodeur/universal-agent-context
cd universal-agent-context
uv sync # Or: pip install -e .
# Option 2: PyPI (Coming Week 3)
pip install universal-agent-context
# Option 3: One-liner (Coming Week 2)
uvx universal-agent-context serve
# Initialize project
uv run uacs context init # Creates .state/context/ directory
uv run uacs memory init # Creates .state/memory/ directory
# Optional: For local LLM tagging (better topic extraction)
pip install transformers torch # ~2GB download on first use
Claude Code Plugin (NEW)
Proactive compaction prevention + real-time context storage:
# Install plugin
cp .claude-plugin/plugin-proactive.json ~/.claude/plugin.json
cp .claude-plugin/hooks/*.py ~/.claude/hooks/
chmod +x ~/.claude/hooks/*.py
# Optional: Install transformers for better topic extraction
pip install transformers torch
Features:
- ๐ก๏ธ Compaction Prevention: Monitors context, compresses at 50% (before Claude's 75% threshold) - 95%+ success
- ๐ค Local LLM Tagging: Uses TinyLlama (1.1B) for topic extraction - zero API cost
- ๐พ Crash-Resistant: Real-time storage via PostToolUse hook
- ๐ Auto-Context: Injects previous context on session resume
See: Quick Start Guide | Plugin Evolution | Compaction Prevention Strategy
CLI Demo
See UACS in action:
# Install packages from GitHub
$ uacs packages install anthropic/skills-testing
๐ฆ Installing package 'anthropic/skills-testing'...
โ
Cloning from GitHub...
โ
Validating package structure...
โ
Installed to .agent/skills/testing/
# List installed packages
$ uacs packages list
๐ Installed Packages (5):
Skills:
โ code-review - Review code for security and best practices
Source: github.com/anthropic/skills
โ documentation - Generate comprehensive docs
Source: github.com/anthropic/skills
โ testing - Create unit, integration, and e2e tests
Source: github.com/anthropic/skills
MCP Servers:
โ filesystem - File operations via MCP
Source: github.com/anthropic/mcp-servers
# Check context stats
$ uacs context stats
๐ Context Statistics:
Total entries: 127
Original tokens: 45,234
After deduplication: 38,449 (15% reduction)
Token savings: 6,785
Optimization breakdown:
- Deduplication: 6,785 tokens (15%)
- Quality filtering: Enabled
- Topic indexing: 12 topics identified
๐ฐ Cost Savings (at $0.01/1K tokens):
Without deduplication: $0.45/call
With deduplication: $0.38/call
Savings: $0.07/call (15%)
# Convert between formats
$ uacs skills convert --to cursorrules
โ
Converted SKILLS.md โ .cursorrules
Skills: 5
Output: .cursorrules (3,456 tokens)
Format validated: โ
# Memory operations
$ uacs memory search "testing"
๐ Searching memories for "testing"...
๐ Found 3 relevant memories:
1. [Score: 0.92] Always use pytest-asyncio for async tests
Added: 2024-12-15, Tags: testing, pytest
2. [Score: 0.87] Integration tests run in Docker containers
Added: 2024-12-20, Tags: testing, docker
3. [Score: 0.81] E2E tests use Playwright with page fixtures
Added: 2024-12-18, Tags: testing, e2e
What this shows:
- ๐ฆ Easy package installation - From GitHub, Git, or local paths
- ๐ Real-time compression stats - See exactly what you're saving
- ๐ Format conversion - One command, any format
- ๐ง Memory recall - Find relevant context instantly
Trace Visualization (NEW)
LangSmith-style visualization for debugging Claude Code sessions:
# Start visualization server
python examples/quickstart/visualization_demo.py
# Open browser
open http://localhost:8081
Features:
- ๐ Session List - View all Claude Code sessions with stats
- ๐ Session Detail - Full trace timeline with every event (prompts, tool uses, compressions)
- ๐ Token Dashboard - Real-time token usage, compression savings, trends
- ๐ท๏ธ Topic Explorer - Topic clusters with session links
- ๐ Search & Filter - Find anything across all sessions by topic/keyword
- ๐ค Export - Export session traces as JSON for analysis
See: Trace Visualization Design | Implementation Status
The Problem
Building with AI agents today means:
- ๐ซ Context switching - Maintaining separate configs for Claude, Gemini, Copilot (SKILLS.md, .cursorrules, .clinerules, AGENTS.md)
- ๐ซ Copy-paste errors - Manually syncing instructions across formats
- ๐ซ Token waste - Large contexts cost money, no intelligent compression
- ๐ซ Tool isolation - Each agent tool manages skills/context separately
- ๐ซ Memory fragmentation - Context lost between agent sessions
The Solution
UACS provides three integration points:
- Python Library - Direct use by developers building agent applications
- CLI Tool -
uacscommands for local development and scripting - MCP Server - Expose UACS capabilities to Claude Desktop, Cursor, Windsurf, Cline
The Result:
Your existing tools get package management, format conversion, perfect recall with deduplication, and persistent memory - without changing how you work.
Use Cases
1. Multi-Tool Development
Scenario: You build agents for both Claude Desktop and Cursor IDE.
Before UACS:
.cursorrules (Cursor config)
SKILLS.md (Claude config)
.clinerules (Cline config)
# Manual sync, 3x maintenance
With UACS:
# Write once in SKILLS.md
uacs skills convert --to cursorrules # Auto-generate .cursorrules
uacs skills convert --to clinerules # Auto-generate .clinerules
# One source, zero sync errors
2. Token Cost Optimization
Scenario: Your agent uses 10,000 tokens per call at $0.01/1K tokens.
Before UACS:
- Cost per call: $0.10
- 100 calls/day: $10/day = $300/month
With UACS (v0.1.0):
context = uacs.get_compressed_context(max_tokens=8500) # Smart retrieval + deduplication
# 15% deduplication savings + perfect recall
# Cost per call: $0.085
# 100 calls/day: $8.50/day = $255/month
# Savings: $45/month (15%)
# Plus: 2 hours/week saved (no re-explaining after context resets)
3. Package Management
Scenario: You need testing capabilities for your agent.
Before UACS:
# Search GitHub manually
# Clone repos
# Copy-paste configs
# Update manually when changes occur
With UACS:
uacs packages install anthropic/skills-testing
# Installed in .agent/skills/ with metadata tracking
# Works with GitHub repos, Git URLs, or local paths
4. Persistent Agent Memory
Scenario: Your agent should remember project conventions across sessions.
With UACS:
# Session 1: Agent learns convention
uacs.memory.add("Use pytest-asyncio for async tests", scope="project")
# Session 2: Different agent, same project
relevant = uacs.memory.search("testing")
# Returns: "Use pytest-asyncio for async tests"
# Zero manual context management
What Makes UACS Different
- ๐ Format Translation - Converts between 5+ formats (SKILLS.md, AGENTS.md, .cursorrules, .clinerules, ADK Config)
- ๐๏ธ Smart Deduplication - Automatic removal of duplicate content (15% immediate savings, 70% compression coming in v0.2.0)
- ๐ฆ Package Management - Install skills + MCP servers from GitHub, Git, or local paths
- ๐ฏ Topic-Based Retrieval - Auto-tagging and focused context
- ๐ง Memory System - Long-term memory with project and global scopes
- ๐ Standalone Library - Python API, not just CLI
vs Similar Tools:
| Feature | UACS | openskills | ai-agent-skills |
|---|---|---|---|
| Format Translation | โ 5+ formats | โ Skills only | โ Skills only |
| Context Management | โ 15% dedup + perfect recall | โ None | โ None |
| Package Management | โ Skills + MCP | โ ๏ธ Limited | โ ๏ธ Limited |
| Memory System | โ Project + Global | โ None | โ None |
| MCP Server | โ Full integration | โ None | โ None |
| Python API | โ Complete | โ ๏ธ Limited | โ ๏ธ Limited |
| Token Tracking | โ Real-time stats | โ None | โ None |
Bottom line: UACS is the only solution that provides format translation, compression, package management, memory, AND MCP server in one package.
See LAUNCH_STRATEGY.md for full positioning.
Quick Start
Goal: Get context compression working in 2 minutes.
Installation
Choose the installation method that best fits your workflow:
| Method | Best For | Prerequisite |
|---|---|---|
| Python (pip) | Developers integrating UACS into Python projects | Python 3.11+ |
| uvx | Quick, temporary usage without installing dependencies | uv installed |
| Binary | Standalone usage, no Python environment needed | None |
| Docker | Server deployments, team environments | Docker |
Quick Start (Python)
# Option 1: From source (Current - Week 1)
git clone https://github.com/kylebrodeur/universal-agent-context
cd universal-agent-context
uv sync # Or: pip install -e .
# Option 2: PyPI (Coming Week 3)
pip install universal-agent-context
# Option 3: One-liner (Coming Week 2)
uvx universal-agent-context serve
# Initialize project
uv run uacs context init # Creates .state/context/ directory
uv run uacs memory init # Creates .state/memory/ directory
5-Minute Tutorial
Step 1: Test the CLI (30 seconds)
uv run uacs --help
# Output: Shows 5 command groups: context, skills, packages, memory, mcp
Step 2: Install a Package (1 minute)
uv run uacs packages install anthropic/skills-testing
# Output: Clones from GitHub, validates, and installs
# Works with GitHub repos, Git URLs, or local paths
Step 3: Python API - Context Compression (2 minutes)
Create test_uacs.py:
from uacs import UACS
from pathlib import Path
# Initialize
uacs = UACS(project_path=Path.cwd())
# Add context entries (simulating agent conversation)
uacs.shared_context.add_entry(
content="Review authentication for security issues",
agent="user"
)
uacs.shared_context.add_entry(
content="Found timing attack in password comparison",
agent="claude",
topics=["security"]
)
# Get compressed context
context = uacs.get_compressed_context(
topic="security", # Filter by topic
max_tokens=1000 # Token budget
)
# Check compression stats
stats = uacs.get_token_stats()
print(f"Compression: {stats['compression_ratio']}")
print(f"Tokens saved: {stats['tokens_saved_by_compression']}")
Run it:
uv run python test_uacs.py
# Output: Shows compression ratio and tokens saved
Step 4: Memory System (1 minute)
# Add persistent memory
uv run uacs memory add "Always use pytest-asyncio for async tests"
# Search later
uv run uacs memory search "testing"
# Output: Returns relevant memories with scores
What you just did:
- โ Installed UACS
- โ Installed a package from GitHub
- โ Compressed context with Python API
- โ Added persistent memory
Next steps: MCP Server Setup | Full Library Guide
Three Ways to Use UACS
1. Python Library
from uacs import UACS
from pathlib import Path
# Initialize
uacs = UACS(project_path=Path.cwd())
# Install packages
uacs.packages.install("anthropic/skills-testing") # From GitHub
uacs.packages.install("/path/to/local/skill") # From local path
# Get compressed context
context = uacs.get_compressed_context(
topic="testing",
max_tokens=4000 # Smart deduplication + topic filtering
)
# Memory management
uacs.memory.add("Important: Always use pytest-asyncio for async tests")
relevant = uacs.memory.search("async testing")
2. CLI Tool
# Package management
uacs packages install anthropic/skills-testing
uacs packages list
uacs packages remove pytest-skill
# Format conversion
uacs skills convert --from cursorrules --to skills
# Context management
uacs context stats
uacs context compress --max-tokens 4000
# Memory
uacs memory add "Important insight"
uacs memory search "relevant topic"
3. MCP Server (For Claude Desktop, Cursor, Windsurf)
# Start MCP server
uacs serve
# Or with uvx (one-liner)
uvx universal-agent-context serve
Configure in Claude Desktop:
// ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"uacs": {
"command": "uacs",
"args": ["serve"],
"env": {
"UACS_PROJECT_PATH": "/path/to/your/project"
}
}
}
}
Now Claude Desktop can:
- Manage packages from GitHub, Git, or local paths
- Convert between formats on-the-fly
- Compress large contexts automatically
- Access your project memory
- Install skills directly from conversation
Core Features
๐ Format Translation
The Problem: You write for Claude (SKILLS.md), but also need Cursor (.cursorrules) and Cline (.clinerules) configs.
The Solution: Write once, deploy everywhere.
# Convert .cursorrules to SKILLS.md
uv run uacs skills convert --from cursorrules --to skills
# Or in Python:
from uacs.adapters import FormatAdapterRegistry
adapter = FormatAdapterRegistry.get_adapter("cursorrules")
content = adapter.parse(Path(".cursorrules").read_text())
skills_format = content.to_system_prompt()
Supported Formats:
- โ Agent Skills (SKILLS.md) - Anthropic standard (spec)
- โ AGENTS.md - Project context standard (spec)
- โ .cursorrules - Cursor IDE format
- โ .clinerules - Cline VSCode extension
- ๐ง ADK Agent Config - Google ADK format (Coming Phase 7)
Quality validation included: All conversions verify structure, check for required fields, score quality.
๐๏ธ Context Compression
The Problem: Large contexts = high costs. A 10K token call costs $0.10. At scale, this adds up fast.
The Solution: Smart context management with perfect recall.
Current Implementation (v0.1.0):
- Deduplication - Hash-based, automatic (15% savings)
- Quality Filtering - Remove noise, keep signal
- Topic-Based Retrieval - Focus on relevant context
- Exact Storage - 100% fidelity, zero information loss
Coming in v0.2.0: 5. LLM Summarization - Claude Haiku for intelligent compression 6. Vector Embeddings - Semantic similarity search 7. Knowledge Graph - Context relationship traversal 8. Target: 70%+ compression with zero information loss
Real-world Impact (v0.1.0):
# Deduplication savings:
- Original context: 10,000 tokens
- After deduplication: 8,500 tokens (15% savings)
- Cost per call: $0.085 (vs $0.10)
- 100 calls/day: $8.50/day vs $10/day
- Monthly savings: $45 (15%)
# Plus time savings:
- Context never lost = no re-explaining
- Save ~2 hours/week for active developers
Usage:
# Automatic compression
context = uacs.get_compressed_context(
topic="security review", # Filter by topic
max_tokens=4000, # Target size
agent="claude" # Filter by agent (optional)
)
# Check what you saved
stats = uacs.get_token_stats()
print(f"Saved: {stats['tokens_saved_by_compression']} tokens")
print(f"Ratio: {stats['compression_ratio']}")
๐ฆ Package Management
The Problem: Skills scattered across GitHub. MCP servers in different repositories. Manual cloning and installation.
The Solution: Simple package manager modeled after GitHub CLI extensions.
# Install from GitHub
uv run uacs packages install anthropic/skills-testing
# Install from Git URL
uv run uacs packages install https://github.com/owner/repo.git
# Install from local path
uv run uacs packages install /path/to/skill
# List installed packages
uv run uacs packages list
# Update packages
uv run uacs packages update
Installation sources:
- โ
GitHub repositories (
owner/repo) - โ Git URLs (HTTPS or SSH)
- โ Local paths (absolute or relative)
Installation tracking:
# Install package
uv run uacs packages install anthropic/skills-testing
# Stored in: .agent/skills/testing/
# Metadata: .agent/skills/.installed.json (tracks source, version, installed date)
# Uninstall
uv run uacs packages remove testing
๐ง Memory System
The Problem: Agents forget project conventions between sessions. You repeat instructions constantly.
The Solution: Persistent memory with project and global scopes.
# Initialize
uv run uacs memory init
# Add project-specific memory
uv run uacs memory add "Use pytest-asyncio for async tests" --scope project
# Add global memory (all projects)
uv run uacs memory add "Prefer composition over inheritance" --scope global
# Search with semantic similarity
uv run uacs memory search "testing patterns"
# Returns: Relevant memories with similarity scores
# Python API
from uacs import UACS
uacs = UACS()
# Add memory programmatically
uacs.memory.add(
"Critical: Always validate input before processing",
scope="project",
tags=["security", "validation"]
)
# Search by topic
results = uacs.memory.search("security", scope="project")
for memory in results:
print(f"{memory.content} (score: {memory.score})")
Storage:
- Project scope:
.state/memory/project/ - Global scope:
~/.config/uacs/memory/global/ - Format: JSON with metadata (timestamp, tags, usage count)
What's Next?
We're executing an 8-week public launch plan:
โ Phase 0 (Dec 25-26): Spinout Complete
- Repository created, tests passing independently
- Clean separation from Multi-Agent CLI (MAOS)
๐ Phase 1 (Week 1 - Current): Polish & Documentation
- README improvements (you are here!)
- Installation guides
- API documentation
- Example gallery
๐ฆ Phase 2 (Week 2): MCP Server Packaging
- PyInstaller binaries for easy distribution
- Docker image for
uacs serve - Cross-platform testing (macOS, Linux, Windows)
๐ Phase 3 (Week 3): PyPI Publishing
pip install universal-agent-context- Version 0.1.0 release
- Package on conda-forge
๐ฃ Phase 4 (Week 4): Public Launch
- Show HN / Reddit launches
- Documentation site live
- Community Discord server
Future Roadmap:
- Phase 5-6: Advanced features (streaming, webhooks, A2A protocol)
- Phase 7-8: Enterprise features (auth, analytics, multi-tenancy)
See DEVELOPMENT_ROADMAP.md for complete timeline and LAUNCH_STRATEGY.md for marketing plan.
Documentation
Getting Started:
- ๐ Quick Start - 5-minute tutorial (above)
- ๐ฆ Installation - See Quick Start section
- ๐ฏ Use Cases - Real-world scenarios
Integrations: UACS works with popular MCP clients out of the box:
- ๐ค Claude Desktop - Complete setup guide with binary + Docker
- โ๏ธ Cursor - Integration with inline chat and Composer
- ๐ Windsurf - Cascade AI integration guide
- ๐ All Integrations - Overview, troubleshooting, and advanced configs
User Guides:
- Library Guide - Complete Python API reference
- CLI Reference - All command documentation
- MCP Server Setup - MCP integration for Claude/Cursor/Windsurf
Technical Deep Dives:
- Adapters - Format translation architecture
- Context Management - Compression algorithms
- Package Management - Installation and management system
Examples: All examples are in examples/ and tested:
- basic_context.py - Context system basics
- package_management.py - Install and manage packages
- memory_usage.py - Persistent memory
- custom_adapter.py - Build custom format adapters
- mcp_tool_usage.py - Programmatic MCP access
Development:
- Development Roadmap - Development status & timeline
- Launch Strategy - Marketing & positioning
- Contributing - How to contribute (coming Week 1)
Requirements
- Python: 3.11 or higher
- Optional: Node.js (for MCP filesystem server)
- Optional: Docker (for containerized MCP deployment)
Installation via uv (recommended):
# Install uv if you don't have it
curl -LsSf https://astral.sh/uv/install.sh | sh
# Clone and install UACS
git clone https://github.com/kylebrodeur/universal-agent-context
cd universal-agent-context
uv sync
Development
Setup:
# Clone repository
git clone https://github.com/kylebrodeur/universal-agent-context.git
cd universal-agent-context
# Install with dev dependencies
uv sync # Or: pip install -e ".[dev]"
# Run tests
uv run pytest # All tests
uv run pytest -n auto # Parallel (faster)
uv run pytest --cov=src # With coverage
# Code quality
uv run ruff format . # Format code
uv run ruff check --fix . # Lint and fix
Contributing: We welcome contributions! See CONTRIBUTING.md (coming Week 1) for guidelines.
Project Status: Phase 1 - Polish & Documentation (Week 1 of 8-week launch)
Related Projects
Multi-Agent CLI (MAOS)
- Repository: github.com/kylebrodeur/multi-agent-cli
- Relationship: MAOS imports UACS for context management
- Focus: Multi-agent orchestration using Google ADK
- Use case: Build systems with multiple AI agents (Gemini, Claude, Copilot) working together
Architecture:
MAOS (Multi-Agent Orchestration)
โโโ imports universal-agent-context
โโโ provides context, skills, packages, memory
License
MIT License - see LICENSE for details
Acknowledgments
- Anthropic - Agent Skills specification (docs) and MCP protocol
- Google - Agent Development Kit (ADK)
- OpenAI - AGENTS.md standard
- Community - Skills contributors at agentskills.io and Smithery
Status: โ
Phase 0 Complete โ ๐ Phase 1 In Progress (Week 1/8)
Version: 0.1.0-dev | Last Updated: December 27, 2025
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
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 universal_agent_context-0.2.0.tar.gz.
File metadata
- Download URL: universal_agent_context-0.2.0.tar.gz
- Upload date:
- Size: 492.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.30
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c086724bc7fd84d43ffa03097c4ecb2f2d87d2556579f62f3ca3702b955fb8ef
|
|
| MD5 |
17c519a87be0cb86b462378b11b6822a
|
|
| BLAKE2b-256 |
cbf4eac82cd08f11323fe2351e9aa450d4f4c3a7c9877b866434f4a975300913
|
File details
Details for the file universal_agent_context-0.2.0-py3-none-any.whl.
File metadata
- Download URL: universal_agent_context-0.2.0-py3-none-any.whl
- Upload date:
- Size: 88.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.30
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
497d8d53a2bed6a32da86e6228982fa946a94f8ee822cb1969fb2a2960292498
|
|
| MD5 |
0caa32006863588a16e67c9802018384
|
|
| BLAKE2b-256 |
5326353bb9c88af33425ca2c1ecb30e4d96dfbb3879d515e923573d3c7412af8
|