.do Business-as-Code
While the cloud enabled Software-as-a-Service, AI is unlocking new business models where Services-as-Software can be delivered without scaling human labor, and Business-as-Code enable the creation of new AI-native organizations to disrupt legacy competitors.
Functions.do Generate Objects without a Schema
import{ai}from'functions.do'constbrand=awaitai.storyBrand({idea: 'Auto Loan Underwriting Services-as-Software'})Functions.do Generate Text
constpost=awaitai`write a blog post introducing ${idea} and ${brand}`Functions.do Generate Lists
consttitles=awaitai.list`${count} possible blog post titles related to ${idea}`titles.forEach((title)=>ai`write a blog post starting with "# ${title}"`)Functions.do Generate Objects with a Type-safe Schema
import{AI}from'functions.do'constai=AI({leanCanvas: {productName: 'name of the product or service',problem: ['top 3 problems the product solves'],solution: ['top 3 solutions the product offers'],uniqueValueProposition: 'clear message that states the benefit of your product',unfairAdvantage: 'something that cannot be easily copied or bought',customerSegments: ['list of target customer segments'],keyMetrics: ['list of key numbers that tell you how your business is doing'],channels: ['path to acquire customers'],costStructure: ['list of operational costs'],revenueStreams: ['list of revenue sources'],},})constbusinessModel=awaitai.leanCanvas({idea: 'Auto Lending Services-as-Software'})Agents.do Research & Web Browsing
import{browse,research}from'agents.do'constdirectories=awaitresearch`website directories for ${topic}`([String])directories.forEach((directory)=>browse`${directory}. Request Agents.do to be added`)Agents.do Autonomous Work
import{Agent}from'agents.do'// Create a customer support agentconstamy=Agent({name: 'Amy',url: 'https://amy.do',role: 'Customer Support Agent',objective: 'Handles customer inquiries and resolves common issues',keyResults: ['ticketResponseTime','ticketResolutionTime','customerSatisfaction'],integrations: ['chat','slack','email','zendesk','shopify'],triggers: ['onTicketCreated','onMessageReceived'],searches: ['FAQs','Tickets','Orders','Products','Customers'],actions: ['sendMessage','updateOrder','refundOrder','resolveTicket','escalateTicket'],})Humans.do Tasks in a Workflow
import{human}from'humans.do'constceo=human({email: 'sam@openai.com'})ceo.approveRelease({product: 'GPT-5'})Evals.do Measure AI Model Performance
import{Eval,JSONDiff}from'evals.do'import{models}from'models.do'Eval('W-2 OCR',{// compare different modelsmodels: models({capability: 'vision'}),// calculate all variations of inputsinputs: async()=>cartesian({image: [1,2,3,4,5,6],blur: [0,1,2,3],res: [512,768,1536,2000,3072],}).map(({ image, blur, res })=>({image: `https://…/w2_img${image}_blur${blur}_res${res}.jpg`})),// run 3 times for each inputseeds: 3,prompt: 'Extract the data from the image.',temperature: 0,expected: expectedOutput,schema: W2,scorers: [JSONDiff],})Experiments.do Rapid Iteration
import{ai}from'functions.do'import{db}from'database.do'import{Battle}from'evals.do'import{Experiment}from'experiments.do'Experiment({models: ['openai/gpt-4.1','openai/gpt-4.1-mini','openai/gpt-4.5-preview','google/gemini-2.5-pro-preview-03-25','google/gemini-2.5-flash-preview','google/gemini-2.0-flash','anthropic/claude-3.7-sonnet','anthropic/claude-3.5-sonnet','meta-llama/llama-4-maverick','meta-llama/llama-4-scout','x-ai/grok-3-beta','x-ai/grok-3-mini-beta',],temperature: [0.7,0.8,0.9,1],system: ['You are an expert at writing compelling and SEO-optimized site content','You are an expert at content marketing for idea-stage startups','You are a YC Group Partner having office hours with one of your startups',],inputs: db.ideas.find({status: 'waitlist'}),task: ai.generateLandingPage({hero: {headline: 'compelling & conversion optimized headline (7-10 words)',subhead: 'compelling & conversion optimized subhead (1-2 sentences)',badge: '3-word eyebrow text above hero headline',},benefits: [{title: '3-4 word high-level overview of the benefit',description: '2 sentence detailed description',}],faqs: [{question: '6-8 word question',answer: '2-3 sentence answer',}],})scorer: [Battle],})Analytics.do Track Business Metrics
import{track}from'analytics.do'track('User.Signup',{ name, email, company })Workflows.do Respond to Events
import{on}from'workflows.do'on('User.Signup',async(event,{ ai, api, db })=>{const{ name, email, company }=event// Enrich content details with lookup from external data sourcesconstenrichedContact=awaitapi.apollo.search({ name, email, company })constsocialProfiles=awaitapi.peopleDataLabs.findSocialProfiles({ name, email, company })constgithubProfile=socialProfiles.github ? awaitapi.github.profile({ name, email, company,profile: socialProfiles.github}) : undefined// Using the enriched contact details, do deep research on the company and personal backgroundconstcompanyProfile=awaitai.researchCompany({ company })constpersonalProfile=awaitai.researchPersonalBackground({ name, email, enrichedContact })constsocialActivity=awaitai.researchSocialActivity({ name, email, enrichedContact, socialProfiles })constgithubActivity=githubProfile ? awaitai.summarizeGithubActivity({ name, email, enrichedContact, githubProfile }) : undefined// Schedule a highly personalized sequence of emails to optimize onboarding and activationconstemailSequence=awaitai.personalizeEmailSequence({ name, email, company, personalProfile, socialActivity, companyProfile, githubActivity })awaitapi.scheduleEmails({ emailSequence })// Summarize everything, save to the database, and post to Slackconstdetails={ enrichedContact, socialProfiles, githubProfile, companyProfile, personalProfile, socialActivity, githubActivity, emailSequence }constsummary=awaitai.summarizeContent({length: '3 sentences', name, email, company, ...details})const{ url }=awaitdb.users.create({ name, email, company, summary, ...details})awaitapi.slack.postMessage({channel: '#signups',content: { name, email, company, summary, url }})})Workflows.do Scheduled Functions
import{every}from'workflows.do'import{cmo}from'agents.do'every('hour during business hours',async(event,{ db })=>{constideas=awaitdb.ideas.find({status: 'launched'})ideas.forEach((idea)=>cmo.do`a creative marketing campaign for ${idea}`)})Database.do Schemaless Collections
import{db}from'database.do'awaitdb.ideas.create({ idea, businessModel,status: 'waitlist'})constwaitlistIdeas=awaitdb.ideas.find({status: 'waitlist'})Database.do Integrated Embeddings & Vector Search
constideas=awaitdb.ideas.search('automotive finance')Database.do Schemas & Relationships
import{DB}from'database.do'constdb=DB({posts: {title: 'text',content: 'richtext',status: 'Draft | Published | Archived',// Select field with predefined optionscontentType: 'Text | Markdown | Code | Object | Schema',// Another select field exampletags: 'tags[]',author: 'authors',},tags: {name: 'text',posts: '<-posts.tags',// Join field to posts (reverse relation)},authors: {name: 'text',email: 'email',role: 'Admin | Editor | Writer',// Select field with predefined optionsposts: '<-posts.author',// Join field to posts (reverse relation)},}).do ❤️ open-source
The .do Platform is completely MIT-licensed open source and built on top of many amazing companies and open source projects:
- AI models are provided by OpenAI, Google, Anthropic, Meta, xAI, DeepSeek, Alibaba, and Perplexity
- AI inference is provided by OpenAI, Google, Anthropic, AWS, Groq, xAI, Perplexity, and Cloudflare
- Additional AI models and inference providers available via OpenRouter
- TypeScript, Node.js, Next.js, React, Tailwind, ShadCN, Payload
- Authentication is provided by WorkOS with customer keys/secrets in WorkOS Vault
- Hosting is managed by Vercel & Cloudflare Workers for Platforms
- Databases are managed MongoDB Atlas, Neon Postgres, and Clickhouse Cloud.
- Integrations via API Keys and OAuth are facilitated by Composio and Zapier
- Analytics provided by PostHog, with monitoring from Better Stack