curl -X POST https://win.oneshotagent.com/v1/tools/browser/profiles \
-H "Content-Type: application/json" \
-H "X-Agent-Proof: $AGENT_READ_PROOF" \
-H "X-Agent-ID: 0xYourWalletAddress" \
-d '{"name": "my-github-bot"}'
const profile = await agent.createBrowserProfile("my-github-bot");
console.log(profile.id); // "prof_abc123..."
profile = client.create_browser_profile("my-github-bot")
print(profile["id"])
{
"id": "prof_abc123",
"name": "my-github-bot"
}
Web & Browser
Browser Profiles
Create, list, and delete persistent browser profiles that retain cookies and session state across tasks
POST
/
v1
/
tools
/
browser
/
profiles
curl -X POST https://win.oneshotagent.com/v1/tools/browser/profiles \
-H "Content-Type: application/json" \
-H "X-Agent-Proof: $AGENT_READ_PROOF" \
-H "X-Agent-ID: 0xYourWalletAddress" \
-d '{"name": "my-github-bot"}'
const profile = await agent.createBrowserProfile("my-github-bot");
console.log(profile.id); // "prof_abc123..."
profile = client.create_browser_profile("my-github-bot")
print(profile["id"])
{
"id": "prof_abc123",
"name": "my-github-bot"
}
Creates, lists and deletes browser profiles. Each keeps cookies, local storage and session state between tasks. Pass its
An import is checked before the call returns, up to 150 seconds. Cookie values never enter task prompts or receipts. The site can still expire or reject an imported cookie.
Run one task at a time per profile. When a login expires, import again into a new profile.
Python:
profile_id to any task.
Authentication
X-Agent-ID and a signed agent read proof (AGENT_READ_PROOF in the examples); the SDK supplies both. Profiles are scoped to your agent. Creating one is free.
Create profile
Playwright cookies:
name, value, either url or domain and path, and optionally expires (Unix seconds), httpOnly, secure, sameSite, partitionKey.Playwright-style
{ cookies, origins: [{ origin, localStorage: [{ name, value }] }] }. Use this or cookies, not both. IndexedDB and sessionStorage are rejected.curl -X POST https://win.oneshotagent.com/v1/tools/browser/profiles \
-H "Content-Type: application/json" \
-H "X-Agent-Proof: $AGENT_READ_PROOF" \
-H "X-Agent-ID: 0xYourWalletAddress" \
-d '{"name": "my-github-bot"}'
const profile = await agent.createBrowserProfile("my-github-bot");
console.log(profile.id); // "prof_abc123..."
profile = client.create_browser_profile("my-github-bot")
print(profile["id"])
{
"id": "prof_abc123",
"name": "my-github-bot"
}
List profiles
curl https://win.oneshotagent.com/v1/tools/browser/profiles \
-H "X-Agent-Proof: $AGENT_READ_PROOF" \
-H "X-Agent-ID: 0xYourWalletAddress"
const profiles = await agent.listBrowserProfiles();
profiles = client.list_browser_profiles()
[
{ "id": "prof_abc123", "name": "my-github-bot" },
{ "id": "prof_def456", "name": "linkedin-scraper" }
]
Delete profile
curl -X DELETE https://win.oneshotagent.com/v1/tools/browser/profiles/prof_abc123 \
-H "X-Agent-Proof: $AGENT_READ_PROOF" \
-H "X-Agent-ID: 0xYourWalletAddress"
await agent.deleteBrowserProfile("prof_abc123");
client.delete_browser_profile("prof_abc123")
Using profiles with tasks
const profile = await agent.createBrowserProfile("linkedin-session", {
cookies: [{
name: "li_at",
value: process.env.LINKEDIN_LI_AT!,
domain: ".linkedin.com",
path: "/",
secure: true,
httpOnly: true,
sameSite: "None",
}],
});
const result = await agent.browser({
task: "Open the feed and report whether a signed-in member feed is visible.",
start_url: "https://www.linkedin.com/feed/",
profile_id: profile.id,
max_steps: 30,
});
Interactive login and 2FA
When a site asks for a password, authenticator code, SMS code or device approval, start a setup session: the account’s owner logs in on a OneShot page, and the profile keeps the session. Requires TypeScript SDK 0.34.0+ or Python 0.24.0+;setup_url needs TypeScript 0.54.0+ or Python 0.41.0+.
Start returns setup_url:
- It opens once and expires 10 minutes after minting or at setup expiry, whichever is first (
setup_url_expires_at). createBrowserProfileSetupLink(profile.id)mints a fresh one; it replaces the earlier link and its open page: a login in progress there cannot finish.- It is a secret: never open it; keep it out of logs and prompts.
live_urlis deprecated and removed in the next release: usesetup_url.
completed_at is set; it stays null after Cancel. Passwords, codes and seeds never enter prompts or receipts.
const profile = await agent.createBrowserProfile("linkedin");
const setup = await agent.startBrowserProfileSetup(profile.id, "https://www.linkedin.com/login/");
// Hand setup.setup_url to the account's owner. It opens once and expires at setup.setup_url_expires_at;
// agent.createBrowserProfileSetupLink(profile.id) mints a fresh one and retires this one.
let status = await agent.getBrowserProfileSetup(profile.id);
while (!status.completed_at) {
if (["expired", "no_setup", "stopped"].includes(status.status)) throw new Error("Account setup ended before Done was pressed");
await new Promise(resolve => setTimeout(resolve, 2000));
status = await agent.getBrowserProfileSetup(profile.id);
}
// The person pressed Done, so the session is saved. Store profile.id for browser({ profile_id, task }).
// When your application saves on their behalf instead, call finishBrowserProfileSetup(profile.id):
// its stored_cookies lists cookie names, domains and paths only, and does not confirm LinkedIn accepted them.
start_browser_profile_setup, create_browser_profile_setup_link, get_browser_profile_setup, finish_browser_profile_setup, plus a-prefixed async variants. MCP: oneshot_browser_connect_account, oneshot_browser_connect_account_status.
HTTP: POST /v1/tools/browser/profiles/{id}/setup/start with { "start_url": "..." }; /setup/link with {} for a fresh link, or with start_url when none is open (otherwise 409 no_setup); /setup/status and /setup/finish with {}. Only the owner can run setup. Start reuses an open setup. Run no other tasks during setup.
Finish saves the session and checks the stored cookies; if the check fails, the profile is kept: retry finish. Setup expires after 15 minutes; the profile survives. Setup endpoints are free. A saved profile skips a new 2FA challenge only while the site accepts its session. OneShot stores no TOTP seeds.