> For the complete documentation index, see [llms.txt](https://tinyhumans.gitbook.io/openhuman/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa.md).

# 开发

- [概览](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/developing.md): 从源代码构建、运行、测试并发布 OpenHuman。
- [Rust 快速入门](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/quickstart.md): 从一个空的 Cargo 项目开始，在你自己的 Rust 进程中于一个 OpenHuman 运行时上运行多个代理。
- [开始设置](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/getting-set-up.md): 从源代码构建 OpenHuman，或安装一个发布版：工具链、子模块、桌面构建以及各平台安装程序。
- [架构](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/architecture.md): OpenHuman 的高层结构：桌面外壳、Rust 核心和前端，以及它们之间的数据流动方式。
- [深入架构参考](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/architecture/architecture.md): OpenHuman 代码库的完整架构参考：仓库布局、运行时、套接字、技能、记忆、安全和 iOS 客户端。
- [代理执行器](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/architecture/agent-harness.md): 代理一次运行是如何进行的：工具调用循环、子代理分发、原型、分诊、钩子，以及围绕它们的成本和预算机制。
- [存储](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/architecture/storage.md): 位于 crates/openhuman-core/src/storage/ 的存储域：包括端口、URL 解析、Cargo 特性、按代理作用域、驱动以及磁盘布局。
- [TinyFlows 上的流程](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/architecture/flows-on-tinyflows.md): OpenHuman 如何组合 TinyFlows 模块：总线契约、作用域存储、运行回调、触发器以及宿主安全边界。
- [记忆](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/architecture/memory.md): crates/openhuman-core/src/memory/ 中的记忆宿主层：TinyMemory 的代理生命周期绑定到 OpenHuman 的轮次、RPC 和 UI。
- [共享核心中的进程状态](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/architecture/process-state.md): 共享核心的进程状态、租户归属和路由要求。
- [MCP 注册表](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/architecture/mcp-registry.md): OpenHuman 如何连接 MCP 服务器，应用产品策略，并通过 TinyBus 模块将它们的工具暴露给代理。
- [安全](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/architecture/security.md): 自主核心的信任边界：自主与风险策略、沙箱选择、审计日志、加密密钥存储、配对防护以及 redact() 辅助函数。
- [前端](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/architecture/frontend.md): \`app/src/\` 中的 React 和 Vite 前端：状态、服务、提供方、路由、组件和 hooks。
- [Tauri 外壳](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/architecture/tauri-shell.md): \`crates/openhuman-app/\` 中的桌面宿主：Tauri v2 webview、IPC 命令、嵌入式核心的生命周期以及 JSON-RPC 桥接。
- [构建 Rust 核心](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/building-rust-core.md): 在一台全新的机器上从零构建 Rust 核心。
- [可加载模块](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/loadable-modules.md): OpenHuman 如何在运行时加载可选的原生模块：注册表、准入检查，以及模块发生故障时会怎样。
- [性能与占用](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/performance.md): 实测占用：一个进程里能容纳多少代理、冷启动、二进制大小，以及让它保持小巧的依赖限制。
- [可插拔引擎](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/engines.md): 四个可替换引擎（模型、嵌入、记忆、搜索）以及用于选择它们的配置键。
- [组件](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/components.md): 【components】配置表：每个微小依赖对应一个开关，它如何缩小宿主范围，以及旧标志如何迁移。
- [Jev](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/jev.md): Jev，这个小型决策模型：它回答什么、OpenHuman 在哪里使用它、它的成本以及如何配置它。
- [嵌入](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/embed.md): 在 Rust 应用中运行 OpenHuman 核心，使用一个 Runtime 和独立配置的 Agents。
- [安装](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/embed/installation.md): 添加 Embed 依赖，选择编译期开关，并有意识地配置宿主的运行时和状态。
- [快速入门](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/embed/quickstart.md): 让一个代理针对本地 fixture 运行，然后为宿主选择提供方和工作目录。
- [嵌入式架构](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/embed/architecture.md): 宿主围绕一个核心组合基础设施；代理基于其运行时派生带作用域的上下文。
- [概念](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/embed/concepts.md): Embed 公共 API 背后的所有权和生命周期规则。
- [运行时](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/embed/concepts/runtime.md): Runtime 拥有一个已初始化的核心以及其代理共享的进程级资源。
- [Runtime 默认值](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/embed/concepts/runtime-defaults.md): Runtime 默认值构成新注册代理的起点；显式代理设置会覆盖它们。
- [Agents](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/embed/concepts/agents.md): 一个 Agent 在共享的 Runtime 上结合一个身份、派生上下文以及独立配置的工具/模型行为。
- [访问与审批](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/embed/concepts/access-approvals.md): Access 配置轮次身份和权限策略；宿主决定暂存请求如何获得决策。
- [提供方](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/embed/concepts/providers.md): 提供方提供路由或原生 ChatModel 实现，并支持代理覆盖和可选的有序回退。
- [轮次与会话](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/embed/concepts/turns-sessions.md): 一次 turn 是一轮原生模型/工具循环；session 是使后续 turns 形成对话的持久身份。
- [工具](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/embed/concepts/tools.md): 工具目录只暴露允许的执行面；宿主工具使用与内置工具相同的原生 Tool 合约。
- [MCP](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/embed/concepts/mcp.md): MCP 服务器为一个代理添加远程工具发现和执行，并带有显式服务器配置和工具白名单。
- [技能](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/embed/concepts/skills.md): 技能是在代理自身 home 目录中发现的指令和资源的复制包。
- [记忆](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/embed/concepts/memory.md): 类型化内存门面在学习、检索或忘记记录之前会绑定命名空间。
- [Cron](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/embed/concepts/cron.md): Cron 提供持久的命名作业、显式的立即运行执行，以及面向已注册代理的作业历史。
- [通道](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/embed/concepts/channels.md): 通道监听器将外部消息绑定到一个已注册代理，并将传输生命周期保持在宿主控制之下。
- [配置文件与 SaaS](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/embed/concepts/profiles-saas.md): ProfileRuntime 通过工作区、凭据、对话和事件流隔离已认证用户。
- [补全器](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/embed/concepts/completer.md): Completer 在不启动 Runtime 也不进入代理工具循环的情况下发送无状态模型请求。
- [Hooks 与缝合点](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/embed/concepts/hooks-seams.md): 宿主切面替代基础设施端口；钩子观察或控制选定的 turn 和工具边界。
- [可观测性](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/embed/concepts/observability.md): Runtime 元数据事件跟踪生命周期和审批；turn 流携带每轮进度和最终结果。
- [测试](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/embed/concepts/testing.md): 确定性的本地提供方和显式观测可在不接触真实推理或后端服务的情况下证明行为。
- [错误](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/embed/concepts/errors.md): 类型化错误区分构建可用性、预期领域状态、宿主设置失败和已移除的代理实例。
- [嵌入式指南](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/embed/guides.md): 构建聊天机器人、承载多个代理、提供用户档案服务，或测试一个嵌入式运行时。
- [CLI 聊天机器人](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/embed/guides/cli-chatbot.md): 在 Rust 命令行宿主中收集回复或消费进度事件。
- [多个代理](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/embed/guides/multi-agent.md): 共享一个运行时，同时配置独立的代理提示词和工作文件夹。
- [多租户 SaaS](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/embed/guides/saas-multi-tenant.md): 使用 ProfileRuntime 隔离用户凭据、工作区和对话历史。
- [部署服务器](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/embed/guides/deploy-server.md): 从宿主拥有的 HTTP 服务中调用代理，而无需向 Embed 添加 RPC。
- [轻量且无头的主机](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/embed/guides/lean-headless.md): 将运行时活动与编译期 Cargo 特性分开控制。
- [使用模拟后端进行测试](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/embed/guides/mock-backend-testing.md): 离线运行嵌入示例，并验证行为，而不仅仅是编译。
- [嵌入集成](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/embed/integrations.md): 为你的宿主选择提供方、工具、存储和通道适配器。
- [OpenAI 兼容提供商和 BYOK](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/embed/integrations/openai-compatible.md): 将推理路由到显式端点和 Bearer，而无需更改共享宿主配置。
- [TinyHumans 托管推理](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/embed/integrations/tinyhumans-managed.md): 在使用托管推理和托管服务之前，请连接 TinyHumans 层。
- [本地和自定义模型](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/embed/integrations/local-models.md): 使用本地兼容 OpenAI 的服务器，或注入原生 ChatModel 实现。
- [MCP 服务器](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/embed/integrations/mcp.md): 连接一个已声明的 MCP 服务器并验证远程发现和执行。
- [Composio](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/embed/integrations/composio.md): 在宿主提供后端传输的同时，为每个代理固定连接器凭据。
- [网页搜索](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/embed/integrations/web-search.md): 为每个代理固定一个网页搜索提供商密钥，仅存于内存中。
- [存储驱动](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/embed/integrations/storage-drivers.md): 通过 Embed 配置 SQLite 或 MongoDB，并检查所选后端。
- [通道](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/embed/integrations/channels.md): 将传入通道绑定到一个代理并验证传递的回复。
- [食谱](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/embed/cookbook.md)
- [嵌入 API 参考](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/embed/api-reference.md): 使用本地 rustdoc 和源代码生成的索引查看完整的 Embed 公共接口。
- [API 索引](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/embed/api-reference/api-index.md)
- [RuntimeBuilder 设置项](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/embed/api-reference/builder-setters.md)
- [编译后的功能矩阵](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/embed/api-reference/capability-matrix.md)
- [嵌入常见问题](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/embed/faq.md): 关于常见的宿主、生命周期、特性和提供方选择的答案。
- [嵌入故障排除](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/embed/troubleshooting.md): 诊断缺失的特性、被阻塞的 turn、凭据、状态路径和生命周期失败。
- [SaaS 配置文件](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/saas-profiles.md): 将 OpenHuman 作为多用户服务运行：每个用户一个用户档案，置于可信网关之后，可在单节点或带有租用用户档案的集群上运行。
- [一个 TinyHumans API 密钥](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/tinyhumans-api-key.md): 一个 TinyHumans API 密钥能解锁什么、如何使用它，以及 OpenHuman 如何存储和发送它。
- [钩子](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/hooks.md): 基于文件的钩子，用于观察和拦截一个代理回合，采用与 Cursor 兼容的契约。
- [MCP 服务器](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/mcp-server.md): 将 OpenHuman Core 作为 stdio Model Context Protocol 服务器运行，供本地 MCP 客户端使用。
- [Claude Code CLI 提供方](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/claude-code.md): 通过 Claude Code CLI 路由聊天工作负载。
- [Linux 和 Docker 上的 TinyComputer 浏览器](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/tinycomputer-docker.md): 在 Linux 容器中以无头模式运行 TinyComputer 浏览器，使用本地构建的模块和无人值守自动化。
- [主题化（令牌系统）](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/theming.md): 支撑每个主题的 CSS token 系统：token 如何定义、Tailwind 如何使用它们，以及如何编写遵循它的组件。
- [测试策略](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/testing-strategy.md): OpenHuman 如何使用 Vitest、cargo test 和 WDIO E2E 测试其产品，以及每种测试放在哪里。
- [端到端测试](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/e2e-testing.md): 如何运行端到端测试套件：使用 Playwright 针对独立核心，使用 WDIO 通过原生 Wry 宿主，以及本地脚本、环境变量和 CI 流水线。
- [代理可观测性](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/agent-observability.md): 如何查看应用和代理做了什么：E2E 产物、推理捕获代理，以及 Langfuse traces。
- [发布政策](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/release-policy.md): OpenHuman 如何发布版本，包括分支模型、CI 通道、最低版本门槛和密钥轮换。
- [AgentBox 市场部署（历史）](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/agentbox-deployment.md): 已移除的 AgentBox 容器表面，保留给任何调试旧版本的人使用。
- [Chromium 嵌入式框架（历史）](https://tinyhumans.gitbook.io/openhuman/zh/kai-fa/cef.md): 为什么桌面外壳不再使用 Chromium（CEF）、由什么取代它，以及禁止向子 webview 注入 JavaScript 的规则。
