claw0  by shareAI-lab

AI agent gateway development from scratch

Created 2 weeks ago

New!

513 stars

Top 61.2% on SourcePulse

GitHubView on GitHub
Project Summary

This repository, shareAI-lab/claw0, provides a progressive, 10-section tutorial for building a production-grade AI agent gateway from scratch. It targets engineers and researchers seeking to understand AI agent architecture beyond basic API interactions. The project offers a clear, step-by-step learning path, covering core concepts from agent loops and tool use to advanced topics like resilience, concurrency, and multi-channel integration, enabling users to confidently build and comprehend complex AI systems.

How It Works

The project employs a unique pedagogical approach where each of the 10 sections introduces exactly one new concept, building incrementally upon the previous code. This ensures that users can follow along with ~7,000 lines of Python code, understanding each component—from the foundational agent loop (s01) and tool dispatch (s02) to session management (s03), channel integration (s04), gateway routing (s05), intelligence modules (s06), proactive scheduling (s07), reliable delivery (s08), resilience patterns (s09), and concurrency control (s10). This layered design, with code and documentation co-located in English, Chinese, and Japanese, facilitates a deep, practical understanding of AI agent gateway architecture.

Quick Start & Requirements

  • Install: Clone the repository (https://github.com/anthropics/claw0.git) and install dependencies via pip install -r requirements.txt.
  • Prerequisites: Python 3.11+, an API key for Anthropic (or compatible provider), and MODEL_ID configured in the .env file.
  • Run: Execute any section, e.g., python sessions/en/s01_agent_loop.py.

Highlighted Details

  • 10 distinct, runnable Python files, each adding a single new concept to the AI agent gateway.
  • Multi-language support (English, Chinese, Japanese) with code and documentation integrated.
  • Comprehensive architecture covering agent loops, tool use, session persistence, multi-channel support (Telegram, Feishu), WebSocket gateway with 5-tier routing, hybrid memory, 8-layer prompts, write-ahead queues, 3-layer retry mechanisms, and named lanes for serialization.

Maintenance & Community

No specific details on maintainers, community channels (e.g., Discord, Slack), or sponsorships are provided in the README.

Licensing & Compatibility

  • License: MIT.
  • Compatibility: The MIT license is highly permissive, generally allowing for commercial use and integration into closed-source projects without significant restrictions.

Limitations & Caveats

The README focuses on the learning curriculum and architectural components; specific limitations, alpha status, or known bugs are not detailed. The project requires an API key for a specific LLM provider, which may represent an adoption barrier. While aiming for production-grade concepts, it is presented primarily as an educational resource.

Health Check
Last Commit

1 week ago

Responsiveness

Inactive

Pull Requests (30d)
2
Issues (30d)
3
Star History
518 stars in the last 14 days

Explore Similar Projects

Starred by Andrew Ng Andrew Ng(Founder of DeepLearning.AI; Cofounder of Coursera; Professor at Stanford), Jack Lukic Jack Lukic(Author of Semantic UI), and
5 more.

ag2 by ag2ai

0.7%
4k
AgentOS for building AI agents and facilitating multi-agent cooperation
Created 1 year ago
Updated 14 hours ago
Starred by Gagan Bansal Gagan Bansal(Coauthor of AutoGen; Research Scientist at Microsoft Research), Elvis Saravia Elvis Saravia(Founder of DAIR.AI), and
1 more.

agent-framework by microsoft

1.8%
8k
AI agent and multi-agent workflow framework
Created 10 months ago
Updated 11 hours ago
Starred by Lilian Weng Lilian Weng(Cofounder of Thinking Machines Lab), Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), and
59 more.

AutoGPT by Significant-Gravitas

0.1%
182k
AI agent platform for building, deploying, and running autonomous workflows
Created 3 years ago
Updated 10 hours ago
Feedback? Help us improve.