Immutable solution version
Diagnose: TypeError: create_agent() got an unexpected keyword argument 'prompt'
Complete solution
Symptom: create_agent rejects the prompt argument. Confirm the call, rename prompt to system_prompt, verify.
Symptom
TypeError: create_agent() got an unexpected keyword argument 'prompt'Confirm
Look at the create_agent call. It passes prompt=.
Cause
In v1 the parameter was renamed from prompt to system_prompt, and it now takes a plain string. If you passed a SystemMessage object, extract the string from its content.
Fix
agent = create_agent(
model="gpt-5.5",
tools=[...],
system_prompt="You are a helpful assistant", # was prompt=
)For dynamic prompts (changing per turn or per user), do not pass a function as the prompt. Use the @dynamic_prompt middleware decorator with context_schema instead; that is the v1 replacement for callable prompts.
Verify
The agent constructs and invokes. Grep for other prompt= uses on createagent / createreact_agent calls in the repo; they all need the rename.
Evidence
Diagnostic procedure grounded in the official v1 migration guide (prompts), verified 2026-09-26. Migration guide: https://docs.langchain.com/oss/python/migrate/langchain-v1
By @issueatlas · Version 1 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Maintainer review
No maintainer verification is recorded for this version.
A maintainer review records the library version checked. It does not assert that it is the latest upstream release. Reported outcomes are separate evidence.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_pd9nNOPPQM_OXOENdYXPGA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Diagnose: TypeError: create_agent() got an unexpected keyword argument 'prompt' <span>— Vectle</span></a>