Examples
Real-world agent implementations and use cases
Agent Examples
Learn from real-world agent implementations across industries and use cases.
Customer Success Agents
Onboarding Automation
Challenge: Manual customer onboarding takes 2-3 weeks and requires multiple team members.
Solution: Onboarding agent coordinates entire process:
// @errors: 7006
// @filename: sdk.do.d.ts
import type { Agent, Customer } from 'sdk.do'
declare const $: any
declare function on(event: any, handler: Function): void
// @filename: example.ts
// ---cut---
import { $, on } from 'sdk.do'
const onboardingAgent = $.Agent.create({
name: 'Customer Onboarding Agent',
role: 'Guide new customers through setup and activation',
// ^^^^
workflow: [
'send-welcome-email',
'schedule-kickoff-call',
'configure-account-settings',
'import-customer-data',
'setup-integrations',
'provide-training-resources',
'monitor-first-usage',
'check-in-after-week-one',
],
})
// Listen for customer creation events
on.Customer.created(async (customer) => {
// ^^
await onboardingAgent.execute({
// ^^^^^^^
customer,
plan: customer.subscription.plan,
integrations: customer.requestedIntegrations,
})
})Results:
- Onboarding time: 3 days (down from 15-21 days)
- Team time saved: 8 hours per customer
- Activation rate: 94% (up from 67%)
- Cost per onboarding: $5 (down from $800)
Sales Development Agents
Lead Qualification
Challenge: SDRs spend 70% of time on unqualified leads.
Solution: Qualification agent scores and enriches leads:
// @errors: 7006
// @filename: sdk.do.d.ts
declare const $: any
declare function on(event: any, handler: Function): void
declare function send(event: any, data: any): Promise<void>
declare const icpCriteria: any
// @filename: example.ts
// ---cut---
import { $, on, send } from 'sdk.do'
const qualificationAgent = $.Agent.create({
name: 'Lead Qualification Agent',
capabilities: ['company-research', 'contact-verification', 'intent-scoring', 'personalization'],
// ^^^^^^^^^^^^^^^^^^
})
on.Lead.created(async (lead) => {
// Enrich data from multiple sources
const company = await qualificationAgent.research(lead.company)
const contact = await qualificationAgent.verify(lead.email)
// AI scores lead fit against ICP criteria
const score = await qualificationAgent.score({
// ^?
company,
contact,
criteria: icpCriteria,
})
// Route based on score thresholds
if (score >= 80) {
send.Lead.hot({ lead, score, insights: company })
// ^^^^
} else if (score >= 50) {
send.Lead.warm({ lead, score })
} else {
send.Lead.nurture({ lead, score })
}
})Results:
- SDR time on qualified leads: 90% (up from 30%)
- Conversion rate: 8% (up from 3%)
- Pipeline value: +145%
- Cost per qualified lead: $15 (down from $120)
Content Creation Agents
Blog Post Production
Challenge: Content team struggles to maintain publishing schedule.
Solution: Content pipeline with specialized agents:
// @errors: 7006
// @filename: sdk.do.d.ts
declare const $: any
declare function on(event: any, handler: Function): void
declare function send(event: any, data: any): Promise<void>
// @filename: example.ts
// ---cut---
import { $, on, send } from 'sdk.do'
// Multi-agent pipeline for content creation
const contentPipeline = $.AgentPipeline.create([
// ^^^^^^^^^^^^^^^^^^^^^^^
$.Agent.create({
name: 'Content Strategist',
role: 'Research topic and create outline',
}),
$.Agent.create({
name: 'Writer',
role: 'Write first draft from outline',
}),
$.Agent.create({
name: 'Editor',
role: 'Edit for clarity, grammar, and style',
}),
$.Agent.create({
name: 'SEO Optimizer',
role: 'Optimize for search engines',
}),
$.Agent.create({
name: 'Publisher',
role: 'Format and publish to CMS',
}),
])
on.BlogPost.requested(async (request) => {
// Pipeline executes agents sequentially
const post = await contentPipeline.execute({
// ^?
topic: request.topic,
keywords: request.keywords,
tone: request.tone,
length: request.length,
})
send.BlogPost.published(post)
})Results:
- Publishing frequency: 20 posts/week (up from 3/week)
- Time to publish: 2 hours (down from 5 days)
- SEO performance: +67% organic traffic
- Cost per post: $50 (down from $800)
Data Processing Agents
Financial Reconciliation
Challenge: Month-end close takes 5 days and requires 3 accountants.
Solution: Reconciliation agent automates the process:
// @errors: 7006
// @filename: sdk.do.d.ts
declare const $: any
declare const db: any
declare const api: any
declare const reconciliationRules: any
declare function on(event: any, handler: Function): void
declare function send(event: any, data: any): Promise<void>
// @filename: example.ts
// ---cut---
import { $, db, api, on, send } from 'sdk.do'
const reconciliationAgent = $.Agent.create({
name: 'Financial Reconciliation Agent',
capabilities: ['transaction-matching', 'discrepancy-detection', 'journal-entry-creation', 'report-generation'],
// ^^^^^^^^^^^^^^^^^^^^^
})
on.Month.ended(async (month) => {
// Gather data from multiple sources in parallel
const [bank, stripe, quickbooks] = await Promise.all([
// ^^^^
db.BankTransaction.query({ month }),
api.stripe.transactions({ month }),
api.quickbooks.transactions({ month }),
])
// AI matches transactions across sources
const results = await reconciliationAgent.reconcile({
// ^?
sources: { bank, stripe, quickbooks },
rules: reconciliationRules,
})
// Handle discrepancies with AI-driven resolution
if (results.discrepancies.length > 0) {
for (const discrepancy of results.discrepancies) {
if (discrepancy.amount < 10) {
// Auto-resolve small amounts
await reconciliationAgent.resolve(discrepancy)
} else {
// Escalate to human for review
send.Reconciliation.review(discrepancy)
}
}
}
// Generate comprehensive report
const report = await reconciliationAgent.report(results)
send.Reconciliation.completed(report)
})Results:
- Close time: 4 hours (down from 5 days)
- Accuracy: 99.9% (up from 97%)
- Team time saved: 100 hours/month
- Cost per close: $20 (down from $3,000)
Customer Support Agents
Tier 1 Support Automation
Challenge: Support team overwhelmed with repetitive questions.
Solution: Support agent handles tier 1 inquiries:
// @errors: 7006
// @filename: sdk.do.d.ts
declare const $: any
declare function on(event: any, handler: Function): void
declare function send(event: any, data: any): Promise<void>
// @filename: example.ts
// ---cut---
import { $, on, send } from 'sdk.do'
const supportAgent = $.Agent.create({
name: 'Customer Support Agent',
capabilities: ['intent-classification', 'knowledge-base-search', 'account-lookup', 'response-generation', 'escalation-routing'],
// ^^^^^^^^^^^^^^^^^^^^^
})
on.Support.ticket(async (ticket) => {
// AI classifies customer intent
const intent = await supportAgent.classify(ticket.message)
// ^?
// Search knowledge base with semantic understanding
const answer = await supportAgent.search({
query: ticket.message,
intent,
context: { customer: ticket.customer },
})
// Respond if confident, otherwise escalate
if (answer.confidence >= 0.8) {
// ^^^^^^^^^^
send.Support.reply({
ticket,
message: answer.response,
confidence: answer.confidence,
})
} else {
send.Support.escalate({
ticket,
reason: 'low-confidence',
suggestedAnswers: answer.candidates,
})
}
})Results:
- Auto-resolution rate: 72%
- First response time: 30 seconds (down from 4 hours)
- CSAT: 4.6/5 (up from 4.1/5)
- Support cost per ticket: $1 (down from $25)
Market Research Agents
Competitive Intelligence
Challenge: Keeping up with competitor changes requires constant manual monitoring.
Solution: Monitoring agent tracks competitors automatically:
// @errors: 7006
// @filename: sdk.do.d.ts
declare const $: any
declare const competitors: any[]
declare const on: any
declare function send(event: any, data: any): Promise<void>
// @filename: example.ts
// ---cut---
import { $, on, send } from 'sdk.do'
const competitorAgent = $.Agent.create({
name: 'Competitive Intelligence Agent',
capabilities: ['website-monitoring', 'news-tracking', 'pricing-analysis', 'feature-comparison', 'alert-generation'],
// ^^^^^^^^^^^^^^^^^^^^
})
// Monitor competitors daily
on.schedule('daily', async () => {
// ^^^^^^^^^^
for (const competitor of competitors) {
// AI detects changes across multiple aspects
const changes = await competitorAgent.detect({
// ^?
competitor,
aspects: ['pricing', 'features', 'messaging', 'team'],
})
if (changes.length > 0) {
// Send alert with AI analysis of impact
send.Competitor.changed({
competitor,
changes,
analysis: await competitorAgent.analyze(changes),
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
})
}
}
})Results:
- Response time to competitor moves: Same day (down from 2-3 weeks)
- Market intelligence coverage: 100% (up from ~30%)
- Strategic adjustments: +3x frequency
- Cost: $50/month (down from $5,000/month)
Next Steps
Ready to build your own agents?
- Overview - Learn agent fundamentals
- Capabilities - Explore available tools
- Teams - Build multi-agent systems
- Services - Package as sellable services