The Agent Development Kit (ADK) provides modules for agents running in the agent runtime. These modules handle communication with the platform, state management, filesystem operations, and more.
Overview
Import ADK modules from terminaluse.lib:
Available Modules
adk.messages
Send and manage messages within a task.
send
Send a message to the task.
list
List messages for a task.
adk.state
Manage persistent state for a task. State is scoped to (task_id, agent_id).
create
Initialize state when a task starts.
get
Retrieve current state.
update
Merge updates into existing state.
delete
Remove state entirely.
adk.tasks
Retrieve and manage tasks.
get
Get a task by ID or name.
delete
Delete a task.
adk.events
Access events for a task.
list
List events for a task.
get
Get a specific event.
adk.agents
Retrieve agent information.
get
Get an agent by ID or name.
list
List agents.
adk.acp
Agent-to-Client Protocol for creating tasks and sending events programmatically.
create_task
Create a new task.
send_event
Send an event to a task.
cancel_task
Cancel a running task.
adk.filesystem
Sync files between the agent runtime and cloud storage.
sync_down
Download files from cloud storage to local filesystem.
sync_up
Upload local files to cloud storage.
Features:
- Manifest-based sync: Only changed files are transferred
- Compression: Files are compressed for efficient transfer
- Change detection: Automatically detects modified files
See Filesystem Sync for detailed usage.
adk.task
Task-scoped system-folder helpers.
sync_down_system_folder
sync_up_system_folder
Use these when you need to manage task-scoped folders like /root/.claude or /root/.codex separately from /workspace.
adk.agent_task_tracker
Track progress of agent tasks.
get
Get tracker for a task.
list
List all trackers.
update
Update tracker progress.
Using with TaskContext
In agent handlers, use TaskContext for convenience - it provides pre-bound versions of these modules:
Use ctx in handlers for cleaner code. Use adk directly in helper functions or when you need to operate on different tasks.