How polyai/adk works
PolyAI ADK is a CLI for building, testing, and deploying voice and chat agents. The main workflow starts with project setup, then pulls and edits Agent Studio configuration, validates and pushes changes, and supports status, diff, branch, review, and deployment operations. Resource classes represent agent configuration; project management coordinates local files and remote synchronization through the API interface. The README documents chat, voice calling, metrics, and other capabilities. Some command implementations were not sampled, so their internal links are omitted or marked unverified.
Main entry points: cli.py CLI entry · project.py Project manager · resource.py Resource model · review.py Review commands
Components 29
CLI and commands
- CLI entry
src/poly/cli.py - Project commands
src/poly/cli_commands/project.py - Sync commands
src/poly/cli_commands/sync.py - Branch commands
src/poly/cli_commands/branch.py - Deployments
src/poly/cli_commands/deployments.py - Review commands
src/poly/cli_commands/review.py - Chat command
src/poly/cli_commands/chat.py - Call command
src/poly/cli_commands/call.py - Terminal output
src/poly/output/console.py - JSON output
src/poly/output/json_output.py - Metrics commands
src/poly/cli_commands/metrics.py - Conversations
src/poly/cli_commands/conversations.py
Project workflow
- Project manager
src/poly/project.py - Push validation
src/poly/utils/prepush.py
Agent configuration
- Resource model
src/poly/resources/resource.py - Flows and steps
src/poly/resources/flows.py - Agent functions
src/poly/resources/function.py - Entities
src/poly/resources/entities.py - Resource utilities
src/poly/resources/resource_utils.py
Platform services
- API interface
src/poly/handlers/interface.py - Platform API
src/poly/handlers/platform_api.py - Device login
src/poly/auth/device_flow.py - Auth provider
src/poly/handlers/auth0_handler.py - GitHub API
src/poly/handlers/github_api_handler.py
Agent interaction
- Chat session
src/poly/cli_commands/chat.py - Voice call client
src/poly/call/client.py
Other components
- Developer
- Agent Studio
- GitHub Gists
Connections 36
- Developer → CLI entry: runs
README.md - CLI entry → Project commands: dispatches
src/poly/cli.py - CLI entry → Sync commands: dispatches
src/poly/cli.py - CLI entry → Branch commands: dispatches
src/poly/cli.py - CLI entry → Deployments: dispatches
src/poly/cli.py - CLI entry → Review commands: dispatches
src/poly/cli.py - CLI entry → Chat command: dispatches
src/poly/cli.py - CLI entry → Call command: dispatches
src/poly/cli.py - CLI entry → Metrics commands: dispatches
src/poly/cli.py - CLI entry → Conversations: dispatches
src/poly/cli.py - Project commands → Project manager: manages
- Sync commands → Project manager: syncs
- Branch commands → Project manager: manages branches
src/poly/cli_commands/branch.py - Deployments → Project manager: reads project
src/poly/cli_commands/deployments.py - Review commands → GitHub API: creates reviews
src/poly/cli_commands/review.py - Review commands → Project manager: computes diffs
src/poly/cli_commands/review.py - GitHub API → GitHub Gists: calls
- Project manager → API interface: uses API
src/poly/project.py - Project manager → Resource model: loads resources
src/poly/project.py - Project manager → Push validation: validates push
src/poly/project.py - API interface → Platform API: delegates
src/poly/handlers/interface.py - API interface → Agent Studio: transfers configuration
- Resource model → Flows and steps: supports flow resources
src/poly/resources/resource.py - Resource model → Agent functions: supports function resources
src/poly/resources/resource.py - Resource model → Resource utilities: uses utilities
src/poly/resources/resource.py - Flows and steps → Entities: references
src/poly/resources/flows.py - Flows and steps → Agent functions: references
src/poly/resources/flows.py - Device login → Auth provider: requests tokens
src/poly/auth/device_flow.py - Developer → Device login: signs in
README.md - Chat command → Agent Studio: starts agent chat
README.md - Call command → Voice call client: starts calling
- Voice call client → Agent Studio: connects to agent
- Developer → Terminal output: views output
README.md - Developer → JSON output: requests JSON
src/poly/output/json_output.py - Metrics commands → Agent Studio: manages metrics
README.md - Conversations → Agent Studio: manages conversations
README.md