Authorize actions. Request approval. Record the outcome.
Deterministic authorization to integrate before your agent executes a sensitive action.
Quick start · Demo · How it works · Screenshots · Integrations · Documentation
Actual console with demo data. Click the screenshots for a closer look.
Your agent proposes an action; DeleGuard evaluates policies and returns ALLOW, DENY, or REQUIRE_APPROVAL. The AI model stays outside the authorization decision.
| Capability | What you can do |
|---|---|
| Business policies | Define YAML rules for the agent, resource, and context; test them and publish versions. |
| Human approvals | Review a sensitive operation and grant time-limited approval or deny it. |
| Permits and evidence | Consume a permit once and associate the reported outcome with its execution. |
| Console and audit trail | Inspect decisions, approvals, and outcomes within each organization. |
Includes an HTTP API, remote Guard MCP, .NET/Python/TypeScript clients, and an optional AI Gateway. You do not need an AI provider key to try the platform.
The verified setup runs PostgreSQL and Redis in Docker, with the API and worker running locally using .NET.
| Requirement | Version or condition |
|---|---|
| .NET SDK | 10 |
| Docker + Compose | Linux containers and Compose v2 |
| Git | To clone the repository |
| Terminal | Examples use PowerShell 7; Bash environment variables are shown below |
git clone https://github.com/juliansprt/DeleGuard.git
cd DeleGuard
docker compose -f deploy/docker-compose.yml up -d --wait postgres redisPostgreSQL uses localhost:5432 and Redis uses localhost:6379. PostgreSQL data persists in a volume; Redis is optional for decision correctness.
From the repository root, in your first terminal:
$env:ASPNETCORE_ENVIRONMENT = "Development"
$env:DOTNET_ENVIRONMENT = "Development"
dotnet run --project src/Deleguard.Api --no-launch-profile --urls http://127.0.0.1:5080In Development, the API applies migrations and seeds the demo organization, agent, and policies. Wait for it to announce that it is listening on port 5080.
From the same repository root, in another terminal:
$env:ASPNETCORE_ENVIRONMENT = "Development"
$env:DOTNET_ENVIRONMENT = "Development"
dotnet run --project src/Deleguard.Workers --no-launch-profileKeep both processes running. The worker processes the outbox, webhook deliveries, and approval expiration.
Using Bash on Linux or macOS?
Replace the environment assignments in each terminal with these two lines, then run the same dotnet run command from the corresponding step:
export ASPNETCORE_ENVIRONMENT=Development
export DOTNET_ENVIRONMENT=Development--no-launch-profile does not load variables from launchSettings.json; set Development explicitly.
In a third terminal, check the connection:
Invoke-RestMethod http://127.0.0.1:5080/healthThe response should be Healthy. Open http://127.0.0.1:5080/login:
| Password | |
|---|---|
admin@demo.local |
DeleguardDemo!23 |
Note
These public credentials are only for the local demo. The quick start uses local login and does not require Keycloak. The full Compose stack needs adjustments before startup: see the development guide.
The first integration protects invoice.cancel. With the API running and Python 3 installed, run this from the repository root:
$env:DELEGUARD_URL = "http://127.0.0.1:5080"
python examples/python/authorize_demo.pyNo external packages are required. In Bash, use export DELEGUARD_URL=http://127.0.0.1:5080 and python3 examples/python/authorize_demo.py.
| Scenario | Decision |
|---|---|
| Draft invoice for COP 5,000,000, not reported to the tax authority | 🟢 ALLOW |
| Issued invoice for COP 35,000,000, not reported to the tax authority | 🟡 REQUIRE_APPROVAL |
| Invoice reported to the tax authority | 🔴 DENY |
The example evaluates the invoice policy and creates the pending approval; it does not cancel invoices. Open Approvals to inspect and resolve it with the demo administrator. The policy requests billing-manager; the organization administrator can also resolve it.
flowchart LR
Agent[Agent] --> PDP["POST /v1/authorize"]
PDP -->|ALLOW| Permit[Consume permit]
PDP -->|REQUIRE_APPROVAL| Human[Human approval]
PDP -->|DENY| Stop[Stop]
Human -->|Approved and decision retrieved| Permit
Human -->|Rejected or expired| Stop
Permit -->|"acquired: true"| Execute[Execute action]
Execute --> Evidence[Report evidence]
classDef allow fill:#dcfce7,stroke:#15803d,color:#14532d
classDef approval fill:#fef3c7,stroke:#b45309,color:#78350f
classDef deny fill:#fee2e2,stroke:#b91c1c,color:#7f1d1d
class Permit,Execute,Evidence allow
class Human approval
class Stop deny
For a real action, preserve operation.id, the SHA-256 of the exact arguments in operation.hash, and the same Idempotency-Key across retries. After approval, retrieve the decision; before the external side effect, refresh the resource facts and consume the permit. Execute only if you receive acquired: true, then report the outcome with its execution_id.
Evidence records what your integration reports; it does not independently verify an external side effect. The execution contract details the flow and how to handle uncertain outcomes.
Review the resource, reason, and validity period before resolving a sensitive operation.
From permit to outcome: view a decision record
Inspect the decision, issued permit, and evidence reported by the integration.
View the visual policy editor and regression cases
The editor lets you adjust rules, simulate outcomes, and save cases before publishing a version.
| Connect | Entry point | Guide |
|---|---|---|
| Your agent or backend | HTTP API and beta .NET, Python, and TypeScript clients | SDKs · OpenAPI |
| Remote MCP tools | /mcp/guard, with a dgk_ agent credential |
Guard MCP |
| Administration through MCP | /mcp, with a separate dgm_ token |
Local access |
| Model providers | Optional AI Gateway, compatible with OpenAI | AI Gateway |
| IDE and desktop client | Per-project connection | IDE integration |
Provider keys stay in the gateway. Only metadata is sent for authorization. The legacy local MCP adapter remains available for compatibility; new connections use the remote Guard.
| To… | Start here |
|---|---|
| Configure variables, credentials, and ports | Development guide |
| Run the web demo, tests, or optional services | Components and validation |
| Open the documentation in English and Spanish | Documentation site |
| Understand the modules and contracts | Repository map · START_HERE |
| Stop services or diagnose a problem | Troubleshooting |
| Report a bug or suggest an improvement | Open an issue |
Initial validation results and known issues
Initial validation covered the Release build, API, worker, /health, Python example, and documentation site. 534 unit tests, 36 security tests, 98 integration tests, and 15 demo agent tests passed.
At the time of that validation, unresolved issues included NuGet NU1902/NU1903 warnings for cryptographic dependencies and a width check in the desktop suite in headless mode. The acceptance script treats NU1903/NU1904 as errors. Review the results and commands before evaluating the project for production.
Contributions go through a pull request to main, maintainer review, and the configured CI checks. Read the contribution guide for the fork and branch workflow, validation commands, and authorization guarantees. Use issues to propose changes or report reproducible bugs.
The project's own code does not yet include a license. Licenses for redistributed components are listed in the third-party notices.


