Kohaku-Lab/KohakuTerrarium

KohakuTerrarium is a general-purpose AI agent framework and batteries-included app for building, running, and composing self-contained agents and multi-agent teams, with built-in tools, sub-agents, persistent sessions, TUI, and web UI.

What it solves

KohakuTerrarium is a framework designed to stop the cycle of rebuilding the same basic infrastructure (the "substrate") every time a developer wants to create a new AI agent. It provides a standardized, reusable foundation for agent logic, tool dispatch, session persistence, and multi-agent orchestration, allowing users to define new agent "shapes" via configuration rather than ground-up reimplementation.

How it works

The framework centers on the creature, a standalone agent composed of six modules: a reasoning loop (Controller), Input, Output, Tools, Triggers, and Sub-agents. These creatures are hosted by a Terrarium engine, which manages the graph topology, communication channels, and session bookkeeping. A Studio layer provides management surfaces like a web dashboard and desktop app, while an optional Laboratory transport layer allows the engine to be distributed across multiple machines via WebSockets.

Who it’s for

It is intended for developers who need customizable agent architectures, want to drive agents programmatically via Python for batch jobs or pipelines, or are building evolving agent requirements that don't fit into a single existing agent product.

Highlights

  • Agent-level abstraction: Define new agents using config files and custom modules instead of rewriting the runtime.
  • Coded Composition Algebra: Use operators like >> (sequence), & (parallel), and | (fallback) to stitch agents into complex pipelines.
  • Built-in Persistence: Native session management allows users to resume agents hours later using kt resume.
  • MCP Support: Connects to Model Context Protocol (MCP) servers per-agent or globally.
  • Package System: A dedicated marketplace (kt install @name) for sharing and installing pre-built creatures and plugins.
  • Multiple Interfaces: Out-of-the-box support for CLI, TUI, web dashboard, and native desktop applications.

Related

  • Project
  • Project
  • Project
  • Project
  • Project