Skip to content

Commit 86aa472

Browse files
docs: update getting started for poly start (#147)
## Summary - Reworks the getting started flow to lead with `poly start` as the primary onboarding path — signup, API key generation, and project creation in one command - Manual API key setup via env vars kept as an alternative for existing users - Documents the credential file (`~/.poly/credentials.json`) and the resolution order (credential file → region env var → `POLY_ADK_KEY`) - Addresses Naorin's ask to update docs ahead of `poly start` going to prod ### Pages changed - **get-started.md** — Steps 1–5 (manual signup, find IDs, generate key) collapsed into a single `poly start` step - **prerequisites.md** — Option A (`poly start`) / Option B (manual) for API key setup, credential resolution order documented - **installation.md** — "Set your API key" points at `poly start`, credential file fallback noted ## Test plan - [x] `mkdocs serve` — all three pages render correctly - [ ] Internal links between pages resolve (prerequisites ↔ installation ↔ get-started) - [ ] Screenshot/image references still work (no images were changed) - [ ] Should be merged after or alongside Ruari's `poly start` PRs 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent fe0191b commit 86aa472

8 files changed

Lines changed: 157 additions & 205 deletions

File tree

Lines changed: 125 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,134 +1,199 @@
11
---
22
title: Getting started with PolyAI
3-
description: Learn how to build your first PolyAI agent in minutes, then connect it to the ADK for local development.
3+
description: Go from zero to a working local agent project in minutes using the ADK CLI.
44
---
55

6-
# Not sure where to start?
6+
# Getting started
77

8-
If you do not yet have an agent in Agent Studio, or you want a working starting point before setting up the ADK, you can build a personalized agent from your company website in a few minutes — no configuration required. The agent lives in Agent Studio as a normal project, so you can pull it straight into the ADK and continue development locally as soon as it is ready.
8+
The fastest way to get up and running is entirely from the command line. Two steps — install the ADK, then run `poly start` — take you from an empty machine to a local project you can edit, push, and deploy.
99

1010
---
1111

12-
## New to PolyAI — build your first agent
12+
## Step 1 — Install the ADK
1313

14-
If you do not yet have access to Agent Studio or an existing agent, start here.
14+
You need **uv** to manage the Python environment. If you already have it, skip the first line.
1515

16-
### Step 1 — Get access to Agent Studio
16+
```bash
17+
curl -LsSf https://astral.sh/uv/install.sh | sh # or: brew install uv
18+
```
1719

18-
Go to [studio.poly.ai](https://studio.poly.ai) and sign up. You can sign up with your email or login with SSO.
20+
Then create a virtual environment and install the ADK:
1921

20-
![Agent Studio sign up for the first time](../assets/agent-studio-login.png)
22+
```bash
23+
uv venv --python=3.14 --seed
24+
source .venv/bin/activate
25+
pip install polyai-adk
26+
```
2127

22-
### Step 2 — Create an agent from your website
28+
Confirm it worked:
2329

24-
![Quick setup button Agent Studio](../assets/quick-agent-setup.png)
30+
```bash
31+
poly --help
32+
```
2533

26-
Once you are inside Agent Studio:
34+
!!! info "Suppress SyntaxWarnings from platform-generated code"
2735

28-
1. Click the **+ Agent** button in the top-right corner.
29-
2. Select **Quick Agent Setup** from the dropdown.
30-
3. Enter your company website URL and click **Create agent**.
36+
Platform-generated code uses regex patterns (such as `\d`) that trigger `SyntaxWarning` in Python 3.14's stricter string handling. This produces 40+ warning lines on every `poly` command and obscures normal output.
3137

32-
Agent Studio crawls your website and generates a working agent configuration — usually within a few minutes. Before it builds, you can choose the voice your agent will use.
38+
To suppress them, set this before running any `poly` command:
3339

34-
![Agent building step — showing Analyzing website, Retrieving data, and voice selection](../assets/agent-build.png)
40+
```bash
41+
export PYTHONWARNINGS=ignore
42+
```
3543

36-
!!! tip "What gets generated"
44+
!!! tip "Optional — install the VS Code / Cursor extension"
45+
46+
If you plan to work in **VS Code** or **Cursor**, you can also install the [PolyAI ADK extension](../reference/tooling.md#polyai-adk-extension-for-vs-code-and-cursor) for resource-aware editing on top of the CLI. The extension is additive — the `poly` command remains the source of truth for every workflow.
47+
48+
## Step 2 — Sign in and set up your API key
49+
50+
```bash
51+
poly start
52+
```
53+
54+
`poly start` handles everything you need to authenticate:
55+
56+
1. **Sign up or sign in** — opens a browser window for authentication. This can be on any device, not just the machine running the CLI.
57+
2. **API key** — generates a key and saves it to `~/.poly/credentials.json`. Future `poly` commands pick it up automatically — no environment variables to manage.
58+
3. **Create a project** — optionally creates a new Agent Studio project and pulls it down locally so you can start editing immediately.
3759

38-
Agent Studio populates **topics** (knowledge base entries) and basic **agent settings** (personality, role, rules) from your website's public content. This gives you an agent that knows about your company and can answer questions — but it does not generate flows, variants, entities, handoffs, or integrations. Those are for you to build locally with the ADK. Everything that is generated is standard ADK-compatible configuration and fully editable once pulled down.
60+
!!! tip "Already have an account?"
61+
If `poly start` detects an existing API key (from the credential file or an environment variable), it skips authentication and goes straight to project creation.
3962

40-
### Step 3 — Test your agent in Agent Studio
63+
??? note "Manual API key setup"
4164

42-
![Completed lite builder](../assets/setup-agent.png)
65+
If you prefer to manage API keys through the Agent Studio UI:
4366

44-
Once the agent is ready, test it inside Agent Studio to confirm it's filled in with information as expected. This gives you a working baseline before you move to local development.
67+
1. Log in to [Agent Studio](https://studio.poly.ai) and open your workspace.
68+
2. In the **API Keys** tab (next to the **Users** tab), click **+ API key**.
4569

46-
### Step 4 — Find your account and project IDs
70+
![Generating an API key in Agent Studio — API Keys tab with the + API key button highlighted](../assets/api-key-data-access.png)
4771

48-
To pull the agent into the ADK, you need two identifiers from Agent Studio. You can find them in the URL when your project is open:
72+
Then export the key:
4973

50-
~~~
51-
https://studio.poly.ai/<account_id>/<project_id>/...
52-
~~~
74+
```bash
75+
export POLY_ADK_KEY=<your-api-key>
76+
```
5377

54-
Copy both values — you will need them in the next step.
78+
To make it permanent, add the export line to your shell profile (`~/.zshrc` or `~/.bashrc`).
5579

56-
### Step 5 — Generate an API key
80+
!!! info "How the ADK resolves API keys"
81+
The ADK checks for credentials in the following order:
5782

58-
![Go back to key](../assets/go-back-to-key.png)
83+
1. **Credential file** — `~/.poly/credentials.json` (written by `poly start`)
84+
2. **Region-specific env var** — e.g. `POLY_ADK_KEY_US`
85+
3. **General env var** — `POLY_ADK_KEY`
5986

60-
The ADK uses an API key to authenticate with Agent Studio. Click **Back to agents** to return to your **workspace**, then follow the steps in [Prerequisites — Generate API key](./prerequisites.md#generate-api-key) to create and export your key.
87+
The first match wins. If nothing is found, the CLI raises an error.
6188

62-
### Step 6 — Pull the agent into the ADK
89+
If you work across multiple regions, you can set region-scoped variables. See [per-region API keys](#per-region-api-keys) below.
6390

64-
Once the [ADK is installed](./installation.md), link your local folder to the project:
91+
## Step 3 — Start building
92+
93+
If `poly start` created a project for you, `cd` into the project directory. Otherwise, connect to an existing project:
6594

6695
```bash
6796
poly init
6897
```
6998

70-
[`poly init`](../reference/cli.md#poly-init) walks you through interactive dropdowns to pick a region, account, and project. It creates a subdirectory and pulls the configuration automatically. Change into the project directory before running any further commands. See [First commands](./first-commands.md) for the full walkthrough.
71-
72-
You now have a fully editable local copy of your agent.
99+
[`poly init`](../reference/cli.md#poly-init) walks you through interactive dropdowns to pick a region, account, and project, then pulls the configuration locally.
73100

74-
### Step 7 — Continue with the ADK
101+
From inside your project directory, the core workflow is:
75102

76-
From here, the standard ADK workflow applies. You can:
103+
```bash
104+
poly status # see what's changed
105+
poly diff # inspect changes in detail
106+
poly branch create dev # work on a branch
107+
poly push # push changes to Agent Studio
108+
poly chat # talk to your agent
109+
```
77110

78-
- edit resources locally with any tooling
79-
- create branches with `poly branch create`
80-
- track changes with `poly status` and `poly diff`
81-
- validate and push changes back with `poly push`
111+
Edit flows, functions, topics, and other resources in your editor of choice — they're just YAML and Python files. Push when you're ready to test in Agent Studio.
82112

83113
<div class="grid cards" markdown>
84114

85115
- **Build an agent with the ADK**
86116

87117
---
88118

89-
Follow the full step-by-step workflow for local development.
119+
Follow the full step-by-step tutorial for local development.
90120
[Open the tutorial](../tutorials/build-an-agent.md)
91121

122+
- **First commands**
123+
124+
---
125+
126+
Explore the full set of CLI commands available to you.
127+
[Open first commands](./first-commands.md)
128+
92129
</div>
93130

94131
---
95132

96-
## Already have an agent in Agent Studio?
133+
## Seed an agent from your website
97134

98-
If you already have an agent in Agent Studio — built in the browser editor, by a PolyAI team, or using any other method — you can connect it directly to the ADK. The ADK connects to any existing Agent Studio project using the same `poly init` + `poly pull` workflow described above.
135+
If you're starting from scratch and want a working baseline, you can generate an agent from your company website inside Agent Studio. This gives you topics and agent settings pre-populated from your site's public content — a useful starting point before building locally.
99136

100-
1. Complete [Prerequisites](./prerequisites.md) to generate your API key and install local tools.
101-
2. Follow [Installation](./installation.md) to install the ADK.
102-
3. Run:
137+
1. Open [Agent Studio](https://studio.poly.ai) and sign in (your `poly start` account works here).
138+
2. Click **+ Agent****Quick Agent Setup**.
139+
3. Enter your website URL and click **Create agent**.
103140

104-
~~~bash
105-
poly init
106-
~~~
141+
![Quick setup button Agent Studio](../assets/quick-agent-setup.png)
142+
143+
Agent Studio crawls your site and generates a configuration — usually within a few minutes. Once it's ready, pull it into your local project:
144+
145+
```bash
146+
poly pull
147+
```
107148

108-
`poly init` shows interactive dropdowns to pick your project. See [First commands](./first-commands.md) for details.
149+
!!! tip "What gets generated"
109150

110-
Your local folder will mirror the project in Agent Studio and you can begin editing immediately.
151+
Agent Studio populates **topics** (knowledge base entries) and basic **agent settings** (personality, role, rules) from your website's public content. It does not generate flows, variants, entities, handoffs, or integrations — those are for you to build locally with the ADK.
111152

112153
---
113154

114-
## Next step
155+
## Already have an agent in Agent Studio?
115156

116-
Install the ADK and confirm your local tools are in place before running your first commands.
157+
If you have an existing project — built in the browser, by a PolyAI team, or by any other method — connect it to the ADK in two commands:
117158

118-
<div class="grid cards" markdown>
159+
```bash
160+
poly start # sign in and save your API key (skip if already done)
161+
poly init # interactive prompts to pick region, account, and project
162+
```
119163

120-
- **Installation**
164+
`poly init` creates a local directory and pulls the full project configuration. From there the standard `poly status` / `poly push` / `poly pull` workflow applies.
121165

122-
---
166+
---
167+
168+
## Per-region API keys
169+
170+
If you work across multiple regions, you can set region-scoped environment variables. The ADK checks the credential file first, then region-scoped env vars, then `POLY_ADK_KEY`.
171+
172+
| Region | Environment variable |
173+
|---|---|
174+
| `us-1` | `POLY_ADK_KEY_US` |
175+
| `euw-1` | `POLY_ADK_KEY_EUW` |
176+
| `uk-1` | `POLY_ADK_KEY_UK` |
177+
| `studio` | `POLY_ADK_KEY_STUDIO` |
178+
| `staging` | `POLY_ADK_KEY_STAGING` |
179+
| `dev` | `POLY_ADK_KEY_DEV` |
180+
181+
```bash
182+
export POLY_ADK_KEY_US=<your-us-api-key>
183+
export POLY_ADK_KEY=<your-fallback-api-key> # used for any other region
184+
```
185+
186+
---
123187

124-
Install the ADK and set up your local environment.
125-
[Open installation](./installation.md)
188+
## Next step
189+
190+
<div class="grid cards" markdown>
126191

127192
- **What is the ADK?**
128193

129194
---
130195

131-
Understand what the ADK does and how it fits into the Agent Studio workflow.
196+
Understand what the ADK does and how it fits into Agent Studio.
132197
[Read the overview](./what-is-the-adk.md)
133198

134199
</div>

docs/docs/get-started/installation.md

Lines changed: 0 additions & 93 deletions
This file was deleted.

0 commit comments

Comments
 (0)