Skip to main content

Crate adk_devtools

Crate adk_devtools 

Source
Expand description

§adk-devtools

Developer tools for ADK-Rust coding agents — read_file, write_file, edit_file, glob, grep, and bash — all scoped to a sandboxed Workspace.

These are the inner-loop tools a coding agent needs: read and edit files, search the tree, and run commands/tests. Every operation is rooted at a workspace directory and rejected if it escapes; mutations and bash are gated by the workspace’s capability flags.

§Quick start

ⓘ
use adk_devtools::{DevToolset, Workspace};
use adk_agent::LlmAgentBuilder;
use std::sync::Arc;

let workspace = Workspace::new("./my-repo");
let agent = LlmAgentBuilder::new("coding-agent")
    .model(model)
    .toolset(Arc::new(DevToolset::new(workspace)))
    .build()?;

§Sandboxing

Workspace enforces path containment (no escaping the root), read-only mode (deny writes/bash), and a bash timeout. Phase 1 runs bash host-local; for strong isolation, run behind a containerized CodeExecutor (see docs/design/coding-agent.md). The policy vocabulary is aligned with adk-code’s SandboxPolicy and will integrate with it directly in a later phase.

Re-exports§

pub use tools::BashTool;
pub use tools::EditFileTool;
pub use tools::GlobTool;
pub use tools::GrepTool;
pub use tools::ReadFileTool;
pub use tools::WriteFileTool;

Modules§

tools
The individual developer tools.

Structs§

DevToolset
Bundles the developer tools (read_file, write_file, edit_file, glob, grep, bash) so they can be attached to an agent in one call.
Workspace
A workspace roots every file/search/shell operation at a directory and enforces a small capability policy.

Enums§

DevToolError
Errors produced by the developer tools.

Constants§

DEFAULT_ENV_ALLOWLIST
Environment variables bash receives by default.