Skip to main content

Crate zapmyco_core

Crate zapmyco_core 

Source
Expand description

§zapmyco-core

AI Agent 运行时的核心抽象层。

§设计原则

  • 零环境依赖:不读文件、不写终端、不碰环境变量
  • 依赖注入:所有外部依赖通过 AgentConfig 传入
  • 事件驱动:所有输出通过 AgentEvent 流发送
  • 工具即 Trait:通过 AgentTool trait 注册,不通过枚举硬编码

Structs§

AgentConfig
Agent 运行配置
ConversationMessage
一条对话消息

Enums§

AgentError
Agent 核心循环错误
AgentEvent
Agent 核心事件
MessageBlock
消息内容块 — 用于表示结构化的工具调用/结果
Role
对话角色

Traits§

AgentTool
Agent 工具定义

Functions§

agent_loop
运行 Agent 核心循环