nabilaziz99/agent-runtime — explained in plain English
Analysis updated 2026-05-18
Study a minimal reference implementation of Claude Code's agent spawning architecture in Python
Use the foundation as a starting point for building a custom LangChain-based multi-agent runtime
Follow the project's roadmap to see how a hierarchical agent cancellation system can be structured
| nabilaziz99/agent-runtime | 2417467487-hub/worldcuproi | chefkannofriend-source/lcb-baker-agent | |
|---|---|---|---|
| Stars | 121 | 121 | 121 |
| Language | Python | Python | Python |
| Setup difficulty | moderate | moderate | easy |
| Complexity | 4/5 | 4/5 | 2/5 |
| Audience | developer | pm founder | general |
Figures from each repo's GitHub metadata at analysis time.
Requires Python 3.11+ and an Anthropic API key, the tool dispatcher needed for a full working example is not implemented yet.
agent_runtime is a Python project that tries to recreate, in a clean and minimal way, the internal architecture that the AI coding assistant Claude Code uses to spawn and manage subagents. The author studied how Claude Code's agent spawning system works and rebuilt the same design patterns in Python rather than copying Claude Code itself. The project is built on top of LangChain, an existing framework for working with AI chat models and tools. It reuses LangChain's message types and its base classes for chat models and tools, and by default connects to Claude models through LangChain's Anthropic integration, though the README says other providers like OpenAI or Google's models could be swapped in without changing the agent code itself. The README is upfront that this is very early stage work, labeled Step 1 of a longer roadmap. What exists so far is the foundational architecture: an agent loop built around asynchronous generators, where an agent calling another agent is treated as recursion, a cancellation system that can stop a whole tree of agents at once, and a simple registry that tracks running agents and lets them exchange messages through an inbox. The README explicitly states that the piece which actually runs tools is not wired up yet, and lists further planned steps including a tool for spawning subagents, a way to cancel a running task, support for compacting long conversations, and hooks that run before or after a tool executes. None of those later steps are implemented yet. Getting started requires Python 3.11 or newer, since the code relies on newer asyncio features and modern type hint syntax. Setup is a pip install of the requirements followed by setting an Anthropic API key as an environment variable. The README includes a minimal usage example showing how a session might work once Step 2 is finished, but as of the current state it is not yet possible to run that full example.
An early-stage Python project rebuilding the architecture Claude Code uses to spawn and manage subagents, built on LangChain, with only the foundational pieces implemented so far.
Mainly Python. The stack also includes Python, LangChain, asyncio.
No license is stated in the README, so no explicit reuse rights are granted.
Setup difficulty is rated moderate, with roughly 1h+ to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.