whatisgithub

What is agent-runtime?

nabilaziz99/agent-runtime — explained in plain English

Analysis updated 2026-05-18

121PythonAudience · developerComplexity · 4/5Setup · moderate

In one sentence

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.

Mindmap

mindmap
  root((agent_runtime))
    What it does
      Recreates agent spawning architecture
      Async generator agent loop
      Hierarchical cancellation
    Built on
      LangChain
      ChatAnthropic
    Current status
      Step 1 foundation only
      Tool dispatcher not wired up
    Roadmap
      Tool dispatcher
      Agent spawn tool
      Compaction and hooks
    Requirements
      Python 3.11 plus
      Anthropic API key

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Study a minimal reference implementation of Claude Code's agent spawning architecture in Python

USE CASE 2

Use the foundation as a starting point for building a custom LangChain-based multi-agent runtime

USE CASE 3

Follow the project's roadmap to see how a hierarchical agent cancellation system can be structured

What is it built with?

PythonLangChainasyncio

How does it compare?

nabilaziz99/agent-runtime2417467487-hub/worldcuproichefkannofriend-source/lcb-baker-agent
Stars121121121
LanguagePythonPythonPython
Setup difficultymoderatemoderateeasy
Complexity4/54/52/5
Audiencedeveloperpm foundergeneral

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 1h+

Requires Python 3.11+ and an Anthropic API key, the tool dispatcher needed for a full working example is not implemented yet.

No license is stated in the README, so no explicit reuse rights are granted.

So what is it?

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.

Copy-paste prompts

Prompt 1
Walk me through how agent_runtime's async generator based agent loop treats subagent calls as recursion.
Prompt 2
Explain the difference between agent_runtime's current Step 1 foundation and what Step 2's tool dispatcher will add.
Prompt 3
Show me how to set up agent_runtime with Python 3.11, install its requirements, and configure an Anthropic API key.
Prompt 4
Compare agent_runtime's AbortController based cancellation approach to a simpler cancellation token pattern.

Frequently asked questions

What is agent-runtime?

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.

What language is agent-runtime written in?

Mainly Python. The stack also includes Python, LangChain, asyncio.

What license does agent-runtime use?

No license is stated in the README, so no explicit reuse rights are granted.

How hard is agent-runtime to set up?

Setup difficulty is rated moderate, with roughly 1h+ to a first successful run.

Who is agent-runtime for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.