How fierywave/agent-sandbox works
This repository is a permissioned tool-using agent sandbox: Track B plans and executes multi-step tasks, while Track A provides the independent authorization and approval service. The graph preserves the documented role/risk policies, rate limits, audit trail, human approval, and starter-tool capabilities. Some agent workflow links are based on the graph excerpt and SOURCE INDEX; unsampled internals are not inferred beyond those references.
Main entry points: main.py HTTP API · graph.py Workflow state machine · permissions.py Permission gate · audit.py Audit log
Components 23
Shared contracts
- Plan and tool call
contracts/plan.py - Roles and decisions
contracts/enums.py - Tool definitions
contracts/tool_registry.py
Agent runtime
- Workflow state machine
track-b-agent/graph.py - Task planner
track-b-agent/planner.py - Guardrail clients
track-b-agent/guardrail_client.py - Permission client
track-b-agent/permission_client.py - Registry client
track-b-agent/registry_client.py - Approval sync
track-b-agent/approval_sync.py - Pending approvals
track-b-agent/approval_store.py - Starter tools
track-b-agent/tools
Guardrail service
- HTTP API
track-a-guardrail/main.py - JWT and roles
track-a-guardrail/auth.py - Tool registry
track-a-guardrail/registry.py - Permission gate
track-a-guardrail/permissions.py - Rate limiter
track-a-guardrail/rate_limit.py
Audit and review
- Approval gateway
track-a-guardrail/approvals.py - Audit log
track-a-guardrail/audit.py - Audit analytics
track-a-guardrail/analytics.py - Review dashboard
track-a-guardrail/dashboard.py - Workflow tracing
track-a-guardrail/tracing.py
Other components
- Task requester
- Human operator
Connections 31
- Task requester → Workflow state machine: submits task
README.md - Workflow state machine → Task planner: plans steps
track-b-agent/graph.py - Task planner → Plan and tool call: produces plan
contracts/plan.py - Workflow state machine → Registry client: loads tools
track-b-agent/graph.py - Registry client → HTTP API: fetches registry
- HTTP API → Tool registry: serves registry
track-a-guardrail/main.py - Tool registry → Tool definitions: seeds definitions
track-a-guardrail/registry.py - Workflow state machine → Permission client: checks permission
track-b-agent/graph.py - Permission client → Guardrail clients: delegates HTTP
- Guardrail clients → HTTP API: calls permission API
track-b-agent/guardrail_client.py - HTTP API → Permission gate: routes checks
track-a-guardrail/main.py - Permission gate → JWT and roles: reads claims
track-a-guardrail/permissions.py - Permission gate → Tool registry: checks tool
track-a-guardrail/permissions.py - Permission gate → Rate limiter: checks quota
track-a-guardrail/permissions.py - Permission gate → Audit log: records decision
track-a-guardrail/permissions.py - Workflow state machine → Starter tools: executes tool
track-b-agent/graph.py - Workflow state machine → Guardrail clients: files approval
track-b-agent/graph.py - Guardrail clients → HTTP API: creates approval
track-b-agent/guardrail_client.py - HTTP API → Approval gateway: routes approvals
track-a-guardrail/main.py - Approval gateway → Audit log: logs resolution
track-a-guardrail/approvals.py - Human operator → Approval gateway: approves or rejects
README.md - Workflow state machine → Pending approvals: tracks pending work
track-b-agent/graph.py - Approval sync → Pending approvals: updates status
track-b-agent/approval_sync.py - Approval sync → Workflow state machine: resumes workflow
track-b-agent/approval_sync.py - HTTP API → Audit log: routes audit
track-a-guardrail/main.py - HTTP API → Audit analytics: routes analytics
track-a-guardrail/main.py - Audit analytics → Audit log: reads events
track-a-guardrail/analytics.py - HTTP API → Review dashboard: routes dashboard
track-a-guardrail/main.py - Review dashboard → Audit log: reads audit data
track-a-guardrail/dashboard.py - HTTP API → Workflow tracing: routes traces
track-a-guardrail/main.py - Workflow state machine → Roles and decisions: uses workflow states
track-b-agent/graph.py