欢迎使用 FlowZap,快速、清晰、掌控的绘图应用。

Claw Code Harness 架构

Claw Code harness 架构图,展示用户循环、Python 编排层、Rust 运行时以及 LLM 提供商、文件系统和 MCP 服务器等外部系统。

完整 FlowZap 代码

User { # User
n1: circle label:"Start"
n2: rectangle label:"Enter CLI command"
n3: rectangle label:"View streamed output"
n4: circle label:"Done"
n1.handle(right) -> n2.handle(left)
n2.handle(bottom) -> Python.n5.handle(top) [label="Command"]
n3.handle(right) -> n4.handle(left)
}
Python { # Python Orchestration
n5: rectangle label:"Load session context"
n6: rectangle label:"Build prompt"
n7: rectangle label:"Call model"
n8: diamond label:"Tool needed?"
n9: rectangle label:"Route tool call"
n10: rectangle label:"Update memory"
n11: rectangle label:"Finalize response"
n5.handle(right) -> n6.handle(left)
n6.handle(right) -> n7.handle(left)
n7.handle(bottom) -> External.n15.handle(top) [label="LLM request"]
n8.handle(bottom) -> n9.handle(top) [label="Yes"]
n8.handle(right) -> n11.handle(left) [label="No"]
n9.handle(bottom) -> Rust.n12.handle(top) [label="Tool call"]
n10.handle(right) -> n11.handle(left)
n11.handle(top) -> User.n3.handle(bottom) [label="Answer"]
}
Rust { # Rust Runtime
n12: diamond label:"Permission granted?"
n13: rectangle label:"Execute tool in sandbox"
n14: rectangle label:"Stream tool events"
n12.handle(right) -> n13.handle(left) [label="Yes"]
n12.handle(top) -> Python.n11.handle(bottom) [label="Denied"]
n13.handle(bottom) -> External.n16.handle(top) [label="File access"]
n13.handle(right) -> n14.handle(left)
n13.handle(top) -> External.n17.handle(bottom) [label="MCP call"]
n14.handle(top) -> Python.n10.handle(bottom) [label="Observations"]
n14.handle(left) -> User.n3.handle(right) [label="Stream"]
}
External { # External Systems
n15: rectangle label:"LLM provider"
n16: rectangle label:"File system"
n17: rectangle label:"MCP server"
n15.handle(left) -> Python.n8.handle(right) [label="Plan"]
n16.handle(left) -> Rust.n14.handle(right) [label="File data"]
n17.handle(left) -> Rust.n14.handle(bottom) [label="Tool data"]
}

相关模板

AI原生单智能体架构

单智能体AI架构,其中一个智能体处理所有事务:解析请求、推理、通过MCP调用工具、生成响应。这是原型和简单自动化的默认架构——易于调试,但很快达到上下文窗口限制且难以并行化。适合快速交付的MVP和独立开发者。

AI编排 - 单智能体(单体)

最简单的AI原生架构——单个智能体接收用户输入、推理、规划、决定工具调用、处理结果并生成响应。通过stdio或HTTP直接MCP连接。最适合MVP和低延迟场景。

MCP 零信任边界

MCP 安全网关架构,对工具调用进行认证,将执行路由到隔离沙箱,清洗响应,并向 AI 智能体返回干净结果。

微服务 API 网关架构

微服务 API 网关架构图,展示请求路由、JWT 身份验证、速率限制、服务发现以及跨分布式后端服务的响应聚合。该模板模拟微服务生态系统中所有客户端流量的入口点,在请求到达内部服务之前执行安全策略。适合设计具有集中式横切关注点的可扩展 API 基础设施的平台工程师。

微服务服务网格架构

服务网格架构图,展示 Istio 或 Linkerd 边车代理处理 mTLS 加密、流量策略、熔断器和跨微服务的分布式追踪。该模板可视化服务网格如何将网络关注点从应用代码中抽象出来,实现服务间的零信任通信。对于采用服务网格基础设施以提升可观测性和安全性的团队至关重要。

返回所有模板