/* * ACP Agent — minimal Composer manifest example. * * The source agent ID is the stable manifest handle. Keep it unchanged when * updating the company API name, including when adding the required __c suffix. * The agent source is loaded from `agent/index.ts`, just as function examples * load handler files from `functions/`. * * Run: * yarn tsn examples/manifest/acp-agent/acp-agent.ts \ * > examples/manifest/acp-agent/manifest.json */ import * as fs from 'node:fs'; import * as path from 'node:path'; import { ACPAgent, BusinessEvent, ManifestBuilder } from '@rippling/rippling-sdk/lib/manifest'; function readAgentFile(filename: string): string { return fs.readFileSync(path.join(__dirname, 'agent', filename), 'utf-8'); } const manifest = new ManifestBuilder({ key: 'acp_agent_example', name: 'ACP Agent Example', description: 'An event-triggered Agent Control Plane agent', }); new ACPAgent( manifest, { name: 'Employee Onboarding Agent', apiName: 'employee_onboarding_agent__c', description: 'Welcomes new employees and prepares their first-day tasks.', identityMode: 'runner', eventTriggers: [ { key: 'employee_hired', eventKey: BusinessEvent.EMPLOYEE_HIRING_INITIATED, promptTemplate: 'Welcome the new employee and prepare their first-day tasks.', }, ], files: [ { path: 'index.ts', content: readAgentFile('index.ts'), kind: 'typescript', }, ], entrypoint: 'index.ts', }, 'employee_onboarding_agent', ); console.log(manifest.preview());