1- import type { Agent } from '@objectstack/spec/ai' ;
2-
3- export const SalesAssistantAgent : Agent = {
1+ /** Sales Assistant — helps reps with lead qualification and opportunity management */
2+ export const SalesAssistantAgent = {
43 name : 'sales_assistant' ,
54 label : 'Sales Assistant' ,
6- description : 'AI agent to help sales reps with lead qualification and opportunity management' ,
75 role : 'assistant' ,
8-
6+
97 instructions : `You are a sales assistant AI helping sales representatives manage their pipeline.
108
119Your responsibilities:
@@ -19,23 +17,18 @@ Your responsibilities:
1917Always be professional, data-driven, and focused on helping close deals.` ,
2018
2119 model : { provider : 'openai' , model : 'gpt-4' , temperature : 0.7 , maxTokens : 2000 } ,
22-
20+
2321 tools : [
24- { name : 'analyze_lead' , description : 'Analyze a lead and provide qualification score' , parameters : { lead_id : 'string' } } ,
25- { name : 'suggest_next_action' , description : 'Suggest next best action for an opportunity' , parameters : { opportunity_id : 'string' } } ,
26- { name : 'generate_email' , description : 'Generate a personalized email template' , parameters : { recipient_id : 'string' , context : 'string' , tone : 'string' } } ,
22+ { type : 'action' as const , name : 'analyze_lead' , description : 'Analyze a lead and provide qualification score' } ,
23+ { type : 'action' as const , name : 'suggest_next_action' , description : 'Suggest next best action for an opportunity' } ,
24+ { type : 'action' as const , name : 'generate_email' , description : 'Generate a personalized email template' } ,
2725 ] ,
28-
26+
2927 knowledge : {
30- sources : [
31- { type : 'object' , objectName : 'lead' , fields : [ '*' ] } ,
32- { type : 'object' , objectName : 'opportunity' , fields : [ '*' ] } ,
33- { type : 'object' , objectName : 'account' , fields : [ '*' ] } ,
34- { type : 'document' , path : '/knowledge/sales-playbook.md' } ,
35- { type : 'document' , path : '/knowledge/product-catalog.md' } ,
36- ] ,
28+ topics : [ 'sales_playbook' , 'product_catalog' , 'lead_qualification' ] ,
29+ indexes : [ 'sales_knowledge' ] ,
3730 } ,
38-
31+
3932 triggers : [
4033 { type : 'object_create' , objectName : 'lead' , condition : 'rating = "hot"' } ,
4134 { type : 'object_update' , objectName : 'opportunity' , condition : 'ISCHANGED(stage)' } ,
0 commit comments