You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature Request]: A turn's prompt= should extend the agent's prompt, not silently replace it #3324
Is your feature request related to a problem? Please describe.
Agent._prepare_turn seeds the turn's prompt from the agent's system prompt and dynamic prompts only when the caller passes none (ag2/agent.py:1264: if not context.prompt: ...). A caller that passes prompt= to run() / ask() to add per-turn context therefore silently replaces everything the agent was built with — including the text plugins contribute, such as SkillPlugin's <available_skills> catalog — and dynamic prompts never run.
We hit this in ag2-assistant: the gateway passed per-turn guidance as prompt=, and for months no skill description reached the model; skills were only discovered when the user named them. The fix was to prepend agent.system_prompt by hand, which still skips dynamic prompts.
Describe the solution you'd like
A way to extend the agent's prompt per turn rather than replace it, e.g.:
run(..., extra_prompt=[...]) appended after the agent's system + dynamic prompts, or
prompt= semantics changed to extend by default, with an explicit replace_prompt=True for today's behaviour.
Either way dynamic prompts (and plugin prompts) should still run for a turn that adds its own text. At minimum, document the replacing behaviour on run() / ask().
Activity