Skip to main content

Module agent

Module agent 

Source
Expand description

Agent module

This module is split into focused submodules:

  • agent_core — the public agent struct, event/response types and tool registration logic.
  • executor — pure business-logic functions: building requests, fetching responses, opening SSE streams, executing tools. No Poll or Context here — just async fns that do real work.
  • stream — the asynchronous AgentStream state machine that schedules calls into executor and drives the full agent loop.

Public types are re-exported at the crate level so callers never need to reach into the submodules directly.

Re-exports§

pub use agent_core::AgentEvent;
pub use agent_core::DeepseekAgent;
pub use agent_core::ToolCallInfo;
pub use agent_core::ToolCallResult;
pub use stream::AgentStream;

Modules§

agent_core
stream
Agent streaming state machine.

Structs§

InterruptSender
Send values to the associated UnboundedReceiver.