Skip to main content

Module agent

Module agent 

Source
Expand description

Claude-Code-shaped agent loop for DeepSeek.

See https://code.claude.com/docs/en/agent-sdk/agent-loop. The crate-level re-exports give you:

With the builtin-tools feature enabled, builtin_tools::default_tools returns Read / Write / Edit / Glob / Grep / Bash ready to plug in.

Re-exports§

pub use builder::AgentBuilder;
pub use builder::DeepSeekAgent;
pub use loop_runner::run;
pub use messages::ContentBlock;
pub use messages::ResultSubtype;
pub use messages::SdkMessage;
pub use messages::SystemSubtype;
pub use options::CompactionConfig;
pub use options::RunOptions;
pub use permissions::PermissionDecision;
pub use permissions::PermissionMode;
pub use permissions::PreToolHook;
pub use tool::Tool;
pub use tool::ToolDefinition;

Modules§

builder
Back-compatible AgentBuilder / DeepSeekAgent over the new streaming loop. Existing callers (e.g. crates/research, crates/genesis) keep working unchanged.
builtin_tools
Built-in tools — same names and rough semantics as the Claude Agent SDK built-ins. The builtin-tools feature gives you Read/Write/Edit/Glob/ Grep/Bash. The scheduler feature adds CronCreate/CronList/CronDelete/ Monitor.
loop_runner
Claude-Code-shaped streaming agent loop.
messages
SDK message types — mirrors the Claude Agent SDK message stream.
options
Options passed into crate::agent::run.
permissions
Permission gating for tool calls.
pricing
Per-model USD pricing for cost reporting.
scheduler
Session-scoped cron scheduler matching Claude Code’s /loop semantics.
tool
Tool trait and ToolDefinition schema — verbatim from the original agent.rs, extended with Tool::read_only_hint used by the loop’s parallel-dispatch and permission logic.