atd-sdk 1.1.0

Rust SDK for the ATD (Agent Tool Dispatch) protocol — connect to any ATD-speaking server over Unix sockets.
Documentation

atd-sdk

Rust client SDK for the Agent Tool Dispatch (ATD) protocol.

Connect to any ATD-speaking server, discover tools, describe them, call them, and page through large results. This is the client half of the workspace — pair it with a server built on atd-runtime (any reachable ATD endpoint will do).

Install

cargo add atd-sdk

Quick example

use atd_sdk::{AtdClient, CallOptions, DiscoverFilter, Endpoint};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let client = AtdClient::connect(
        Endpoint::unix("/tmp/my-atd.sock")
    ).await?;

    let tools = client.discover(None, DiscoverFilter::default()).await?;
    println!("{} tools available", tools.len());

    let result = client.call(
        "ref:echo.say",
        serde_json::json!({"text": "hello"}),
        CallOptions { dry_run: false, preferred_binding: None },
    ).await?;

    println!("{result:?}");
    Ok(())
}

Client surface

  • connect / connect_with_options — open a connection to an Endpoint
  • hello / hello_with_ucan_tokens — capability handshake (UCAN-lite tokens)
  • discover — list tool summaries, with an optional query + DiscoverFilter
  • describe — fetch a tool's full ToolDefinition
  • call — invoke a tool
  • call_page / call_all — paginated invocation over HMAC-signed cursors; call_all follows cursors and merges pages per CallAllOptions

The client is async (tokio) and speaks the length-prefixed JSON wire format. It has no server dependency — it works against any ATD-speaking server, including the reference server atd-ref-server.

See also

License

Apache-2.0. See LICENSE.