Python SDK for drydock — build and test AI agents and agentic workflows locally.
Project description
drydock-sdk
Python SDK for drydock — build and test AI agents and agentic workflows locally, one binary, with or without Docker.
Write an agent, tool, or MCP server as a plain Python function, decorate it, and the drydock runtime launches it as an isolated node: hot-reloaded during development, wired to other agents (A2A) and MCP servers, and fully traced.
from drydock import node
@node(name="greeter", role="agent")
async def greet(ctx, name: str = "world"):
await ctx.emit({"status": "thinking"}) # stream a partial update
return {"message": f"hello, {name}"}
Requires the drydock runtime
This package is the author-side SDK only. It has no effect on its own — nodes
are launched and orchestrated by the separate drydock binary (the runtime, HTTP
API, web UI, and tracing all live there). Install the runtime first:
# macOS / Linux
curl -fsSL https://raw.githubusercontent.com/scionoftech/drydock/main/scripts/install.sh | sh
See the project README for tarball and build-from-source options.
Install
pip install drydock-sdk
Zero runtime dependencies, pure Python, ships type hints (PEP 561). Install it into the virtualenv of each node you author.
Write a node
A node is a directory with your handler and a node.yaml manifest:
# handler.py
from drydock import node
@node(name="hello", role="agent") # role: "agent" | "tool" | "mcp"
async def hi(ctx, name: str = "world"):
return {"message": f"hello, {name}"}
# node.yaml
name: hello
version: 0.1.0
role: agent
runtime: python
entry: handler.py:hi
drydock dev # hot-reload daemon + web UI
drydock invoke hello --input '{"name":"Sai"}'
The ctx object
Every handler receives a context as its first argument:
| Call | Does |
|---|---|
await ctx.a2a.call(target, input) |
Invoke another node by name (agent-to-agent) |
await ctx.mcp.call(alias, tool, args) |
Call a tool on a declared MCP server |
await ctx.mcp.list(alias) |
List an MCP server's tools |
await ctx.session.append(role, content) |
Append to the persistent transcript |
await ctx.session.history(limit) |
Read recent transcript entries |
await ctx.emit(data) |
Stream a partial chunk (no-op on plain invoke) |
ctx.session_id, ctx.streaming, ctx.trace |
Invocation metadata |
Handlers may be async def (served concurrently) or plain def (run in a thread
pool). A JSON-object input is spread onto handler kwargs; return any
JSON-serializable value.
Full reference — input mapping, session semantics, the error model, streaming, and environment scrubbing — is in docs/SDK.md.
Links
- Project & docs: https://github.com/scionoftech/drydock
- SDK reference: https://github.com/scionoftech/drydock/blob/main/docs/SDK.md
- Issues: https://github.com/scionoftech/drydock/issues
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file drydock_sdk-0.1.0.tar.gz.
File metadata
- Download URL: drydock_sdk-0.1.0.tar.gz
- Upload date:
- Size: 10.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6fbd82ee7ad2ea12ef44db431210804f976fb2525e1ce6f509d776c4f1ae7945
|
|
| MD5 |
0ab3432f3579027bcd1de08e4219cc5e
|
|
| BLAKE2b-256 |
2c2d2b07a694d995f931f7cc00bda15f8b6c3ef9143fccdc00ca43526c7f82f6
|
File details
Details for the file drydock_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: drydock_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c259b3c402178e54c42c526e3193d38ed57352edb133096b8027bd2dcee22ea7
|
|
| MD5 |
7c9fe1ba5767fe344d8acf8635bde231
|
|
| BLAKE2b-256 |
9878bc5c7ffc940d216f5e141841c733c51c6899a4e3595f05de3fdc8357a443
|