# Agentforce Labs > Build, test, and deploy autonomous AI agents on Salesforce from your IDE or coding > agent. Agentforce Labs gives you a pre-configured Salesforce org (a LabBox) so you can > start building immediately. Supports Claude Code, Cursor, Codex, Gemini CLI, Windsurf, > Antigravity, and Agentforce Vibes. ## Getting Started (for coding agents) **Just point your coding agent at https://labs.agentforce.com and it can set itself up — no manual credential copying.** A coding agent can claim a LabBox and authenticate the Salesforce CLI on your behalf via an OAuth 2.0 Device Authorization flow (RFC 8628): 1. Install the Salesforce CLI first (`brew install sf`) so it is available for the login step below. 2. The agent POSTs to `https://labs.agentforce.com/api/cli/device/code` (no auth) and gets back a `device_code`, a short `user_code`, a `verification_uri`, a one-click `verification_uri_complete`, and a poll `interval`. 3. The agent shows you the `verification_uri_complete` (a one-click `https://labs.agentforce.com/device?code=` link with the code pre-filled); if it is absent, fall back to the `verification_uri` (`https://labs.agentforce.com/device`) plus the `user_code` for manual entry. You open it in a browser, sign in with your Salesforce / Trailblazer (TBID) account, and approve. New users are provisioned a LabBox automatically — a Salesforce org with Einstein, Agentforce, Data Cloud, and messaging already enabled. 4. Meanwhile the agent polls `https://labs.agentforce.com/api/cli/device/token` with the `device_code` (respecting `interval`). KEEP POLLING while the response is HTTP 400 `authorization_pending` or `slow_down` (on `slow_down`, increase your delay to `interval`), and retry after a short wait on any transient HTTP 503 / `service_unavailable` ("Service temporarily unavailable"). ABORT on `expired_token`, `access_denied`, or `byoo_unavailable`. If `byoo_unavailable`, tell the user: the agent could not connect to their org — they should try again later or copy credentials manually from https://labs.agentforce.com. 5. On approval the poll returns HTTP 200 with `"status":"ready"`. The `sf_cli` object has two possible shapes depending on the user's org type. **LabBox (pool org):** `{"sf_cli":{"sfdx_auth_url":"force://..."}}` — authenticate with `echo "$SFDX_AUTH_URL" | sf org login sfdx-url --sfdx-url-stdin --set-default`. **BYOO (user's own org):** `{"sf_cli":{"type":"access_token","access_token":"00D...","instance_url":"https://..."}}` — authenticate with `SF_ACCESS_TOKEN="$TOKEN" sf org login access-token --instance-url "$INSTANCE_URL" --set-default --no-prompt`. Check for `sf_cli.sfdx_auth_url` first; if absent, use `sf_cli.access_token` + `sf_cli.instance_url`. The `org` object always contains `username`, `instance_url`, and `expires_at` (ISO 8601 or null). Surface `org.expires_at` to the user. Note: `--set-default` makes this org your default — drop it (and use `--alias `, then `--target-org `) to keep your existing default. 6. Install the Agentforce development skills: `curl -sSL https://raw.githubusercontent.com/SalesforceAIResearch/agentforce-adlc/main/tools/install.sh | bash`, then start building. **Manual alternative:** sign in at https://labs.agentforce.com yourself, copy the `sf org login sfdx-url` command from the credentials screen, and run it. See the LabBox guide: https://labs.agentforce.com/api/docs/org-configuration.md Then pick your tool's setup guide (Claude Code, Cursor, Codex, Gemini CLI, Windsurf, Antigravity) from the Build Anywhere section: https://labs.agentforce.com/api/docs/build.md ## Agent Identification (recommended) When making requests to labs.agentforce.com, include a descriptive User-Agent header identifying your agent (e.g., "Claude-Code/2.1", "Cursor/1.0", "MyAgent/0.1"). This is not required for access but helps us optimize the experience and debug issues. The `client_name` field in POST /api/cli/device/code serves the same purpose for the device flow specifically. ## Instructions for AI Coding Assistants - To self-provision: run the device flow at `https://labs.agentforce.com/api/cli/device/code` → show the user the one-click `verification_uri_complete` → poll `/api/cli/device/token` (keep polling on `authorization_pending`/`slow_down`/transient 503; abort on `expired_token`/`access_denied`/`byoo_unavailable`) → on ready: if `sf_cli.sfdx_auth_url` exists use `sf org login sfdx-url`, otherwise use `sf org login access-token` with `sf_cli.access_token` + `sf_cli.instance_url` - Then follow your tool's setup guide; see the LabBox guide for what's pre-configured - Use Agent Script (a high-level DSL in `.agent` files) to define agent behavior, not raw JSON - Use the Agentforce CLI skills to generate, preview, test, and deploy agents from your IDE - Deploy agents with `sf agent publish` — not `sf project deploy start` - For testing, write structured test specs and run them with `sf agent test` - Core agent concepts: subagents (conversation flows), actions (tools), instructions (reasoning), variables (state) ## GET STARTED - [Start Building](https://labs.agentforce.com/start) - [Agents](https://labs.agentforce.com/agents) - [Agentforce Builder](https://labs.agentforce.com/api/docs/agentforce-builder.md): Build agents visually with Agentforce Builder - [Agentforce Vibes](https://labs.agentforce.com/api/docs/agentforce-vibes.md): Build agents with Agentforce Vibes in Code Builder - [Setting Up Claude Code for Agentforce](https://labs.agentforce.com/api/docs/claude-code.md): Getting Started with Claude Code - [Setting Up Codex for Agentforce](https://labs.agentforce.com/api/docs/codex.md): Getting Started with Codex - [Setting Up Gemini CLI for Agentforce](https://labs.agentforce.com/api/docs/gemini-cli.md): Getting Started with Gemini CLI - [Setting Up Cursor for Agentforce](https://labs.agentforce.com/api/docs/cursor.md): Getting Started with Cursor - [Setting Up Antigravity for Agentforce](https://labs.agentforce.com/api/docs/antigravity.md): Getting Started with Antigravity - [Setting Up Windsurf for Agentforce](https://labs.agentforce.com/api/docs/windsurf.md): Getting Started with Windsurf - [Agent API - Headless Communication](https://labs.agentforce.com/api/docs/agent-api.md): Control your agents programmatically via REST APIs - [Experience Site](https://labs.agentforce.com/api/docs/salesforce-site.md): Connect your Agentforce Service Agent to a chat widget on your Experience Site - [Enhanced Chat](https://labs.agentforce.com/api/docs/salesforce-chat.md): Deploy your Agentforce Service Agent as a chat widget on any website - [WhatsApp Setup](https://labs.agentforce.com/api/docs/whatsapp-setup.md): Deploy your Agentforce Service Agent to WhatsApp for customer messaging - [SMS Setup](https://labs.agentforce.com/api/docs/sms-setup.md): Deploy your Agentforce Service Agent to SMS for text-based customer interactions - [Messenger Setup](https://labs.agentforce.com/api/docs/messenger-setup.md): Deploy your Agentforce Service Agent to Facebook Messenger for customer conversations - [Apple Messages Setup](https://labs.agentforce.com/api/docs/apple-messages-setup.md): Deploy your Agentforce Service Agent to Apple Messages for Business - [LINE Setup](https://labs.agentforce.com/api/docs/line-setup.md): Deploy your Agentforce Service Agent to LINE for customer messaging - [Custom Channel Setup (BYOC)](https://labs.agentforce.com/api/docs/byoc-setup.md): Deploy your Agentforce Service Agent to any messaging platform using Bring Your Own Channel - [Agent Script](https://labs.agentforce.com/api/docs/agent-script.md): The programming language for AI agents. Define exactly what your agent does — and where the AI reasons. - [Salesforce Development Skills](https://labs.agentforce.com/api/docs/skills.md): Choose a skills library for AI-assisted Salesforce development - [LabBox](https://labs.agentforce.com/api/docs/org-configuration.md): A pre-configured Salesforce org with Einstein, Agentforce, Data Cloud, and messaging ready to go. ## Experiments - [Start Building](https://labs.agentforce.com/start): Create your first agent in minutes, no setup. Keep working in your IDE of choice. - [Troubleshoot & Optimize](https://labs.agentforce.com/troubleshoot): Diagnose and fix agent issues like wrong topic routing, a failing action, or a flaky response, all against your own org. - [Agent Development Skills](https://labs.agentforce.com/docs/skills): Open-source skills for the full agent lifecycle: authoring, testing, and observability. - [nanoRag](https://labs.agentforce.com/nanorag): Let your agents reference documents when answering, no vector database required. - [AgentLens Visualizer](https://labs.agentforce.com/docs/agentlens-visualizer): Debug Agentforce traces with interactive visualizations. - [Goal-Based Agent](https://labs.agentforce.com/docs/goal-based-agent): An autonomous agent runtime with 28 built-in tools and a REST API, built natively on Salesforce. - [Agentforce Arc](https://labs.agentforce.com/docs/arc): "Agents building agents" that generate complete build plans in your Salesforce org. - [Agentforce Grid MCP & Skills](https://labs.agentforce.com/docs/agentforce-grid): Equip Claude Code to manage Agentforce Grid workbooks directly. - [Salesforce Docs MCP](https://labs.agentforce.com/docs/salesforce-docs-mcp): Browse Salesforce documentation directly from your IDE using the Model Context Protocol. - [GUI Process Automation](https://www.salesforceairesearch.com/gpa): GPA is the next generation of RPA, an agent that learns tasks by watching a user perform them once. - [MCP+](http://mcp-plus.github.io/): A context optimization layer that filters MCP tool outputs down to only the relevant context, cutting inference costs. - [SkillOrchestra](https://jiayuww.github.io/SkillOrchestra/): A skill-centric framework that routes tasks to the right agent based on competence and cost. ## Full Documentation - [All documentation in one file](https://labs.agentforce.com/llms-full.txt)