Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
C

capsule-react

> 编程语言
Open source

ReAct loop coordinator. Stateless state machine for reasoning-and-action cycle. Part of Unicity AOS.

5.1K stars0 likes0 views
WebsiteGitHub

About

ReAct loop coordinator. Stateless state machine for reasoning-and-action cycle. Part of Unicity AOS.

astrid-capsule-react

The ReAct loop coordinator for Astrid OS.

In the OS model, this capsule is the shell. It drives the reasoning-and-action cycle that makes an agent an agent: fetch context, think, act, observe, repeat.

State machine

Idle -> AwaitingIdentity -> AwaitingPromptBuild -> Streaming -> AwaitingTools -> Streaming -> ... -> Idle

The react loop contains no inference logic. It is pure control flow that coordinates five other capsules over the IPC event bus:

  1. Session - fetch conversation history, persist turn results
  2. Identity - build the system prompt from workspace config
  3. Prompt Builder - merge plugin contributions into the final prompt
  4. Provider (e.g. Anthropic) - stream LLM responses
  5. Tool Router - dispatch tool calls and collect results

What it does not do

This capsule does not call LLMs, execute tools, build prompts, or store messages. It orchestrates the capsules that do. Replacing this capsule with a different orchestration strategy (debate, MCTS, chain-of-verification) changes the agent's behaviour without touching any other capsule.

Persistence

Ephemeral per-turn state is stored in the capsule KV store:

  • react.turn.{session_id} - current turn state
  • react.req2sess.{request_id} - request-to-session correlation
  • react.call2sess.{call_id} - tool call-to-session correlation

This is control flow state, not conversation history. History lives in the session capsule.

Development

rustup target add wasm32-unknown-unknown
cargo build --target wasm32-unknown-unknown --release

License

Dual-licensed under MIT and Apache 2.0.

Copyright (c) 2025-2026 Joshua J. Bouw and Unicity Labs.

GitHub Issues· 0 open

View all on GitHub

No open issues yet, or sync has not completed.

Highlights

  • •react.turn.{session_id} - current turn state
  • •react.req2sess.{request_id} - request-to-session correlation
  • •react.call2sess.{call_id} - tool call-to-session correlation

> Tags

Rust

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言