Dev & Engineering agent-gatewaytutorialanthropictelegramfeishupythonconcurrency

claw0: Build an AI Agent Gateway from Scratch

Learn to build a production-grade AI agent gateway from zero to one through 10 progressive sections, covering tool use, multi-channel routing, autonomy, and concurrency.

FollowAgents review · FARS-2.1
Not recommended
28/ 100 5-point scale 1.4 / 5
1 2 3 4 5 6
1Trust0 / 29 · 0.0/5

Evidence shows the repository is a tutorial, with no actual execution code, so there is no substantive content on least privilege, user confirmation, data flow transparency, sensitive data handling, dependency security, external effects, rollback, or source attribution. All trust criteria score 0 because there is no evidence these aspects are addressed.

2Reliability5 / 14 · 1.8/5

Self-consistency scores 2: the 10 sections and dependencies described in the README are structurally consistent, but no code verification is provided. Dependency availability scores 1: dependencies are listed, but no version pinning or availability guarantees. Failure messages score 0: no documentation on error handling or user-visible failure messages.

3Adaptability6 / 18 · 1.7/5

Audience and scenarios score 2: clearly aimed at developers learning AI agents, with multi-language support. Capability boundaries score 1: scope of each section is described, but limitations are not explicit. Trigger precision scores 0: no trigger conditions defined. Environment fit scores 1: mentions Python version and API key, but no detailed environment configuration guide.

4Convention8 / 18 · 2.2/5

Information architecture scores 2: clear directory structure and section descriptions. Install notes score 2: provides quick start steps. Naming stability scores 1: section naming is consistent, but no API stability mentioned. Examples and FAQ score 2: provides runnable examples, but no FAQ. Known limitations score 0: not mentioned. License scores 2: MIT license. Versioning/changelog score 0: none. Maintenance responsibility scores 1: not explicit, but repository has organizational ownership.

5Effectiveness7 / 13 · 2.7/5

Output usability scores 2: code and documentation are co-located, facilitating learning. Marginal value scores 2: provides a progressive learning path from basics to advanced. Cost-benefit scores 1: requires API key and dependencies, but reasonable for an educational project.

6Verifiability2 / 8 · 1.3/5

Claim traceability scores 1: claims in README partially correspond to file structure, but no code verification. Cross-source corroboration scores 0: no external validation. Fact-inference separation scores 1: some distinction between description and inference, but not explicit.

Evidence confidence: Low Reviewed Aug 09, 2026 Reviewed revision 0fbf0eb1bd65
Safety controls not found in source: least-privilege scoping, confirmation before acting, data-flow disclosure, sensitive-data handling, dependency security, disclosed external effects, rollback or recovery path, verifiable attribution
Before you use it
  • The repository is a tutorial, not a runnable agent product, so trust-related criteria cannot be assessed.
  • Dependencies are not pinned, posing potential supply chain risks.
  • No tests or verification provided; all claims are based on README only.
Review evidence [1][2]
See the full review method →

What does this agent do, and when should you use it?

claw0 is an educational repository that guides developers in building an AI agent gateway from scratch, similar to OpenClaw. It comprises 10 progressive sections, each a runnable Python file introducing one core concept, from the basic agent loop to concurrency control. The code supports Telegram and Feishu channels, implements session persistence, heartbeat cron jobs, message delivery queues, and resilience mechanisms like retries and auth rotation. By the end, learners can read OpenClaw's production codebase with confidence. The repository provides English, Chinese, and Japanese versions of code and docs.

Each section is a standalone Python script demonstrating a specific aspect of the agent gateway. For instance, s01 implements the basic agent loop (while True + stop_reason), s02 adds tool use via a dispatch table, s03 implements JSONL session persistence, s04 integrates Telegram and Feishu channels, s05 implements gateway routing with 5-tier binding, s06 introduces agent personality via files like SOUL.md, s07 adds heartbeat and scheduled tasks, s08 implements a message queue, s09 implements retry and auth rotation, and s10 implements named-lane concurrency. Users run these scripts with an Anthropic API key to experience building a gateway step-by-step.

  1. AI developers wanting to understand the core mechanisms of AI agents through hands-on coding
  2. Teams building automation bots for Telegram or Feishu, leveraging the channel implementations
  3. Developers needing message persistence and reliable delivery, learning from s03 and s08 queue designs
  4. Users interested in proactive agent behavior and scheduled tasks, referencing s07
  5. Developers ensuring concurrency safety in multi-user or multi-channel environments, studying s10
  6. Those wanting to give agents a personality and memory, exploring s06

What are this agent's strengths and limitations?

Pros
  • Progressive pedagogy, each section adds one concept while retaining prior code
  • Three language versions (English, Chinese, Japanese) with co-located code and docs
  • Covers production-grade features: auth rotation, retry onion, concurrency control
  • Provides clear dependency graphs and architecture diagrams
  • Runnable and beginner-friendly
Limitations
  • Only supports Anthropic API, requiring its API key
  • No Docker or cloud deployment config, requires manual deployment
  • Teaching code may simplify real-world production complexities
  • No explicit test coverage or production readiness assurances

How do you install or deploy this agent?

  1. Clone the repo: git clone https://github.com/shareAI-lab/claw0.git && cd claw0. 2. Install dependencies: pip install -r requirements.txt. 3. Copy .env.example to .env and edit to set ANTHROPIC_API_KEY and MODEL_ID. 4. Ensure Python 3.11+.

How do you use this agent?

Run any section (e.g., English): python sessions/en/s01_agent_loop.py. Study sections in order, as each builds on previous ones; for example, s03 depends on s02, s04 on s03, and so on. It's recommended to run from s01 to s10 sequentially and read the accompanying .md docs.

How does this agent compare with similar options?

The repository mentions a companion project, learn-claude-code, which focuses on the internal design of an agent (planning, context compression, team coordination), while claw0 focuses on gateway routing, channels, and proactive behavior.

FAQ

What credentials do I need?
You need an Anthropic API key (ANTHROPIC_API_KEY) and set the model ID (MODEL_ID).
Which chat platforms are supported?
Telegram and Feishu are explicitly supported, implemented in s04.
Can I use this code in production?
The code is educational but includes production-grade concepts like retries and queues; use as a base and harden for production.
What prerequisites are required?
Python programming basics and understanding of API usage.

Related agents