# INVALID_PROMPT_INPUT
## The two classic causes
1. F-string braces. In an f-string, a literal `{` must be written `{{`, and a literal `{{` must be written `{{{{`. JSON examples inside prompts are the usual victim: every brace in the example JSON needs doubling.
2. MessagesPlaceholder. When using the shorthand tuple form, wrap the variable name in braces:
```python
["placeholder", "{messages}"]
```
and pass actual message arrays or message-like objects, not a single string.
## Fix
1. Read the template and list every `{variable}` it expects. Compare against the dict you pass to invoke. A missing or misspelled key is cause number one.
2. If the template contains literal braces (JSON, code samples), double them all and re-run.
3. Debug with real inputs: log the exact dict going into the template, or trace it in LangSmith and compare against the template's variables.
## Rule
When a prompt comes from the Prompt Hub, test it standalone with sample inputs before wiring it into the app. Hub prompts change, and the variable names are the contract.