Symptom
An agent served through AGUIAdapter runs without its system_prompt. A function decorated with @agent.system_prompt never runs. The report's print, ----LOADING PROMPT----, does not appear.
Evidence what you'll see
- The same agent follows the prompt when that text is passed as
instructionsinstead. - The report also names
VercelAIAdapterandto_webin the title as the same skip.
Why it happens
UI adapters pass the frontend's messages in as message_history, and system_prompt was added only when a run started without history.
Affected versions
AGUIAdapter, and the title also names the Vercel AI adapter and to_web. The linked issue does not name a Pydantic AI version, an operating system, or a Python version.
Fix steps
0 of 2 done
Your check marks stay in this browser only.
How to check it worked
- Send a message through
AGUIAdapterand confirm thesystem_promptfunction runs.
If it still fails
- Set
manage_system_promptto'client'only when the frontend is supposed to own the prompt. The linked issue does not describe a skippedsystem_promptonv1.86.0with the default.
Sources and credit
Summarized in our own words from these public reports. Credit goes to their authors.
Provided as is, without warranty. Try changes in a non-production environment and back up first. Security-related steps: verify against the official docs. Terms · Request removal or attribution change
Hit an error we don't cover? Submit it