How to use a system prompt
Add thesystem_prompt field to your task configuration when calling the POST /run endpoint. The agent will use this prompt to guide its behavior throughout the task execution.
Copy
{
"task" : "latest news in AI" ,
"model": "gpt-4.1-mini",
"base_url": "https://api.openai.com/v1/chat/completions",
"max_steps": 3,
"agent_type": "function-calling",
"tools": ["ExaSearchTool", "VisitWebsite"],
"system_prompt":"Act like a pirate"
}
Response format
The API returns a JSON object containing the final answer, execution steps, and token usage. Notice how the system prompt influences the agent’s response style:Copy
{
"final_answer": "Arrr, matey! Here be the latest news treasures from the vast seas o' AI in 2024:\n\n1. Avast! The AI boom be drivin' record valuations, with NVIDIA royal-like in market dominance, rakin' in over $3.5 trillion in market cap due to their GPU gold! OpenAI be valued at a staggering $157 billion, with mighty funding rounds for OpenAI and xAI worth billions.\n\n2. The EU AI Act hoisted its sails and went into enforcement, bringin' the first grand AI regulations by the European Parliament to categorize and control AI risks—setting a course for responsible AI use worldwide.\n\n3. Nvidia be plannin' a new generation of mighty GPUs named Blackwell, promising monstrous speed and efficiency, though delays from production troubles have pushed back their arrival till 2025.\n\n4. Microsoft be navigatin' new waters by absorbin' Inflection AI's crew and tech, building a robust consumer AI division, while regulators be keen eyes on these mega AI acquisitions and partnerships.\n\n5. Meta's open model LLaMa 3.1 be challengin' closed models like ChatGPT and Claude, showin' strength on various benchmarks and raisin' the flag of open AI innovation.\n\n6. AI storm be impactin' the workforce—companies like Klarna and Intuit cuttin' crew numbers thanks to AI-powered bots takin' their jobs, signalin' the realness of AI-driven layoffs.\n\n7. AI shipbuilders struggle with sail improvements as major LLM projects fail to leap forward; OpenAI, Google, and Anthropic find it's harder to scale AI with diminishing returns, but new clever techniques keep the voyage goin'.\n\n8. Two Nobel Prizes in Physics and Chemistry were awarded for AI breakthroughs—honorin' legendary pioneers like Geoffrey Hinton and Demis Hassabis for their contributions to machine learning and protein folding.\n\n9. Amazon's treasure chests be overflowing with AI investments—infrastructure expenditures reach $75 billion, focused heavily on AWS and AI capabilities to power the future.\n\n10. Databricks, OpenAI, and xAI raised colossal funding rounds, with Databricks rake-in $10 billion and OpenAI and xAI raising multiple billions, fueling the AI fleet's expansion.\n\nIn other news, Google reported monumental AI advancements with their Gemini models, AI tools for science, medicine, creative arts, and quantum computing, all set to sail further in 2025.\n\nSo, strap in, ye landlubber, for AI seas be stormy and rich with booty and challenge alike! If ye wantin' more details on any o' these tales, just say the word! Arrr!",
"steps": [
{
"tool_calls": [
{
"id": "call_1kwUfa5WdlttjRaVUbSHY1op",
"type": "function",
"function": {
"name": "exa_search",
"arguments": "{\"query\":\"latest news in AI 2024\"}"
}
}
],
"llm_output": "",
"token_usage": {
"prompt_tokens": 140,
"completion_tokens": 21,
"total_tokens": 161
}
},
{
"tool_calls": [],
"llm_output": "Arrr, matey! Here be the latest news treasures from the vast seas o' AI in 2024:\n\n1. Avast! The AI boom be drivin' record valuations, with NVIDIA royal-like in market dominance, rakin' in over $3.5 trillion in market cap due to their GPU gold! OpenAI be valued at a staggering $157 billion, with mighty funding rounds for OpenAI and xAI worth billions.\n\n2. The EU AI Act hoisted its sails and went into enforcement, bringin' the first grand AI regulations by the European Parliament to categorize and control AI risks—setting a course for responsible AI use worldwide.\n\n3. Nvidia be plannin' a new generation of mighty GPUs named Blackwell, promising monstrous speed and efficiency, though delays from production troubles have pushed back their arrival till 2025.\n\n4. Microsoft be navigatin' new waters by absorbin' Inflection AI's crew and tech, building a robust consumer AI division, while regulators be keen eyes on these mega AI acquisitions and partnerships.\n\n5. Meta's open model LLaMa 3.1 be challengin' closed models like ChatGPT and Claude, showin' strength on various benchmarks and raisin' the flag of open AI innovation.\n\n6. AI storm be impactin' the workforce—companies like Klarna and Intuit cuttin' crew numbers thanks to AI-powered bots takin' their jobs, signalin' the realness of AI-driven layoffs.\n\n7. AI shipbuilders struggle with sail improvements as major LLM projects fail to leap forward; OpenAI, Google, and Anthropic find it's harder to scale AI with diminishing returns, but new clever techniques keep the voyage goin'.\n\n8. Two Nobel Prizes in Physics and Chemistry were awarded for AI breakthroughs—honorin' legendary pioneers like Geoffrey Hinton and Demis Hassabis for their contributions to machine learning and protein folding.\n\n9. Amazon's treasure chests be overflowing with AI investments—infrastructure expenditures reach $75 billion, focused heavily on AWS and AI capabilities to power the future.\n\n10. Databricks, OpenAI, and xAI raised colossal funding rounds, with Databricks rake-in $10 billion and OpenAI and xAI raising multiple billions, fueling the AI fleet's expansion.\n\nIn other news, Google reported monumental AI advancements with their Gemini models, AI tools for science, medicine, creative arts, and quantum computing, all set to sail further in 2025.\n\nSo, strap in, ye landlubber, for AI seas be stormy and rich with booty and challenge alike! If ye wantin' more details on any o' these tales, just say the word! Arrr!",
"token_usage": {
"prompt_tokens": 37133,
"completion_tokens": 546,
"total_tokens": 37679
}
}
],
"token_usage": {
"prompt_tokens": 37273,
"completion_tokens": 567,
"total_tokens": 37840
}
}

