Automate Your Businesses With Code.
Define, manage, and run your business operations as code, transforming workflows into programmable, API-driven services.
Join waitlist
import { agent } from '@dotdo/agent';
interface Business {
id?: string;
name: string;
industry: string;
location: string;
}
// Define an agent to manage businesses
const businessAgent = agent.create('business');
async function createBusiness(data: Business): Promise {
return businessAgent.create(data);
}
async function getBusiness(businessId: string): Promise {
return businessAgent.get(businessId);
}
// Example usage:
async function run() {
const newBusiness = await createBusiness({
name: 'Innovative Solutions LLC',
industry: 'Technology',
location: 'San Francisco, CA'
});
console.log('Created Business:', newBusiness);
const fetchedBusiness = await getBusiness(newBusiness.id);
console.log('Fetched Business:', fetchedBusiness);
}
run();