Skip to main content

System prompt

The system prompt for agentic functions is defined in terms of templating variables, shown below.
System

User prompt

The user prompt for agentic functions is defined in terms of templating variables, shown below.
User

Templating variables

Initial context defining the agent’s role and the function being executed.Note:
  • function_name: The name of the agentic function.
  • function_description: The doc-string provided for the agentic function.
  • function_stub: Formatted stub of the agentic function.
  • function_arguments_stub: Formatted stub of the arguments of the agentic function.
  • has_arguments: True if the agentic function has arguments, False otherwise.
  • uses_tool_calls: True if the agent uses tool calls, False otherwise.
STARTER
Core constraints defining available resources, code execution rules, and output requirements.Note:
  • uses_tool_calls: True if the agent uses tool calls, False otherwise.
  • is_returning_text: True if the return type of the agentic function is str/string, False otherwise.
  • available_modules: A list of the names of all available modules in the REPL.
  • has_global_resources: True if resources provided via scope in the decorator, False otherwise.
  • global_resources_stub: Formatted stubs of all defined resources provided via scope in the decorator.
OBJECTIVES
Step-by-step process for analyzing inputs, executing code, and producing results.
WORKFLOW
Defines the two types of messages the agent receives during execution.
INTERACTIONS
Formatting rules for agent responses and code blocks.
OUTPUT
Key behavioral guidelines for handling tasks, return types, and error conditions.
NOTES
Formatted task description, expected return type, and additional tools.Note:
  • inputs_stub: Formatted stub of the arguments along with their values on calling the agentic function.
USER_PROMPT
Formatted expected return type for the agent’s task.
Formatted stubs for all defined resources available to the agent.