analysis plan not working
# support
k
i try but it not assisgning analysis plan to agent and when i call the agent it not providing analysis,please solve it ASAP and give me correct payload(that cover all atributes of analysis plan) and here is my call ID "03a84d4b-1fcc-422c-b955-0bc639b778ea" @User
v
@Kavish I'm here to help you with your issue. To ensure that the analysis plan is correctly assigned to the agent and that you receive the analysis you're looking for, we need to make sure that the payload for the analysis plan includes all the necessary attributes. Could you please provide me with the details of the analysis plan you are trying to assign? Once I have the details, I can assist you in creating the correct payload. If you have a specific structure or attributes in mind for the analysis plan, please share them with me so I can better assist you.
You can continue this conversation by mentioning me in the message.
c
What is not working?
k
like summry prompt,success evalution prompt is not assigning the agent while creating agent with create api
s
@Kavish your creating the analysis plan wrong way here are the logs and correct json schema for it.
logs
🔵 19:23:19:636 Couldn't Generate Summary. Error The API deployment for this resource does not exist. If you created the deployment within the last 5 minutes, please wait a moment and try again. 🟡 19:23:19:222 Couldn't Complete Anthropic Bedrock Request. Status: 400. Error: 400 Malformed input request: #: subject must not be valid against schema {"required":["messages"]}#/messages: expected minimum item count: 1, found: 0, please reformat your input and try again. 🟡 19:23:19:217 Couldn't Complete Anthropic Bedrock Request. Status: 400. Error: 400 Malformed input request: #: subject must not be valid against schema {"required":["messages"]}#/messages: expected minimum item count: 1, found: 0, please reformat your input and try again.
json_schema
Copy code
json
{
  "summaryPlan": {
    "enabled": true,
    "messages": [
      {
        "role": "system",
        "content": "You are an expert note-taker. Summarize this call in a few lines."
      },
      {
        "role": "user",
        "content": "Here is the transcript:\\n\\n{{transcript}}\\n\\n"
      }
    ],
    "timeoutSeconds": 60
  },
  "structuredDataPlan": {
    "enabled": true,
    "schema": {
      "type": "object",
      "title": "CallData",
      "description": "Extract important fields from the call transcript.",
      "properties": {
        "customerName": {
          "type": "string",
          "description": "Full name of the customer."
        },
        "orderNumber": {
          "type": "string",
          "description": "Order or ticket number referenced during the call."
        },
        "issueCategory": {
          "type": "string",
          "description": "High-level category describing the customer’s issue."
        }
      },
      "required": [
        "customerName",
        "issueCategory"
      ]
    },
    "messages": [
      {
        "role": "system",
        "content": "You are an expert data extractor. Only return valid JSON that follows this schema:\\n{{schema}}"
      },
      {
        "role": "user",
        "content": "Here is the transcript:\\n\\n{{transcript}}\\n\\n"
      }
    ],
    "timeoutSeconds": 60
  },
  "successEvaluationPlan": {
    "enabled": true,
    "rubric": "PassFail",
    "messages": [
      {
        "role": "system",
        "content": "You are an expert call evaluator. Return only whether the call was successful.\\nRubric:\\n{{rubric}}"
      },
      {
        "role": "user",
        "content": "Here is the transcript:\\n\\n{{transcript}}\\n\\n"
      },
      {
        "role": "user",
        "content": "Here was the system prompt:\\n\\n{{systemPrompt}}\\n\\n"
      }
    ],
    "timeoutSeconds": 60
  }
}
@Kavish checkout this document and let me know how it helps you https://vapi.notion.site/Analysis-Plan-170008c8393f80a6baafd4e736f12023?pvs=4
k
it still giving me below error @Shubham Bajaj
Copy code
{
  "message": [
    "property summaryPlan should not exist",
    "property structuredDataPlan should not exist",
    "property successEvaluationPlan should not exist"
  ],
  "error": "Bad Request",
  "statusCode": 400
}
https://cdn.discordapp.com/attachments/1324464343081025682/1324758590917185546/message.txt?ex=67795114&is=6777ff94&hm=908ca2bc90cfb32995c59d102813257b686e5bab2529e64581d33e0337ae9395&
s
It has to be inside property-named
analysisPlan
Copy code
curl -X POST https://api.vapi.ai/assistant \
     -H "Authorization: Bearer " \
     -H "Content-Type: application/json" \
     -d '{
  "analysisPlan": {
    "structuredDataPlan": {
      "messages": [],
      "enabled": true,
      "timeoutSeconds": 60,
      "schema": {}
    },
    "summaryPlan": {},
    "successEvaluationPlan": {}
  }
}'
k
s
@Kavish As mentioned earlier, the Dashboard UI has not been updated for the Analysis Plan yet, but I will let you know when it is updated.
3 Views