经 AI Skill Hub 精选评估,KohakuTerrarium Agent工作流 获评「推荐使用」。这款AI工具在功能完整性、社区活跃度和易用性方面表现出色,AI 评分 7.5 分,适合有一定技术背景的用户使用。
通用型AI代理框架,提供开箱即用的工作流编排能力。支持多种LLM集成,适合开发者构建复杂智能应用、自动化任务流程和多步骤AI任务编排。
KohakuTerrarium Agent工作流 是一款基于 Python 开发的开源工具,专注于 AI代理框架、工作流编排、LLM集成 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
通用型AI代理框架,提供开箱即用的工作流编排能力。支持多种LLM集成,适合开发者构建复杂智能应用、自动化任务流程和多步骤AI任务编排。
KohakuTerrarium Agent工作流 是一款基于 Python 开发的开源工具,专注于 AI代理框架、工作流编排、LLM集成 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
# 方式一:pip 安装(推荐)
pip install kohakuterrarium
# 方式二:虚拟环境安装(推荐生产环境)
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install kohakuterrarium
# 方式三:从源码安装(获取最新功能)
git clone https://github.com/Kohaku-Lab/KohakuTerrarium
cd KohakuTerrarium
pip install -e .
# 验证安装
python -c "import kohakuterrarium; print('安装成功')"
# 命令行使用
kohakuterrarium --help
# 基本用法
kohakuterrarium input_file -o output_file
# Python 代码中调用
import kohakuterrarium
# 示例
result = kohakuterrarium.process("input")
print(result)
# kohakuterrarium 配置文件示例(config.yml) app: name: "kohakuterrarium" debug: false log_level: "INFO" # 运行时指定配置文件 kohakuterrarium --config config.yml # 或通过环境变量配置 export KOHAKUTERRARIUM_API_KEY="your-key" export KOHAKUTERRARIUM_OUTPUT_DIR="./output"
<p align="center"> <img src="images/banner.png" alt="KohakuTerrarium" width="800"> </p> <p align="center"> <strong>The machine for building agents — so you stop rebuilding the machine every time you want a new one.</strong> </p> <p align="center"> <img src="https://img.shields.io/badge/python-3.10%2B-blue" alt="Python 3.10+"> <img src="https://img.shields.io/badge/license-KohakuTerrarium--1.0-green" alt="License"> <img src="https://img.shields.io/badge/version-1.4.0-orange" alt="Version"> </p>
<p align="center"> <strong>English</strong> · <a href="README.zh.md">繁體中文</a> · <a href="README.zh-CN.md">简体中文</a> </p> <p align="center"> <a href="https://terrarium.kohaku-lab.org"><strong>Documentation</strong></a> </p>
---
kt resume.kt search and the search_memory tool let you (and the agent) look up past work.group_* graph-editor tools registered on privileged nodes.>>, &, |, *, .iterate operators for stitching agents into pipelines programmatically.kt-biome. Start by running strong default agents; customise or inherit from them later.KohakuTerrarium already ships:
kt install, kt update).Terrarium engine plus lower-level Agent access.npm install --prefix src/kohakuterrarium-frontend npm run build --prefix src/kohakuterrarium-frontend ```
```bash
```bash
kt service install + hardened unitsThree first-party Docker images on GHCR — pick the shape:
```bash
What Python version is required? Python 3.10 or higher. Install via pip install kohakuterrarium. Python 3.12+ is recommended — that's what CI validates and what the agent runtime is tuned for. 3.10 and 3.11 are supported on a best-effort basis (everything installs and runs, but the asyncio + SQLite-daemon-thread interaction on those older runtimes is slower and occasionally fights the per-test timeouts in the integration suite).
Which LLM providers are supported? Codex OAuth, OpenAI/OpenRouter-style providers, native Anthropic, Google Gemini, local OpenAI-compatible servers (Ollama, vLLM), and other OpenAI-compatible cloud providers. Configure with kt login, kt config llm add, kt config provider add, or provider API keys.
Can I use local models? Yes. Point the LLM endpoint to your local server (Ollama, vLLM, etc.) and configure the model name in your creature configuration.
Recommended Python version: 3.12 or newer. CI validates 3.12+ only; 3.10 and 3.11 still install and run (requires-python = ">=3.10") but are supported best-effort — older asyncio + SQLite-daemon-thread interaction is slower and the integration suite occasionally times out on those runtimes.
Agents are async Python values. One Terrarium engine per process hosts every running creature — a standalone agent is just a 1-creature graph in the engine.
import asyncio
from kohakuterrarium import Terrarium
async def main():
# Solo creature
engine, alice = await Terrarium.with_creature("@kt-biome/creatures/swe")
try:
async for chunk in alice.chat("Explain what this codebase does."):
print(chunk, end="", flush=True)
finally:
await engine.shutdown()
# Multi-agent recipe
engine = await Terrarium.from_recipe("@kt-biome/terrariums/swe_team")
try:
async for chunk in engine["swe"].chat("Fix the auth bug."):
print(chunk, end="", flush=True)
finally:
await engine.shutdown()
asyncio.run(main())
Creatures are meant to be packaged, installed, reused, and shared.
kt install https://github.com/someone/cool-creatures.git
kt install ./my-creatures -e
kt list
kt update --all
Run installed configs with package references:
kt run @cool-creatures/creatures/my-agent
kt terrarium run @cool-creatures/terrariums/my-team
Available resources:
kt-biome/ — official showcase creatures, terrariums, and plugin packexamples/agent-apps/ — config-driven creature examplesexamples/code/ — Python usage examplesexamples/terrariums/ — multi-agent examplesexamples/plugins/ — plugin examplesSee examples/README.md.
First Creature · First Terrarium · First Python Embedding · First Custom Tool · First Plugin
Getting Started · Creatures · Terrariums · Sessions · Memory · Configuration · Programmatic Usage · Composition · Custom Modules · Plugins · MCP · Packages · Serving · Laboratory · Deployment — Docker · Deployment — systemd · Deployment — reverse proxy · Examples
kt install https://github.com/Kohaku-Lab/kt-biome.git
```
Supports Codex OAuth, OpenRouter/OpenAI, native Anthropic, Google Gemini, and any OpenAI-compatible API.
Private by default, shared by opt-in.
See CLI Reference.
CLI · HTTP · Python API · Configuration · Builtins · Plugin hooks
kt install <git-url> kt install ./my-creatures -e # editable install ```
A creature has six conceptual modules. Five of them are user-extensible — you swap their implementations in config or in Python. The sixth, the controller, is the reasoning loop that drives them; you rarely swap it (and when you do, you're writing the framework's successor).
| Module | What it does | Example custom use |
|---|---|---|
| **Input** | Receives external events | Discord listener, webhook, voice input |
| **Output** | Delivers agent output | Discord sender, TTS, file writer |
| **Tool** | Executes actions | API calls, database access, RAG retrieval |
| **Trigger** | Generates automatic events | Timer, scheduler, channel watcher |
| **Sub-agent** | Delegated task execution | Planning, code review, research |
Plus plugins, which modify the connections between modules without forking them (prompt plugins, lifecycle hooks). See plugins guide.
Why is my creature not responding? Check that your LLM provider is configured correctly with kt login. Verify network connectivity and API key validity.
How do I debug agent behavior? Use kt run --verbose for detailed logs. Resume or inspect prior work with kt resume, search it with kt search, or use the Studio session viewer in the web/desktop UI.
Where can I get help? - QQ Group: 1097666427 - Discord: https://discord.gg/xWYrkyvJ2s - Forum: https://linux.do/
KohakuTerrarium 是一个专为构建 Agent 而设计的“机器”,旨在解决开发者在创建新 Agent 时需要重复构建运行时的痛点。它通过高度抽象的模型,让开发者能够专注于定义 Agent 的行为而非底层架构,从而实现从“构建机器”到“配置机器”的范式转变。
本项目提供 Agent 级别的抽象,采用独特的六模块 Creature 模型,开发者只需编写配置或自定义模块��可创建新 Agent。系统内置了强大的 Session 持久化与恢复功能,支持通过 `kt resume` 恢复运行状态,并提供可搜索的 Session 历史记录。此外,它还内置了丰富的工具集(如 File, Shell, Web, Jupyter 等)以及专门用于规划、执行和研究的 Sub-agents,支持后台工具执行与非阻塞的 Agent 流。
在使用 `kt web` 或 `kt app` 等 Web 前端功能时,需要先在 `src/kohakuterrarium-frontend` 目录下通过 npm 进行构建。此外,建议使用 Python 3.12 或更高版本以获得最佳的 asyncio 和 SQLite 性能支持,虽然 3.10+ 版本也兼容,但部分集成测试可能会因运行时差异而出现超时。
首先,通过 pip 安装 KohakuTerrarium 核心包。如果需要完整功能,可以使用 `pip install "kohakuterrarium[full]"`。安装完成后,可以通过 `kt install` 命令从 GitHub 仓库或本地路径安装预设的 Creatures 和 Plugins。对于开发者,还支持使用 `-e` 参数进行可编辑模式安装。
项目支持通过 Python 异步编程进行程序化调用,将 Agent 视为异步 Python 值进行操作。同时,提供了强大的 CLI 工具,支持通过 `kt install` 安装第三方 Agent 包,并通过 `kt run` 使用特定的 package reference 来运行配置好的 Agent 或 Terrarium 团队环境。
KohakuTerrarium 提供了灵活的配置机制,支持通过 `kt configure` 配置多种 LLM 提供商,包括 Anthropic、OpenAI、Google Gemini 以及任何兼容 OpenAI 标准的 API。系统通过 Environment(共享状态)与 Session(私有状态)进行隔离,确保 Agent 的私有数据(如 scratchpad)默认安全,仅在需要时通过 opt-in 模式进行共享。
项目提供了多层次的交互接口:`cli` 提供丰富的终端内联体验;`tui` 提供全屏的 Textual 交互式应用程序;`plain` 模式则通过标准输入输出(stdout/stdin)支持管道操作与 CI/CD 集成。开发者可以参考官方文档获取关于 HTTP、Python API 及插件钩子(Plugin hooks)的详细参考。
每个 Creature 由六个概念模块组成。其中五个模块是用户可扩展的,开发者可以通过修改配置或 Python 代码来替换其实现。第六个模块是 Controller(控制��),负责驱动整个推理循环。这种模块化设计允许开发者通过更换模块来实现 Agent 能力的快速迭代,而无需重构整个框架。
针对常见问题,如果 Agent 没有响应,请首先通过 `kt login` 检查 LLM 提供商配置及 API Key 的有效性。若需调试 Agent 的具体行为,建议使用 `kt run --verbose` 查看详细日志,并利用 `kt resume` 或搜索功能来检查和回溯之前的运行记录。
设计完整的AI代理框架,提供工作流和LLM集成能力。项目活跃度中等,文档完整度有待提升,适合寻求工作流方案的开发团队。
该工具使用 NOASSERTION 协议,商用场景请仔细阅读协议条款,必要时咨询法律意见。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
📄 NOASSERTION — 请查阅原始协议条款了解具体使用限制。
AI Skill Hub 点评:KohakuTerrarium Agent工作流 的核心功能完整,质量良好。对于AI爱好者来说,这是一个值得纳入个人工具库的选择。建议先在非生产环境试用,再逐步推广。
| 原始名称 | KohakuTerrarium |
| 原始描述 | 开源AI工作流:KohakuTerrarium is a general-purpose AI agent framework and batteries-included a。⭐326 · Python |
| Topics | AI代理框架工作流编排LLM集成Python框架智能自动化 |
| GitHub | https://github.com/Kohaku-Lab/KohakuTerrarium |
| License | NOASSERTION |
| 语言 | Python |
收录时间:2026-05-16 · 更新时间:2026-05-19 · License:NOASSERTION · AI Skill Hub 不对第三方内容的准确性作法律背书。