Skip to content
Go to Dashboard

Quickstart

Five minutes. Sign up, install the SDK, run a task, and watch events stream back.

Step 0 — Get an API key (30 sec)

  1. Sign up at console.web-agent.asix.inc.
  2. Open Settings → API Keys → Create.
  3. Copy the wa_… key. It is shown once. If you lose it, revoke and create again.
bash
export WEBAGENT_API_KEY=wa_xxxxxxxxxxxxxxxxxxxxxxxx
export WEBAGENT_PROJECT_ID=proj_xxxxxxxxxxxxxxxxxxxxxxxx

Project 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)

bash
pip install web-agent-sdk
bash
npm install @web-agent/sdk
bash
# nothing to install

Step 2 — Run a task (90 sec)

Client opens a DoAnything session and streams events to terminal.

python
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())
typescript
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;
}
bash
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:

python
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"])
python
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"])
python
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

Troubleshooting

SymptomCauseFix
401 unauthorizedWrong, expired, or revoked keySettings → API Keys → create a new one
402 insufficient_creditsFree quota used upSettings → Billing → Add credits
SSE stalls > 60 sNetwork drop or proxy bufferingReconnect with Last-Event-ID — see Events & SSE
429 rate_limit_exceededBurst over plan concurrencyBack off + retry; Dev plan defaults to 5–10 concurrent sessions