Introduction
Uni — Essential Scala Utilities, refined for Scala 3 with minimal dependencies.
Uni provides small, reusable building blocks that complement the Scala standard library. It consolidates foundational utilities from the wvlet/airframe project into a single, cohesive library.
What is Uni?
Uni provides:
- Design - Object wiring with lifecycle management
- Logging - Structured logging with source code location tracking
- Serialization - JSON parsing/generation and MessagePack binary format
- HTTP Client - Cross-platform client with retry and streaming support
- Reactive Streams - Rx-based operators for async data flows
- Control Flow - Retry logic, circuit breakers, and resource management
- CLI Utilities - Terminal styling, progress bars, and command launching
- Type Introspection - Compile-time reflection with Surface
Design Philosophy
uni follows these principles:
- Minimal Dependencies - Core functionality without heavy external dependencies
- Cross-Platform - Works on JVM, Scala.js, and Scala Native
- Scala 3 First - Modern Scala 3 syntax and features
- Composable - Small, focused utilities that combine well
- Production Ready - Battle-tested code from the Airframe ecosystem
Module Structure
uni — Core Utilities
| Module | Description |
|---|---|
| Design | Object wiring with lifecycle management |
| Logging | Structured logging with source code location tracking |
| JSON | JSON parsing and generation |
| MessagePack | Binary serialization format |
| Surface | Compile-time type introspection |
| HTTP | HTTP client with retry and streaming support |
| Rx | Reactive streams and async data flows |
| Control | Retry logic, circuit breakers, and caching |
| CLI | Terminal styling, progress bars, and command launching |
uni-agent — LLM Agent Framework
| Module | Description |
|---|---|
| LLM Agent | Core agent abstraction for AI workflows |
| Chat Sessions | Conversation state management |
| Tool Integration | Function calling and external tools |
| AWS Bedrock | Bedrock chat model integration |
Next Steps
- Installation - Add uni to your project
- Design Principles - Learn about the architecture
- Core Utilities - Explore the foundational APIs
