Back to blog

Building Claw Biswas: A 4-Phase Autonomous AI Agent System

6 min readBy Aditya Biswas

May 21, 2026

This week, we completed a major milestone in our AI development journey: building a complete 4-phase autonomous agent system for Claw Biswas. In just one week, we transformed Claw from a capable assistant into an autonomous decision-maker that can discover work, make decisions, execute complex workflows, and learn from its experiences.

The Journey to Autonomy

The idea of building an autonomous AI system has been a long-standing goal. We wanted to create an AI that could operate independently, make decisions, and learn from its experiences - all while maintaining human oversight when needed.

The project began with a simple question: "What if Claw could discover work, make decisions, and execute tasks without constant human intervention?" This question led us to develop a framework that would enable Claw to operate autonomously while ensuring that critical decisions still required human oversight.

The 4-Phase Framework

The system we built enables Claw to:

  1. Discover work from 56+ potential tasks
  2. Make decisions within defined authority boundaries
  3. Execute multi-step workflows with auto-retry and graceful degradation
  4. Learn and adapt by recording decision outcomes and building runbooks

Phase 1: Task Discovery

#Phase 1: Task Discovery
#Phase 1: Task Discovery

The first phase gives Claw the ability to proactively identify work without user intervention. This is crucial for ensuring that Claw can operate independently and efficiently.

Key Tools Implemented:

  • get_unstarted_work(): Lists pending tasks
  • get_blocking_issues(): Identifies critical blockers
  • detect_anomalies(): Surfaces unusual patterns
  • prioritize_work(): Returns 56 discoverable work items sorted by business impact

How It Works:

When Claw asks "What should I do today?", it gets back a prioritized list of tasks with:

  • Task type (content, infrastructure, analytics, etc.)
  • Priority level (critical, high, medium, low)
  • Impact score (how many users affected)
  • Dependencies (what else must complete first)
  • Time estimate (how long it will take)

Business Impact:

Agent never needs to ask "What should I do?" - it knows the work queue automatically. This ensures that Claw can operate independently and efficiently, focusing on the most impactful tasks first.

Phase 2: Decision Making Authority

#Phase 2: Decision Making Authority
#Phase 2: Decision Making Authority

The second phase establishes a framework for autonomous decision-making. This is crucial for ensuring that Claw can operate independently while still maintaining human oversight for critical decisions.

Components:

  • Authority Matrix: Maps each decision type to risk levels (LOW/MEDIUM/HIGH)
  • Risk Assessment: Evaluates decision risk based on scope and reversibility
  • Escalation Logic: Routes decisions appropriately

Key Tools Implemented:

  • request_decision(agent_id, decision_type, description): Submit decision for approval/execution
  • can_agent_do(agent_id, decision_type, risk_level): Check authority before attempting

Authority Examples for Claw:

code
LOW-RISK (auto-approved):
  - Retry failed operations
  - Format content
  - Generate summaries
  - Reorganize data

MEDIUM-RISK (user approval required):
  - Modify user settings
  - Update published content
  - Change workflow parameters

HIGH-RISK (blocked):
  - Delete irreversible data
  - Modify authentication
  - Change system permissions

Business Impact:

Agent handles routine decisions in seconds; user only intervenes for critical choices. This ensures that Claw can operate efficiently while still maintaining human oversight for critical decisions.

Phase 3: Autonomous Work Completion

#Phase 3: Autonomous Work Completion
#Phase 3: Autonomous Work Completion

The third phase enables complex workflow execution. This is crucial for ensuring that Claw can handle complex, multi-step tasks independently.

Components:

  • WorkflowExecutor: Manages multi-step task execution
  • Dependency Management: Ensures prerequisites completed before dependent steps
  • Auto-retry Logic: Retries failed steps up to 3 times
  • Graceful Degradation: Workflows continue despite partial failures

Key Tools Implemented:

  • create_workflow(workflow_id, description, steps): Define multi-step process
  • get_workflow_status(workflow_id): Monitor workflow progress

Workflow Example:

code
Workflow: generate_newsletter
  Step 1: Gather content (retry max 3)
  Step 2: Filter professional articles (depends on Step 1)
  Step 3: Generate draft (depends on Step 2)
  Step 4: Publish (depends on Step 3)
  Step 5: Notify users (depends on Step 4)

If Step 2 fails after 3 retries:
  ✓ Step 3 skipped (dependency unmet)
  ✓ Step 4 skipped (dependency unmet)
  ✓ Step 5 runs with partial content
  Result: PARTIAL_SUCCESS (not FAILED)

Business Impact:

Complex multi-step tasks complete reliably even when individual steps fail temporarily. This ensures that Claw can handle complex tasks independently and efficiently.

Phase 4: Learning & Adaptation

#Phase 4: Learning & Adaptation
#Phase 4: Learning & Adaptation

The final phase focuses on continuous improvement. This is crucial for ensuring that Claw can learn from its experiences and improve over time.

Components:

  • Decision Outcome Recording: Captures result of each autonomous decision
  • Pattern Recognition: Identifies successful patterns for reuse
  • Runbook Generation: Creates documented procedures from successful workflows
  • Effectiveness Tracking: Measures agent improvement over time

Key Tools Implemented:

  • record_decision_outcome(agent_id, decision_type, result, details): Log decision result
  • get_agent_effectiveness(): Track success rates
  • get_learned_runbooks(): Retrieve generated procedures
  • get_full_autonomy_status(): Comprehensive autonomy metrics

Learning Example:

After 100 retry operations, all successful:

  • System generates runbook: "When should we retry operations?"
  • Includes: success conditions, command patterns, error recovery
  • Future retry requests check runbook first
  • Success rate improves as patterns become actionable

Business Impact:

Agent gets smarter with each decision. This ensures that Claw can continuously improve and adapt to new challenges.

What We Built

What We Built
What We Built

In just one week, we:

  • Integrated with 11 agents, 20 microservices, and 79 tools
  • Fixed 3 critical bugs during emergency debugging
  • Optimized infrastructure (30 GB disk space freed)
  • Implemented all 4 phases with zero downtime

Critical Bugs Fixed

  1. Scheduler File Descriptor Leak: Changed from file handle passing to asyncio.subprocess.PIPE (6.5GB saved)
  2. F-String Variable Substitution: Fixed line 859 in agents.py: {context} → context_dict
  3. Missing Tool Registration: Added get_newsletter_status to ALL_TOOLS

Infrastructure

The complete system runs across 20 services, all tested and verified working. The implementation was completed with zero downtime.

The Impact of Autonomy

The development of this autonomous system has significant implications for the future of AI. By enabling Claw to operate independently, we can focus on more strategic tasks while Claw handles routine operations. This not only increases efficiency but also allows for more innovative and creative work.

Moreover, the ability of Claw to learn and adapt means that it can continuously improve its performance. This is crucial for ensuring that Claw remains effective and relevant in a rapidly changing technological landscape.

Conclusion

Conclusion
Conclusion

This project represents a significant leap forward in AI autonomy. Claw Biswas is now capable of handling complex, multi-step tasks with minimal human intervention, while continuously improving its performance through learning and adaptation.

We're excited about the possibilities this opens up for more sophisticated AI systems that can operate independently, make decisions, and learn from their experiences - all while maintaining human oversight when needed.

Stay tuned for more updates as we continue to push the boundaries of what's possible with autonomous AI systems!

Share
#ai#autonomy#agent#system#development
Aditya Biswas

Aditya Biswas

@adityabiswas

Computer Science Engineer turned EdTech sales leader, now building AI-powered products full-time from Bangalore. I spent years at Intellipaat as AVP Sales & Marketing, learning what makes teams tick and products sell. Now I channel that into building tools that actually work — Creator OS helps content teams ship faster, Profile Insights turns resumes into career roadmaps, and Qwiklo gives B2C sales teams a no-code operating system. The twist? My AI agent, Claw Biswas, runs the content engine — publishing newsletters, syncing projects from GitHub, and managing this entire site autonomously through OpenClaw. On YouTube (@aregularindian), I simplify careers, finance, and tech for India's next-gen professionals. No fluff, no shady pitches — just clarity. If you're a builder, creator, or working professional in India trying to figure out AI, careers, or side projects — you're in the right place.

Loading comments...