Policy-driven autonomous runtime for AI CLI agents — deterministic rule evaluation, built-in human escalation
Project description
AtlasBridge
Policy-driven autonomous runtime for AI CLI agents.
AtlasBridge is a deterministic, policy-governed runtime that allows AI CLI agents to operate autonomously within defined boundaries. Humans define the rules. AtlasBridge enforces them.
Instead of manually approving every prompt, AtlasBridge evaluates each decision against a strict Policy DSL and executes only what is explicitly permitted. When uncertainty, ambiguity, or high-impact actions arise, AtlasBridge escalates safely to a human.
Autonomy first. Human override when required.
What AtlasBridge Is
AtlasBridge is an autonomous execution layer that sits between you and your AI developer agents.
It provides:
- Policy-driven prompt responses
- Deterministic rule evaluation
- Autonomous workflow execution (plan → execute → fix → PR → merge)
- CI-enforced merge gating
- Built-in human escalation
- Structured audit logs and decision traces
AtlasBridge is not a wrapper around a CLI tool. It is a runtime that governs how AI agents execute.
How It Works
- An AI CLI agent emits a prompt or reaches a decision boundary.
- AtlasBridge classifies the prompt (type + confidence).
- The Policy DSL is evaluated deterministically.
- If a rule matches:
- The action is executed automatically.
- If no rule matches or confidence is low:
- The prompt is escalated to a human.
- Execution resumes.
Every decision is logged, traceable, and idempotent.
Autonomy Modes
AtlasBridge supports three operating modes:
Off
All prompts are routed to a human. No automatic decisions.
Assist
AtlasBridge automatically handles explicitly allowed prompts. All others are escalated.
Full
AtlasBridge automatically executes permitted prompts and workflows. No-match, low-confidence, or high-impact actions are escalated safely.
Full autonomy never means uncontrolled execution. Policy always defines the boundary.
Human Escalation (Built-In)
Whenever your agent pauses and requires human input — approval, confirmation, a choice, or clarification — AtlasBridge forwards that prompt to your phone.
You respond from Telegram or Slack. AtlasBridge relays your decision back to the CLI. Execution resumes.
Human intervention is always available when policy requires it.
Safety by Design
AtlasBridge is built around strict invariants:
- No freestyle decisions
- No bypassing CI checks
- No merging unless all required checks pass
- No force-pushing protected branches
- Default-safe escalation on uncertainty
- Append-only audit log for every decision
Autonomy is powerful — but bounded, deterministic, and reviewable.
Install
pip install atlasbridge
# With Slack support:
pip install "atlasbridge[slack]"
# Upgrade to latest version:
pip install --upgrade atlasbridge
Requires Python 3.11+. Works on macOS and Linux.
Quick start
Option A — Interactive Mode (v0.5.0+)
Run atlasbridge with no arguments in your terminal to launch the interactive control panel:
atlasbridge # auto-launches TUI when stdout is a TTY
atlasbridge ui # explicit TUI launch
The interactive UI guides you through setup, shows live status, and provides quick access to sessions, logs, and doctor checks — all in your terminal.
┌─ AtlasBridge ──────────────────────────────────────────────────────┐
│ AtlasBridge │
│ Human-in-the-loop control plane for AI developer agents │
│ │
│ AtlasBridge is ready. │
│ Config: Loaded │
│ Daemon: Running │
│ Channel: telegram │
│ Sessions: 2 │
│ Pending prompts: 0 │
│ │
│ [R] Run a tool [S] Sessions │
│ [L] Logs (tail) [D] Doctor │
│ [T] Start/Stop daemon │
│ [Q] Quit │
│ │
│ [S] Setup [D] Doctor [Q] Quit │
└─────────────────────────────────────────────────────────────────────┘
Option B — CLI commands
1. Set up your channel
Telegram (recommended for getting started):
atlasbridge setup --channel telegram
You'll be prompted for your Telegram bot token (get one from @BotFather) and your Telegram user ID (get it from @userinfobot).
Slack:
atlasbridge setup --channel slack
You'll need a Slack App with Socket Mode enabled, a bot token (xoxb-*), and an app-level token (xapp-*).
Need help getting tokens? See the Channel Token Setup Guide for step-by-step instructions, or press H inside the TUI setup wizard.
2. Run your AI agent under supervision
atlasbridge run claude
AtlasBridge wraps Claude Code in a PTY supervisor. When it detects a prompt waiting for input, it either forwards it to your phone or handles it per your policy. Tap a button, send a reply, or let autopilot take care of it.
3. Enable autopilot (optional)
Create a policy file to tell AtlasBridge which prompts to handle automatically:
# ~/.atlasbridge/policy.yaml
policy_version: "0"
name: my-policy
autonomy_mode: full
rules:
- id: auto-approve-yes-no
description: Auto-reply 'y' to yes/no prompts
match:
prompt_type: [yes_no]
min_confidence: medium
action:
type: auto_reply
value: "y"
- id: auto-confirm-enter
description: Auto-press Enter on confirmation prompts
match:
prompt_type: [confirm_enter]
action:
type: auto_reply
value: "\n"
defaults:
no_match: require_human
low_confidence: require_human
Then enable it:
atlasbridge autopilot enable
atlasbridge autopilot mode full # or: assist, off
Validate and test your policy before going live:
atlasbridge policy validate policy.yaml
atlasbridge policy test policy.yaml --prompt "Continue? [y/n]" --type yes_no --explain
4. Check status
atlasbridge status # daemon + channel status
atlasbridge sessions # active and recent sessions
atlasbridge autopilot status # autopilot state + recent decisions
atlasbridge autopilot explain # last 20 decisions with explanations
5. Pause and resume
Instantly pause autopilot and route all prompts to your phone:
atlasbridge pause # from your terminal
atlasbridge resume # re-enable autopilot
You can also send /pause or /resume from Telegram or Slack.
How it works
atlasbridge run claudewraps your AI CLI in a PTY supervisor- The tri-signal prompt detector watches the output stream
- When a prompt is detected:
- Autopilot off — prompt is forwarded to Telegram/Slack; you reply from your phone
- Autopilot assist — policy suggests a reply; you confirm or override from your phone
- Autopilot full — policy auto-replies if a rule matches; unmatched prompts escalate to your phone
- AtlasBridge injects the answer (yours or the policy's) into the CLI's stdin
- Every decision is recorded in an append-only audit log
Supported agents
| Agent | Command |
|---|---|
| Claude Code | atlasbridge run claude |
| OpenAI Codex CLI | atlasbridge run openai |
| Google Gemini CLI | atlasbridge run gemini |
Supported channels
| Channel | Status |
|---|---|
| Telegram | Supported |
| Slack | Supported (atlasbridge[slack]) |
Changelog
v0.6.3 — Roadmap rewrite
- Updated:
docs/roadmap-90-days.md— replaced stale 90-day phase plan (all phases shipped) with a milestone-based roadmap anchored at v0.6.2; covers v0.7.0 through v1.0.0 GA with definitions of done
v0.6.2 — Product positioning
- Updated:
pyproject.tomldescription → "Policy-driven autonomous runtime for AI CLI agents — deterministic rule evaluation, built-in human escalation" - Updated:
pyproject.tomlkeywords — addedpolicy,autonomous,agent,escalation; removed stale relay/interactive/remote terms
v0.6.1 — Policy Authoring Documentation
- New:
docs/policy-authoring.md— 10-section guide: quick start (5 min), core concepts, syntax reference, CLI usage, 8 authoring patterns, debugging, FAQ, and safety notes - New:
config/policies/— 5 ready-to-use policy presets (minimal,assist-mode,full-mode-safe,pr-remediation-dependabot,escalation-only) - Updated:
docs/policy-dsl.md— status updated to Implemented (v0.6.0+)
v0.6.0 — Autonomous Agent Runtime (Policy-Driven)
- Policy DSL v0 — YAML-based, strictly typed, first-match-wins rule engine;
atlasbridge policy validateandatlasbridge policy test --explain - Autopilot Engine — policy-driven prompt handler with three autonomy modes: Off / Assist / Full
- Kill switch —
atlasbridge pause/atlasbridge resume(or/pause,/resumefrom Telegram/Slack) - Decision trace — append-only JSONL audit log at
~/.atlasbridge/autopilot_decisions.jsonl - Autopilot CLI —
atlasbridge autopilot enable|disable|status|mode|explain - 56 new tests (policy model, parser, evaluator, decision trace); 341 total
- New design docs:
docs/autopilot.md,docs/policy-dsl.md,docs/autonomy-modes.md
v0.5.3 — CSS packaging hotfix
- fix(ui):
atlasbridge uino longer crashes withStylesheetErrorwhen installed from a wheel - Root cause:
.tcssfiles were not included in the package distribution, and CSS was loaded via filesystem path instead ofimportlib.resources - Both
ui/app.pyandtui/app.pynow load CSS viaimportlib.resources(works in editable and wheel installs) - Added
[tool.setuptools.package-data]for*.tcssinclusion - Added
__init__.pytoui/css/soimportlib.resourcescan locate assets atlasbridge doctornow checks that UI assets are loadable- 4 new regression tests for CSS resource loading
v0.5.2 — Production UI skeleton
- New
atlasbridge.uipackage: 6 screens with exact widget IDs,StatusCardscomponent,polling.py(poll_state()), and full TCSS atlasbridge/atlasbridge uinow launch the production UI skeleton (separate from the originaltui/package, which is preserved for compatibility)- WelcomeScreen shows live status cards when configured (Config / Daemon / Channel / Sessions)
- SetupWizardScreen navigates to a dedicated
SetupCompleteScreenon finish - 12 new smoke tests; 285 total
v0.5.1 — Branding fix + lab import fix
- All CLI output now shows "AtlasBridge" —
doctor,status,setup,daemon,sessions,run, andlabwere still printing "Aegis" / "aegis" atlasbridge lab list/runno longer crashes withModuleNotFoundErrorwhen installed from PyPI; now shows a clear message pointing to editable install
v0.5.0 — Interactive Terminal UI
atlasbridge(no args) — launches the built-in TUI when run in an interactive terminal; prints help otherwiseatlasbridge ui— explicit TUI launch command- Welcome screen — shows live status (daemon, channel, sessions) when configured; onboarding copy when not
- Setup Wizard — 4-step guided flow: choose channel → enter credentials (masked) → allowlist user IDs → confirm and save
- Doctor screen — environment health checks with ✓/⚠/✗ icons, re-runnable with
R - Sessions screen — DataTable of active and recent sessions
- Logs screen — tail of the hash-chained audit log (last 100 events)
- Bug fix —
channel_summarynow returns"none"when channels exist but none are configured - 74 new unit tests; 273 total
v0.4.0 — Slack + AtlasBridge rename
- Full Slack channel implementation (Web API + Socket Mode + Block Kit buttons)
- MultiChannel fan-out — broadcast to Telegram and Slack simultaneously
- Renamed from Aegis to AtlasBridge; auto-migration from
~/.aegis/on first run - Added
GeminiAdapterfor Google Gemini CLI
v0.3.0 — Linux
- Linux PTY supervisor (same
ptyprocessbackend as macOS) - systemd user service integration (
atlasbridge startinstalls and enables the unit) - 20 QA scenarios in the Prompt Lab
v0.2.0 — macOS MVP
- Working end-to-end Telegram relay for Claude Code
- Tri-signal prompt detector (pattern match + TTY block inference + silence watchdog)
- Atomic SQL idempotency guard (
decide_prompt()) - Hash-chained audit log
v0.1.0 — Design
- Architecture docs, code stubs, Prompt Lab simulator infrastructure
Status
| Version | Status | Description |
|---|---|---|
| v0.1.0 | Released | Architecture, docs, and code stubs |
| v0.2.0 | Released | macOS MVP — working Telegram relay |
| v0.3.0 | Released | Linux support, systemd integration |
| v0.4.0 | Released | Slack channel, MultiChannel fan-out, renamed to AtlasBridge |
| v0.5.0 | Released | Interactive terminal UI — setup wizard, sessions, logs, doctor |
| v0.5.1 | Released | Branding fix (Aegis→AtlasBridge in CLI output) + lab import fix |
| v0.5.2 | Released | Production UI skeleton — 6 screens, StatusCards, polling, TCSS |
| v0.6.0 | Released | Autonomous Agent Runtime — Policy DSL v0, autopilot engine, kill switch |
| v0.6.1 | Released | Policy authoring guide, 5 policy presets, docs/policy-authoring.md |
| v0.6.2 | Released | Product positioning — autonomy-first tagline, pyproject.toml keywords |
| v0.6.3 | Released | Roadmap rewrite — milestone-based, aligned with autonomy-first positioning |
| v0.7.0 | Planned | Windows (ConPTY, experimental) |
| v0.7.1 | Planned | Policy engine hardening — per-rule rate limits, hot-reload, Slack kill switch |
| v0.8.0 | Planned | Policy DSL v1 — compound conditions, session context, policy inheritance |
Design
See the docs/ directory:
| Document | What it covers |
|---|---|
| architecture.md | System diagram, component overview, sequence diagrams |
| reliability.md | PTY supervisor, tri-signal detector, Prompt Lab |
| adapters.md | BaseAdapter interface, Claude Code adapter |
| channels.md | BaseChannel interface, Telegram and Slack implementations |
| cli-ux.md | All CLI commands, output formats, exit codes |
| autopilot.md | Autopilot engine architecture, kill switch, escalation protocol |
| policy-authoring.md | Policy authoring guide — quick start, patterns, debugging, FAQ |
| policy-dsl.md | AtlasBridge Policy DSL v0 full reference |
| autonomy-modes.md | Off / Assist / Full mode specs and behavior |
| roadmap-90-days.md | 6-phase roadmap |
| qa-top-20-failure-scenarios.md | 20 mandatory QA scenarios |
| dev-workflow-multi-agent.md | Branch model, agent roles, CI pipeline |
Repository structure
src/atlasbridge/
core/
prompt/ — detector, state machine, models
session/ — session manager and lifecycle
routing/ — prompt router (events → channel, replies → PTY)
store/ — SQLite database
audit/ — append-only audit log with hash chaining
daemon/ — daemon manager (orchestrates all subsystems)
policy/ — Policy DSL v0: model, parser, evaluator, explain
autopilot/ — AutopilotEngine, kill switch, decision trace
os/tty/ — PTY supervisors (macOS, Linux, Windows stub)
os/systemd/ — Linux systemd user service integration
adapters/ — CLI tool adapters (Claude Code, OpenAI CLI, Gemini CLI)
channels/ — notification channels (Telegram, Slack, MultiChannel)
cli/ — Click CLI entry point and subcommands
tests/
unit/ — pure unit tests (no I/O)
policy/ — policy model, parser, evaluator tests + fixtures
integration/ — SQLite + mocked HTTP
prompt_lab/ — deterministic QA scenario runner
scenarios/ — QA-001 through QA-020 scenario implementations
docs/ — design documents
config/
policy.example.yaml — annotated full-featured example policy
policy.schema.json — JSON Schema for IDE validation
policies/ — ready-to-use policy presets
minimal.yaml — safe start: only Enter confirmations auto-handled
assist-mode.yaml — assist mode with common automation rules
full-mode-safe.yaml — full mode with deny guards for dangerous operations
pr-remediation-dependabot.yaml — auto-approve Dependabot PR prompts
escalation-only.yaml — all prompts routed to human (no automation)
Core invariants
AtlasBridge guarantees the following regardless of channel, adapter, or concurrency:
- No duplicate injection — nonce idempotency via atomic SQL guard
- No expired injection — TTL enforced in the database WHERE clause
- No cross-session injection — prompt_id + session_id binding checked
- No unauthorised injection — allowlisted identities only
- No echo loops — 500ms suppression window after every injection
- No lost prompts — daemon restart reloads pending prompts from SQLite
- Bounded memory — rolling 4096-byte buffer, never unbounded growth
Development
# Install in editable mode with dev dependencies
pip install -e ".[dev]"
# Run tests
pytest tests/ -q
# Run a Prompt Lab scenario
atlasbridge lab run partial-line-prompt
# Lint and format
ruff check . && ruff format --check .
# Type check
mypy src/atlasbridge/
# Full CI equivalent (local)
ruff check . && ruff format --check . && mypy src/atlasbridge/ && pytest tests/ --cov=atlasbridge
Troubleshooting
Wrong binary in PATH?
atlasbridge version --verbose
This shows the exact install path, config path, Python version, and platform — useful for detecting stale installs or multiple versions.
atlasbridge: command not found after pip install
Ensure your Python scripts directory is on PATH:
python3 -m site --user-scripts # shows user scripts dir
# or for venv:
which atlasbridge
Config not found
atlasbridge doctor
Shows where AtlasBridge expects its config file. Run atlasbridge setup to create it.
Upgrading from Aegis?
AtlasBridge automatically migrates ~/.aegis/config.toml on first run. Your tokens and settings are preserved.
Contributing
See CONTRIBUTING.md. All contributions require:
- Existing tests to remain green
- New code to have unit tests
- Prompt Lab scenarios for any PTY/detection changes
License
MIT — see LICENSE.
Project details
Release history Release notifications | RSS feed
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 atlasbridge-0.7.5.tar.gz.
File metadata
- Download URL: atlasbridge-0.7.5.tar.gz
- Upload date:
- Size: 108.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5fe0c30e185b04e69846b32ea2a3ed0543c518f9674b6958d5770951113bbbe1
|
|
| MD5 |
4518e05ad8b666fac0dae63c1180726b
|
|
| BLAKE2b-256 |
e883017b11c3d9fcd1d6f8ae87ffd2136bc62cb026732ab6b97072ce34f52fa1
|
Provenance
The following attestation bundles were made for atlasbridge-0.7.5.tar.gz:
Publisher:
publish-pypi.yml on abdulraoufatia/atlasbridge
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
atlasbridge-0.7.5.tar.gz -
Subject digest:
5fe0c30e185b04e69846b32ea2a3ed0543c518f9674b6958d5770951113bbbe1 - Sigstore transparency entry: 975745089
- Sigstore integration time:
-
Permalink:
abdulraoufatia/atlasbridge@3625b6fa49cc35fac8a486281df82d855953eb18 -
Branch / Tag:
refs/tags/v0.7.5 - Owner: https://github.com/abdulraoufatia
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@3625b6fa49cc35fac8a486281df82d855953eb18 -
Trigger Event:
push
-
Statement type:
File details
Details for the file atlasbridge-0.7.5-py3-none-any.whl.
File metadata
- Download URL: atlasbridge-0.7.5-py3-none-any.whl
- Upload date:
- Size: 134.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cffd8fe70dcce36cf37694a199b6f6a3bb687a90dda136911c0747eb55f7bf23
|
|
| MD5 |
c9bd01bb06d7d7661d18e7fdaae82d35
|
|
| BLAKE2b-256 |
4ba5d01ddf5c6dadc68a380060cee9b006de668e972b5046913ed1a9c0f363b8
|
Provenance
The following attestation bundles were made for atlasbridge-0.7.5-py3-none-any.whl:
Publisher:
publish-pypi.yml on abdulraoufatia/atlasbridge
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
atlasbridge-0.7.5-py3-none-any.whl -
Subject digest:
cffd8fe70dcce36cf37694a199b6f6a3bb687a90dda136911c0747eb55f7bf23 - Sigstore transparency entry: 975745091
- Sigstore integration time:
-
Permalink:
abdulraoufatia/atlasbridge@3625b6fa49cc35fac8a486281df82d855953eb18 -
Branch / Tag:
refs/tags/v0.7.5 - Owner: https://github.com/abdulraoufatia
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@3625b6fa49cc35fac8a486281df82d855953eb18 -
Trigger Event:
push
-
Statement type: