|
| 1 | +/** |
| 2 | + * Copyright 2025 Google LLC |
| 3 | + * |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | + * you may not use this file except in compliance with the License. |
| 6 | + * You may obtain a copy of the License at |
| 7 | + * |
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | + * |
| 10 | + * Unless required by applicable law or agreed to in writing, software |
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | + * See the License for the specific language governing permissions and |
| 14 | + * limitations under the License. |
| 15 | + */ |
| 16 | + |
| 17 | +import { ai } from '../config/genkit'; |
| 18 | +import { agent as catalogAgent } from './catalogAgent'; |
| 19 | +import { agent as paymentAgent } from './paymentAgent'; |
| 20 | +import { agent as representativeAgent } from './representativeAgent'; |
| 21 | + |
| 22 | +// The triage agent routes customers to the appropriate specialist |
| 23 | +export const agent = ai.definePrompt({ |
| 24 | + name: 'triageAgent', |
| 25 | + description: 'Triage Agent', |
| 26 | + model: 'googleai/gemini-2.5-flash', |
| 27 | + tools: [catalogAgent, paymentAgent, representativeAgent], |
| 28 | + system: `You are an AI customer service agent for TechStore Computer Shop. |
| 29 | + Greet the user and ask them how you can help. Route them to the appropriate specialist agent: |
| 30 | + - Use catalogAgent for browsing products, searching items, or getting product information |
| 31 | + - Use paymentAgent for payment processing |
| 32 | + - Use representativeAgent for providing store information |
| 33 | + If you cannot help the customer with the available tools, politely explain so.`, |
| 34 | +}); |
0 commit comments