Table of Contents
- What is Regent?
- Core principles
- Available crate features
- Usage
- Attribute Categories
- Use Cases
- Task Distribution
- Contributing
- License
What is Regent?
A multi-paradigm configuration management system as a library.
Regent SDK provides an engine for declarative configuration management, allowing you to define expected system states and automatically assess or remedy compliance. Because it's an engine, you embed it in your own solution — an all-in-one CLI tool, a distributed system with control nodes and workers, a monitoring system feeding a web interface, or an agent fetching remote configuration — whatever suits you !
Core principles
Regent is built around three key concepts:
- Expected State: The desired configuration of your system, defined via
ExpectedState - Attributes: Building blocks that describe that state (see
attributemodule) - Compliance: Whether a host matches its expected state, with methods to assess or enforce it
On top of these concepts, Regent is developped with the following goals in mind :
- Declarative State Management: Describe the expected state of a host using
ExpectedStateandAttribute. Regent is not a scripting tool. - Idempotency when possible: All operations are designed to be idempotent, meaning a strong focus on the initial assessment of the host's state. However some operations can't be idempotent by nature (a shell command).
- Multi-Protocol Host Connection: Regent can connect to hosts using SSH2 or direct access (localhost) so nothing new for now but we abstracted away the connection protocol and we intend to add more protocols and ways to connect to hosts (like this cool project)
- Secret Management: For secrets, we rely on modern specialized platforms instead. Regent has the
SecretProviderabstraction for this. - Task Distribution: Workload can be sent through the wire (serialized/deserialized) using the
RegentTasktype. Build a RegentTask, send it to someone else to be executed then get back the outcome. Lots of possibilities here ! - Templating Support: Variable substitution using Tera templates
Available crate features
Enable the following Cargo features for additional capabilities: cargo add regent-sdk -F <feature>
aws-secretsmanager: dynamically retrieve secrets from AWS Secrets Managergcp-secretmanager: dynamically retrieve secrets from Google Cloud Secret Managerwindows: Enable Windows support (not every attribute will be compatible, see Usage)
Usage
YAML API
Define your infrastructure declaratively with YAML:
async
Rust API
Build your infrastructure programmatically:
async
Attribute Categories
Available attribute modules for defining expected state:
system: System resources (services, users, groups, cron, hostname)package: Package management (apt, yum/dnf, pacman, repositories)network: Network configuration (iptables)shell: Shell commandsutilities: Utilities (line in file, debug, ping)ai: AI integration (Ollama)
Use Cases
Regent integrates seamlessly with the Rust ecosystem:
- CLI Tools - Wrap with clap for configuration management commands
- Massive Scale - Use tokio to handle thousands of hosts concurrently
- Distributed Systems - Serialize tasks, send via HTTP/gRPC/RabbitMQ, execute on worker nodes
- Observability - Run compliance checks in axum health endpoints
- Monitoring Integration - Plug into Centreon, Nagios, Zabbix for regular health checks
Contributing
We welcome contributions! The project needs help with:
- New Secret Providers: Hashicorp Vault, Delinea SecretServer, Azure Key Vault, or any other secure backend
- New Attributes: Expand coverage for network management (nftables, firewalld), additional package managers, container orchestration, or cloud resource management
- Documentation: Tutorials, real-world examples, and deeper API documentation
- Testing: More comprehensive test coverage, especially for edge cases and multi-host scenarios
- Performance: Benchmarks, optimizations for large-scale deployments
Join the conversation Regent Discord
License
Regent is licensed under the Apache License, Version 2.0.