Bounded Autonomy Framework
Relevant source files
The following files were used as context for generating this wiki page:
The Bounded Autonomy Framework is a specialized infrastructure designed to govern the DevSkyy platform's 57 AI agents. Its primary purpose is to ensure that all AI-driven tasks are deterministic, logged, and subject to human review, providing a robust layer of control and safety. The system operates entirely locally, with no external network calls, and enforces human approval for any material changes, thereby keeping the AI's operations under complete operator control.
This framework is built upon a 10-layer architecture that covers everything from system definition and execution to security, recovery, and governance. It extends the core AgentOrchestrator to introduce boundaries and approval workflows, ensuring stability, traceability, and verified performance under human supervision.
Sources: fashion_ai_bounded_autonomy/README.md:11-22, 100-103
Architecture
The framework is structured into core components, configuration files, runtime directories for logs and data, and local databases for state management. This design ensures a clear separation of concerns and facilitates robust auditability.
Sources: fashion_ai_bounded_autonomy/README.md:37-67
10-Layer Architectural Model
The system's design is conceptualized in ten distinct layers, ensuring comprehensive control over the AI's lifecycle.
This diagram illustrates the 10-layer architecture that governs the Bounded Autonomy system.
Sources: fashion_ai_bounded_autonomy/README.md:25-35
Component Interaction
The core components interact to manage agent tasks, approval flows, and system health. The BoundedOrchestrator is central, coordinating with the ApprovalSystem for reviews and being monitored by the Watchdog.
This diagram shows the interactions between the main Python components, databases, and file system directories.
Sources: fashion_ai_bounded_autonomy/README.md:43-67
Core Components
The framework is composed of several key Python classes that manage the bounded execution environment.
BoundedOrchestrator
The BoundedOrchestrator is the central component, extending the base AgentOrchestrator to enforce bounded controls. It manages agent registration and task execution, routing high-risk actions through the approval system.
This diagram shows that BoundedOrchestrator inherits from a base AgentOrchestrator.
Sources: fashion_ai_bounded_autonomy/README.md:200-218, ai_orchestration/README.md:21-28
Key methods of the BoundedOrchestrator are summarized below.
| Method | Description |
|---|---|
register_agent | Registers an existing DevSkyy agent and wraps it with bounded controls. |
execute_task | Executes a task. If the task is high-risk or require_approval is set, it is sent to the ApprovalSystem instead of being executed immediately. |
emergency_stop | Halts all system operations in response to a critical event. |
pause_system / resume_system | Allows an operator to temporarily pause and resume all agent activities. |
get_bounded_status | Retrieves the current operational status of the bounded system. |
Sources: fashion_ai_bounded_autonomy/README.md:200-218
ApprovalSystem
This component manages the human review queue for actions that require operator sign-off. It maintains a database of pending actions and processes approvals or rejections from operators.
This diagram outlines the main methods of the ApprovalSystem class.
Sources: fashion_ai_bounded_autonomy/README.md:220-228
Watchdog
The Watchdog is responsible for monitoring the health of the BoundedOrchestrator and its registered agents. It can trigger recovery actions if an agent or the system becomes unresponsive.
| Method | Description |
|---|---|
start | Begins monitoring the orchestrator. |
stop | Stops the monitoring service. |
get_status | Returns the health status of monitored components. |
clear_agent_halt | Allows an operator to manually clear a halt state for a specific agent. |
Sources: fashion_ai_bounded_autonomy/README.md:236-242
DataPipeline
The DataPipeline handles data ingestion and processing in a validated manner. It ensures that only approved and properly structured data is used for agent tasks, and that all processing uses local-only models.
This flowchart shows the data validation and processing flow within the DataPipeline.
Sources: fashion_ai_bounded_autonomy/README.md:144-160, 230-234
Task Execution Flow
When a task is initiated via BoundedOrchestrator.execute_task, it undergoes a decision process to determine if it can be executed immediately or if it requires human approval.
Execution Logic
The following diagram illustrates the logic flow for a task execution request.
This flowchart details the decision-making process within the BoundedOrchestrator for each task.
Sources: fashion_ai_bounded_autonomy/README.md:88-95
Sequence Diagram: Approval Workflow
This sequence diagram shows the interaction between the components during a task that requires approval.
This diagram shows the end-to-end flow of a task requiring human approval, from initial request to final execution.
Sources: fashion_ai_bounded_autonomy/README.md:92-95, 126-139
Human-in-the-Loop: The Approval Process
Operator interaction is a cornerstone of the framework, managed via the approval_cli.py tool. This command-line interface allows authorized personnel to review, approve, or reject actions queued by the ApprovalSystem.
Operator CLI Commands
The following commands are available to operators for managing the review queue.
| Command | Description |
|---|---|
list | Lists all actions currently pending approval. |
review <action_id> | Displays the detailed information for a specific pending action. |
approve <action_id> | Approves a pending action, allowing it to be executed. Requires operator name. |
reject <action_id> | Rejects a pending action, preventing execution. Requires operator name and a reason. |
stats | Shows statistics on approvals and rejections, optionally filtered by operator. |
cleanup | Removes expired or stale actions from the queue. |
Sources: fashion_ai_bounded_autonomy/README.md:166-179
Configuration
The system's behavior is defined through a set of YAML and JSON configuration files located in the config/ directory.
config/architecture.yaml
Defines the runtime configuration for system components.
| Key | Description | Example |
|---|---|---|
port | The port number for the component's service. | 8101 |
role | The designated role of the component. | "design_intelligence" |
permissions | A list of capabilities the component is allowed to use. | ["trend_analysis"] |
auto_restart | Whether the watchdog should automatically restart the component on failure. | true |
Sources: fashion_ai_bounded_autonomy/README.md:183-191
config/agents_config.json
Defines capabilities, permissions, and schedules for registered AI agents.
| Key | Description | Example |
|---|---|---|
capabilities | List of functions the agent can perform. | ["trend_analysis"] |
permissions | Fine-grained permissions, e.g., can_modify_config. | {"can_access_logs": true} |
schedules | Cron-based schedules for automated task execution. | {"task": "trend_analysis", "cron": "0 2 * * 1"} |
Sources: fashion_ai_bounded_autonomy/README.md:193-209
Security and Governance
The framework enforces a strict security policy to ensure safe and transparent operations.
- Network Isolation: All outbound network calls are blocked by default to ensure the system operates entirely locally.
- Credential Management: All credentials are encrypted using AES-256-GCM.
- Process Sandboxing: OS-level isolation is used for agent processes.
- Audit Logging: Every action, decision, and system event is logged to immutable, timestamped files in
logs/audit/. - Access Control: Permissions are managed through role-based access control defined in configuration.
Sources: fashion_ai_bounded_autonomy/README.md:213-221
Conclusion
The Bounded Autonomy Framework provides an essential layer of safety, control, and auditability for the DevSkyy AI platform. By mandating human-in-the-loop workflows for significant actions, enforcing local-only execution, and maintaining a complete audit trail, it allows the powerful capabilities of the 57 AI agents to be harnessed in a deterministic and secure manner. This ensures that while the agents can propose and execute complex tasks, ultimate control always remains with a human operator.