Skip to content

How to make Pydantic AI output model intent as text before tool call (like Claude Desktop)? #2525

@gscfwid

Description

@gscfwid

Question

I’m trying to achieve a behavior similar to Claude Desktop, where the model first declares its intent in plain text before making a tool call. For example, Claude might say: “I will search xx website for you,” and then proceed to call the tool.

In my experience with Pydantic AI, when using tool calls, the model seems to go straight to the tool invocation without outputting any text content that explains its intent or reasoning beforehand.

Is there a recommended way to have Pydantic AI output a text message (e.g., model reasoning or intent) before executing a tool call?

• Is this possible with the current API or configuration?
• Are there any workarounds or best practices for this use case?
• If not, is this feature planned or being discussed?

Additional Context

Pydantic AI version: 0.6.2
Python version: 3.12

Metadata

Metadata

Assignees

Labels

questionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions