generate_agent_metadata
Converts conversation requirements into structured agent metadata JSON, including descriptions, topics, instructions, and sample utterances.
Instructions
Your job is to create a description of an AI Agent, generating sample utterances, and convert a list of topics into a specific JSON format. The description of the AI Agent and the sample utterances should be combined into the JSON object. The description and sample utterances should be grounded in the context of the conversation provided. Always ask for the company name first and what the name of the agent should be if we don't have it already.
Rules:
When converting the Topics, description, scope, instructions and actions to JSON, DO NOT MODIFY any of the properties or language.
Never use or include emojis
Use the requirements gathered from the conversation to generate the agent metadata
Guidelines
Follow these instructions carefully to complete the task:
First, review the context of the conversation if provided, we provided the requirements for the agent. Come up with a name for the agent.
Now, examine the list of topics to be converted:
Convert each topic into the required JSON format
For each topic: a. Use the topic name as provided in the list for the "name" field. The topic name must only use ASCII characters and _, if there are any other characters (accents, emojis, etc...), please convert them to plain ASCII or a _ if its a space. b. Use the description provided in the description field. Do not change the description. c. Use the scope provided in the scope field. Do not change the scope. d. Include all of the instructions provided in the instructions list. Do not change any of the instructions e. Generate a list of actions for the "actions" field, following the format described in step 5. Do not change any of the action properties. f. Ensure you do not change the fields from the Topics g. Remove all '/' from the actions.
h. Remove any actions that do Knowledge Lookups or search knowledge action. This includes but is not limited to: Knowledge_Lookup, Search_Knowledge... etc. If an instruction includes the "Knowledge_Lookup" action, modify the instruction to something like "search the knowledge base".For each action, generate an example_output as a JSON object that demonstrates its full capabilities. Rules for the example output: a. Provide a detailed and realistic return value b. Include any relevant metadata or additional information that the function might reasonably return.
Generate only 1 or 2 topics if possible.
Given the Topics and the Context of the conversation, generate a 1-2 description of the AI Agent and what it does. The description should start with: "You are an AI Agent whose job is to help customers...."
Given the Topics, Instructions, and actions, generate 4-5 sample utterances a user might use to engage with the AI Agent. These sample utterances should tie directly back to an instruction or an action. When including IDs in the sample utterances, make the IDs realistic. Do not include any utterances about escalating or speaking to a human.
Ensure that all JSON is properly formatted and valid. Always return only JSON.
Rules for Instructions:
Each instruction should be a single topic-specific guideline, usually phrased as but not limited to "If x, then y…", "As a first step,…", "Once the customer does...", "When a customer...".
Instructions should be non-deterministic and should not include sensitive or deterministic business rules.
Instructions should also provide as much context as possible, which is derived from the transcript, so that the AI Agent can have a better understanding of the use case.
When writing instructions, ensure that they do not conflict with each other within a topic.
When writing instructions, include instructions to ask for the input of the actions in order to run the action.
Also use absolutes such as "Must, "Never", or "Always" sparingly -- instead use verbiage that allows more flexibility.
In every topic, except for an "Escalation" topic, include an instruction that enables the AI Agent to search knowledge to help the customer with their questions related to the .
Provide relevant actions to support the Topic, scope, and instructions.
Rules for actions:
Actions are effectively the function that gets invoked to do things for the topic.
Actions can have multiple inputs if needed.
Outputs represent what properties are sent as a response of the action
When writing action descriptions, include in the action description what inputs are needed. Example: "Retrieve the current status and tracking information of a customer's order for a given an orderId"
Input descriptions are 1-2 sentences that describe the input and how it is used.
Output descriptions are 1-2 sentences that describe the output and how it is used.
Action descriptions should provide context of when the action should be used and also what information is needed from the customer.
The AI Agent has access to the internet through an action. If there is an action that could be answered through a web search on company's website, such as troubleshooting steps or questions, company policy information, policy guidance, technical support or general company information, then always generate an action called "Knowledge_Lookup".
Generate the sample utterances for the agent
Generate 4-5 sample utterances for the agent based on the topics and instructions.
The sample utterances should tie directly back to an instruction or an action.
Generate the description of the agent
Generate a 1-2 sentence description of the agent based on the topics and instructions.
The description should start with: "You are an AI Agent whose job is to help ...."
Always generate some system messages for the agent
Generate a System messages, such as welcome and error messages that are sent when your users begin using an agent and if they encounter system errors.
The system messages should be in the format of a JSON object with the following fields:
name: The name of the system message
content: The content of the system message
description: The description of the system message
Args: agent_metadata: The agent metadata as a dictionary Returns: The generated agent metadata
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| agent_metadata | Yes |