Skip to main content
context supplies data to a task. tools supplies Python functions the model can choose to call.
Tool signatures define input types, and docstrings describe their purpose. Tool code runs in your Python process with its permissions. Expose functions whose side effects you intend to allow.

Reuse tools on an agent

Tools belong to agents or tasks. Assigning thread.tools does not make a tool available.

Context is prompt data

Context keys are not interpolated into instructions. Use an f-string if you need to build instructions in Python. To share earlier messages, use a thread.