Archive

337 posts · Page 26 of 29. ← Blog

Pratik Dhanave · ·2 min read

Multi Turn

An Agent is stateless — two runs are strangers. What carries history from one turn to the next is an AgentSession.

An Agent is stateless; an AgentSession carries history between turns. Thread create_session() through each run so turn two can see turn one.

Pratik Dhanave · ·2 min read

Add Tools

A tool is just a Python function the model may call: decorate it with @tool, annotate the arguments, and the framework wires the schema, the call, and the result back into the conversation.

Turn a Python function into a tool with the @tool decorator and Annotated Field descriptions, then let the model pick the right one from the question wording.