Home/Help Center/AI debugger

Automation

Use the AI Debugger

Test a system prompt with the AI Context Debugger. Check it against the limit of the step or widget it is for, and see its token use and a live reply.

By Chirag Darji · Updated 7 Nov 2026 · 9 min read

On this page
  1. Before you start
  2. Steps
  3. What you will see
  4. Settings and options
  5. Troubleshooting
  6. Related reading
AI Context Debugger in VGraple CRM: paste a system prompt, ask a test question and run a context test against a connection

The AI Context Debugger, under Settings, lets you paste a system prompt and a test question, then shows whether the prompt fits the limit of the place it will run, how many tokens it costs, how much of the model's context window it uses, and what the model actually replies. It is a token and prompt-testing tool, not a live replay of a real customer conversation.

AI debugger: first 5 of 7 steps

  1. 1Open Settings, then Automation & AI, then
  2. 2Choose what you are testing for
  3. 3Paste your full system prompt
  4. 4Enter a test question
  5. 5Choose the AI connection to test with
The steps on this page, in order.

Before you start

  • The debugger is on Growth and above, and each question costs 10 AI credits. No key is needed: it tests with your workspace's default AI connection, which is VGraple AI unless you added your own key under Settings, then AI.
  • It does not automatically pull in your knowledge base content or a real conversation's history; you paste in exactly what you want tested, nothing more.
  • Use it before shipping a long or complex system prompt for an AI Agent step, an AI Reply step or the website chat widget, to catch a prompt that is over that place's limit or unexpectedly large before customers ever see it.
  • Only Owner and Admin roles typically reach Settings pages that touch AI configuration; if you cannot see the debugger, check your role's access.
  • The tool tests the prompt in isolation, on a single question with no conversation history behind it, so it will not reproduce every nuance of a multi-turn conversation exactly. Treat its numbers as a strong signal, not a guarantee of identical behavior in production.

Steps

  1. Open Settings, then Automation & AI, then AI Debugger. The page is titled AI Context Debugger. It shows a "No AI connection available" warning, with an Open AI settings button, if the workspace has no usable AI connection.

Chat widget setup in VGraple CRM: appearance, welcome message, position and AI settings

  1. Choose what you are testing for: AI Agent step, AI Reply step or Website chat widget. Each place keeps a different amount of the prompt, and the line under the buttons says how much.
  2. Paste your full system prompt into the System Prompt field. Under it, a counter shows the length against that place's limit (for example "1,240 of 8,000 characters") and turns red with the reason when the prompt is over it, next to a live estimated token count.
  3. Enter a test question, or use the default "Hello, what can you help me with?" if you just want a general check.
  4. Choose the AI connection to test with. Each usable connection is a button showing its name, provider and model: VGraple AI, plus any key of your own added under Settings, then AI.
  5. Click Run Context Test. The tool sends your prompt, the platform's business-scope rules and your question to the real provider and reports back actual, not estimated, token usage. For an AI Agent step over 8,000 characters it sends only the first 8,000, as the step would.
  6. Read the verdict banner and stats. The banner says whether the prompt fits the limit of the place you chose and how many characters were sent, then the stats report the percentage of the model's context window used, the exact prompt and completion token counts, and the model's actual reply text.

A real-estate agency that has been adding rules to its AI Reply node's system prompt for months, one edge case at a time, is a good example of when this tool earns its place: what started as 200 words describing the business can quietly grow into several thousand words of accumulated instructions. Pasting the current prompt into the debugger before adding one more rule shows whether it is still comfortably small, or whether it is time to trim before the next customer conversation pays for it in latency and cost.

What you will see

A short, focused prompt tested for the website chat widget returns a verdict like "Within the website chat widget limit: 1,200 of 3,000 characters. It fits well within this model's context window," with a low percentage bar. A Goal and persona that grew past 8,000 characters, tested for an AI Agent step, returns a red verdict saying the step reads only the first 8,000 characters and how many are ignored. An AI Reply prompt that fills most of the model's context window asks you to trim it. Either way, you get the model's actual reply to your test question underneath the stats, so you can judge the prompt's quality at the same time as its size.

The stats grid breaks the total down into four figures: the estimated system prompt tokens and question tokens (calculated before the API call, from a rough character count), and the actual prompt tokens and response tokens (reported back by the provider itself after the call completes). Comparing the estimated and actual prompt figures is a useful sanity check on its own, since a large gap between them usually means the character-based estimate undercounted something, most often a prompt with a lot of non-English text or unusual formatting.

Settings and options

Setting or fieldWhat it doesDefault
Testing forWhere the prompt will run: AI Agent step (reads the first 8,000 characters), AI Reply step (no character limit of its own) or Website chat widget (saves at most 3,000 characters)AI Agent step
System PromptThe full prompt text to test; shows its length against the chosen limit and a live estimated token count as you typeEmpty
Test QuestionThe question sent alongside the system prompt"Hello, what can you help me with?"
AI connection to test withWhich connection answers the test question; its model sets the context windowThe first connection in the list
Context used percentageActual prompt tokens divided by the selected model's context windowCalculated per test run
Verdict messageA plain-language read of whether the prompt fits the chosen limit, then whether it fits comfortably in the model's context window, is large, or should be trimmedCalculated per test run

Troubleshooting

SymptomLikely causeFix
No connection buttons appear and the page says "No AI connection available"The workspace has no usable AI connectionClick Open AI settings and add or repair a connection under Settings, then AI
Run Context Test is greyed out and the counter is redTesting for is set to Website chat widget and the prompt is over 3,000 characters, which the widget will not saveShorten the prompt, or move reference material into the widget's knowledge base
The verdict says the last characters are ignoredTesting for is set to AI Agent step and the Goal and persona is over 8,000 charactersShorten it, or move reference facts into the knowledge base; the flow builder shows the same counter under Goal and persona and warns when you save the flow
Run Context Test shows "Paste your system prompt first."No system prompt was entered, since a blank prompt has nothing to measurePaste your system prompt into the field before running the test
The debugger's reply does not match what a real flow's AI Reply node said for the same promptThe debugger does not include your knowledge base content or conversation history; a real flow turn includes retrieved chunks the debugger never seesPaste the retrieved knowledge base content into the System Prompt field alongside your instructions to approximate a real turn more closely
The page says AI is not availableThe workspace has no AI credits leftWait for the free credits to renew on the 1st, or buy a credit pack; see AI credits
The token count feels too high for a short-looking promptEstimated counts use a rough character-to-token ratio before the real test runs; the actual count reported after Run Context Test is provider-measured and more accurateTrust the post-run "actual" figures over the pre-run estimate shown while typing

If a bot's system prompt seems too large or is producing inconsistent answers, use this tool before assuming a deeper problem; if the bot is not answering at all, the cause is more likely one of the gates covered in AI on but not replying than a prompt-size issue.

Frequently asked questions

What exactly does the AI debugger test?
It takes a system prompt and a test question you paste in, sends both to a real AI provider, and reports back the actual token counts used, the model's context window size, and the resulting reply. It is a token-usage and context-fit test, not a replay of a real customer conversation.
Does the AI debugger show me the knowledge base chunks a real conversation retrieved?
No. The debugger tests only what you paste into it; it does not pull in your knowledge base sources or replay retrieved context from a real chat. To see what a real turn actually retrieved, you would need to reconstruct the system prompt and knowledge base content by hand and paste them in yourself.
Which AI providers can I test with?
Any AI connection your workspace can use. The debugger lists them as buttons under AI connection to test with: VGraple AI, plus any key of your own you added under Settings, then AI. A connection that is not usable is left off the list.
What plan does the AI debugger need?
The debugger is on Growth and above, and each debugger question costs 10 AI credits from the same balance that covers reply suggestions, conversation summaries, and the website widget's AI.
What does the "context used" percentage actually mean?
The percentage of the selected connection's model context window (shown under the bar as Context window) consumed by your system prompt plus the test question, calculated from the provider's own reported token usage, not an estimate.
How long can a system prompt be?
It depends on where it runs, which is why the debugger asks what you are testing for. An AI Agent step reads the first 8,000 characters of its Goal and persona and ignores the rest. The website chat widget (whose bot also answers Instagram and Messenger) saves at most 3,000 characters. An AI Reply step has no character limit of its own and sends the whole prompt on every reply, so there the only ceiling is the model's context window.
My prompt is over the limit. What does the debugger do?
For an AI Agent step, the counter under the prompt box turns red, and the test runs on the first 8,000 characters only, because that is what the step reads; the verdict names how many characters are ignored. For the website chat widget, Run Context Test stays off until the prompt is 3,000 characters or fewer, since the widget would not save it. Move long reference material, such as price lists and policies, into the knowledge base instead.
My system prompt is short but the debugger still warns about size. Why?
The verdict first checks the limit of the place you are testing for, then how much of the model's context window the test used. A prompt within the limit gets a plain fit message; past about 10,000 tokens or 60 percent of the window it says each reply costs more, and past 80 percent it asks you to trim.
Can I use this tool to test an AI Reply flow node's actual prompt?
Yes. Choose AI Reply step under Testing for, then copy the System Prompt from the node's settings and paste it in. The test sends your text and the platform's business-scope rules; the live step also adds its knowledge results and formatting rules, so a real reply uses more tokens than the test.

Run your WhatsApp on VGraple CRM

Free forever plan, official Meta WhatsApp Business API, set up in 15 minutes. No card needed.