A Rust implementation of the PolyAI Agent Development Kit CLI for managing Agent Studio projects locally. Like the Python ADK, it provides a Git-like workflow for synchronizing project configuration between your filesystem and Agent Studio.
Note
This repository is a work-in-progress Rust rewrite of the original Python ADK. New users should install the Python ADK unless they are explicitly testing the Rust port.
This Rust CLI is intended to match the Python ADK command surface and on-disk project layout. Most core local workflows are implemented, including start, login, init, pull, push, status, diff, branch, format, validate, chat, deployments, and project creation.
Some newer Python ADK features are still being ported, including conversations
commands. The poly review command group is present but still incomplete in
this Rust port.
The PolyAI ADK is currently in Early Access. Changes may land frequently while
the platform evolves. If you encounter an issue, first make sure you are running
the latest available version (try poly self-update).
Before using the ADK you must have:
- access to a PolyAI Agent Studio workspace
Run the guided setup to sign in, save an API key to
~/.poly/credentials.json, and optionally create a project:
poly startYou can also sign in without creating a project:
poly loginFor automation, you can still provide an API key as an environment variable:
export POLY_ADK_KEY=<your-key>Some commands also shell out to Python tooling:
ruff: used bypoly formatfor Python formattingty: used bypoly format --tyfor optional Python type checking
To try the Rust ADK from the latest GitHub release:
curl --proto '=https' --tlsv1.2 -LsSf \
https://github.com/polyai/adk-rs/releases/latest/download/poly-adk-installer.sh | shThe release installer installs the poly binary and provides adk as an alias.
Once installed, use the poly command to manage Agent Studio projects:
poly start # Sign in for the first time and optionally create a project
poly login # Sign in and save an API key
poly init # Initialize a local Agent Studio project
poly project create # Create a new Agent Studio project
poly pull # Pull latest configuration
poly push # Push local changes
poly status # View local project status
poly diff # View local changes
poly revert # Revert local changes
poly branch # Manage branches
poly format # Format resources
poly validate # Validate configuration
poly deployments # Manage deployments
poly chat # Chat with the agent
poly docs # Output reference documentationRun:
poly --helpto see all available commands. Each command also supports --help for detailed
syntax:
poly push --helpInitialize an Agent Studio project locally. Runs interactively by default, prompting for region, account, and project. You can also pass these directly:
poly init
poly init --region us-1 --account_id 123 --project_id my_project
poly init --base-path /path/to/projects
poly init --formatCreate a new Agent Studio project under an account:
poly project create
poly project create --region us-1 --account_id 123 --name "My agent"
poly project create --greeting "Hello, how can I help you?"Pull the latest project configuration from Agent Studio:
poly pull
poly pull --force
poly pull --formatPush local changes to Agent Studio:
poly push
poly push --dry-run
poly push --skip-validation
poly push --force
poly push --formatView changed, new, and deleted files in your project:
poly status
poly status --jsonShow diffs between your local project and the remote version, or between named versions:
poly diff
poly diff --files file1.yaml
poly diff abc1234
poly diff --before hash1 --after hash2Revert local changes:
poly revert
poly revert file1.yaml file2.yamlManage branches:
poly branch list
poly branch current
poly branch create my-feature
poly branch switch my-feature
poly branch switch my-feature --force
poly branch delete my-feature
poly branch merge "Merge message"Format project resources. Python files are formatted with ruff, while YAML and
JSON resources are formatted in process. Use --check to report files that would
change without writing them; use --ty to also run type checking.
poly format
poly format --files file1.py
poly format --check
poly format --tyValidate project configuration locally:
poly validate
poly validate --jsonList, inspect, promote, and roll back deployments:
poly deployments list
poly deployments list --env live --limit 20
poly deployments show abc1234
poly deployments promote --from abc1234 --to live
poly deployments rollback --to abc1234Start an interactive chat session with your agent:
poly chat
poly chat --environment live
poly chat --channel webchat
poly chat --metadata
poly chat --message "Hello"Output ADK reference documentation:
poly docs
poly docs --all
poly docs topics
poly docs --output doc_file.mdGenerate shell completion scripts:
poly completion bash
poly completion zsh
poly completion fishUpdate a release-installer managed Rust ADK binary:
poly self-updateUninstall a shell-installed Rust ADK binary. This command reads cargo-dist's install receipt, whose format is not a stable public API:
poly uninstalladk-cli:polybinary, CLI parsing, output, and integration testsadk-core: project workflows such as init, pull, push, status, diff, validate, chat, and deploymentsadk-resources: resource-family semantics shared by core and push/pull workflowsadk-api-client: HTTP communication with the PolyAI backendadk-types,adk-io,adk-protobuf,adk-ffi: shared support cratesdocs: parity notes, testing strategy, and contributor documentation
Please report bugs or request features via GitHub Issues.
See docs/development.md for contributor setup, release notes, and parity-test workflow.
This project is licensed under the Apache License 2.0.
