Skip to main content

authgraph

Show me what will happen before the AI executes anything.

Python execution planning + TrigGuard authorization simulation. No permit, no run.

pip install authgraph
from authgraph import Plan, simulate

plan = Plan()
plan.add("file.read", read_file, title="read_file")
plan.add("git.push", push_branch, title="push_branch")

result = simulate(plan)
print(result)          # predicted PERMIT / ESCALATE / BLOCKED per step
print(plan.visualize())  # execution graph

Before anything runs, authgraph asks TrigGuard. Simulation never executes your callables.

Your code → authgraph → TrigGuard → Gateway

Not a CrewAI/LangGraph/Quanta product. Optional integration hooks live under authgraph.integrations and do not bundle external runtimes.

Requires TRIGGUARD_API_KEY, TRIGGUARD_ORG_ID, and gateway https://api.trigguardai.com (default).

Full guide: docs/QUICKSTART.md


APIs (0.3)

API Use when
Plan + simulate() Preview authorization for a multi-step agent pipeline
plan.execute() Run steps after PERMIT; cascade BLOCKED on DENY/ESCALATE
explain() Human-readable DENY/ESCALATE with suggested actions
plan.visualize() / export_dot() Console tree or Graphviz DOT
@guard() Single function — zero graph boilerplate
AuthgraphRuntime + run_step Multi-step DAG workflows
from authgraph import Plan, PlanBuilder, simulate, explain, guard

CLI:

authgraph simulate examples/deployment.py
authgraph explain receipt_123 --action deploy.release
authgraph graph examples/deployment.py --dot

Demos: examples/demos/ (agents, GitHub Actions, DB migrate, Terraform, K8s, robotics)


Quick start (@guard)

import os
from authgraph import AuthgraphRuntime, run_step

os.environ["TRIGGUARD_API_KEY"] = "tg_live_..."
os.environ["TRIGGUARD_ORG_ID"] = "org_..."

runtime = AuthgraphRuntime()
graph = runtime.create_graph(title="Deploy", description="Plan then ship")
repo = os.environ.get("TRIGGUARD_REPOSITORY", "your-org/your-repo")
plan = runtime.add_node(
    graph, title="Plan", description="Define scope",
    authority_surface="deploy.release", metadata={"repository": repo},
)
runtime.start(graph)

result = run_step(
    runtime, graph, plan, agent_id="my-agent",
    fn=lambda: {"spec": "ship it"},
)
print(result.receipt, result.execution_time)

More examples: examples/


What is shipped (0.3)

  • Execution plans — Plan, PlanBuilder, sequential steps with metadata
  • Simulation — simulate() / plan.simulate() never runs callables; queries TrigGuard
  • Graph execution — plan.execute() with downstream BLOCKED cascade
  • Explainability — explain() for receipts, decisions, gateway JSON
  • Risk breakdown — result.risk_score, result.risk_factors (local heuristic, not policy)
  • Visualization — console tree + Graphviz DOT export
  • CLI — authgraph simulate|explain|graph
  • Universal execution engine (authgraph.execution) — one claim/execute/complete path
  • @guard, authorization(), sync + async + batch
  • Optional integrations (CrewAI, LangGraph, …) — thin hooks only
  • Fail-closed TrigGuard gate

Not shipped: hosted service, bundled agent frameworks, policy duplication, GitHub Apps, K8s controllers, Terraform providers (build when design partners ask).


Environment

Variable Required Description
TRIGGUARD_API_KEY yes Customer API key
TRIGGUARD_ORG_ID yes Org id (X-Consumer)
TRIGGUARD_GATEWAY_URL no Default https://api.trigguardai.com
TRIGGUARD_REPOSITORY no Auto metadata for deploy surfaces
TRIGGUARD_ACTOR no Default actor for @guard / context manager

License

See LICENSE.

Metadata

Release files for authgraph 0.3.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for authgraph 0.3.2
File Size Uploaded
authgraph-0.3.2.tar.gz 48.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for authgraph 0.3.2
File Interpreter ABI Platform
authgraph-0.3.2-py3-none-any.whl Python 3 none any Details

Total release size: 92.9 kB

Release files / authgraph-0.3.2.tar.gz

Download URL authgraph-0.3.2.tar.gz
Size 48.9 kB
Tags Source
SHA-256 checksum
How to use checksums
5c8496bc19cb2c68c7590da3c75739ff1f875d87218d20147c2ecf577c42133b
BLAKE2b-256 checksum
How to use checksums
9f7241ed8e5b7b4f6c35bc16284e2fcb801bd6eb0008fad7f499336d6250a844
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.15

Release files / authgraph-0.3.2-py3-none-any.whl

Download URL authgraph-0.3.2-py3-none-any.whl
Size 44.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2f60ad8d14bc2a0dfe23883f746902e4a0a486f33ac5c73871adc3f362bcbd0e
BLAKE2b-256 checksum
How to use checksums
bc544ce6db1a6e32b6df360add020b9ce24a378e4e61af6ea460e88d7e25a3b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.15

Release history Release notifications | RSS feed

This release

0.3.2 This release

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page