| Workflow | Description |
|---|---|
| CLI workflow | The hands-on developer path. You run the commands yourself, edit files locally, and push changes back to Agent Studio. |
| AI-agent workflow | You provide a brief; a coding tool uses the ADK to generate and push the project files on your behalf. |
You provide context
Gather the requirements, business rules, API information, and reference material.
The agent or developer builds
Using the ADK, the project files are created, edited, validated, and prepared locally.
Agent Studio hosts and deploys
The generated work is pushed back into Agent Studio, where it can be reviewed, merged, and deployed.
Architecture at a glance
| Role | Responsibility |
|---|---|
| You | Provide requirements, project context, and business rules |
| PolyAI ADK | Connect the local project to Agent Studio and manage sync, validation, and tooling |
| Coding agent | Optionally generate and update files using the ADK |
| Agent Studio | Host, preview, review, merge, and deploy the agent |
Local project structure
See Working locally — What a local project contains for the full directory tree. In short, the project mirrors what Agent Studio understands:agent_settings/, flows/, functions/, topics/, voice/, chat/, and config/.
Workflow 1 - CLI workflow
The CLI workflow is the manual developer path. You use the ADK directly, edit the project locally, and push changes back to Agent Studio. You can run this workflow in whichever editing surface you prefer: a plain terminal, or VS Code / Cursor with the PolyAI ADK extension for resource-aware navigation and validation. Both count as the CLI workflow — the difference is only the editing surface.Step 1 - Initialize your project
Link a local folder to an existing Agent Studio project. The agent must already exist in Agent Studio.poly init walks you through interactive dropdowns for region, account, and project. It creates the project directory and pulls the current configuration. Change into the project directory before running any further commands. See First commands for flag options and details.
Step 2 - Set up the environment
Configure any API keys or environment variables needed for the project.poly init pulls the current configuration automatically, but you can run poly pull at any time to refresh it:
Run commands from the project folderAll CLI commands should be run from within the local project folder, unless you explicitly use the relevant path flag.
Step 3 - Chat with the agent
Start an interactive chat session to confirm the connection works and inspect runtime behavior.poly chat runs against Agent Studio, not your local filespoly chat connects to the last pushed state of your current branch (or sandbox on main). Push first, or use poly chat --push.Step 4 - Review the docs and understand the SDK
Use the CLI docs command to inspect the available resources and learn how they fit together.Step 5 - Customize the agent
This is the core build phase. Create a branch, edit resources locally, track changes, and push them back.Branching
Functions
Create or modify backend functions the agent calls at runtime. See the functions reference for the full API. Typical locations include:- global functions under the functions directory
- lifecycle hooks such as start and end functions
- flow-scoped functions
- function steps inside flows
Topics
Add or edit knowledge-base topics used for retrieval.Agent settings
Update the personality, role, and rules that define the agent’s global behavior.Flows
Build conversation flows, including prompts, step transitions, entities, and function steps.Channel-specific settings
Adjust greeting messages, disclaimers, and style prompts for voice and chat.Safety filters
Configure content safety filtering at the project level and per channel.Handoffs, SMS, and variants
Define escalation paths, SMS templates, and per-variant configuration.Languages and translations
Configure supported languages and localized text strings for multilingual agents.ASR and response control
Tune speech recognition and control TTS behavior.Experimental config
Enable or tune experimental features where needed.Step 6 - Track and validate changes
Inspect the local changes before pushing.Step 7 - Push changes
Push the local changes back to Agent Studio.Step 8 - Test against sandbox
Once your branch is merged in Agent Studio, test the agent by chatting with it against the sandbox environment.Pushing before chattingPush your latest changes before chatting —
poly chat connects to the last pushed state. Target a specific environment with --environment sandbox, --environment pre-release, or --environment live.Step 9 - Iterate on quality
Review, refine, and test again. You can also use the review command to share diffs with teammates.Step 10 - Deploy to production
Once the changes are pushed and validated, merge the branch in Agent Studio and deploy the project.Merging from the CLI or the Agent Studio web UIMerge from the CLI with
poly branch merge '<commit message>', which merges the current branch into main. You can also merge through the Agent Studio web UI by switching to the branch and clicking Merge. After merging, run poly chat --environment sandbox to test. See the Branch merging reference for the full conflict-resolution flow.Step 11 - Monitor performance
Use Agent Studio analytics to monitor containment, CSAT, handle time, and flagged transcripts. Pull changes back locally as needed and continue iterating.Workflow 2 - AI-agent workflow
The AI-agent workflow uses a coding agent — such as Claude Code, or an in-editor agent in VS Code or Cursor paired with the PolyAI ADK extension — to run the same development loop on your behalf.You provide the brief
Requirements, business rules, integrations, and API documentation.
The coding tool generates the project
It uses the ADK to read documentation, generate files, and push the result.
You review and deploy
Agent Studio remains the place where the work is checked, merged, and deployed.
Step 1 - Gather requirements
Collect the project context before you begin. Include anything the coding tool will need to produce a working agent:- API endpoint URLs
- business rules
- use-case descriptions
- internal notes or emails
- reference material
- links to API documentation
Step 2 - Create a new project in Agent Studio
Open Agent Studio and create a brand-new project. The project starts empty:- no knowledge base
- no flows
- no configuration
Think of Agent Studio as the deployment targetAgent Studio is where the project lives, but the coding tool generates the actual content.
Step 3 - Start the coding tool via the CLI
Open your terminal and start the coding tool. At this stage:- the ADK must already be installed
- the Agent Studio project must already exist
- the coding tool should initialize and link the project using the ADK
poly init pulls the current configuration automatically — there is no need to run poly pull separately. The ADK acts as the bridge between your local environment and Agent Studio, letting the coding tool read from and write back to the project.
Step 4 - Give the coding tool its context
Provide the coding tool with the information you gathered earlier. Include:- project-specific requirements
- the URL to the business’s public API documentation
- relevant internal context
- useful patterns or best practices from previous projects
Step 5 - Generate the project files
Once the context is in place, the coding tool generates the project files. This produces the assets the agent needs, including:Conversation flows
Dialog logic and routing for the agent.
Callable functions
Backend functions used during calls.
Knowledge base entries
Information the agent can reference when answering questions.
API integrations
Both real API connections and mock endpoints for testing.
Step 6 - Push to Agent Studio
Once the files are generated, use the ADK to push them to Agent Studio. A new branch is created in the project so the generated work can be reviewed safely before anything goes live. When you switch to that branch in Agent Studio, you should see the generated changes, such as:- updated greeting messages
- new knowledge base entries
- a built tracking flow
- real and mock API integrations
Step 7 - Review, merge, and deploy
Review the generated work inside Agent Studio. Check that the key parts of the agent look correct:- flows
- functions
- knowledge base entries
- API integrations
- merge the branch into
main— either withpoly branch mergefrom the CLI or through the Agent Studio web UI - deploy the project
CLI command overview
| Command | Description |
|---|---|
| poly init | Initialize a new project locally |
| poly pull | Pull remote config into the local project |
| poly push | Push local changes to Agent Studio |
| poly status | List changed files |
| poly diff | Show diffs |
| poly revert | Revert local changes |
| poly branch | Branch management |
| poly format | Format resource files |
| poly validate | Validate project configuration locally |
| poly review | Create a diff review page |
| poly chat | Start an interactive session with the agent |
| poly docs | Output resource documentation |
The overall loop
- create or connect a project
- build locally using the ADK
- push to Agent Studio
- review, merge, and deploy
Next steps
Restaurant booking agent
Apply the workflow to a real-world example with flows, functions, and variants.
Core concepts
Understand resource architecture, local development patterns, and team workflows.
CLI reference
Explore the available ADK commands and options.

