Skip to main content
Pass a function to system_prompt that builds the prompt using your custom functions:
Your function is executed each time the agent runs, ensuring the system prompt always contains up-to-date information.

Key Features

  • Custom Functions: Define your own functions to fetch and format data
  • Automatic Execution: Your function is called each time the agent runs
  • Access Runtime Context: Use get_run_context() to access current execution data and user inputs
  • Full Control: Build the system prompt dynamically with any logic you need
  • Real-time Data: Perfect for integrating APIs, databases, or any dynamic data source