Skip to content

Commit 09aa7dd

Browse files
committed
Add json editor support to client side tool
Fix the minor bugs of client side tool
1 parent 1fd8395 commit 09aa7dd

File tree

5 files changed

+877
-16
lines changed

5 files changed

+877
-16
lines changed

platform/agc-platform-core/src/main/resources/bootstrap-agents.json

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,5 +209,151 @@
209209
"model":"gpt-4.1-mini",
210210
"temperature":1,
211211
"suggestedQueries":["Find high-value customers with repeated payment failures and unresolved complaints, and apply the action assign_agent to all customers."]
212+
},
213+
{
214+
"name": "Atom",
215+
"description": "Handle SalesForce use-cases",
216+
"systemPrompt": "You are agent ATOM (your nickname), who can access through provided tools: call transcripts, update Sales Force CRM and get info from Sales Force CRM.\n\nROLE\nYou are “Sales Ops Agent,” a reliable assistant for enterprise sales managers. \nYour main purpose is to:\n1. Update Salesforce (or equivalent CRM) with call logs and opportunity notes from call transcripts. \n2. Retrieve past call logs and opportunity context to help sales executives prepare for meetings. \n\nPRIMARY OBJECTIVES\n- After a call: take a transcript, extract structured details, and create/update the correct call log and opportunity in the CRM. \n- Before a meeting: fetch and summarize relevant past call logs and opportunities for the specified account/contact. \n\nCONSTRAINTS & PRINCIPLES\n- Be tool-name agnostic. Match capabilities by purpose (e.g., “get transcript,” “update CRM log,” “fetch past CRM logs”) rather than by exact function name. \n- Never invent Salesforce IDs or data. Use only user input or tool outputs. \n- Keep updates minimal and accurate — only update/create what’s explicitly mentioned. \n- Keep outputs compact, structured, and useful for a sales manager. \n\nAVAILABLE CAPABILITIES\n- **Transcript Retrieval Tool**: to get call transcript for account. This tool provides the complete transcript of the call with the client.\n- **CRM Update Tool**: update call logs in CRM against the account. Generally, this information is updated just after call with the client.\n- **CRM Fetch Tool**: get past call logs against the account.\n\nACCOUNT EXAMPLES:\n- BMW\n- Siemens\n\nTRANSCRIPT DATA EXTRACTION\nFrom a call transcript, identify:\n- Participants (names, roles, emails if available). \n- Account & Contact names. \n- Opportunity mentions (name, stage, amount, close date, competitors). \n- Call metadata (datetime, duration, key topics, decisions, objections, risks, commitments). \n- Action items/next steps (with owner and due date). \n- Sentiment: positive / neutral / negative. \n\nOutput Instructions:\n1. Provide bullet points in answer to question.\n2. Add: \n- What you accomplished?\n- What can be done next?\n \nTodays date is 22/09/2025",
217+
"tools": [
218+
{
219+
"type": "function",
220+
"name": "salesforce_data_extraction",
221+
"description": "This tool can get data about past call logs and opportunities logged for an account in sales force.",
222+
"parameters": {
223+
"type": "object",
224+
"properties": {
225+
"workflow_id": {
226+
"type": "string",
227+
"description": "Id of the workflow to be executed",
228+
"enum": [
229+
"ff8735d6-4bc0-4c3b-9dee-030776440c72"
230+
]
231+
},
232+
"Input": {
233+
"type": "object",
234+
"description": "The object that contains information about account to search for call log, opportunity.",
235+
"properties": {
236+
"search_term": {
237+
"type": "string",
238+
"description": "The account name for search. For example - BW, Siemens, Volkswagen"
239+
}
240+
}
241+
},
242+
"execution_specs": {
243+
"type": "object",
244+
"properties": {
245+
"type": {
246+
"type": "string",
247+
"enum": [
248+
"client_side"
249+
]
250+
},
251+
"maxRetryAttempts": {
252+
"type": "number",
253+
"enum": [
254+
1
255+
]
256+
},
257+
"waitTimeInMillis": {
258+
"type": "number",
259+
"enum": [
260+
60000
261+
]
262+
}
263+
}
264+
}
265+
},
266+
"required": [
267+
"workflow_id",
268+
"Input"
269+
],
270+
"additionalProperties": false
271+
},
272+
"strict": true
273+
},
274+
{
275+
"type": "function",
276+
"name": "salesforce_opportunity_creation",
277+
"description": "This tool can update call logs in sales force. Call logs are generally updated after sales meeting with the customer.",
278+
"parameters": {
279+
"type": "object",
280+
"properties": {
281+
"workflow_id": {
282+
"type": "string",
283+
"description": "Id of the workflow to be executed",
284+
"enum": [
285+
"ff8735d6-4bc0-4c3b-9dee-030776440c72"
286+
]
287+
},
288+
"Input": {
289+
"type": "object",
290+
"description": "The object that contains information about account to search, call log, opportunity.",
291+
"properties": {
292+
"search_term": {
293+
"type": "string",
294+
"description": "The account name for search. For example - BW, Siemens, Volkswagen"
295+
},
296+
"subject_option": {
297+
"type": "string",
298+
"description": "The subject, always picked from default",
299+
"default": "Call"
300+
},
301+
"call_details": {
302+
"type": "string",
303+
"description": "The discussion of the call to be logged. Can be a bullet list that summarised the call in various sections like: progress, client mood, pain-points, opportunities"
304+
},
305+
"contact_name": {
306+
"type": "string",
307+
"description": "Name/designation of the contact person."
308+
},
309+
"opportunity_name": {
310+
"type": "string",
311+
"description": "concise one sentence about the opportunity available."
312+
},
313+
"opportunity_description": {
314+
"type": "string",
315+
"description": "Detailed description of the opportunity"
316+
},
317+
"close_date": {
318+
"type": "string",
319+
"description": "Expected close date of the opportunity. If not available then set as +5 days from the current date in format DD/MM/YYYY. Example date can be like this - 22/09/2025"
320+
}
321+
}
322+
},
323+
"execution_specs": {
324+
"type": "object",
325+
"properties": {
326+
"type": {
327+
"type": "string",
328+
"enum": [
329+
"client_side"
330+
]
331+
},
332+
"maxRetryAttempts": {
333+
"type": "number",
334+
"enum": [
335+
1
336+
]
337+
},
338+
"waitTimeInMillis": {
339+
"type": "number",
340+
"enum": [
341+
60000
342+
]
343+
}
344+
}
345+
}
346+
},
347+
"required": [
348+
"workflow_id",
349+
"Input"
350+
],
351+
"additionalProperties": false
352+
},
353+
"strict": true
354+
}
355+
],
356+
"model":"gpt-4.1-mini",
357+
"temperature":1
212358
}
213359
]

ui/src/components/AiPlayground.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1006,7 +1006,8 @@ const AiPlayground: React.FC = () => {
10061006
console.log('Has client-side tools:', hasClientSideTools(agent));
10071007

10081008
// Check if agent has client-side tools and show prerequisite dialog
1009-
if (hasClientSideTools(agent)) {
1009+
// Skip showing dialog if agent name contains "Atom" (case-insensitive)
1010+
if (hasClientSideTools(agent) && !agent.name.toLowerCase().includes('atom')) {
10101011
console.log('Showing prerequisite dialog for agent:', agent.name);
10111012
setPrerequisiteDialogOpen(true);
10121013
}

ui/src/components/ArrayItemsModal.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ const ArrayItemsModal: React.FC<ArrayItemsModalProps> = ({
5151
if (open) {
5252
if (initialItems) {
5353
setItems(initialItems);
54-
setPropertyType(initialItems.type);
54+
// If property has enum values, treat it as enum type in UI (even if saved type is 'string')
55+
setPropertyType(initialItems.enum && initialItems.enum.length > 0 ? 'enum' : initialItems.type);
5556
setPropertyDescription(initialItems.description || '');
5657
setPropertyDefaultValue(initialItems.default !== undefined ? JSON.stringify(initialItems.default) : '');
5758
setPropertyEnumValues(initialItems.enum || []);
@@ -120,7 +121,7 @@ const ArrayItemsModal: React.FC<ArrayItemsModalProps> = ({
120121
const parsedDefaultValue = parseDefaultValue(propertyDefaultValue, propertyType);
121122

122123
const newItems: PropertyDefinition = {
123-
type: propertyType,
124+
type: propertyType === 'enum' ? 'string' : propertyType,
124125
description: propertyDescription.trim() || undefined,
125126
...(parsedDefaultValue !== undefined && { default: parsedDefaultValue }),
126127
...(propertyType === 'enum' && propertyEnumValues.length > 0 && { enum: propertyEnumValues }),
@@ -134,7 +135,8 @@ const ArrayItemsModal: React.FC<ArrayItemsModalProps> = ({
134135
const handleCancel = () => {
135136
if (initialItems) {
136137
setItems(initialItems);
137-
setPropertyType(initialItems.type);
138+
// If property has enum values, treat it as enum type in UI (even if saved type is 'string')
139+
setPropertyType(initialItems.enum && initialItems.enum.length > 0 ? 'enum' : initialItems.type);
138140
setPropertyDescription(initialItems.description || '');
139141
setPropertyDefaultValue(initialItems.default !== undefined ? JSON.stringify(initialItems.default) : '');
140142
setPropertyEnumValues(initialItems.enum || []);

0 commit comments

Comments
 (0)