What will you build?
From design tools to e-commerce, real-time editors to smart homes β see how Surf gives AI agents typed, structured access to any web application.
Why Surf, not just an API?
Your API is great for developers. Surf makes it great for AI agents too. One protocol, universal discovery, built for machines.
Auto-Discovery
Agents fetch /.well-known/surf.json and instantly know every command, parameter, type, and auth requirement. No docs to read, no API keys to hunt.
Universal Protocol
Every Surf-enabled site works the same way. Learn Surf once, interact with any site. No more custom REST conventions per service.
Agent-First Design
Commands include hints like idempotent, sideEffects, and estimatedMs β metadata that helps agents plan, retry, and reason about actions.
Zero Vision Models
No screenshots, no DOM parsing, no pixel-clicking. Just typed commands and structured responses. Faster, cheaper, 100% reliable.
Real-Time Sync
APIs are request/response. Surf has built-in WebSocket broadcasting via Surf Live β agents and UIs stay in sync, always.
Type Safety Built In
Every command has typed parameters with validation, scoped auth levels, and standardized error codes. No guessing, no custom parsing.
At a glance
| Feature | Traditional API | Surf Protocol |
|---|---|---|
| Discovery | Read docs, find endpoints | Automatic via /.well-known/surf.json |
| Integration | Custom per API | Universal β one protocol for all |
| Auth | Custom flows | Standardized per-command auth levels |
| Type safety | Maybe OpenAPI | Built-in typed params + validation |
| Agent hints | None | Idempotent, sideEffects, estimatedMs |
| Real-time | Build your own | Surf Live β built-in WebSocket sync |
| Error handling | Custom per API | Standardized error codes |
AI Design Tool
Create graphics through typed commands
An AI agent creates designs by calling canvas commands β no mouse, no screenshots. Create shapes, apply gradients, add text, and export β all through structured Surf commands.
Commands
canvas.createβ Create a new canvas with dimensionscanvas.addRectβ Add a rectangle with fill and strokecanvas.setGradientβ Apply linear or radial gradientscanvas.addTextβ Add text with font, size, and colorcanvas.addCircleβ Add a circle with position and stylecanvas.alignObjectsβ Auto-align shapes on the canvascanvas.exportPNGβ Export the canvas as PNG// Agent builds a gradient logo in one pipelineconst client = await SurfClient.discover( 'https://pixelforge-pearl.vercel.app')Β await client.pipeline([ { command: 'canvas.create', params: { width: 800, height: 600 } }, { command: 'canvas.addRect', params: { x: 100, y: 80, w: 300, h: 200, fill: '#0057FF' } }, { command: 'canvas.setGradient', params: { type: 'linear', from: '#0057FF', to: '#00C9B1' } }, { command: 'canvas.addText', params: { text: 'Made by AI', fontSize: 32 } }, { command: 'canvas.addCircle', params: { cx: 520, cy: 200, r: 80 } }, { command: 'canvas.alignObjects', params: { align: 'center' } },])E-Commerce Store
Search, browse, and purchase programmatically
Agents search products, manage carts, and complete purchases through a typed command pipeline β replacing 10 page loads with a single 47ms API call.
Commands
products.listβ List products with paginationproducts.searchβ Search by name, category, or filtersproducts.getβ Get detailed product info by IDcart.addβ Add a product to the cartcart.getβ View current cart contents + totalcart.checkoutβ Complete purchase (auth required)// Full shopping flow in one pipelineconst client = await SurfClient.discover( 'https://store.example.com')Β const result = await client.pipeline([ { command: 'products.search', params: { q: 'wireless headphones', maxPrice: 600 }, as: 'results' }, { command: 'cart.add', params: { id: '$results.products.0.id', qty: 1 } }, { command: 'cart.checkout' },])// β Order confirmed β 47ms total, 0 screenshotsSurf Live: Real-Time Video Editor
Agent edits while users watch β live
Powered by Surf Live, an AI agent edits a video timeline while connected browsers see every change in real-time. State syncs instantly via WebSocket β no polling, no refresh.
Commands
useSurfState()β React hook for synced stateuseSurfEvent()β Subscribe to real-time eventsSurfProviderβ Context provider with auto-reconnecttimeline.updateβ Push timeline changes to all clientsimport { SurfProvider, useSurfEvent } from '@surfjs/react'Β function App() { return ( <SurfProvider url="wss://your-server.com/surf/live"> <Timeline /> </SurfProvider> )}Β function Timeline() { const [clips, setClips] = useState([])Β useSurfEvent('timeline.updated', (data) => { setClips(data.clips) // Updates instantly across all browsers })Β return <ClipList clips={clips} />}CMS / Content Management
Agents manage pages, blocks, and media
An agent creates pages, adds content blocks, uploads media, and publishes β all through structured commands. No clicking through admin UIs.
Commands
page.createβ Create a new page with metadatacontent.addBlockβ Add a content block (text, image, embed)media.uploadβ Upload an image or filepage.setStatusβ Move page through workflow stagespage.publishβ Publish a draft page// Agent creates a blog post with an imageconst client = await SurfClient.discover('https://cms.example.com')Β await client.pipeline([ { command: 'page.create', params: { title: 'Hello World', type: 'blog' }, as: 'page' }, { command: 'content.addBlock', params: { pageId: '$page.id', type: 'text', body: 'Welcome to our blog.' } }, { command: 'media.upload', params: { url: 'https://example.com/hero.jpg' }, as: 'image' }, { command: 'content.addBlock', params: { pageId: '$page.id', type: 'image', mediaId: '$image.id' } }, { command: 'page.publish', params: { pageId: '$page.id' } },])Developer Tools / CI/CD
Run builds, check tests, deploy previews
Agents trigger CI pipelines, check test results, and deploy preview environments β all through typed commands with structured responses.
Commands
ci.runβ Trigger a CI build for a branchtest.statusβ Check test results and coveragedeploy.previewβ Deploy to a preview environmentdeploy.promoteβ Promote preview to productionlogs.tailβ Stream recent deployment logs// Agent runs full CI β deploy pipelineconst client = await SurfClient.discover('https://ci.example.com')Β const result = await client.pipeline([ { command: 'ci.run', params: { branch: 'feat/new-api' }, as: 'build' }, { command: 'test.status', params: { buildId: '$build.id' }, as: 'tests' }, { command: 'deploy.preview', params: { buildId: '$build.id' }, as: 'deploy' },])Β console.log(result.deploy.url) // β "preview-abc123.vercel.app"Smart Home / IoT
Control devices and read sensors
Agents control smart home devices β toggle lights, adjust thermostats, activate scenes. Structured commands replace brittle home automation scripts.
Commands
devices.listβ List all connected devices and statuslights.setβ Turn lights on/off, set brightness and colorthermostat.setβ Set target temperaturescene.activateβ Activate a predefined sceneblinds.setβ Set blind/shade positionmedia.playβ Play audio on connected speakers// Agent sets up a movie night sceneconst client = await SurfClient.discover('https://home.local')Β await client.pipeline([ { command: 'lights.set', params: { room: 'living', brightness: 20, color: '#FF8C00' } }, { command: 'thermostat.set', params: { target: 22 } }, { command: 'scene.activate', params: { name: 'Movie Night' } }, { command: 'blinds.set', params: { position: 20 } }, { command: 'media.play', params: { source: 'ambient' } },])// Lights dimmed, temperature set, scene activatedBuild your own
Add Surf to any website in minutes. Expose typed commands, and let any AI agent interact with your app.
npx @surfjs/cli inspect your-site.com