Skip to main content

AdaL Agent SDK

The AdaL Agent SDK is a Python package that lets you embed AdaL's full agent runtime in your own applications. Instead of using the CLI interactively, you can drive AdaL programmatically — run queries, stream events, handle tool approvals, resume sessions, and orchestrate multi-step workflows from Python.

Use Cases

  • CI/CD pipelines — run code review, test generation, or refactoring as automated steps
  • Custom tooling — build internal developer tools powered by AdaL's agent capabilities
  • Batch processing — process multiple files or repositories in sequence
  • Testing & evaluation — script reproducible agent interactions for benchmarking
  • Integrations — embed AdaL in Slack bots, web services, or notebook workflows

Architecture

Your Python App

├─ query() ← one-shot convenience API

└─ AdalAgentClient ← persistent multi-query client


AdaL SDK Runtime ← subprocess (adal --sdk-runtime)


AdaL Backend ← agent logic, tools, LLM calls

The SDK spawns AdaL as a subprocess and communicates over a stdio NDJSON protocol. This means:

  • Full agent capabilities — same tools, models, and reasoning as the CLI
  • Session persistence — resume conversations across client instances
  • Streaming events — real-time access to assistant text, tool calls, and status updates
  • Permission control — programmatic approve/deny/modify for any tool call

Requirements

RequirementVersion
Python3.10+
AdaL CLILatest (with --sdk-runtime support)
Dependenciesanyio>=4.0

The SDK requires the AdaL CLI installed and authenticated. Install it with:

# macOS, Linux, WSL
curl -fsSL https://adal.sylph.ai/install.sh | bash

# Windows PowerShell
irm https://adal.sylph.ai/install/windows | iex

Run adal once to complete browser authentication before using the SDK.

What's Next

  • Quick Start — install the SDK and run your first query
  • Client API — multi-query sessions, resume, and model switching
  • Permissions — control tool approval with callbacks
  • API Reference — full reference for all exports