Skip to main content

Crate defect_agent

Crate defect_agent 

Source
Expand description

Defect agent core.

Defines the abstractions that the agent main loop depends on: llm::LlmProvider, tool::Tool, event::AgentEvent, and the session state container. Concrete provider/tool implementations live in sibling crates (defect-llm, defect-tools, defect-mcp, etc.) and are plugged in through These traits are consumed here.

Modules are organized by responsibility and are exposed only at the module level (no flat re-exports at the lib root). Callers write defect_agent::llm::LlmProvider rather than defect_agent::LlmProvider.

Modules§

error
Cross-module error utilities.
event
The event stream published by the agent main loop to external consumers.
fs
Filesystem backend abstraction.
hooks
Hook system: extension points for the agent main loop.
http
HTTP client abstraction.
llm
LLM provider abstraction.
policy
Sandbox policy: “Allow / Deny / Ask user” decision for tool calls.
session
Session — state container and lifecycle interface for a single conversation.
shell
Shell execution backend abstraction.
tool
Tool abstraction.