AGPL-v3 Licensed · Rust 2024

The Universal AI Agent Framework

One agent. Every model. Every channel.
Built in Rust for reliability that compounds.

ugent
$ ugent
Connected: OpenAI (gpt-5.5), Anthropic (claude-opus-4.8), Google (gemini-3.5)
Channels: Telegram, Slack, Discord, LINE, WeChat, Email
Context engine: indexing 847 files (42% cached)
Orchestrator: 3 workers ready (planner, coder, reviewer)
Swarm: node "userver" online, 0 peers
Runtime: 8 workers, HTTP/2 enabled, pool=16/host
Ready. What are we building?
+ 3 more lines
30+ crates 13 channels 6+ LLM providers 6 LSP languages P2P swarm tuned runtime
Features

Built different. Built to last.

Every pillar engineered to make UGENT the most capable agent framework available.

Core

One Agent. Every Model.

OpenAI. Anthropic. Google. DeepSeek. DashScope. Azure AI. AWS Bedrock. Ollama. OpenRouter. Any OpenAI-compatible endpoint.

Configure each as a named instance with its own model, temperature, and transport policy. Unified reasoning across providers, automatic prompt caching, transparent failover. Images, audio, video, documents — multimodal input gated by what each provider actually supports.

Routing to gpt-5.5 via openai (0.8s)
Routing to claude-opus-4.8 via anthropic (1.1s)
Routing to gemini-3.5 via google (0.6s)
Routing to deepseek-r2 via deepseek (0.9s)
Failover: openai → anthropic (cache hit)
Routing to qwen3.7-max via dashscope (0.7s)
Routing to llama-4 via azure (0.5s)
Routing to nova-premier via bedrock (1.0s)
Routing to gpt-5.5 via openai (0.8s)
Routing to claude-opus-4.8 via anthropic (1.1s)
Routing to gemini-3.5 via google (0.6s)
Routing to deepseek-r2 via deepseek (0.9s)
Failover: openai → anthropic (cache hit)
Routing to qwen3.7-max via dashscope (0.7s)
Routing to llama-4 via azure (0.5s)
Routing to nova-premier via bedrock (1.0s)
openai
anthropic
google
ollama
deepseek
dashscope
azure
bedrock
openrouter
+more
Plugins

Connected Everywhere

Telegram, Slack, Discord, LINE, WeChat, WeCom, Weixin, Email, DingTalk, WhatsApp, Salesforce, Web, Translation. Each channel runs as an isolated OS process. Crashes don’t cascade. State survives restarts.

Durable

Orchestrator v2

Master-worker DAG with crash recovery and idempotent replay. 8 worker roles. Quality gates with weighted scoring. Fallback chains (model upgrade, provider switch, prompt simplification). Shared memory across workers. Adaptive planning: mutate the task graph mid-run.

Intelligence

Code Intelligence

Semantic search + knowledge graph over your entire codebase. LSP diagnostics compressed to 960 tokens worst case. Multi-mode retrieval: lexical BM25, semantic embeddings, and graph traversal.

Savings

Prompt Caching

Cache breakpoints on stable system prefixes. Dynamic context inserted after the cache boundary — your cached tokens survive across turns. Provider-neutral telemetry tracks cache reads, writes, and hit rates. Token budget projection before each call.

Encrypted

Agents That Talk to Agents

Encrypted P2P between UGENT instances. mTLS with Ed25519. Biscuit token auth. Cedar policy engine. A2A 1.0 protocol. Zero-config mDNS discovery on LAN. Send context packages with budget enforcement and secret redaction.

mTLS Biscuit Cedar A2A 1.0 mDNS
node-a
node-b
Persistent

Hybrid Memory

Markdown logs + SQLite FTS5 for lexical recall. Optional semantic search via LLM embeddings + knowledge graph with deduplicated facts. Budget-aware injection caps memory to a fraction of your context window. Scheduled compaction summarizes old conversations into concise facts. Per-user memory isolation with federated identity for enterprise teams.

Security

Injection Firewall

Deterministic source-boundary firewall: untrusted text may provide evidence but must never grant authority. Three-phase defense strips ANSI/OSC terminal escape sequences, classifies text provenance via a taint lattice, and blocks injection patterns before they reach the LLM.

taint propagation MCP pinning memory quarantine egress gate skills firewall sandboxed execution
Routing

Intent Gate

Semantic classification blocks out-of-scope queries before they reach the LLM. Cosine-similarity scoring against domain-specific vector packs. Four-decision matrix: Allow, Uncertain, Reject, Route. Local ONNX or OpenAI embeddings.

vector packs standalone server zero LLM cost
Intelligence

Context Overflow Defense

Three-layer pipeline prevents oversized tool results from blowing past the context window. Pre-persist budget gate summarizes. Per-tool projection caps stale results. In-memory compression trims current-turn output over 20 KB.

auto-summarize projection caps last-mile compression
Automation

Scheduled Jobs

Recurring tasks on cron schedules. Execution isolation keeps cron streams separate from interactive chat. Run history with /cron review. Background compaction, memory extraction, and tool jobs run without blocking your conversation.

cron.toml scope isolation run history
Autonomous

Loop & Goal

Self-paced continuous iteration. UGENT runs repeated turns autonomously — no user prompt needed. Goal mode tracks success criteria and reports progress each cycle: in-progress, completed, or blocked. schedule_wakeup controls the delay between iterations.

self-paced goal tracking progress reporting
Orchestrate

Drives Claude Code & Codex

Resume, monitor, and auto-schedule external coding agents from inside UGENT. Use /claude or /codex to dispatch sessions with full control over permission modes, iteration limits, and auto-resume policies.

auto-resume session tracking rate limiting yolo / safe / inherit per-project config
Performance

Saturates Your Hardware. Runs Anywhere.

Multi-core tokio runtime with N worker threads (default = num_cpus). 153+ async tasks across cores, 41 spawn_blocking sites for CPU-bound work, 10 concurrent sub-agent slots. 8 parallel tool calls by default — conflict-aware (reads batch, writes serialize). Background shell jobs with push notification on completion. Auto-adopt on timeout — long-running work is never lost.

Runs on SSH, tmux, zellij, Herdr, Ghostty, Warp, Alacritty, iTerm2, WezTerm, Windows Terminal + WSL. OSC 52 clipboard over SSH. Crossterm + ratatui with proper raw mode lifecycle. Two-phase bootstrap reads config before tokio starts. HTTP/2 with ALPN, tunable connection pools.

Herdr integration: pane state reporting (idle / working / blocked / done), tool-level metadata, and toast notifications when the agent needs attention. Zero-cost when not running inside Herdr — safe to enable by default.

ugent.toml

[runtime] worker_threads = "auto" enable_http2 = true pool = 16/host

[agent] max_concurrent_tools = 8  # conflict-aware parallel execution

Architecture

Engineered in Layers

Three tiers. 30+ crates. Zero compromises on separation of concerns.

ugent-ui

TUI · CLI · REPL · Setup Hub · Cron Jobs · Worker Monitoring · Activity Panel

The surface
ugent-core

Agent Runtime · LLM Providers · Sessions · Memory · Tools · Orchestrator · Hooks · Routing · Intent Gate · Skills · Firewall · Security

The engine
ugent-plugin

13 Channels · Intent Gate · Translation · Herdr · Bridge · IPC · Process Supervisor · SDK Crates

How it talks
ugent-swarm

P2P Transport · mTLS · Biscuit Auth · Cedar Policy · A2A 1.0

Agents ↔ Agents
Rust 2024 SQLite axum rustls Biscuit Cedar LSP MCP A2A 1.0
Integrations

13 Channels. Zero Lock-in.

Each channel is a plugin. Enable what you need. Disable what you don’t.

Each channel runs in its own process. Crashes don’t cascade. State survives restarts.

Swarm

Agents Across Machines

Encrypted peer-to-peer communication. Cross-workspace, cross-server, cross-network.

WORKSPACE A LAN 192.168.1.0/24 U alpha U beta U gamma WORKSPACE B LAN 10.0.0.0/16 U delta U epsilon U zeta CLOUD NETWORK WAN / Public Internet U cloud-01 U cloud-02 A2A / mTLS

Identity

Ed25519 keys, self-signed CA, per-workspace isolation

Trust

TOFU model, fingerprint verify, token revocation

Discovery

mDNS zero-config, DNS SRV, static peers

Plugin SDK

Build a Channel in Minutes

Scaffold, implement, deploy. The plugin SDK handles lifecycle, IPC, and crash recovery.

Step 1

$ cargo install cargo-generate

$ cargo generate --git https://github.com/unizhu/ugent-plugin-template

# → project-name: channel-myapp

# → channel-name: My App

Step 2

# Implement the TODO sections: API connection, inbound,

# outbound delivery, and media handling.

$ cd channel-myapp && cargo build --release

# plugins.toml — register with UGENT

[[plugins]]

id = "myapp-main"

kind = "channel-myapp"

command = "./target/release/channel-myapp"

Step 3

$ ugent  # launch UGENT, plugin auto-registers

# → Plugin channel-myapp: connected

# → Messages flowing. Outbox armed. Heartbeat alive.