-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathmain.ts
More file actions
51 lines (42 loc) · 2.62 KB
/
main.ts
File metadata and controls
51 lines (42 loc) · 2.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import 'dotenv/config'
import { InvestigationWorkflow } from './investigationWorkflow.js'
import { payload } from './payload.js'
/**
* Main entry point for the Investigator Workflow system
* Orchestrates a multi-agent investigation to solve an art theft case
*/
async function main() {
try {
console.log('═══════════════════════════════════════════════════════════')
console.log(' 🔍 ART THEFT INVESTIGATION - MULTI-AGENT SYSTEM')
console.log('═══════════════════════════════════════════════════════════\n')
// Initialize the investigator workflow
const workflow = new InvestigationWorkflow(process.env.MODEL_NAME!)
// Define the suspects
const suspectNames = 'Sophie Dubois, Marcus Chen, Viktor Petrov'
console.log('📋 Case Details:')
console.log(` • Stolen Items: ${payload.rows.length} artworks`)
console.log(` • Suspects: ${suspectNames}`)
console.log(` • Investigation Team: 3 specialized agents\n`)
// Start the investigation
const startTime = Date.now()
const result = await workflow.kickoff({
payload,
suspect_names: suspectNames,
})
const duration = ((Date.now() - startTime) / 1000).toFixed(2)
console.log('\n═══════════════════════════════════════════════════════════')
console.log(' 📘 FINAL INVESTIGATION REPORT')
console.log('═══════════════════════════════════════════════════════════\n')
console.log(result)
console.log('\n═══════════════════════════════════════════════════════════')
console.log(` ⏱️ Investigation completed in ${duration} seconds`)
console.log('═══════════════════════════════════════════════════════════\n')
} catch (error) {
console.error('\n❌ Investigation failed with error:')
console.error(error)
process.exit(1)
}
}
// Run the main function
main()