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