Quickstart
Five minutes. Sign up, install the SDK, run a task, and watch events stream back.
Step 0 — Get an API key (30 sec)
- Sign up at console.web-agent.asix.inc.
- Open Settings → API Keys → Create.
- Copy the
wa_…key. It is shown once. If you lose it, revoke and create again.
export WEBAGENT_API_KEY=wa_xxxxxxxxxxxxxxxxxxxxxxxx
export WEBAGENT_PROJECT_ID=proj_xxxxxxxxxxxxxxxxxxxxxxxxProject ID
Project-scoped paths look like /v1/projects/{pid}/… (DoAnything / WebSearch / Track). Find your project ID in the Console URL after Project Switcher → your project. Standalone endpoints (DeepResearch) resolve the project from your Bearer token.
Step 1 — Install the SDK (30 sec)
pip install web-agent-sdknpm install @web-agent/sdk# nothing to installStep 2 — Run a task (90 sec)
Client opens a DoAnything session and streams events to terminal.
import asyncio
from web_agent.v1 import Client
from web_agent.v1.types import CreateSessionRequest
async def main():
async with Client(
api_key="wa_demo_xxxxxxxxxxxxxxxx",
project_id="proj_demo_0001",
) as client:
session = await client.sessions.create(CreateSessionRequest(
instructions="Search Hacker News for the top 5 stories today, return them as a list.",
))
task = session.tasks[0]
async for event in client.events.stream(session.id, task.id):
print(event.type, event.data)
if event.type == "task.completed":
break
asyncio.run(main())import { Client } from "@web-agent/sdk";
const client = new Client({
apiKey: "wa_demo_xxxxxxxxxxxxxxxx",
projectId: "proj_demo_0001",
});
const session = await client.sessions.create({
instructions: "Search Hacker News for the top 5 stories today, return them as a list.",
});
const task = session.tasks[0]!;
for await (const event of client.events.stream(session.id, task.id)) {
console.log(event.type, event.data);
if (event.type === "task.completed") break;
}curl https://api.web-agent.asix.inc/v1/projects/proj_demo_0001/do_anything/sessions \
-H "Authorization: Bearer wa_demo_xxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"instructions": "Search Hacker News for the top 5 stories today, return them as a list."
}'Same code as the Console
The Console's Get Code dialog hands you exactly this snippet, with your real API key and current form values pre-filled. Open console.web-agent.asix.inc/new, fill the form, click Get Code, and you skip the typing.
Step 3 — Switch to a shaped API when you know the artifact (60 sec)
DoAnything is open-ended (artifact shape unconstrained). When you know you want a research report / a solved problem / search results, use the shaped API for a quality contract:
async with Client(api_key="wa_...", project_id="proj_demo") as client:
task = await client.deep_research.run(
topic="Open-source vector DB landscape 2026",
depth="deep",
)
print(task["task_id"])async with Client(api_key="wa_...", project_id="proj_demo") as client:
# wait=true (default): blocks ≤30s synchronously
result = await client.web_search.run(
queries=["best Python ORM 2026"],
)
for hit in result["results"]["results"]:
print(hit["title"], hit["url"])async with Client(api_key="wa_...", project_id="proj_demo") as client:
mon = await client.track.create(
intent="Notify me when the Apple stock dips below $200",
schedule={"kind": "interval", "every_seconds": 3600},
notify_channel={"kind": "callback_url", "url": "https://hooks.example.com/track"},
)
print(mon["id"])The shaped APIs share the same auth / error envelope / event channel as DoAnything — see Python SDK / TypeScript SDK.
Step 4 — Watch it in the Console (30 sec)
Open https://console.web-agent.asix.inc/sessions/<session.id> (replace with the id you printed in step 2). You'll see the same chat log plus a live browser preview iframe — exactly what your stream is showing, rendered.
Next steps
- Run a task that asks you to confirm something —
task.input_request. - Save login state across sessions — Profiles.
- Schedule a task to run every morning — Schedules.
- Browse the full API — every endpoint, every field.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
401 unauthorized | Wrong, expired, or revoked key | Settings → API Keys → create a new one |
402 insufficient_credits | Free quota used up | Settings → Billing → Add credits |
| SSE stalls > 60 s | Network drop or proxy buffering | Reconnect with Last-Event-ID — see Events & SSE |
429 rate_limit_exceeded | Burst over plan concurrency | Back off + retry; Dev plan defaults to 5–10 concurrent sessions |