🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.
TypeScript analyticsautogenevaluationlangchainlarge-language-modelsllama-indexllmllm-evaluationllm-observabilityllmopsmonitoringobservabilityopen-sourceopenaiplaygroundprompt-engineeringprompt-managementself-hostedycombinator
test: extend normalized IO test suite with documented provider examples and enrichments from tests across code base (#17581)
marliessophiefd28f9d32290
diff --git a/packages/shared/scripts/seeder/utils/framework-traces/agno-2025-06-11.json b/packages/shared/scripts/seeder/utils/framework-traces/agno-2025-06-11.jsonindex 4dbbab1689..1ae5dfe75e 100644--- a/packages/shared/scripts/seeder/utils/framework-traces/agno-2025-06-11.json+++ b/packages/shared/scripts/seeder/utils/framework-traces/agno-2025-06-11.json@@ -40,55 +40,22 @@"message": "What is currently trending on Twitter?"},"session.id": "35cc6c90-b657-4819-b66c-c931c03ad569",- "agno{key_suffix}.tools": [- "duckduckgo_search",- "duckduckgo_news"- ],+ "agno{key_suffix}.tools": ["duckduckgo_search", "duckduckgo_news"],"output.value": {"content": "To find out what's currently trending on Twitter, you can visit the following resources:\n\n1. **[Twitter Explore](https://twitter.com/explore/tabs/trending/)**: Explore trending topics, hashtags, and conversations directly on Twitter.\n\n2. **[Trends24](https://trends24.in/united-states/)**: This site lists today's top X (Twitter) trends and hashtags in the United States, including topics like National Guard, Los Angeles, and more.\n\n3. **[Get Day Trends](https://getdaytrends.com/top/tweeted/day/)**: This platform analyzes Twitter data to provide insights on current trending topics and hashtags.\n\n4. **[91 Trends](https://91trends.com/twitter/united-states/)**: Get real-time updates on what's trending on Twitter in the United States.\n\n5. **[Global Twitter Trends](https://globaltwittertrends.com/united-states/)**: Check out what's trending specifically in the United States and view tweets based on those trends.\n\nFeel free to explore these links for the most up-to-date trending topics!","content_type": "str","event": "RunResponse","metrics": {- "input_tokens": [- 163,- 663- ],- "output_tokens": [- 20,- 225- ],- "total_tokens": [- 183,- 888- ],- "audio_tokens": [- 0,- 0- ],- "input_audio_tokens": [- 0,- 0- ],- "output_audio_tokens": [- 0,- 0- ],- "cached_tokens": [- 0,- 0- ],- "reasoning_tokens": [- 0,- 0- ],- "prompt_tokens": [- 163,- 663- ],- "completion_tokens": [- 20,- 225- ],+ "input_tokens": [163, 663],+ "output_tokens": [20, 225],+ "total_tokens": [183, 888],+ "audio_tokens": [0, 0],+ "input_audio_tokens": [0, 0],+ "output_audio_tokens": [0, 0],+ "cached_tokens": [0, 0],+ "reasoning_tokens": [0, 0],+ "prompt_tokens": [163, 663],+ "completion_tokens": [20, 225],"prompt_tokens_details": [{"audio_tokens": 0,@@ -113,10 +80,7 @@"rejected_prediction_tokens": 0}],- "time": [- 0.9596867079999356,- 4.799381209000785- ]+ "time": [0.9596867079999356, 4.799381209000785]},"model": "gpt-4o-mini","model_provider": "OpenAI",@@ -344,46 +308,16 @@"content_type": "str","event": "RunResponse","metrics": {- "input_tokens": [- 163,- 663- ],- "output_tokens": [- 20,- 225- ],- "total_tokens": [- 183,- 888- ],- "audio_tokens": [- 0,- 0- ],- "input_audio_tokens": [- 0,- 0- ],- "output_audio_tokens": [- 0,- 0- ],- "cached_tokens": [- 0,- 0- ],- "reasoning_tokens": [- 0,- 0- ],- "prompt_tokens": [- 163,- 663- ],- "completion_tokens": [- 20,- 225- ],+ "input_tokens": [163, 663],+ "output_tokens": [20, 225],+ "total_tokens": [183, 888],+ "audio_tokens": [0, 0],+ "input_audio_tokens": [0, 0],+ "output_audio_tokens": [0, 0],+ "cached_tokens": [0, 0],+ "reasoning_tokens": [0, 0],+ "prompt_tokens": [163, 663],+ "completion_tokens": [20, 225],"prompt_tokens_details": [{"audio_tokens": 0,@@ -408,10 +342,7 @@"rejected_prediction_tokens": 0}],- "time": [- 0.9596867079999356,- 4.799381209000785- ]+ "time": [0.9596867079999356, 4.799381209000785]},"model": "gpt-4o-mini","model_provider": "OpenAI",@@ -629,9 +560,7 @@"description": "(optional, default=5) The maximum number of results to return."}},- "required": [- "query"- ]+ "required": ["query"]},"requires_confirmation": false,"external_execution": false@@ -654,9 +583,7 @@"description": "(optional, default=5) The maximum number of results to return."}},- "required": [- "query"- ]+ "required": ["query"]},"requires_confirmation": false,"external_execution": false@@ -713,9 +640,7 @@"description": "(optional, default=5) The maximum number of results to return."}},- "required": [- "query"- ]+ "required": ["query"]},"requires_confirmation": false,"external_execution": false@@ -738,9 +663,7 @@"description": "(optional, default=5) The maximum number of results to return."}},- "required": [- "query"- ]+ "required": ["query"]},"requires_confirmation": false,"external_execution": false@@ -858,9 +781,7 @@"description": "(optional, default=5) The maximum number of results to return."}},- "required": [- "query"- ]+ "required": ["query"]},"requires_confirmation": false,"external_execution": false@@ -883,9 +804,7 @@"description": "(optional, default=5) The maximum number of results to return."}},- "required": [- "query"- ]+ "required": ["query"]},"requires_confirmation": false,"external_execution": false@@ -954,7 +873,7 @@"name": "langfuse-sdk","version": "3.0.1","attributes": {- "public_key": "pk-lf-5855d85e-3943-497e-bd10-f50ad414bcba"+ "public_key": "pk-lf-5855d85e-3943-497e-bd10-f50ad414bccc"}}},@@ -1140,7 +1059,7 @@"name": "langfuse-sdk","version": "3.0.1","attributes": {- "public_key": "pk-lf-5855d85e-3943-497e-bd10-f50ad414bcba"+ "public_key": "pk-lf-5855d85e-3943-497e-bd10-f50ad414bccc"}}},@@ -1225,9 +1144,7 @@"description": "(optional, default=5) The maximum number of results to return."}},- "required": [- "query"- ]+ "required": ["query"]},"requires_confirmation": false,"external_execution": false@@ -1250,9 +1167,7 @@"description": "(optional, default=5) The maximum number of results to return."}},- "required": [- "query"- ]+ "required": ["query"]},"requires_confirmation": false,"external_execution": false@@ -1281,9 +1196,7 @@"description": "(optional, default=5) The maximum number of results to return."}},- "required": [- "query"- ]+ "required": ["query"]},"requires_confirmation": false,"external_execution": false@@ -1306,9 +1219,7 @@"description": "(optional, default=5) The maximum number of results to return."}},- "required": [- "query"- ]+ "required": ["query"]},"requires_confirmation": false,"external_execution": false@@ -1435,9 +1346,7 @@"description": "(optional, default=5) The maximum number of results to return."}},- "required": [- "query"- ]+ "required": ["query"]},"requires_confirmation": false,"external_execution": false@@ -1460,9 +1369,7 @@"description": "(optional, default=5) The maximum number of results to return."}},- "required": [- "query"- ]+ "required": ["query"]},"requires_confirmation": false,"external_execution": false@@ -1522,4 +1429,4 @@}}]-}\ No newline at end of file+}diff --git a/packages/shared/scripts/seeder/utils/framework-traces/autogen-2025-06-06.json b/packages/shared/scripts/seeder/utils/framework-traces/autogen-2025-06-06.jsonindex 1d0bd6c76e..83d9bfaef5 100644--- a/packages/shared/scripts/seeder/utils/framework-traces/autogen-2025-06-06.json+++ b/packages/shared/scripts/seeder/utils/framework-traces/autogen-2025-06-06.json@@ -5,10 +5,7 @@"name": "autogen-chat-trace","timestamp": "2025-06-06T11:31:33.965Z","environment": "default",- "tags": [- "autogen",- "dev"- ],+ "tags": ["autogen", "dev"],"bookmarked": false,"release": null,"version": "1.0.0",@@ -17,7 +14,7 @@"public": true,"input": "\"Say 'Hello World!'\"","output": "\"Hello World!\"",- "metadata": "{\"email\":\"[email protected]\",\"resourceAttributes\":{\"telemetry.sdk.language\":\"python\",\"telemetry.sdk.name\":\"opentelemetry\",\"telemetry.sdk.version\":\"1.33.1\",\"service.name\":\"unknown_service\"},\"scope\":{\"name\":\"langfuse-sdk\",\"version\":\"3.0.0\",\"attributes\":{\"public_key\":\"pk-lf-5855d85e-3943-497e-bd10-f50ad414bcba\"}}}",+ "metadata": "{\"email\":\"[email protected]\",\"resourceAttributes\":{\"telemetry.sdk.language\":\"python\",\"telemetry.sdk.name\":\"opentelemetry\",\"telemetry.sdk.version\":\"1.33.1\",\"service.name\":\"unknown_service\"},\"scope\":{\"name\":\"langfuse-sdk\",\"version\":\"3.0.0\",\"attributes\":{\"public_key\":\"pk-lf-5855d85e-3943-497e-bd10-f50ad414bccc\"}}}","createdAt": "2025-06-06T11:31:35.000Z","updatedAt": "2025-06-06T11:31:35.337Z","scores": [],@@ -45,7 +42,7 @@"name": "langfuse-sdk","version": "3.0.0","attributes": {- "public_key": "pk-lf-5855d85e-3943-497e-bd10-f50ad414bcba"+ "public_key": "pk-lf-5855d85e-3943-497e-bd10-f50ad414bccc"}}},@@ -96,7 +93,7 @@"name": "langfuse-sdk","version": "3.0.0","attributes": {- "public_key": "pk-lf-5855d85e-3943-497e-bd10-f50ad414bcba"+ "public_key": "pk-lf-5855d85e-3943-497e-bd10-f50ad414bccc"}}},@@ -146,4 +143,4 @@"output": "Hello World!"}]-}\ No newline at end of file+}diff --git a/packages/shared/scripts/seeder/utils/framework-traces/llamaindex-2025-06-05.json b/packages/shared/scripts/seeder/utils/framework-traces/llamaindex-2025-06-05.jsonindex ea56649106..8c32db2f8d 100644--- a/packages/shared/scripts/seeder/utils/framework-traces/llamaindex-2025-06-05.json+++ b/packages/shared/scripts/seeder/utils/framework-traces/llamaindex-2025-06-05.json@@ -5,10 +5,7 @@"name": "llama-index-trace","timestamp": "2025-06-05T15:45:52.971Z","environment": "default",- "tags": [- "llama-index",- "rag"- ],+ "tags": ["llama-index", "rag"],"bookmarked": false,"release": null,"version": "1.0.0",@@ -17,7 +14,7 @@"public": true,"input": "\"What is Langfuse?\"","output": "\"Langfuse is a tool designed to help developers monitor and debug applications that utilize large language models (LLMs). It provides features for tracking and analyzing the performance of LLMs, enabling developers to gain insights into how these models are functioning within their applications. Langfuse can be particularly useful for identifying issues, optimizing performance, and ensuring that the integration of language models into applications is smooth and effective.\"",- "metadata": "{\"email\":\"[email protected]\",\"resourceAttributes\":{\"telemetry.sdk.language\":\"python\",\"telemetry.sdk.name\":\"opentelemetry\",\"telemetry.sdk.version\":\"1.33.1\",\"service.name\":\"unknown_service\"},\"scope\":{\"name\":\"langfuse-sdk\",\"version\":\"3.0.0\",\"attributes\":{\"public_key\":\"pk-lf-5855d85e-3943-497e-bd10-f50ad414bcba\"}}}",+ "metadata": "{\"email\":\"[email protected]\",\"resourceAttributes\":{\"telemetry.sdk.language\":\"python\",\"telemetry.sdk.name\":\"opentelemetry\",\"telemetry.sdk.version\":\"1.33.1\",\"service.name\":\"unknown_service\"},\"scope\":{\"name\":\"langfuse-sdk\",\"version\":\"3.0.0\",\"attributes\":{\"public_key\":\"pk-lf-5855d85e-3943-497e-bd10-f50ad414bccc\"}}}","createdAt": "2025-06-05T15:45:56.000Z","updatedAt": "2025-06-05T15:45:56.029Z","scores": [],@@ -45,7 +42,7 @@"name": "langfuse-sdk","version": "3.0.0","attributes": {- "public_key": "pk-lf-5855d85e-3943-497e-bd10-f50ad414bcba"+ "public_key": "pk-lf-5855d85e-3943-497e-bd10-f50ad414bccc"}}},@@ -99,14 +96,10 @@"llm.provider": "openai","llm.system": "openai","input.value": {- "args": [- "What is Langfuse?"- ]+ "args": ["What is Langfuse?"]},"input.mime_type": "application/json",- "llm.prompts": [- "What is Langfuse?"- ],+ "llm.prompts": ["What is Langfuse?"],"output.value": "Langfuse is a tool designed to help developers monitor and debug applications that utilize large language models (LLMs). It provides features for tracking and analyzing the performance of LLMs, enabling developers to gain insights into how these models are functioning within their applications. Langfuse can be particularly useful for identifying issues, optimizing performance, and ensuring that the integration of language models into applications is smooth and effective.","llm.token_count.prompt": "13","llm.token_count.prompt_details.cache_read": "0",@@ -172,11 +165,9 @@"outputUsage": 81,"totalUsage": 94,"input": {- "args": [- "What is Langfuse?"- ]+ "args": ["What is Langfuse?"]},"output": "Langfuse is a tool designed to help developers monitor and debug applications that utilize large language models (LLMs). It provides features for tracking and analyzing the performance of LLMs, enabling developers to gain insights into how these models are functioning within their applications. Langfuse can be particularly useful for identifying issues, optimizing performance, and ensuring that the integration of language models into applications is smooth and effective."}]-}\ No newline at end of file+}diff --git a/packages/shared/src/utils/normalized-io/README.md b/packages/shared/src/utils/normalized-io/README.mdindex 736b370336..542310f166 100644--- a/packages/shared/src/utils/normalized-io/README.md+++ b/packages/shared/src/utils/normalized-io/README.md@@ -10,6 +10,10 @@ rendering) derive their shapes from that representation.Please only use the normalized parser behind feature flags at this time.It has not been sufficiently validated against production data yet.+- **Real-trace fixtures:** Provider fixture files embed structurally preserved observation+ input, output, and metadata from captured traces, with source filenames and+ observation IDs. Anonymized text is marked in fixture comments. Some traces have been taken from existing test suites; coverage is representative, not exhaustive.+A telemetry JSON blob can contain the same conversation under keys such as`messages`, `choices`, or `contents`. The parser handles input and outputseparately and does three things:diff --git a/packages/shared/src/utils/normalized-io/conventions/providers/agno/agno.test.ts b/packages/shared/src/utils/normalized-io/conventions/providers/agno/agno.test.tsindex d3a2cad795..42e250df3d 100644--- a/packages/shared/src/utils/normalized-io/conventions/providers/agno/agno.test.ts+++ b/packages/shared/src/utils/normalized-io/conventions/providers/agno/agno.test.ts@@ -1,13 +1,16 @@import { describe, expect, it } from "vitest";import { normalizeSpanIO } from "../../../parser";-import { agnoPythonReprFixture } from "./fixtures";+import { agnoPythonReprFixture, capturedTraceFixtures } from "./fixtures";describe("Agno normalized I/O", () => {- it.each([agnoPythonReprFixture])("$name", ({ spanIO, expected }) => {- expect(normalizeSpanIO(spanIO)).toEqual({- ...expected,- span: spanIO,- });- });+ it.each([...capturedTraceFixtures, agnoPythonReprFixture])(+ "$name",+ ({ spanIO, expected }) => {+ expect(normalizeSpanIO(spanIO)).toEqual({+ ...expected,+ span: spanIO,+ });+ },+ );});diff --git a/packages/shared/src/utils/normalized-io/conventions/providers/agno/fixtures.ts b/packages/shared/src/utils/normalized-io/conventions/providers/agno/fixtures.tsindex 754205b77f..fa7977574e 100644--- a/packages/shared/src/utils/normalized-io/conventions/providers/agno/fixtures.ts+++ b/packages/shared/src/utils/normalized-io/conventions/providers/agno/fixtures.ts@@ -19,3 +19,113 @@ export const agnoPythonReprFixture = {toolDefinitions: [],},} satisfies NormalizedIOFixture;++// Verbatim stored observation IO from ChatML integration-example exports.+export const capturedTraceFixtures: NormalizedIOFixture[] = [+ // Source: worker/src/__tests__/chatml/framework-traces/agno-2025-06-11.trace.json; observation ca136de468e156c9+ {+ name: "verbatim agno-2025-06-11.trace.json / ca136de468e156c9",+ spanIO: {+ input:+ '{"messages": ["role=\'system\' content=\'<additional_information>\\\\n- Use markdown to format your answers.\\\\n</additional_information>\' name=None tool_call_id=None tool_calls=None audio=None images=None videos=None files=None audio_output=None image_output=None thinking=None redacted_thinking=None provider_data=None citations=None reasoning_content=None tool_name=None tool_args=None tool_call_error=None stop_after_tool_call=False add_to_agent_memory=True from_history=False metrics=MessageMetrics(input_tokens=0, output_tokens=0, total_tokens=0, audio_tokens=0, input_audio_tokens=0, output_audio_tokens=0, cached_tokens=0, reasoning_tokens=0, prompt_tokens=0, completion_tokens=0, prompt_tokens_details=None, completion_tokens_details=None, additional_metrics=None, time=None, time_to_first_token=None, timer=None) references=None created_at=1749650492", "role=\'user\' content=\'What is currently trending on Twitter?\' name=None tool_call_id=None tool_calls=None audio=None images=None videos=None files=None audio_output=None image_output=None thinking=None redacted_thinking=None provider_data=None citations=None reasoning_content=None tool_name=None tool_args=None tool_call_error=None stop_after_tool_call=False add_to_agent_memory=True from_history=False metrics=MessageMetrics(input_tokens=0, output_tokens=0, total_tokens=0, audio_tokens=0, input_audio_tokens=0, output_audio_tokens=0, cached_tokens=0, reasoning_tokens=0, prompt_tokens=0, completion_tokens=0, prompt_tokens_details=None, completion_tokens_details=None, additional_metrics=None, time=None, time_to_first_token=None, timer=None) references=None created_at=1749650492"], "tools": [{"type": "function", "function": {"name": "duckduckgo_search", "description": "Use this function to search DuckDuckGo for a query.", "parameters": {"type": "object", "properties": {"query": {"type": "string", "description": "(str) The query to search for."}, "max_results": {"type": "number", "description": "(optional, default=5) The maximum number of results to return."}}, "required": ["query"]}, "requires_confirmation": false, "external_execution": false}}, {"type": "function", "function": {"name": "duckduckgo_news", "description": "Use this function to get the latest news from DuckDuckGo.", "parameters": {"type": "object", "properties": {"query": {"type": "string", "description": "(str) The query to search for."}, "max_results": {"type": "number", "description": "(optional, default=5) The maximum number of results to return."}}, "required": ["query"]}, "requires_confirmation": false, "external_execution": false}}]}',+ output:+ '{"id":"chatcmpl-BhGJAW79iSsHO7ES5wgoTga4hQFyn","choices":[{"finish_reason":"tool_calls","index":0,"logprobs":null,"message":{"content":null,"refusal":null,"role":"assistant","annotations":[],"audio":null,"function_call":null,"tool_calls":[{"id":"call_VybxG748CQId8Xxo6wb2pWy1","function":{"arguments":"{\\"query\\":\\"currently trending on Twitter\\"}","name":"duckduckgo_search"},"type":"function"}]}}],"created":1749650492,"model":"gpt-4o-mini-2024-07-18","object":"chat.completion","service_tier":"default","system_fingerprint":"fp_34a54ae93c","usage":{"completion_tokens":20,"prompt_tokens":163,"total_tokens":183,"completion_tokens_details":{"accepted_prediction_tokens":0,"audio_tokens":0,"reasoning_tokens":0,"rejected_prediction_tokens":0},"prompt_tokens_details":{"audio_tokens":0,"cached_tokens":0}}}',+ metadata:+ '{"attributes":{"input.mime_type":"application/json","input.value":"{\\"messages\\": [\\"role=\'system\' content=\'<additional_information>\\\\\\\\n- Use markdown to format your answers.\\\\\\\\n</additional_information>\' name=None tool_call_id=None tool_calls=None audio=None images=None videos=None files=None audio_output=None image_output=None thinking=None redacted_thinking=None provider_data=None citations=None reasoning_content=None tool_name=None tool_args=None tool_call_error=None stop_after_tool_call=False add_to_agent_memory=True from_history=False metrics=MessageMetrics(input_tokens=0, output_tokens=0, total_tokens=0, audio_tokens=0, input_audio_tokens=0, output_audio_tokens=0, cached_tokens=0, reasoning_tokens=0, prompt_tokens=0, completion_tokens=0, prompt_tokens_details=None, completion_tokens_details=None, additional_metrics=None, time=None, time_to_first_token=None, timer=None) references=None created_at=1749650492\\", \\"role=\'user\' content=\'What is currently trending on Twitter?\' name=None tool_call_id=None tool_calls=None audio=None images=None videos=None files=None audio_output=None image_output=None thinking=None redacted_thinking=None provider_data=None citations=None reasoning_content=None tool_name=None tool_args=None tool_call_error=None stop_after_tool_call=False add_to_agent_memory=True from_history=False metrics=MessageMetrics(input_tokens=0, output_tokens=0, total_tokens=0, audio_tokens=0, input_audio_tokens=0, output_audio_tokens=0, cached_tokens=0, reasoning_tokens=0, prompt_tokens=0, completion_tokens=0, prompt_tokens_details=None, completion_tokens_details=None, additional_metrics=None, time=None, time_to_first_token=None, timer=None) references=None created_at=1749650492\\"], \\"tools\\": [{\\"type\\": \\"function\\", \\"function\\": {\\"name\\": \\"duckduckgo_search\\", \\"description\\": \\"Use this function to search DuckDuckGo for a query.\\", \\"parameters\\": {\\"type\\": \\"object\\", \\"properties\\": {\\"query\\": {\\"type\\": \\"string\\", \\"description\\": \\"(str) The query to search for.\\"}, \\"max_results\\": {\\"type\\": \\"number\\", \\"description\\": \\"(optional, default=5) The maximum number of results to return.\\"}}, \\"required\\": [\\"query\\"]}, \\"requires_confirmation\\": false, \\"external_execution\\": false}}, {\\"type\\": \\"function\\", \\"function\\": {\\"name\\": \\"duckduckgo_news\\", \\"description\\": \\"Use this function to get the latest news from DuckDuckGo.\\", \\"parameters\\": {\\"type\\": \\"object\\", \\"properties\\": {\\"query\\": {\\"type\\": \\"string\\", \\"description\\": \\"(str) The query to search for.\\"}, \\"max_results\\": {\\"type\\": \\"number\\", \\"description\\": \\"(optional, default=5) The maximum number of results to return.\\"}}, \\"required\\": [\\"query\\"]}, \\"requires_confirmation\\": false, \\"external_execution\\": false}}]}","llm.input_messages.0.message.role":"system","llm.input_messages.0.message.content":"<additional_information>\\n- Use markdown to format your answers.\\n</additional_information>","llm.input_messages.1.message.role":"user","llm.input_messages.1.message.content":"What is currently trending on Twitter?","llm.tools.0.tool.json_schema":"{\\"type\\": \\"function\\", \\"function\\": {\\"name\\": \\"duckduckgo_search\\", \\"description\\": \\"Use this function to search DuckDuckGo for a query.\\", \\"parameters\\": {\\"type\\": \\"object\\", \\"properties\\": {\\"query\\": {\\"type\\": \\"string\\", \\"description\\": \\"(str) The query to search for.\\"}, \\"max_results\\": {\\"type\\": \\"number\\", \\"description\\": \\"(optional, default=5) The maximum number of results to return.\\"}}, \\"required\\": [\\"query\\"]}, \\"requires_confirmation\\": false, \\"external_execution\\": false}}","llm.tools.1.tool.json_schema":"{\\"type\\": \\"function\\", \\"function\\": {\\"name\\": \\"duckduckgo_news\\", \\"description\\": \\"Use this function to get the latest news from DuckDuckGo.\\", \\"parameters\\": {\\"type\\": \\"object\\", \\"properties\\": {\\"query\\": {\\"type\\": \\"string\\", \\"description\\": \\"(str) The query to search for.\\"}, \\"max_results\\": {\\"type\\": \\"number\\", \\"description\\": \\"(optional, default=5) The maximum number of results to return.\\"}}, \\"required\\": [\\"query\\"]}, \\"requires_confirmation\\": false, \\"external_execution\\": false}}","llm.model_name":"gpt-4o-mini","llm.provider":"OpenAI","output.mime_type":"application/json","output.value":"{\\"id\\":\\"chatcmpl-BhGJAW79iSsHO7ES5wgoTga4hQFyn\\",\\"choices\\":[{\\"finish_reason\\":\\"tool_calls\\",\\"index\\":0,\\"logprobs\\":null,\\"message\\":{\\"content\\":null,\\"refusal\\":null,\\"role\\":\\"assistant\\",\\"annotations\\":[],\\"audio\\":null,\\"function_call\\":null,\\"tool_calls\\":[{\\"id\\":\\"call_VybxG748CQId8Xxo6wb2pWy1\\",\\"function\\":{\\"arguments\\":\\"{\\\\\\"query\\\\\\":\\\\\\"currently trending on Twitter\\\\\\"}\\",\\"name\\":\\"duckduckgo_search\\"},\\"type\\":\\"function\\"}]}}],\\"created\\":1749650492,\\"model\\":\\"gpt-4o-mini-2024-07-18\\",\\"object\\":\\"chat.completion\\",\\"service_tier\\":\\"default\\",\\"system_fingerprint\\":\\"fp_34a54ae93c\\",\\"usage\\":{\\"completion_tokens\\":20,\\"prompt_tokens\\":163,\\"total_tokens\\":183,\\"completion_tokens_details\\":{\\"accepted_prediction_tokens\\":0,\\"audio_tokens\\":0,\\"reasoning_tokens\\":0,\\"rejected_prediction_tokens\\":0},\\"prompt_tokens_details\\":{\\"audio_tokens\\":0,\\"cached_tokens\\":0}}}","openinference.span.kind":"LLM"},"resourceAttributes":{"telemetry.sdk.language":"python","telemetry.sdk.name":"opentelemetry","telemetry.sdk.version":"1.33.1","service.name":"unknown_service"},"scope":{"name":"openinference.instrumentation.agno","version":"0.1.4","attributes":{}}}',+ },+ expected: {+ messages: [+ {+ role: "system",+ parts: [+ {+ type: "text",+ text: "<additional_information>\n- Use markdown to format your answers.\n</additional_information>",+ },+ ],+ source: "input",+ },+ {+ role: "user",+ parts: [+ {+ type: "text",+ text: "What is currently trending on Twitter?",+ },+ ],+ source: "input",+ },+ {+ role: "assistant",+ parts: [+ {+ type: "tool-call",+ toolCallId: "call_VybxG748CQId8Xxo6wb2pWy1",+ toolName: "duckduckgo_search",+ input: {+ query: "currently trending on Twitter",+ },+ toolType: "function",+ },+ ],+ source: "output",+ finishReason: {+ type: "tool-calls",+ raw: "tool_calls",+ },+ },+ ],+ toolDefinitions: [+ {+ name: "duckduckgo_search",+ description: "Use this function to search DuckDuckGo for a query.",+ inputSchema: {+ type: "object",+ properties: {+ query: {+ type: "string",+ description: "(str) The query to search for.",+ },+ max_results: {+ type: "number",+ description:+ "(optional, default=5) The maximum number of results to return.",+ },+ },+ required: ["query"],+ },+ type: "function",+ providerMetadata: {+ requires_confirmation: false,+ external_execution: false,+ },+ },+ {+ name: "duckduckgo_news",+ description:+ "Use this function to get the latest news from DuckDuckGo.",+ inputSchema: {+ type: "object",+ properties: {+ query: {+ type: "string",+ description: "(str) The query to search for.",+ },+ max_results: {+ type: "number",+ description:+ "(optional, default=5) The maximum number of results to return.",+ },+ },+ required: ["query"],+ },+ type: "function",+ providerMetadata: {+ requires_confirmation: false,+ external_execution: false,+ },+ },+ ],+ },+ },+];diff --git a/packages/shared/src/utils/normalized-io/conventions/providers/ai-sdk/ai-sdk.test.ts b/packages/shared/src/utils/normalized-io/conventions/providers/ai-sdk/ai-sdk.test.tsindex 89f92d4ef7..598c78c7de 100644--- a/packages/shared/src/utils/normalized-io/conventions/providers/ai-sdk/ai-sdk.test.ts+++ b/packages/shared/src/utils/normalized-io/conventions/providers/ai-sdk/ai-sdk.test.ts@@ -2,12 +2,16 @@ import { describe, expect, it } from "vitest";import { normalizeSpanIO } from "../../../parser";import {+ capturedTraceFixtures,+ documentedPromptFixtures,vercelAiSdkMixedToolMessagesFixture,vercelAiSdkOutputToolCallFixture,} from "./fixtures";describe("AI SDK normalized I/O", () => {it.each([+ ...capturedTraceFixtures,+ ...documentedPromptFixtures,vercelAiSdkMixedToolMessagesFixture,vercelAiSdkOutputToolCallFixture,])("$name", ({ spanIO, expected }) => {diff --git a/packages/shared/src/utils/normalized-io/conventions/providers/ai-sdk/fixtures.ts b/packages/shared/src/utils/normalized-io/conventions/providers/ai-sdk/fixtures.tsindex 69961482e8..89b8038b5e 100644--- a/packages/shared/src/utils/normalized-io/conventions/providers/ai-sdk/fixtures.ts+++ b/packages/shared/src/utils/normalized-io/conventions/providers/ai-sdk/fixtures.ts@@ -2,6 +2,56 @@ import type { SpanIO, ToolDefinition } from "../../../types";import type { NormalizedIOFixture } from "../fixture-types";+// Docs-derived requests, not captured traces:+// https://ai-sdk.dev/docs/reference/ai-sdk-core/generate-text+export const documentedPromptFixtures: NormalizedIOFixture[] = [+ { name: "string prompt", input: { prompt: "Weather in San Francisco?" } },+ {+ name: "system and prompt",+ input: { system: "Answer briefly.", prompt: "Weather in San Francisco?" },+ },+ {+ name: "message prompt",+ input: { prompt: [{ role: "user", content: "Weather in San Francisco?" }] },+ },+ {+ name: "messages",+ input: {+ messages: [{ role: "user", content: "Weather in San Francisco?" }],+ },+ },+].flatMap(({ name, input }) =>+ [false, true].map(+ (serialized): NormalizedIOFixture => ({+ name: `documented AI SDK ${name}${serialized ? " (JSON)" : ""}`,+ spanIO: {+ input: serialized ? JSON.stringify(input) : input,+ output: undefined,+ metadata: undefined,+ },+ expected: {+ messages: [+ ...(input.system+ ? [+ {+ source: "input" as const,+ role: "system" as const,+ parts: [{ type: "text" as const, text: input.system }],+ },+ ]+ : []),+ {+ source: "input",+ role: "user",+ parts: [{ type: "text", text: "Weather in San Francisco?" }],+ },+ ],+ toolDefinitions: [],+ },+ }),+ ),+);+const inputToolCallId = "call_5iGKBMczvh1pevPChrZNGSFB";const outputToolCallId = "toolu_01XXtujJ3DBaYEZGzn96xpGt";@@ -560,3 +610,49 @@ export const vercelAiSdkOutputToolCallFixture = {],},} satisfies NormalizedIOFixture;++// Verbatim stored observation IO from ChatML integration-example exports.+export const capturedTraceFixtures: NormalizedIOFixture[] = [+ // Source: worker/src/__tests__/chatml/framework-traces/vercel-aisdk-2025-11-17.trace.json; observation 1dc6768109615657+ // Host and user identifiers in metadata resourceAttributes replaced with+ // placeholders; input and output are unmodified.+ {+ name: "verbatim vercel-aisdk-2025-11-17.trace.json / 1dc6768109615657",+ spanIO: {+ input: '{"prompt":"What is the weather like today in San Francisco?"}',+ output:+ '[{"toolCallId":"call_DgKARp7a7IhJPDczfifMp6Ra","toolName":"getWeather","input":"{\\"location\\":\\"San Francisco\\"}"}]',+ metadata:+ '{"attributes":{"operation.name":"ai.generateText","ai.operationId":"ai.generateText","ai.model.provider":"openai.responses","ai.model.id":"gpt-5","ai.settings.maxRetries":"2","ai.request.headers.user-agent":"ai/5.0.76","ai.response.finishReason":"tool-calls","ai.response.providerMetadata":"{\\"openai\\":{\\"responseId\\":\\"resp_097184780dc1e1bc00691b3756e6848195a954cd789a29c378\\",\\"serviceTier\\":\\"default\\"}}","ai.usage.promptTokens":"62","ai.usage.completionTokens":"85"},"resourceAttributes":{"host.name":"dev-machine.local","host.arch":"arm64","host.id":"00000000-0000-0000-0000-000000000000","process.pid":22217,"process.executable.name":"deno","process.executable.path":"/opt/homebrew/bin/deno","process.command_args":["/opt/homebrew/bin/deno","/Users/dev/Documents/GitHub/langfuse-docs/cookbook/$deno$jupyter.mts"],"process.runtime.version":"20.11.1","process.runtime.name":"nodejs","process.runtime.description":"Node.js","process.command":"/Users/dev/Documents/GitHub/langfuse-docs/cookbook/$deno$jupyter.mts","process.owner":"dev","service.name":"unknown_service:/opt/homebrew/bin/deno","telemetry.sdk.language":"nodejs","telemetry.sdk.name":"opentelemetry","telemetry.sdk.version":"2.1.0"},"scope":{"name":"ai","attributes":{}}}',+ },+ expected: {+ messages: [+ {+ role: "user",+ parts: [+ {+ type: "text",+ text: "What is the weather like today in San Francisco?",+ },+ ],+ source: "input",+ },+ {+ role: "assistant",+ parts: [+ {+ type: "tool-call",+ toolCallId: "call_DgKARp7a7IhJPDczfifMp6Ra",+ toolName: "getWeather",+ input: {+ location: "San Francisco",+ },+ },+ ],+ source: "output",+ },+ ],+ toolDefinitions: [],+ },+ },+];diff --git a/packages/shared/src/utils/normalized-io/conventions/providers/ai-sdk/index.ts b/packages/shared/src/utils/normalized-io/conventions/providers/ai-sdk/index.tsindex 642b9d168d..c7b4782b70 100644--- a/packages/shared/src/utils/normalized-io/conventions/providers/ai-sdk/index.ts+++ b/packages/shared/src/utils/normalized-io/conventions/providers/ai-sdk/index.ts@@ -19,6 +19,7 @@ import {import type { FilePart, FinishReason } from "../../../types";import type {IOConvention,+ MessageSource,PartHandler,ToolDefinitionCarrier,ToolDefinitionSource,@@ -194,6 +195,21 @@ function aiSdkToolDefinitionSources(export const aiSdkProvider = {name: "ai-sdk",+ claimMessages: (root, kind): MessageSource[] => {+ if (kind !== "input" || root.messages !== undefined) return [];+ if (typeof root.prompt === "string") {+ return [{ kind: "single", value: root.prompt, fallbackRole: "user" }];+ }+ if (+ Array.isArray(root.prompt) &&+ root.prompt.every(+ (message) => typeof asRecord(message)?.role === "string",+ )+ ) {+ return [{ kind: "sequence", values: root.prompt, fallbackRole: "user" }];+ }+ return [];+ },finishReasonTypeByRaw: AI_SDK_FINISH_REASON_TYPE_BY_RAW,// AI SDK / MCP tool declarations: { name?, description, inputSchema }.tryNormalizeToolDefinition: (value: Record<string, unknown>) => {diff --git a/packages/shared/src/utils/normalized-io/conventions/providers/anthropic/anthropic.test.ts b/packages/shared/src/utils/normalized-io/conventions/providers/anthropic/anthropic.test.tsindex c6c677a71f..4dcc8a469c 100644--- a/packages/shared/src/utils/normalized-io/conventions/providers/anthropic/anthropic.test.ts+++ b/packages/shared/src/utils/normalized-io/conventions/providers/anthropic/anthropic.test.ts@@ -4,10 +4,14 @@ import { normalizeSpanIO } from "../../../parser";import {anthropicMessagesRawServerToolsAndMediaFixture,anthropicMessagesRichContentFixture,+ capturedTraceFixtures,+ documentedToolResultFixtures,} from "./fixtures";describe("Anthropic normalized I/O", () => {it.each([+ ...capturedTraceFixtures,+ ...documentedToolResultFixtures,anthropicMessagesRawServerToolsAndMediaFixture,anthropicMessagesRichContentFixture,])("$name", ({ spanIO, expected }) => {diff --git a/packages/shared/src/utils/normalized-io/conventions/providers/anthropic/fixtures.ts b/packages/shared/src/utils/normalized-io/conventions/providers/anthropic/fixtures.tsindex 992a6a340f..79cb549935 100644--- a/packages/shared/src/utils/normalized-io/conventions/providers/anthropic/fixtures.ts+++ b/packages/shared/src/utils/normalized-io/conventions/providers/anthropic/fixtures.ts@@ -1,4 +1,99 @@import type { NormalizedIOFixture } from "../fixture-types";+import { toJsonValue } from "../../../core/utils/json";++// Docs-derived tool-result variants; the image data is a sample placeholder.+// https://platform.claude.com/docs/en/agents-and-tools/tool-use/handle-tool-calls+export const documentedToolResultFixtures: NormalizedIOFixture[] = [+ { label: "empty", content: undefined },+ {+ label: "text and image",+ content: [+ { type: "text", text: "15 degrees" },+ {+ type: "image",+ source: { type: "base64", media_type: "image/jpeg", data: "aGVsbG8=" },+ },+ ],+ },+ {+ label: "text and document",+ content: [+ { type: "text", text: "The weather is" },+ {+ type: "document",+ source: { type: "text", media_type: "text/plain", data: "15 degrees" },+ },+ ],+ },+].map(+ ({ label, content }): NormalizedIOFixture => ({+ name: `Anthropic ${label} tool result with string system instruction`,+ spanIO: {+ input: {+ system: "Be concise.",+ messages: [+ {+ role: "assistant",+ content: [+ {+ type: "tool_use",+ id: "call_weather",+ name: "get_weather",+ input: { city: "Paris" },+ },+ ],+ },+ {+ role: "user",+ content: [+ {+ type: "tool_result",+ tool_use_id: "call_weather",+ ...(content === undefined ? {} : { content }),+ },+ ],+ },+ ],+ },+ output: undefined,+ metadata: undefined,+ },+ expected: {+ messages: [+ {+ source: "input",+ role: "system",+ parts: [{ type: "text", text: "Be concise." }],+ },+ {+ source: "input",+ role: "assistant",+ parts: [+ {+ type: "tool-call",+ toolCallId: "call_weather",+ toolName: "get_weather",+ input: { city: "Paris" },+ toolType: "tool_use",+ },+ ],+ },+ {+ source: "input",+ role: "tool",+ parts: [+ {+ type: "tool-result",+ toolCallId: "call_weather",+ output: toJsonValue(content ?? null),+ },+ ],+ },+ ],+ toolDefinitions: [],+ },+ }),+);const searchSchema = {type: "object",@@ -587,3 +682,48 @@ export const anthropicMessagesRichContentFixture = {],},} satisfies NormalizedIOFixture;++// Verbatim stored observation IO from ChatML integration-example exports.+export const capturedTraceFixtures: NormalizedIOFixture[] = [+ // Source: worker/src/__tests__/chatml/framework-traces/claude-agent-2025-12-22.trace.json; observation f8e8f040dc94e67e+ {+ name: "verbatim claude-agent-2025-12-22.trace.json / f8e8f040dc94e67e",+ spanIO: {+ input: '{"content":"role"}',+ output:+ '{"content":[{"type":"tool_use","id":"toolu_01NtVat4vJLFfVd5TqdLHcA7","name":"mcp__weather__get_weather","input":{"city":"New York"}}],"role":"assistant"}',+ metadata:+ '{"attributes":{"gen_ai.operation.name":"chat","gen_ai.serialized.name":"claude.assistant.turn","langsmith.span.kind":"llm","langsmith.trace.name":"claude.assistant.turn","langsmith.trace.session_name":"default","gen_ai.system":"anthropic","gen_ai.request.model":"claude-sonnet-4-5-20250929","langsmith.metadata.ls_model_name":"claude-sonnet-4-5-20250929","langsmith.metadata.LANGSMITH_OTEL_ENABLED":"true","langsmith.metadata.LANGSMITH_OTEL_ONLY":"true","langsmith.metadata.LANGSMITH_TRACING":"true"},"resourceAttributes":{"telemetry.sdk.language":"python","telemetry.sdk.name":"opentelemetry","telemetry.sdk.version":"1.37.0","service.name":"unknown_service"},"scope":{"name":"langsmith","attributes":{}}}',+ },+ expected: {+ messages: [+ {+ role: "user",+ parts: [+ {+ type: "text",+ text: "role",+ },+ ],+ source: "input",+ },+ {+ role: "assistant",+ parts: [+ {+ type: "tool-call",+ toolCallId: "toolu_01NtVat4vJLFfVd5TqdLHcA7",+ toolName: "mcp__weather__get_weather",+ input: {+ city: "New York",+ },+ toolType: "tool_use",+ },+ ],+ source: "output",+ },+ ],+ toolDefinitions: [],+ },+ },+];diff --git a/packages/shared/src/utils/normalized-io/conventions/providers/gemini/fixtures.ts b/packages/shared/src/utils/normalized-io/conventions/providers/gemini/fixtures.tsindex ce17129051..f5dc622665 100644--- a/packages/shared/src/utils/normalized-io/conventions/providers/gemini/fixtures.ts+++ b/packages/shared/src/utils/normalized-io/conventions/providers/gemini/fixtures.ts@@ -1,5 +1,104 @@import type { NormalizedIOFixture } from "../fixture-types";+// Docs-derived GenerateContent history, not the separate Interactions API.+// https://ai.google.dev/gemini-api/docs/function-calling+export const documentedFunctionRoundTripFixtures: NormalizedIOFixture[] = [+ false,+ true,+].map(+ (python): NormalizedIOFixture => ({+ name: `Gemini ${python ? "Python" : "REST"} function round trip with system instruction`,+ spanIO: {+ input: {+ ...(python+ ? {+ config: {+ system_instruction: { parts: [{ text: "Be concise." }] },+ },+ }+ : { systemInstruction: { parts: [{ text: "Be concise." }] } }),+ contents: [+ { role: "user", parts: [{ text: "Weather in Paris?" }] },+ {+ role: "model",+ parts: [+ {+ [python ? "function_call" : "functionCall"]: {+ id: "call_weather",+ name: "get_weather",+ args: { city: "Paris" },+ },+ },+ ],+ },+ {+ role: "user",+ parts: [+ {+ [python ? "function_response" : "functionResponse"]: {+ id: "call_weather",+ name: "get_weather",+ response: { temperature: 15 },+ },+ },+ ],+ },+ ],+ },+ output: {+ candidates: [+ { content: { role: "model", parts: [{ text: "15 degrees." }] } },+ ],+ },+ metadata: undefined,+ },+ expected: {+ messages: [+ {+ source: "input",+ role: "system",+ parts: [{ type: "text", text: "Be concise." }],+ },+ {+ source: "input",+ role: "user",+ parts: [{ type: "text", text: "Weather in Paris?" }],+ },+ {+ source: "input",+ role: "assistant",+ parts: [+ {+ type: "tool-call",+ toolCallId: "call_weather",+ toolName: "get_weather",+ input: { city: "Paris" },+ toolType: "functionCall",+ },+ ],+ },+ {+ source: "input",+ role: "tool",+ parts: [+ {+ type: "tool-result",+ toolCallId: "call_weather",+ output: { temperature: 15 },+ },+ ],+ },+ {+ source: "output",+ role: "assistant",+ parts: [{ type: "text", text: "15 degrees." }],+ },+ ],+ toolDefinitions: [],+ },+ }),+);+/** Synthetic Gemini case adapted from the playground suite. */export const geminiEmbeddedToolDefinitionFixture = {name: "extracts Gemini tool-definition messages",@@ -200,3 +299,165 @@ export const geminiMediaAndCodeExecutionFixture = {toolDefinitions: [],},} satisfies NormalizedIOFixture;++// Verbatim stored observation IO from ChatML integration-example exports.+export const capturedTraceFixtures: NormalizedIOFixture[] = [+ // Source: worker/src/__tests__/chatml/framework-traces/google-adk-2025-08-28.trace.json; observation bded677884f031ce+ {+ name: "verbatim google-adk-2025-08-28.trace.json / bded677884f031ce",+ spanIO: {+ input:+ '{"model": "gemini-2.0-flash", "config": {"http_options": {"headers": {"x-goog-api-client": "google-adk/1.12.0 gl-python/3.12.11", "user-agent": "google-adk/1.12.0 gl-python/3.12.11"}}, "system_instruction": "Always greet using the say_hello tool.\\n\\nYou are an agent. Your internal name is \\"hello_agent\\".", "tools": [{"function_declarations": [{"name": "say_hello"}]}]}, "contents": [{"parts": [{"text": "hi"}], "role": "user"}, {"parts": [{"function_call": {"args": {}, "name": "say_hello"}}], "role": "model"}, {"parts": [{"function_response": {"name": "say_hello", "response": {"greeting": "Hello Langfuse 👋"}}}], "role": "user"}]}',+ output:+ '{"content":{"parts":[{"text":"Hello Langfuse 👋!\\n"}],"role":"model"},"finish_reason":"STOP","usage_metadata":{"candidates_token_count":6,"candidates_tokens_details":[{"modality":"TEXT","token_count":6}],"prompt_token_count":39,"prompt_tokens_details":[{"modality":"TEXT","token_count":39}],"total_token_count":45}}',+ metadata:+ '{"attributes":{"session.id":"demo-session","user.id":"demo-user","gen_ai.system":"gcp.vertex.agent","gen_ai.request.model":"gemini-2.0-flash","gcp.vertex.agent.invocation_id":"e-5022fa36-69c5-4fe7-bb37-662704dcb713","gcp.vertex.agent.session_id":"demo-session","gcp.vertex.agent.event_id":"f2596747-d905-44bc-b85c-1e9692c3249c","gcp.vertex.agent.llm_request":"{\\"model\\": \\"gemini-2.0-flash\\", \\"config\\": {\\"http_options\\": {\\"headers\\": {\\"x-goog-api-client\\": \\"google-adk/1.12.0 gl-python/3.12.11\\", \\"user-agent\\": \\"google-adk/1.12.0 gl-python/3.12.11\\"}}, \\"system_instruction\\": \\"Always greet using the say_hello tool.\\\\n\\\\nYou are an agent. Your internal name is \\\\\\"hello_agent\\\\\\".\\", \\"tools\\": [{\\"function_declarations\\": [{\\"name\\": \\"say_hello\\"}]}]}, \\"contents\\": [{\\"parts\\": [{\\"text\\": \\"hi\\"}], \\"role\\": \\"user\\"}, {\\"parts\\": [{\\"function_call\\": {\\"args\\": {}, \\"name\\": \\"say_hello\\"}}], \\"role\\": \\"model\\"}, {\\"parts\\": [{\\"function_response\\": {\\"name\\": \\"say_hello\\", \\"response\\": {\\"greeting\\": \\"Hello Langfuse 👋\\"}}}], \\"role\\": \\"user\\"}]}","gcp.vertex.agent.llm_response":"{\\"content\\":{\\"parts\\":[{\\"text\\":\\"Hello Langfuse 👋!\\\\n\\"}],\\"role\\":\\"model\\"},\\"finish_reason\\":\\"STOP\\",\\"usage_metadata\\":{\\"candidates_token_count\\":6,\\"candidates_tokens_details\\":[{\\"modality\\":\\"TEXT\\",\\"token_count\\":6}],\\"prompt_token_count\\":39,\\"prompt_tokens_details\\":[{\\"modality\\":\\"TEXT\\",\\"token_count\\":39}],\\"total_token_count\\":45}}","gen_ai.usage.input_tokens":"39","gen_ai.usage.output_tokens":"6","gen_ai.response.finish_reasons":"[\\"stop\\"]","llm.provider":"google","input.value":"{\\"model\\": \\"gemini-2.0-flash\\", \\"config\\": {\\"http_options\\": {\\"headers\\": {\\"x-goog-api-client\\": \\"google-adk/1.12.0 gl-python/3.12.11\\", \\"user-agent\\": \\"google-adk/1.12.0 gl-python/3.12.11\\"}}, \\"system_instruction\\": \\"Always greet using the say_hello tool.\\\\n\\\\nYou are an agent. Your internal name is \\\\\\"hello_agent\\\\\\".\\", \\"tools\\": [{\\"function_declarations\\": [{\\"name\\": \\"say_hello\\"}]}]}, \\"contents\\": [{\\"parts\\": [{\\"text\\": \\"hi\\"}], \\"role\\": \\"user\\"}, {\\"parts\\": [{\\"function_call\\": {\\"args\\": {}, \\"name\\": \\"say_hello\\"}}], \\"role\\": \\"model\\"}, {\\"parts\\": [{\\"function_response\\": {\\"name\\": \\"say_hello\\", \\"response\\": {\\"greeting\\": \\"Hello Langfuse 👋\\"}}}], \\"role\\": \\"user\\"}]}","input.mime_type":"application/json","llm.tools.0.tool.json_schema":"{\\"name\\":\\"say_hello\\"}","llm.model_name":"gemini-2.0-flash","llm.invocation_parameters":"{\\"http_options\\":{\\"headers\\":{\\"x-goog-api-client\\":\\"google-adk/1.12.0 gl-python/3.12.11\\",\\"user-agent\\":\\"google-adk/1.12.0 gl-python/3.12.11\\"}},\\"system_instruction\\":\\"Always greet using the say_hello tool.\\\\n\\\\nYou are an agent. Your internal name is \\\\\\"hello_agent\\\\\\".\\",\\"tools\\":[{\\"function_declarations\\":[{\\"name\\":\\"say_hello\\"}]}]}","llm.input_messages.0.message.role":"system","llm.input_messages.0.message.content":"Always greet using the say_hello tool.\\n\\nYou are an agent. Your internal name is \\"hello_agent\\".","llm.input_messages.1.message.role":"user","llm.input_messages.1.message.contents.0.message_content.text":"hi","llm.input_messages.1.message.contents.0.message_content.type":"text","llm.input_messages.2.message.role":"model","llm.input_messages.2.message.tool_calls.0.tool_call.function.name":"say_hello","llm.input_messages.3.message.role":"tool","llm.input_messages.3.message.name":"say_hello","llm.input_messages.3.message.content":"{\\"greeting\\": \\"Hello Langfuse 👋\\"}","output.value":"{\\"content\\":{\\"parts\\":[{\\"text\\":\\"Hello Langfuse 👋!\\\\n\\"}],\\"role\\":\\"model\\"},\\"finish_reason\\":\\"STOP\\",\\"usage_metadata\\":{\\"candidates_token_count\\":6,\\"candidates_tokens_details\\":[{\\"modality\\":\\"TEXT\\",\\"token_count\\":6}],\\"prompt_token_count\\":39,\\"prompt_tokens_details\\":[{\\"modality\\":\\"TEXT\\",\\"token_count\\":39}],\\"total_token_count\\":45}}","output.mime_type":"application/json","llm.token_count.total":"45","llm.token_count.prompt":"39","llm.token_count.completion":"6","llm.output_messages.0.message.role":"model","llm.output_messages.0.message.contents.0.message_content.text":"Hello Langfuse 👋!\\n","llm.output_messages.0.message.contents.0.message_content.type":"text","openinference.span.kind":"LLM"},"resourceAttributes":{"telemetry.sdk.language":"python","telemetry.sdk.name":"opentelemetry","telemetry.sdk.version":"1.36.0","service.name":"unknown_service"},"scope":{"name":"openinference.instrumentation.google_adk","version":"0.1.3","attributes":{}}}',+ },+ expected: {+ messages: [+ {+ role: "system",+ parts: [+ {+ type: "text",+ text: 'Always greet using the say_hello tool.\n\nYou are an agent. Your internal name is "hello_agent".',+ },+ ],+ source: "input",+ },+ {+ role: "user",+ parts: [+ {+ type: "text",+ text: "hi",+ },+ ],+ source: "input",+ },+ {+ role: "assistant",+ parts: [+ {+ type: "tool-call",+ toolCallId: null,+ toolName: "say_hello",+ input: {},+ toolType: "functionCall",+ },+ ],+ source: "input",+ },+ {+ role: "tool",+ parts: [+ {+ type: "tool-result",+ toolCallId: "say_hello",+ output: {+ greeting: "Hello Langfuse 👋",+ },+ },+ ],+ source: "input",+ },+ {+ role: "assistant",+ parts: [+ {+ type: "text",+ text: "Hello Langfuse 👋!\n",+ },+ ],+ finishReason: {+ type: "stop",+ raw: "STOP",+ },+ source: "output",+ },+ ],+ toolDefinitions: [+ {+ name: "say_hello",+ },+ ],+ },+ },+ // Source: worker/src/__tests__/chatml/framework-traces/google-gemini-2025-08-01.trace.json; observation b7a63ca7e1d083bc+ {+ name: "verbatim google-gemini-2025-08-01.trace.json / b7a63ca7e1d083bc",+ spanIO: {+ input: '{"model": "gemini-2.5-flash", "contents": "What is Langfuse?"}',+ output:+ '{"sdk_http_response":{"headers":{"content-type":"application/json; charset=UTF-8","vary":"Origin, X-Origin, Referer","content-encoding":"gzip","date":"Fri, 01 Aug 2025 13:22:12 GMT","server":"scaffolding on HTTPServer2","x-xss-protection":"0","x-frame-options":"SAMEORIGIN","x-content-type-options":"nosniff","server-timing":"gfet4t7; dur=11935","alt-svc":"h3=\\":443\\"; ma=2592000,h3-29=\\":443\\"; ma=2592000","transfer-encoding":"chunked"}},"candidates":[{"content":{"parts":[{"text":"**Langfuse** is an **open-source observability and evaluation platform specifically designed for Large Language Model (LLM) applications.**\\n\\nIn essence, it acts as a \\"flight recorder\\" or \\"black box\\" for your AI applications, giving you deep insights into how they are performing in real-time and helping you iterate and improve them.\\n\\nHere\'s a breakdown of what Langfuse is and why it\'s important:\\n\\n### The Problem Langfuse Solves\\n\\nBuilding applications powered by LLMs (like chatbots, summarizers, RAG systems) presents unique challenges:\\n\\n1. **Non-Determinism:** LLMs aren\'t like traditional code; their outputs can vary, making debugging difficult.\\n2. **Opacity:** It\'s hard to see what\'s happening \\"inside\\" the LLM call – what prompt was sent, what response was received, how long it took, and what tools were used.\\n3. **Performance & Cost Tracking:** Monitoring token usage, latency, and costs across various LLM calls and chains is complex.\\n4. **Evaluation & Improvement:** How do you know if a change to your prompt or RAG system actually made your application better? How do you collect user feedback?\\n5. **Debugging Production Issues:** When something goes wrong in production, tracing the exact cause (e.g., a bad prompt, a hallucination, a failed tool call) is crucial.\\n\\n### How Langfuse Works & Its Key Features\\n\\nLangfuse addresses these challenges by providing:\\n\\n1. **Tracing & Observability:**\\n * **End-to-end visibility:** It captures every step of an LLM application\'s lifecycle, from user input, through various LLM calls, tool usage, RAG retrievals, and final output.\\n * **Detailed Spans:** Each step (e.g., an OpenAI call, a LlamaIndex query, a custom function) is recorded as a \\"span,\\" showing inputs, outputs, timestamps, costs (tokens, price), and associated metadata.\\n * **Visualizations:** Presents these traces in a clear, waterfall-style UI, making it easy to understand the flow and identify bottlenecks or errors.\\n\\n2. **Debugging & Monitoring:**\\n * **Real-time Dashboards:** Provides metrics on latency, cost, token usage, and error rates across your application.\\n * **Error Identification:** Quickly pinpoint exactly which LLM call or step failed within a complex chain.\\n * **Search & Filtering:** Easily find specific traces based on user IDs, session IDs, error status, or custom tags.\\n\\n3. **Evaluation & Feedback Loops:**\\n * **Manual Feedback:** Allows users (or developers) to provide direct feedback (e.g., \\"good,\\" \\"bad,\\" custom scores) on specific traces. This is invaluable for human-in-the-loop evaluation.\\n * **Automated Evaluation:** Integrates with evaluation frameworks (e.g., RAGAS) or custom scripts to automatically score LLM outputs, enabling A/B testing of prompts or models.\\n * **Prompt Comparison:** Helps you compare the performance of different prompt versions side-by-side based on collected metrics and evaluations.\\n\\n4. **Prompt Management:**\\n * Store and version control your prompts.\\n * Attach evaluations to specific prompt versions to track their effectiveness over time.\\n\\n5. **User & Session Tracking:**\\n * Associate traces with specific users or sessions, allowing you to understand individual user journeys and identify patterns.\\n\\n### Key Benefits\\n\\n* **Faster Debugging:** Quickly diagnose and fix issues in your LLM applications.\\n* **Improved Performance:** Identify and optimize slow or costly parts of your LLM chains.\\n* **Data-Driven Iteration:** Make informed decisions about prompt engineering, model selection, and architecture based on real usage data and evaluations.\\n* **Cost Control:** Monitor token usage and costs to prevent budget overruns.\\n* **Enhanced Reliability:** Build more robust and production-ready LLM applications.\\n\\n### Integrations\\n\\nLangfuse integrates with popular LLM frameworks and libraries, including:\\n\\n* LangChain\\n* LlamaIndex\\n* OpenAI API\\n* Anthropic API\\n* And can be used with any custom LLM integration.\\n\\nIn summary, Langfuse is a critical tool for any developer or team serious about building, deploying, and maintaining high-quality, performant, and reliable LLM-powered applications in production."}],"role":"model"},"finish_reason":"STOP","index":0}],"model_version":"gemini-2.5-flash","usage_metadata":{"candidates_token_count":951,"prompt_token_count":6,"prompt_tokens_details":[{"modality":"TEXT","token_count":6}],"thoughts_token_count":1104,"total_token_count":2061},"automatic_function_calling_history":[]}',+ metadata:+ '{"attributes":{"llm.input_messages.0.message.content":"What is Langfuse?","llm.input_messages.0.message.role":"user","output.value":"{\\"sdk_http_response\\":{\\"headers\\":{\\"content-type\\":\\"application/json; charset=UTF-8\\",\\"vary\\":\\"Origin, X-Origin, Referer\\",\\"content-encoding\\":\\"gzip\\",\\"date\\":\\"Fri, 01 Aug 2025 13:22:12 GMT\\",\\"server\\":\\"scaffolding on HTTPServer2\\",\\"x-xss-protection\\":\\"0\\",\\"x-frame-options\\":\\"SAMEORIGIN\\",\\"x-content-type-options\\":\\"nosniff\\",\\"server-timing\\":\\"gfet4t7; dur=11935\\",\\"alt-svc\\":\\"h3=\\\\\\":443\\\\\\"; ma=2592000,h3-29=\\\\\\":443\\\\\\"; ma=2592000\\",\\"transfer-encoding\\":\\"chunked\\"}},\\"candidates\\":[{\\"content\\":{\\"parts\\":[{\\"text\\":\\"**Langfuse** is an **open-source observability and evaluation platform specifically designed for Large Language Model (LLM) applications.**\\\\n\\\\nIn essence, it acts as a \\\\\\"flight recorder\\\\\\" or \\\\\\"black box\\\\\\" for your AI applications, giving you deep insights into how they are performing in real-time and helping you iterate and improve them.\\\\n\\\\nHere\'s a breakdown of what Langfuse is and why it\'s important:\\\\n\\\\n### The Problem Langfuse Solves\\\\n\\\\nBuilding applications powered by LLMs (like chatbots, summarizers, RAG systems) presents unique challenges:\\\\n\\\\n1. **Non-Determinism:** LLMs aren\'t like traditional code; their outputs can vary, making debugging difficult.\\\\n2. **Opacity:** It\'s hard to see what\'s happening \\\\\\"inside\\\\\\" the LLM call – what prompt was sent, what response was received, how long it took, and what tools were used.\\\\n3. **Performance & Cost Tracking:** Monitoring token usage, latency, and costs across various LLM calls and chains is complex.\\\\n4. **Evaluation & Improvement:** How do you know if a change to your prompt or RAG system actually made your application better? How do you collect user feedback?\\\\n5. **Debugging Production Issues:** When something goes wrong in production, tracing the exact cause (e.g., a bad prompt, a hallucination, a failed tool call) is crucial.\\\\n\\\\n### How Langfuse Works & Its Key Features\\\\n\\\\nLangfuse addresses these challenges by providing:\\\\n\\\\n1. **Tracing & Observability:**\\\\n * **End-to-end visibility:** It captures every step of an LLM application\'s lifecycle, from user input, through various LLM calls, tool usage, RAG retrievals, and final output.\\\\n * **Detailed Spans:** Each step (e.g., an OpenAI call, a LlamaIndex query, a custom function) is recorded as a \\\\\\"span,\\\\\\" showing inputs, outputs, timestamps, costs (tokens, price), and associated metadata.\\\\n * **Visualizations:** Presents these traces in a clear, waterfall-style UI, making it easy to understand the flow and identify bottlenecks or errors.\\\\n\\\\n2. **Debugging & Monitoring:**\\\\n * **Real-time Dashboards:** Provides metrics on latency, cost, token usage, and error rates across your application.\\\\n * **Error Identification:** Quickly pinpoint exactly which LLM call or step failed within a complex chain.\\\\n * **Search & Filtering:** Easily find specific traces based on user IDs, session IDs, error status, or custom tags.\\\\n\\\\n3. **Evaluation & Feedback Loops:**\\\\n * **Manual Feedback:** Allows users (or developers) to provide direct feedback (e.g., \\\\\\"good,\\\\\\" \\\\\\"bad,\\\\\\" custom scores) on specific traces. This is invaluable for human-in-the-loop evaluation.\\\\n * **Automated Evaluation:** Integrates with evaluation frameworks (e.g., RAGAS) or custom scripts to automatically score LLM outputs, enabling A/B testing of prompts or models.\\\\n * **Prompt Comparison:** Helps you compare the performance of different prompt versions side-by-side based on collected metrics and evaluations.\\\\n\\\\n4. **Prompt Management:**\\\\n * Store and version control your prompts.\\\\n * Attach evaluations to specific prompt versions to track their effectiveness over time.\\\\n\\\\n5. **User & Session Tracking:**\\\\n * Associate traces with specific users or sessions, allowing you to understand individual user journeys and identify patterns.\\\\n\\\\n### Key Benefits\\\\n\\\\n* **Faster Debugging:** Quickly diagnose and fix issues in your LLM applications.\\\\n* **Improved Performance:** Identify and optimize slow or costly parts of your LLM chains.\\\\n* **Data-Driven Iteration:** Make informed decisions about prompt engineering, model selection, and architecture based on real usage data and evaluations.\\\\n* **Cost Control:** Monitor token usage and costs to prevent budget overruns.\\\\n* **Enhanced Reliability:** Build more robust and production-ready LLM applications.\\\\n\\\\n### Integrations\\\\n\\\\nLangfuse integrates with popular LLM frameworks and libraries, including:\\\\n\\\\n* LangChain\\\\n* LlamaIndex\\\\n* OpenAI API\\\\n* Anthropic API\\\\n* And can be used with any custom LLM integration.\\\\n\\\\nIn summary, Langfuse is a critical tool for any developer or team serious about building, deploying, and maintaining high-quality, performant, and reliable LLM-powered applications in production.\\"}],\\"role\\":\\"model\\"},\\"finish_reason\\":\\"STOP\\",\\"index\\":0}],\\"model_version\\":\\"gemini-2.5-flash\\",\\"usage_metadata\\":{\\"candidates_token_count\\":951,\\"prompt_token_count\\":6,\\"prompt_tokens_details\\":[{\\"modality\\":\\"TEXT\\",\\"token_count\\":6}],\\"thoughts_token_count\\":1104,\\"total_token_count\\":2061},\\"automatic_function_calling_history\\":[]}","output.mime_type":"application/json","llm.provider":"google","input.value":"{\\"model\\": \\"gemini-2.5-flash\\", \\"contents\\": \\"What is Langfuse?\\"}","input.mime_type":"application/json","llm.model_name":"gemini-2.5-flash","llm.token_count.total":"2061","llm.token_count.prompt":"6","llm.token_count.completion_details.reasoning":"1104","llm.token_count.completion":"2055","llm.output_messages.0.message.content":"**Langfuse** is an **open-source observability and evaluation platform specifically designed for Large Language Model (LLM) applications.**\\n\\nIn essence, it acts as a \\"flight recorder\\" or \\"black box\\" for your AI applications, giving you deep insights into how they are performing in real-time and helping you iterate and improve them.\\n\\nHere\'s a breakdown of what Langfuse is and why it\'s important:\\n\\n### The Problem Langfuse Solves\\n\\nBuilding applications powered by LLMs (like chatbots, summarizers, RAG systems) presents unique challenges:\\n\\n1. **Non-Determinism:** LLMs aren\'t like traditional code; their outputs can vary, making debugging difficult.\\n2. **Opacity:** It\'s hard to see what\'s happening \\"inside\\" the LLM call – what prompt was sent, what response was received, how long it took, and what tools were used.\\n3. **Performance & Cost Tracking:** Monitoring token usage, latency, and costs across various LLM calls and chains is complex.\\n4. **Evaluation & Improvement:** How do you know if a change to your prompt or RAG system actually made your application better? How do you collect user feedback?\\n5. **Debugging Production Issues:** When something goes wrong in production, tracing the exact cause (e.g., a bad prompt, a hallucination, a failed tool call) is crucial.\\n\\n### How Langfuse Works & Its Key Features\\n\\nLangfuse addresses these challenges by providing:\\n\\n1. **Tracing & Observability:**\\n * **End-to-end visibility:** It captures every step of an LLM application\'s lifecycle, from user input, through various LLM calls, tool usage, RAG retrievals, and final output.\\n * **Detailed Spans:** Each step (e.g., an OpenAI call, a LlamaIndex query, a custom function) is recorded as a \\"span,\\" showing inputs, outputs, timestamps, costs (tokens, price), and associated metadata.\\n * **Visualizations:** Presents these traces in a clear, waterfall-style UI, making it easy to understand the flow and identify bottlenecks or errors.\\n\\n2. **Debugging & Monitoring:**\\n * **Real-time Dashboards:** Provides metrics on latency, cost, token usage, and error rates across your application.\\n * **Error Identification:** Quickly pinpoint exactly which LLM call or step failed within a complex chain.\\n * **Search & Filtering:** Easily find specific traces based on user IDs, session IDs, error status, or custom tags.\\n\\n3. **Evaluation & Feedback Loops:**\\n * **Manual Feedback:** Allows users (or developers) to provide direct feedback (e.g., \\"good,\\" \\"bad,\\" custom scores) on specific traces. This is invaluable for human-in-the-loop evaluation.\\n * **Automated Evaluation:** Integrates with evaluation frameworks (e.g., RAGAS) or custom scripts to automatically score LLM outputs, enabling A/B testing of prompts or models.\\n * **Prompt Comparison:** Helps you compare the performance of different prompt versions side-by-side based on collected metrics and evaluations.\\n\\n4. **Prompt Management:**\\n * Store and version control your prompts.\\n * Attach evaluations to specific prompt versions to track their effectiveness over time.\\n\\n5. **User & Session Tracking:**\\n * Associate traces with specific users or sessions, allowing you to understand individual user journeys and identify patterns.\\n\\n### Key Benefits\\n\\n* **Faster Debugging:** Quickly diagnose and fix issues in your LLM applications.\\n* **Improved Performance:** Identify and optimize slow or costly parts of your LLM chains.\\n* **Data-Driven Iteration:** Make informed decisions about prompt engineering, model selection, and architecture based on real usage data and evaluations.\\n* **Cost Control:** Monitor token usage and costs to prevent budget overruns.\\n* **Enhanced Reliability:** Build more robust and production-ready LLM applications.\\n\\n### Integrations\\n\\nLangfuse integrates with popular LLM frameworks and libraries, including:\\n\\n* LangChain\\n* LlamaIndex\\n* OpenAI API\\n* Anthropic API\\n* And can be used with any custom LLM integration.\\n\\nIn summary, Langfuse is a critical tool for any developer or team serious about building, deploying, and maintaining high-quality, performant, and reliable LLM-powered applications in production.","llm.output_messages.0.message.role":"model","openinference.span.kind":"LLM"},"resourceAttributes":{"telemetry.sdk.language":"python","telemetry.sdk.name":"opentelemetry","telemetry.sdk.version":"1.34.1","service.name":"unknown_service"},"scope":{"name":"openinference.instrumentation.google_genai","version":"0.1.5","attributes":{}}}',+ },+ expected: {+ messages: [+ {+ role: "user",+ parts: [+ {+ type: "text",+ text: "What is Langfuse?",+ },+ ],+ source: "input",+ },+ {+ role: "assistant",+ parts: [+ {+ type: "text",+ text: '**Langfuse** is an **open-source observability and evaluation platform specifically designed for Large Language Model (LLM) applications.**\n\nIn essence, it acts as a "flight recorder" or "black box" for your AI applications, giving you deep insights into how they are performing in real-time and helping you iterate and improve them.\n\nHere\'s a breakdown of what Langfuse is and why it\'s important:\n\n### The Problem Langfuse Solves\n\nBuilding applications powered by LLMs (like chatbots, summarizers, RAG systems) presents unique challenges:\n\n1. **Non-Determinism:** LLMs aren\'t like traditional code; their outputs can vary, making debugging difficult.\n2. **Opacity:** It\'s hard to see what\'s happening "inside" the LLM call – what prompt was sent, what response was received, how long it took, and what tools were used.\n3. **Performance & Cost Tracking:** Monitoring token usage, latency, and costs across various LLM calls and chains is complex.\n4. **Evaluation & Improvement:** How do you know if a change to your prompt or RAG system actually made your application better? How do you collect user feedback?\n5. **Debugging Production Issues:** When something goes wrong in production, tracing the exact cause (e.g., a bad prompt, a hallucination, a failed tool call) is crucial.\n\n### How Langfuse Works & Its Key Features\n\nLangfuse addresses these challenges by providing:\n\n1. **Tracing & Observability:**\n * **End-to-end visibility:** It captures every step of an LLM application\'s lifecycle, from user input, through various LLM calls, tool usage, RAG retrievals, and final output.\n * **Detailed Spans:** Each step (e.g., an OpenAI call, a LlamaIndex query, a custom function) is recorded as a "span," showing inputs, outputs, timestamps, costs (tokens, price), and associated metadata.\n * **Visualizations:** Presents these traces in a clear, waterfall-style UI, making it easy to understand the flow and identify bottlenecks or errors.\n\n2. **Debugging & Monitoring:**\n * **Real-time Dashboards:** Provides metrics on latency, cost, token usage, and error rates across your application.\n * **Error Identification:** Quickly pinpoint exactly which LLM call or step failed within a complex chain.\n * **Search & Filtering:** Easily find specific traces based on user IDs, session IDs, error status, or custom tags.\n\n3. **Evaluation & Feedback Loops:**\n * **Manual Feedback:** Allows users (or developers) to provide direct feedback (e.g., "good," "bad," custom scores) on specific traces. This is invaluable for human-in-the-loop evaluation.\n * **Automated Evaluation:** Integrates with evaluation frameworks (e.g., RAGAS) or custom scripts to automatically score LLM outputs, enabling A/B testing of prompts or models.\n * **Prompt Comparison:** Helps you compare the performance of different prompt versions side-by-side based on collected metrics and evaluations.\n\n4. **Prompt Management:**\n * Store and version control your prompts.\n * Attach evaluations to specific prompt versions to track their effectiveness over time.\n\n5. **User & Session Tracking:**\n * Associate traces with specific users or sessions, allowing you to understand individual user journeys and identify patterns.\n\n### Key Benefits\n\n* **Faster Debugging:** Quickly diagnose and fix issues in your LLM applications.\n* **Improved Performance:** Identify and optimize slow or costly parts of your LLM chains.\n* **Data-Driven Iteration:** Make informed decisions about prompt engineering, model selection, and architecture based on real usage data and evaluations.\n* **Cost Control:** Monitor token usage and costs to prevent budget overruns.\n* **Enhanced Reliability:** Build more robust and production-ready LLM applications.\n\n### Integrations\n\nLangfuse integrates with popular LLM frameworks and libraries, including:\n\n* LangChain\n* LlamaIndex\n* OpenAI API\n* Anthropic API\n* And can be used with any custom LLM integration.\n\nIn summary, Langfuse is a critical tool for any developer or team serious about building, deploying, and maintaining high-quality, performant, and reliable LLM-powered applications in production.',+ },+ ],+ source: "output",+ finishReason: {+ type: "stop",+ raw: "STOP",+ },+ },+ ],+ toolDefinitions: [],+ },+ },+ // Source: worker/src/__tests__/chatml/framework-traces/vertex-ai-2025-08-01.trace.json; observation 125abcbf5c41f4df+ {+ name: "verbatim vertex-ai-2025-08-01.trace.json / 125abcbf5c41f4df",+ spanIO: {+ input:+ '{"contents": [{"role": "user", "parts": [{"text": "What is Langfuse?"}]}], "model": "projects/vertex-ai-integration-467711/locations/europe-central2/publishers/google/models/gemini-2.5-flash", "tools": [], "labels": {}, "safety_settings": []}',+ output:+ '{"candidates": [{"content": {"role": "model", "parts": [{"text": "**Langfuse** is an **open-source observability and evaluation platform specifically designed for Large Language Model (LLM) applications.**\\n\\nThink of it as an Application Performance Management (APM) tool, but tailored to the unique challenges of building and running applications powered by LLMs, such as chatbots, summarizers, code generators, and more.\\n\\n### Why Langfuse Exists (The Problem It Solves)\\n\\nDeveloping with LLMs introduces new complexities:\\n\\n1. **Non-Determinism:** LLM outputs can vary even with the same input, making debugging difficult.\\n2. **Opacity:** It\'s hard to see *why* an LLM responded a certain way, especially with complex prompt chains or tool usage.\\n3. **Cost & Latency:** LLM API calls can be expensive and slow, requiring careful monitoring.\\n4. **Quality Evaluation:** Subjective and difficult to measure if an LLM is truly \\"good\\" or \\"helpful\\" for specific tasks.\\n5. **Iteration Speed:** Testing prompt changes, different models, or retrieval-augmented generation (RAG) strategies requires robust tooling.\\n6. **User Feedback:** Connecting user-reported issues or satisfaction back to specific LLM interactions.\\n\\n### What Langfuse Does (Key Features)\\n\\nLangfuse helps address these problems by providing:\\n\\n1. **Tracing & Debugging:**\\n * **End-to-end visibility:** It captures every step of an LLM call or a chain of LLM calls (e.g., initial user query, prompt engineering, internal thoughts of the LLM, tool calls, final response).\\n * **Detailed data:** Records prompts, responses, models used, tokens consumed, latency, cost, errors, and custom metadata.\\n * **Visual timelines:** Allows developers to inspect the flow of an interaction, pinpointing where issues occurred.\\n\\n2. **Evaluation & Feedback:**\\n * **Manual Annotations:** Allows human reviewers to rate the quality of LLM outputs directly within the platform.\\n * **Automated Evaluations:** Integrates with evaluation frameworks to run automated checks (e.g., factual consistency, toxicity, helpfulness).\\n * **Feedback Integration:** Connects user feedback (e.g., thumbs up/down, specific comments) directly to the trace of the interaction.\\n\\n3. **Monitoring & Analytics:**\\n * **Dashboards:** Provides metrics on key performance indicators like latency, cost, token usage, error rates, and throughput.\\n * **Trend Analysis:** Helps identify regressions or improvements over time.\\n * **Experimentation:** Facilitates A/B testing of different prompts, models, or configurations by comparing their performance metrics and evaluations.\\n\\n4. **Prompt Management:** While not a dedicated prompt engineering tool, its tracing capabilities allow you to see how different prompts perform in production and iterate on them effectively.\\n\\n### How It Works\\n\\n* **SDKs:** You integrate Langfuse into your application code using their SDKs (e.g., Python, JavaScript).\\n* **Data Capture:** The SDKs automatically capture relevant data about your LLM calls and send it to the Langfuse backend.\\n* **Backend:** Langfuse provides a hosted cloud service, or you can self-host their open-source backend (which uses PostgreSQL and ClickHouse).\\n* **Web UI:** All the captured data is visualized in a user-friendly web interface for analysis, debugging, and evaluation.\\n\\n### Who Uses Langfuse?\\n\\n* **LLM Developers:** For debugging, testing, and improving their LLM-powered applications.\\n* **ML Engineers:** To monitor the performance and reliability of LLMs in production.\\n* **Product Managers:** To understand user experience and the impact of LLM changes.\\n* **Anyone building and deploying Generative AI applications.**\\n\\nIn essence, Langfuse provides the necessary tools for developers to bring LLM applications from prototype to production with confidence, ensuring they are observable, debuggable, and continuously improving."}]}, "finish_reason": 1, "avg_logprobs": -0.7123595830251479, "index": 0, "score": 0.0, "safety_ratings": []}], "usage_metadata": {"prompt_token_count": 5, "candidates_token_count": 845, "total_token_count": 2023}, "model_version": "gemini-2.5-flash"}',+ metadata:+ '{"attributes":{"input.value":"{\\"contents\\": [{\\"role\\": \\"user\\", \\"parts\\": [{\\"text\\": \\"What is Langfuse?\\"}]}], \\"model\\": \\"projects/vertex-ai-integration-467711/locations/europe-central2/publishers/google/models/gemini-2.5-flash\\", \\"tools\\": [], \\"labels\\": {}, \\"safety_settings\\": []}","input.mime_type":"application/json","llm.model_name":"projects/vertex-ai-integration-467711/locations/europe-central2/publishers/google/models/gemini-2.5-flash","llm.invocation_parameters":"{\\"stop_sequences\\": [], \\"response_mime_type\\": \\"\\"}","llm.input_messages.0.message.role":"user","llm.input_messages.0.message.contents.0.message_content.text":"What is Langfuse?","output.value":"{\\"candidates\\": [{\\"content\\": {\\"role\\": \\"model\\", \\"parts\\": [{\\"text\\": \\"**Langfuse** is an **open-source observability and evaluation platform specifically designed for Large Language Model (LLM) applications.**\\\\n\\\\nThink of it as an Application Performance Management (APM) tool, but tailored to the unique challenges of building and running applications powered by LLMs, such as chatbots, summarizers, code generators, and more.\\\\n\\\\n### Why Langfuse Exists (The Problem It Solves)\\\\n\\\\nDeveloping with LLMs introduces new complexities:\\\\n\\\\n1. **Non-Determinism:** LLM outputs can vary even with the same input, making debugging difficult.\\\\n2. **Opacity:** It\'s hard to see *why* an LLM responded a certain way, especially with complex prompt chains or tool usage.\\\\n3. **Cost & Latency:** LLM API calls can be expensive and slow, requiring careful monitoring.\\\\n4. **Quality Evaluation:** Subjective and difficult to measure if an LLM is truly \\\\\\"good\\\\\\" or \\\\\\"helpful\\\\\\" for specific tasks.\\\\n5. **Iteration Speed:** Testing prompt changes, different models, or retrieval-augmented generation (RAG) strategies requires robust tooling.\\\\n6. **User Feedback:** Connecting user-reported issues or satisfaction back to specific LLM interactions.\\\\n\\\\n### What Langfuse Does (Key Features)\\\\n\\\\nLangfuse helps address these problems by providing:\\\\n\\\\n1. **Tracing & Debugging:**\\\\n * **End-to-end visibility:** It captures every step of an LLM call or a chain of LLM calls (e.g., initial user query, prompt engineering, internal thoughts of the LLM, tool calls, final response).\\\\n * **Detailed data:** Records prompts, responses, models used, tokens consumed, latency, cost, errors, and custom metadata.\\\\n * **Visual timelines:** Allows developers to inspect the flow of an interaction, pinpointing where issues occurred.\\\\n\\\\n2. **Evaluation & Feedback:**\\\\n * **Manual Annotations:** Allows human reviewers to rate the quality of LLM outputs directly within the platform.\\\\n * **Automated Evaluations:** Integrates with evaluation frameworks to run automated checks (e.g., factual consistency, toxicity, helpfulness).\\\\n * **Feedback Integration:** Connects user feedback (e.g., thumbs up/down, specific comments) directly to the trace of the interaction.\\\\n\\\\n3. **Monitoring & Analytics:**\\\\n * **Dashboards:** Provides metrics on key performance indicators like latency, cost, token usage, error rates, and throughput.\\\\n * **Trend Analysis:** Helps identify regressions or improvements over time.\\\\n * **Experimentation:** Facilitates A/B testing of different prompts, models, or configurations by comparing their performance metrics and evaluations.\\\\n\\\\n4. **Prompt Management:** While not a dedicated prompt engineering tool, its tracing capabilities allow you to see how different prompts perform in production and iterate on them effectively.\\\\n\\\\n### How It Works\\\\n\\\\n* **SDKs:** You integrate Langfuse into your application code using their SDKs (e.g., Python, JavaScript).\\\\n* **Data Capture:** The SDKs automatically capture relevant data about your LLM calls and send it to the Langfuse backend.\\\\n* **Backend:** Langfuse provides a hosted cloud service, or you can self-host their open-source backend (which uses PostgreSQL and ClickHouse).\\\\n* **Web UI:** All the captured data is visualized in a user-friendly web interface for analysis, debugging, and evaluation.\\\\n\\\\n### Who Uses Langfuse?\\\\n\\\\n* **LLM Developers:** For debugging, testing, and improving their LLM-powered applications.\\\\n* **ML Engineers:** To monitor the performance and reliability of LLMs in production.\\\\n* **Product Managers:** To understand user experience and the impact of LLM changes.\\\\n* **Anyone building and deploying Generative AI applications.**\\\\n\\\\nIn essence, Langfuse provides the necessary tools for developers to bring LLM applications from prototype to production with confidence, ensuring they are observable, debuggable, and continuously improving.\\"}]}, \\"finish_reason\\": 1, \\"avg_logprobs\\": -0.7123595830251479, \\"index\\": 0, \\"score\\": 0.0, \\"safety_ratings\\": []}], \\"usage_metadata\\": {\\"prompt_token_count\\": 5, \\"candidates_token_count\\": 845, \\"total_token_count\\": 2023}, \\"model_version\\": \\"gemini-2.5-flash\\"}","output.mime_type":"application/json","llm.token_count.prompt":"5","llm.token_count.completion":"845","llm.token_count.total":"2023","llm.output_messages.0.message.role":"assistant","llm.output_messages.0.message.contents.0.message_content.text":"**Langfuse** is an **open-source observability and evaluation platform specifically designed for Large Language Model (LLM) applications.**\\n\\nThink of it as an Application Performance Management (APM) tool, but tailored to the unique challenges of building and running applications powered by LLMs, such as chatbots, summarizers, code generators, and more.\\n\\n### Why Langfuse Exists (The Problem It Solves)\\n\\nDeveloping with LLMs introduces new complexities:\\n\\n1. **Non-Determinism:** LLM outputs can vary even with the same input, making debugging difficult.\\n2. **Opacity:** It\'s hard to see *why* an LLM responded a certain way, especially with complex prompt chains or tool usage.\\n3. **Cost & Latency:** LLM API calls can be expensive and slow, requiring careful monitoring.\\n4. **Quality Evaluation:** Subjective and difficult to measure if an LLM is truly \\"good\\" or \\"helpful\\" for specific tasks.\\n5. **Iteration Speed:** Testing prompt changes, different models, or retrieval-augmented generation (RAG) strategies requires robust tooling.\\n6. **User Feedback:** Connecting user-reported issues or satisfaction back to specific LLM interactions.\\n\\n### What Langfuse Does (Key Features)\\n\\nLangfuse helps address these problems by providing:\\n\\n1. **Tracing & Debugging:**\\n * **End-to-end visibility:** It captures every step of an LLM call or a chain of LLM calls (e.g., initial user query, prompt engineering, internal thoughts of the LLM, tool calls, final response).\\n * **Detailed data:** Records prompts, responses, models used, tokens consumed, latency, cost, errors, and custom metadata.\\n * **Visual timelines:** Allows developers to inspect the flow of an interaction, pinpointing where issues occurred.\\n\\n2. **Evaluation & Feedback:**\\n * **Manual Annotations:** Allows human reviewers to rate the quality of LLM outputs directly within the platform.\\n * **Automated Evaluations:** Integrates with evaluation frameworks to run automated checks (e.g., factual consistency, toxicity, helpfulness).\\n * **Feedback Integration:** Connects user feedback (e.g., thumbs up/down, specific comments) directly to the trace of the interaction.\\n\\n3. **Monitoring & Analytics:**\\n * **Dashboards:** Provides metrics on key performance indicators like latency, cost, token usage, error rates, and throughput.\\n * **Trend Analysis:** Helps identify regressions or improvements over time.\\n * **Experimentation:** Facilitates A/B testing of different prompts, models, or configurations by comparing their performance metrics and evaluations.\\n\\n4. **Prompt Management:** While not a dedicated prompt engineering tool, its tracing capabilities allow you to see how different prompts perform in production and iterate on them effectively.\\n\\n### How It Works\\n\\n* **SDKs:** You integrate Langfuse into your application code using their SDKs (e.g., Python, JavaScript).\\n* **Data Capture:** The SDKs automatically capture relevant data about your LLM calls and send it to the Langfuse backend.\\n* **Backend:** Langfuse provides a hosted cloud service, or you can self-host their open-source backend (which uses PostgreSQL and ClickHouse).\\n* **Web UI:** All the captured data is visualized in a user-friendly web interface for analysis, debugging, and evaluation.\\n\\n### Who Uses Langfuse?\\n\\n* **LLM Developers:** For debugging, testing, and improving their LLM-powered applications.\\n* **ML Engineers:** To monitor the performance and reliability of LLMs in production.\\n* **Product Managers:** To understand user experience and the impact of LLM changes.\\n* **Anyone building and deploying Generative AI applications.**\\n\\nIn essence, Langfuse provides the necessary tools for developers to bring LLM applications from prototype to production with confidence, ensuring they are observable, debuggable, and continuously improving.","openinference.span.kind":"LLM"},"resourceAttributes":{"telemetry.sdk.language":"python","telemetry.sdk.name":"opentelemetry","telemetry.sdk.version":"1.34.1","service.name":"unknown_service"},"scope":{"name":"openinference.instrumentation.vertexai","version":"0.1.11","attributes":{}}}',+ },+ expected: {+ messages: [+ {+ role: "user",+ parts: [+ {+ type: "text",+ text: "What is Langfuse?",+ },+ ],+ source: "input",+ },+ {+ role: "assistant",+ parts: [+ {+ type: "text",+ text: '**Langfuse** is an **open-source observability and evaluation platform specifically designed for Large Language Model (LLM) applications.**\n\nThink of it as an Application Performance Management (APM) tool, but tailored to the unique challenges of building and running applications powered by LLMs, such as chatbots, summarizers, code generators, and more.\n\n### Why Langfuse Exists (The Problem It Solves)\n\nDeveloping with LLMs introduces new complexities:\n\n1. **Non-Determinism:** LLM outputs can vary even with the same input, making debugging difficult.\n2. **Opacity:** It\'s hard to see *why* an LLM responded a certain way, especially with complex prompt chains or tool usage.\n3. **Cost & Latency:** LLM API calls can be expensive and slow, requiring careful monitoring.\n4. **Quality Evaluation:** Subjective and difficult to measure if an LLM is truly "good" or "helpful" for specific tasks.\n5. **Iteration Speed:** Testing prompt changes, different models, or retrieval-augmented generation (RAG) strategies requires robust tooling.\n6. **User Feedback:** Connecting user-reported issues or satisfaction back to specific LLM interactions.\n\n### What Langfuse Does (Key Features)\n\nLangfuse helps address these problems by providing:\n\n1. **Tracing & Debugging:**\n * **End-to-end visibility:** It captures every step of an LLM call or a chain of LLM calls (e.g., initial user query, prompt engineering, internal thoughts of the LLM, tool calls, final response).\n * **Detailed data:** Records prompts, responses, models used, tokens consumed, latency, cost, errors, and custom metadata.\n * **Visual timelines:** Allows developers to inspect the flow of an interaction, pinpointing where issues occurred.\n\n2. **Evaluation & Feedback:**\n * **Manual Annotations:** Allows human reviewers to rate the quality of LLM outputs directly within the platform.\n * **Automated Evaluations:** Integrates with evaluation frameworks to run automated checks (e.g., factual consistency, toxicity, helpfulness).\n * **Feedback Integration:** Connects user feedback (e.g., thumbs up/down, specific comments) directly to the trace of the interaction.\n\n3. **Monitoring & Analytics:**\n * **Dashboards:** Provides metrics on key performance indicators like latency, cost, token usage, error rates, and throughput.\n * **Trend Analysis:** Helps identify regressions or improvements over time.\n * **Experimentation:** Facilitates A/B testing of different prompts, models, or configurations by comparing their performance metrics and evaluations.\n\n4. **Prompt Management:** While not a dedicated prompt engineering tool, its tracing capabilities allow you to see how different prompts perform in production and iterate on them effectively.\n\n### How It Works\n\n* **SDKs:** You integrate Langfuse into your application code using their SDKs (e.g., Python, JavaScript).\n* **Data Capture:** The SDKs automatically capture relevant data about your LLM calls and send it to the Langfuse backend.\n* **Backend:** Langfuse provides a hosted cloud service, or you can self-host their open-source backend (which uses PostgreSQL and ClickHouse).\n* **Web UI:** All the captured data is visualized in a user-friendly web interface for analysis, debugging, and evaluation.\n\n### Who Uses Langfuse?\n\n* **LLM Developers:** For debugging, testing, and improving their LLM-powered applications.\n* **ML Engineers:** To monitor the performance and reliability of LLMs in production.\n* **Product Managers:** To understand user experience and the impact of LLM changes.\n* **Anyone building and deploying Generative AI applications.**\n\nIn essence, Langfuse provides the necessary tools for developers to bring LLM applications from prototype to production with confidence, ensuring they are observable, debuggable, and continuously improving.',+ },+ ],+ source: "output",+ },+ ],+ toolDefinitions: [],+ },+ },+];diff --git a/packages/shared/src/utils/normalized-io/conventions/providers/gemini/gemini.test.ts b/packages/shared/src/utils/normalized-io/conventions/providers/gemini/gemini.test.tsindex cbe0019a35..e6c77fca87 100644--- a/packages/shared/src/utils/normalized-io/conventions/providers/gemini/gemini.test.ts+++ b/packages/shared/src/utils/normalized-io/conventions/providers/gemini/gemini.test.ts@@ -2,6 +2,8 @@ import { describe, expect, it } from "vitest";import { normalizeSpanIO } from "../../../parser";import {+ capturedTraceFixtures,+ documentedFunctionRoundTripFixtures,geminiEmbeddedToolDefinitionFixture,geminiMediaAndCodeExecutionFixture,geminiSystemInstructionWithGenericMessagesFixture,@@ -9,6 +11,8 @@ import {describe("Gemini normalized I/O", () => {it.each([+ ...capturedTraceFixtures,+ ...documentedFunctionRoundTripFixtures,geminiEmbeddedToolDefinitionFixture,geminiSystemInstructionWithGenericMessagesFixture,geminiMediaAndCodeExecutionFixture,diff --git a/packages/shared/src/utils/normalized-io/conventions/providers/gemini/index.ts b/packages/shared/src/utils/normalized-io/conventions/providers/gemini/index.tsindex e7f3ca21ce..db3abbb3fe 100644--- a/packages/shared/src/utils/normalized-io/conventions/providers/gemini/index.ts+++ b/packages/shared/src/utils/normalized-io/conventions/providers/gemini/index.ts@@ -212,7 +212,10 @@ function geminiSystemMessage(const config = asRecord(root.config);const systemInstruction =- config?.system_instruction ?? config?.systemInstruction;+ root.systemInstruction ??+ root.system_instruction ??+ config?.system_instruction ??+ config?.systemInstruction;if (!systemInstruction) return undefined;return {diff --git a/packages/shared/src/utils/normalized-io/conventions/providers/langchain/fixtures.ts b/packages/shared/src/utils/normalized-io/conventions/providers/langchain/fixtures.tsindex 36c8521f2e..e8396107b8 100644--- a/packages/shared/src/utils/normalized-io/conventions/providers/langchain/fixtures.ts+++ b/packages/shared/src/utils/normalized-io/conventions/providers/langchain/fixtures.ts@@ -680,3 +680,139 @@ export const langgraphProductionShapeFixture = {toolDefinitions: [],},} satisfies NormalizedIOFixture;++// Verbatim stored observation IO from ChatML integration-example exports.+export const capturedTraceFixtures: NormalizedIOFixture[] = [+ // Source: worker/src/__tests__/chatml/framework-traces/langgraph-js-2025-10-30.trace.json; observation 0856a1825ccee968+ // Host and user identifiers in metadata resourceAttributes replaced with+ // placeholders; input and output are unmodified.+ {+ name: "verbatim langgraph-js-2025-10-30.trace.json / 0856a1825ccee968",+ spanIO: {+ input:+ '[{"content":"What\'s the weather in San Francisco?","role":"user"},{"content":"","role":"assistant","tool_calls":[{"id":"call_VEZJgIQLgzcb80IIyQJm7JCi","type":"function","function":{"name":"get_weather","arguments":"{\\"city\\":\\"San Francisco\\"}"}}]},{"content":"It\'s always sunny in San Francisco!","additional_kwargs":{},"role":"get_weather"}]',+ output:+ '{"content":"It\'s always sunny in San Francisco! \\n\\nWould you like more details (current temperature, hourly forecast, or a multi-day outlook)?","role":"assistant"}',+ metadata:+ '{"tags":["seq:step:2"],"langgraph_step":3,"langgraph_node":"model_request","langgraph_triggers":["branch:to:model_request"],"langgraph_path":["__pregel_pull","model_request"],"langgraph_checkpoint_ns":"model_request:3d72c0f6-1849-5286-bc3f-b198da3bc9cb|model_request:c51cebc4-7aca-5acb-951c-245ef0a1809c","__pregel_task_id":"3d72c0f6-1849-5286-bc3f-b198da3bc9cb","checkpoint_ns":"model_request:3d72c0f6-1849-5286-bc3f-b198da3bc9cb","ls_provider":"openai","ls_model_name":"gpt-5-mini","ls_model_type":"chat","resourceAttributes":{"host.name":"dev-machine.local","host.arch":"arm64","host.id":"00000000-0000-0000-0000-000000000000","process.pid":97650,"process.executable.name":"deno","process.executable.path":"/opt/homebrew/bin/deno","process.command_args":["/opt/homebrew/bin/deno","/Users/dev/Documents/GitHub/playground/js/$deno$jupyter.mts"],"process.runtime.version":"20.11.1","process.runtime.name":"nodejs","process.runtime.description":"Node.js","process.command":"/Users/dev/Documents/GitHub/playground/js/$deno$jupyter.mts","process.owner":"dev","service.name":"unknown_service:/opt/homebrew/bin/deno","telemetry.sdk.language":"nodejs","telemetry.sdk.name":"opentelemetry","telemetry.sdk.version":"2.1.0"},"scope":{"name":"langfuse-sdk","version":"4.3.0","attributes":{}}}',+ },+ expected: {+ messages: [+ {+ role: "user",+ parts: [+ {+ type: "text",+ text: "What's the weather in San Francisco?",+ },+ ],+ source: "input",+ },+ {+ role: "assistant",+ parts: [+ {+ type: "tool-call",+ toolCallId: "call_VEZJgIQLgzcb80IIyQJm7JCi",+ toolName: "get_weather",+ input: {+ city: "San Francisco",+ },+ toolType: "function",+ },+ ],+ source: "input",+ },+ {+ senderName: "get_weather",+ role: "user",+ parts: [+ {+ type: "text",+ text: "It's always sunny in San Francisco!",+ },+ ],+ source: "input",+ },+ {+ role: "assistant",+ parts: [+ {+ type: "text",+ text: "It's always sunny in San Francisco! \n\nWould you like more details (current temperature, hourly forecast, or a multi-day outlook)?",+ },+ ],+ source: "output",+ },+ ],+ toolDefinitions: [],+ },+ },+ // Source: worker/src/__tests__/chatml/framework-traces/langgraph-python-2025-08-22.trace.json; observation 4f6535aaebcda355+ {+ name: "verbatim langgraph-python-2025-08-22.trace.json / 4f6535aaebcda355",+ spanIO: {+ input:+ '[{"role": "user", "content": "Be helpful!"}, {"role": "user", "content": "Search the web for \'example\' and summarize."}, {"role": "tool", "content": {"type": "function", "function": {"name": "Web-Search", "description": "Dummy web search tool.", "parameters": {"properties": {"query": {"type": "string"}}, "required": ["query"], "type": "object"}}}}]',+ output:+ '{"role": "assistant", "content": "", "additional_kwargs": {"tool_calls": [{"id": "call_1oGK863sxQHlPreFhDdEs3yl", "function": {"arguments": "{\\"query\\":\\"example\\"}", "name": "Web-Search"}, "type": "function"}], "refusal": null}}',+ metadata:+ '{"tags":["seq:step:1","demo","langfuse","langgraph"],"thread_id":"demo-thread-1","langgraph_step":1,"langgraph_node":"agent","langgraph_triggers":["branch:to:agent"],"langgraph_path":["__pregel_pull","agent"],"langgraph_checkpoint_ns":"agent:d507d231-6dad-b926-076f-0644c0a0134e","checkpoint_ns":"agent:d507d231-6dad-b926-076f-0644c0a0134e","ls_provider":"openai","ls_model_name":"gpt-4o","ls_model_type":"chat","ls_temperature":0,"resourceAttributes":{"telemetry.sdk.language":"python","telemetry.sdk.name":"opentelemetry","telemetry.sdk.version":"1.36.0","service.name":"unknown_service"},"scope":{"name":"langfuse-sdk","version":"3.3.0","attributes":{"public_key":"KJGLKJGLJG"}}}',+ },+ expected: {+ messages: [+ {+ role: "user",+ parts: [+ {+ type: "text",+ text: "Be helpful!",+ },+ ],+ source: "input",+ },+ {+ role: "user",+ parts: [+ {+ type: "text",+ text: "Search the web for 'example' and summarize.",+ },+ ],+ source: "input",+ },+ {+ role: "assistant",+ parts: [+ {+ type: "tool-call",+ toolCallId: "call_1oGK863sxQHlPreFhDdEs3yl",+ toolName: "Web-Search",+ input: {+ query: "example",+ },+ toolType: "function",+ },+ ],+ source: "output",+ },+ ],+ toolDefinitions: [+ {+ name: "Web-Search",+ description: "Dummy web search tool.",+ inputSchema: {+ properties: {+ query: {+ type: "string",+ },+ },+ required: ["query"],+ type: "object",+ },+ type: "function",+ },+ ],+ },+ },+];diff --git a/packages/shared/src/utils/normalized-io/conventions/providers/langchain/langchain.test.ts b/packages/shared/src/utils/normalized-io/conventions/providers/langchain/langchain.test.tsindex a34a59031f..073de15bf1 100644--- a/packages/shared/src/utils/normalized-io/conventions/providers/langchain/langchain.test.ts+++ b/packages/shared/src/utils/normalized-io/conventions/providers/langchain/langchain.test.ts@@ -2,6 +2,7 @@ import { describe, expect, it } from "vitest";import { normalizeSpanIO } from "../../../parser";import {+ capturedTraceFixtures,langchainBatchedMessagesFixture,langchainDictToolMessageFixture,langchainMultiBatchMessagesFixture,@@ -11,6 +12,7 @@ import {describe("LangChain normalized I/O", () => {it.each([+ ...capturedTraceFixtures,langchainBatchedMessagesFixture,langchainMultiBatchMessagesFixture,langchainDictToolMessageFixture,diff --git a/packages/shared/src/utils/normalized-io/conventions/providers/mixed/fixtures/index.ts b/packages/shared/src/utils/normalized-io/conventions/providers/mixed/fixtures/index.tsindex 054d101f0a..78113d0c65 100644--- a/packages/shared/src/utils/normalized-io/conventions/providers/mixed/fixtures/index.ts+++ b/packages/shared/src/utils/normalized-io/conventions/providers/mixed/fixtures/index.ts@@ -1,9 +1,281 @@+import type { NormalizedIOFixture } from "../../fixture-types";import { looseProviderMessageShapesFixture } from "./loose-provider-message-shapes";import { outputOnlyPlainTextFixture } from "./output-only-plain-text";import { outputOnlyStructuredMessageFixture } from "./output-only-structured-message";import { rawPassthroughToolCallsFixture } from "./raw-passthrough-tool-calls";+// Verbatim stored observation IO from ChatML integration-example exports.+const capturedTraceFixtures: NormalizedIOFixture[] = [+ // Source: worker/src/__tests__/chatml/framework-traces/autogen-2025-06-06.trace.json; observation 83517f9062f5ada4+ {+ name: "verbatim autogen-2025-06-06.trace.json / 83517f9062f5ada4",+ spanIO: {+ input:+ "system: You are a helpful AI assistant. Solve tasks using your tools. Reply with TERMINATE when the task has been completed.\nuser: Say 'Hello World!'",+ output: "Hello World!",+ metadata:+ '{"resourceAttributes":{"telemetry.sdk.language":"python","telemetry.sdk.name":"opentelemetry","telemetry.sdk.version":"1.33.1","service.name":"unknown_service"},"scope":{"name":"langfuse-sdk","version":"3.0.0","attributes":{"public_key":"pk-lf-5855d85e-3943-497e-bd10-f50ad414bccc"}}}',+ },+ expected: {+ messages: [+ {+ role: "user",+ parts: [+ {+ type: "text",+ text: "system: You are a helpful AI assistant. Solve tasks using your tools. Reply with TERMINATE when the task has been completed.\nuser: Say 'Hello World!'",+ },+ ],+ source: "input",+ },+ {+ role: "assistant",+ parts: [+ {+ type: "text",+ text: "Hello World!",+ },+ ],+ source: "output",+ },+ ],+ toolDefinitions: [],+ },+ },+ // Source: worker/src/__tests__/chatml/framework-traces/beeai-2025-08-01.trace.json; observation 52df0f7f9dad6b23+ {+ name: "verbatim beeai-2025-08-01.trace.json / 52df0f7f9dad6b23",+ spanIO: {+ input:+ '[{"role": "system", "content": "# Available functions\\nYou can only use the following functions. Always use all required parameters.\\n\\nFunction Name: Wikipedia\\nDescription: Search factual and historical information, including biography, history, politics, geography, society, culture, science, technology, people, animal species, mathematics, and other subjects.\\nInput Schema: {\\"properties\\": {\\"full_text\\": {\\"default\\": false, \\"description\\": \\"If set to true, it will return the full text of the page instead of its short summary.\\", \\"title\\": \\"Full Text\\", \\"type\\": \\"boolean\\"}, \\"query\\": {\\"description\\": \\"Name of the Wikipedia page.\\", \\"title\\": \\"Query\\", \\"type\\": \\"string\\"}}, \\"required\\": [\\"query\\"], \\"title\\": \\"WikipediaToolInput\\", \\"type\\": \\"object\\"}\\n\\nFunction Name: OpenMeteoTool\\nDescription: Retrieve current, past, or future weather forecasts for a location.\\nInput Schema: {\\"properties\\": {\\"country\\": {\\"anyOf\\": [{\\"type\\": \\"string\\"}, {\\"type\\": \\"null\\"}], \\"default\\": null, \\"description\\": \\"Country name.\\", \\"title\\": \\"Country\\"}, \\"end_date\\": {\\"anyOf\\": [{\\"format\\": \\"date\\", \\"type\\": \\"string\\"}, {\\"type\\": \\"null\\"}], \\"default\\": null, \\"description\\": \\"End date for the weather forecast in the format YYYY-MM-DD (UTC)\\", \\"title\\": \\"End Date\\"}, \\"location_name\\": {\\"description\\": \\"The name of the location to retrieve weather information.\\", \\"title\\": \\"Location Name\\", \\"type\\": \\"string\\"}, \\"start_date\\": {\\"anyOf\\": [{\\"format\\": \\"date\\", \\"type\\": \\"string\\"}, {\\"type\\": \\"null\\"}], \\"default\\": null, \\"description\\": \\"Start date for the weather forecast in the format YYYY-MM-DD (UTC)\\", \\"title\\": \\"Start Date\\"}, \\"temperature_unit\\": {\\"default\\": \\"celsius\\", \\"description\\": \\"The unit to express temperature\\", \\"enum\\": [\\"celsius\\", \\"fahrenheit\\"], \\"title\\": \\"Temperature Unit\\", \\"type\\": \\"string\\"}}, \\"required\\": [\\"location_name\\"], \\"title\\": \\"OpenMeteoToolInput\\", \\"type\\": \\"object\\"}\\n\\n# Communication structure\\nYou communicate only in instruction lines. The format is: \\"Instruction: expected output\\". You must only use these instruction lines and must not enter empty lines or anything else between instruction lines.\\nYou must skip the instruction lines Function Name, Function Input and Function Output if no function calling is required.\\n\\nMessage: User\'s message. You never use this instruction line.\\nThought: A single-line step-by-step plan of how to answer the user\'s message. You can use the available functions defined above. This instruction line must be immediately followed by Function Name if one of the available functions defined above needs to be called, or by Final Answer. Do not provide the answer here.\\nFunction Name: Name of the function. This instruction line must be immediately followed by Function Input.\\nFunction Input: Function parameters in JSON format adhering to the function\'s input specification ie. {\\"arg1\\":\\"value1\\", \\"arg2\\":\\"value2\\"}. Empty object is a valid parameter.\\nFunction Output: Output of the function in JSON format.\\nThought: Continue your thinking process.\\nFinal Answer: Answer the user or ask for more information or clarification. It must always be preceded by Thought.\\n\\n## Examples\\nMessage: Can you translate \\"How are you\\" into French?\\nThought: The user wants to translate a text into French. I can do that.\\nFinal Answer: Comment vas-tu?\\n\\n# Instructions\\nUser can only see the Final Answer, all answers must be provided there.\\nYou must always use the communication structure and instructions defined above. Do not forget that Thought must be a single-line immediately followed by either Function Name or Final Answer.\\nFunctions must be used to retrieve factual or historical information to answer the message.\\nIf the user suggests using a function that is not available, answer that the function is not available. You can suggest alternatives if appropriate.\\nWhen the message is unclear or you need more information from the user, ask in Final Answer.\\n\\n# Your capabilities\\nPrefer to use these capabilities over functions.\\n- You understand these languages: English, Spanish, French.\\n- You can translate and summarize, even long documents.\\n\\n# Notes\\n- If you don\'t know the answer, say that you don\'t know.\\n- The current time and date in ISO format might be found in the last message.\\n- When answering the user, use friendly formats for time and date.\\n- Use markdown syntax for formatting code snippets, links, JSON, tables, images, files.\\n- Sometimes, things don\'t go as planned. Functions may not provide useful information on the first few tries. You should always try a few different approaches before declaring the problem unsolvable.\\n- When the function doesn\'t give you what you were asking for, you must either use another function or a different function input.\\n - When using search engines, you try different formulations of the query, possibly even in a different language.\\n- You cannot do complex calculations, computations, or data manipulations without using functions.\\n"}, {"role": "user", "content": [{"type": "text", "text": "Message: I\'m planning a trip to Barcelona, Spain. Can you research key attractions and landmarks I should visit, and also tell me what the current weather conditions are like there?\\n\\nThis message was created at 2025-08-01T13:56:54+00:00"}]}, {"role": "assistant", "content": [{"type": "text", "text": "Thought: I will first research key attractions and landmarks in Barcelona and then check the current weather conditions there. \\nFunction Name: Wikipedia\\nFunction Input: {\\"query\\": \\"Tourism in Barcelona\\"}\\nFunction Output: [{\\"description\\": \\"Barcelona ( BAR-s\\u0259-LOH-n\\u0259; Catalan: [b\\u0259\\u027es\\u0259\\u02c8lon\\u0259] ; Spanish: [ba\\u027e\\u03b8e\\u02c8lona] ) is a city on the northeastern coast of Spain. It is the capital and largest city of the autonomous community of Catalonia, as well as the second-most populous municipality of Spain. With a population of 1.6 million within city limits, its urban area extends to numerous neighbouring municipalities within the province of Barcelona and is home to around 5.3 million people, making it the fifth most populous urban area of the European Union after Paris, the Ruhr area, Madrid and Milan. It is one of the largest metropolises on the Mediterranean Sea, located on the coast between the mouths of the rivers Llobregat and Bes\\u00f2s, bounded to the west by the Serra de Collserola mountain range.\\\\nAccording to tradition, Barcelona was founded by either the Phoenicians or the Carthaginians, who had trading posts along the Catalonian coast. In the Middle Ages, Barcelona became the capital of the County of Barcelona. After joining with the Kingdom of Aragon to form the composite monarchy of the Crown of Aragon, Barcelona, which continued to be the capital of the Principality of Catalonia, became the most important city in the Crown of Aragon and its main economic and administrative centre, only to be overtaken by Valencia, wrested from Moorish control by the Catalans, shortly before the dynastic union between the Crown of Castile and the Crown of Aragon in 1516. Barcelona became the centre of Catalan separatism, briefly becoming part of France during the 17th century Reapers\' War and again in 1812 until 1814 under Napoleon. Experiencing industrialization and several workers movements during the 19th and early 20th century, it became the capital of autonomous Catalonia in 1931 and it was the epicenter of the revolution experienced by Catalonia during the Spanish Revolution of 1936, until its capture by the fascists in 1939. After the Spanish transition to democracy in the 1970s, Barcelona once again became the capital of an autonomous Catalonia.\\\\nBarcelona has a rich cultural heritage and is today an important cultural centre and a major tourist destination. Particularly renowned are the architectural works of Antoni Gaud\\u00ed and Llu\\u00eds Dom\\u00e8nech i Montaner, which have been designated UNESCO World Heritage Sites. The city is home to two of the most prestigious universities in Spain: the University of Barcelona and Pompeu Fabra University. The headquarters of the Union for the Mediterranean are located in Barcelona. The city is known for hosting the 1992 Summer Olympics as well as world-class conferences and expositions. In addition, many international sport tournaments have been played here.\\\\nBarcelona is a major cultural, economic, and financial centre in southwestern Europe, as well as the main biotech hub in Spain. As a leading world city, Barcelona\'s influence in global socio-economic affairs qualifies it for global city status (Beta +).\\\\nBarcelona is a transport hub, with the Port of Barcelona being one of Europe\'s principal seaports and busiest European passenger port, an international airport, Barcelona\\u2013El Prat Airport, which handles over 50-million passengers per year, an extensive motorway network, and a high-speed rail line with a link to France and the rest of Europe.\\", \\"title\\": \\"Barcelona\\", \\"url\\": \\"https://en.wikipedia.org/wiki/Barcelona\\"}]\\n"}]}]',+ output: null,+ metadata:+ '{"attributes":{"target":"backend.openai.chat.start","name":"start","traceId":"0cff2691-3a45-4988-a243-8cb8c508aa25","input.mime_type":"application/json","input.value":"[{\\"role\\": \\"system\\", \\"content\\": \\"# Available functions\\\\nYou can only use the following functions. Always use all required parameters.\\\\n\\\\nFunction Name: Wikipedia\\\\nDescription: Search factual and historical information, including biography, history, politics, geography, society, culture, science, technology, people, animal species, mathematics, and other subjects.\\\\nInput Schema: {\\\\\\"properties\\\\\\": {\\\\\\"full_text\\\\\\": {\\\\\\"default\\\\\\": false, \\\\\\"description\\\\\\": \\\\\\"If set to true, it will return the full text of the page instead of its short summary.\\\\\\", \\\\\\"title\\\\\\": \\\\\\"Full Text\\\\\\", \\\\\\"type\\\\\\": \\\\\\"boolean\\\\\\"}, \\\\\\"query\\\\\\": {\\\\\\"description\\\\\\": \\\\\\"Name of the Wikipedia page.\\\\\\", \\\\\\"title\\\\\\": \\\\\\"Query\\\\\\", \\\\\\"type\\\\\\": \\\\\\"string\\\\\\"}}, \\\\\\"required\\\\\\": [\\\\\\"query\\\\\\"], \\\\\\"title\\\\\\": \\\\\\"WikipediaToolInput\\\\\\", \\\\\\"type\\\\\\": \\\\\\"object\\\\\\"}\\\\n\\\\nFunction Name: OpenMeteoTool\\\\nDescription: Retrieve current, past, or future weather forecasts for a location.\\\\nInput Schema: {\\\\\\"properties\\\\\\": {\\\\\\"country\\\\\\": {\\\\\\"anyOf\\\\\\": [{\\\\\\"type\\\\\\": \\\\\\"string\\\\\\"}, {\\\\\\"type\\\\\\": \\\\\\"null\\\\\\"}], \\\\\\"default\\\\\\": null, \\\\\\"description\\\\\\": \\\\\\"Country name.\\\\\\", \\\\\\"title\\\\\\": \\\\\\"Country\\\\\\"}, \\\\\\"end_date\\\\\\": {\\\\\\"anyOf\\\\\\": [{\\\\\\"format\\\\\\": \\\\\\"date\\\\\\", \\\\\\"type\\\\\\": \\\\\\"string\\\\\\"}, {\\\\\\"type\\\\\\": \\\\\\"null\\\\\\"}], \\\\\\"default\\\\\\": null, \\\\\\"description\\\\\\": \\\\\\"End date for the weather forecast in the format YYYY-MM-DD (UTC)\\\\\\", \\\\\\"title\\\\\\": \\\\\\"End Date\\\\\\"}, \\\\\\"location_name\\\\\\": {\\\\\\"description\\\\\\": \\\\\\"The name of the location to retrieve weather information.\\\\\\", \\\\\\"title\\\\\\": \\\\\\"Location Name\\\\\\", \\\\\\"type\\\\\\": \\\\\\"string\\\\\\"}, \\\\\\"start_date\\\\\\": {\\\\\\"anyOf\\\\\\": [{\\\\\\"format\\\\\\": \\\\\\"date\\\\\\", \\\\\\"type\\\\\\": \\\\\\"string\\\\\\"}, {\\\\\\"type\\\\\\": \\\\\\"null\\\\\\"}], \\\\\\"default\\\\\\": null, \\\\\\"description\\\\\\": \\\\\\"Start date for the weather forecast in the format YYYY-MM-DD (UTC)\\\\\\", \\\\\\"title\\\\\\": \\\\\\"Start Date\\\\\\"}, \\\\\\"temperature_unit\\\\\\": {\\\\\\"default\\\\\\": \\\\\\"celsius\\\\\\", \\\\\\"description\\\\\\": \\\\\\"The unit to express temperature\\\\\\", \\\\\\"enum\\\\\\": [\\\\\\"celsius\\\\\\", \\\\\\"fahrenheit\\\\\\"], \\\\\\"title\\\\\\": \\\\\\"Temperature Unit\\\\\\", \\\\\\"type\\\\\\": \\\\\\"string\\\\\\"}}, \\\\\\"required\\\\\\": [\\\\\\"location_name\\\\\\"], \\\\\\"title\\\\\\": \\\\\\"OpenMeteoToolInput\\\\\\", \\\\\\"type\\\\\\": \\\\\\"object\\\\\\"}\\\\n\\\\n# Communication structure\\\\nYou communicate only in instruction lines. The format is: \\\\\\"Instruction: expected output\\\\\\". You must only use these instruction lines and must not enter empty lines or anything else between instruction lines.\\\\nYou must skip the instruction lines Function Name, Function Input and Function Output if no function calling is required.\\\\n\\\\nMessage: User\'s message. You never use this instruction line.\\\\nThought: A single-line step-by-step plan of how to answer the user\'s message. You can use the available functions defined above. This instruction line must be immediately followed by Function Name if one of the available functions defined above needs to be called, or by Final Answer. Do not provide the answer here.\\\\nFunction Name: Name of the function. This instruction line must be immediately followed by Function Input.\\\\nFunction Input: Function parameters in JSON format adhering to the function\'s input specification ie. {\\\\\\"arg1\\\\\\":\\\\\\"value1\\\\\\", \\\\\\"arg2\\\\\\":\\\\\\"value2\\\\\\"}. Empty object is a valid parameter.\\\\nFunction Output: Output of the function in JSON format.\\\\nThought: Continue your thinking process.\\\\nFinal Answer: Answer the user or ask for more information or clarification. It must always be preceded by Thought.\\\\n\\\\n## Examples\\\\nMessage: Can you translate \\\\\\"How are you\\\\\\" into French?\\\\nThought: The user wants to translate a text into French. I can do that.\\\\nFinal Answer: Comment vas-tu?\\\\n\\\\n# Instructions\\\\nUser can only see the Final Answer, all answers must be provided there.\\\\nYou must always use the communication structure and instructions defined above. Do not forget that Thought must be a single-line immediately followed by either Function Name or Final Answer.\\\\nFunctions must be used to retrieve factual or historical information to answer the message.\\\\nIf the user suggests using a function that is not available, answer that the function is not available. You can suggest alternatives if appropriate.\\\\nWhen the message is unclear or you need more information from the user, ask in Final Answer.\\\\n\\\\n# Your capabilities\\\\nPrefer to use these capabilities over functions.\\\\n- You understand these languages: English, Spanish, French.\\\\n- You can translate and summarize, even long documents.\\\\n\\\\n# Notes\\\\n- If you don\'t know the answer, say that you don\'t know.\\\\n- The current time and date in ISO format might be found in the last message.\\\\n- When answering the user, use friendly formats for time and date.\\\\n- Use markdown syntax for formatting code snippets, links, JSON, tables, images, files.\\\\n- Sometimes, things don\'t go as planned. Functions may not provide useful information on the first few tries. You should always try a few different approaches before declaring the problem unsolvable.\\\\n- When the function doesn\'t give you what you were asking for, you must either use another function or a different function input.\\\\n - When using search engines, you try different formulations of the query, possibly even in a different language.\\\\n- You cannot do complex calculations, computations, or data manipulations without using functions.\\\\n\\"}, {\\"role\\": \\"user\\", \\"content\\": [{\\"type\\": \\"text\\", \\"text\\": \\"Message: I\'m planning a trip to Barcelona, Spain. Can you research key attractions and landmarks I should visit, and also tell me what the current weather conditions are like there?\\\\n\\\\nThis message was created at 2025-08-01T13:56:54+00:00\\"}]}, {\\"role\\": \\"assistant\\", \\"content\\": [{\\"type\\": \\"text\\", \\"text\\": \\"Thought: I will first research key attractions and landmarks in Barcelona and then check the current weather conditions there. \\\\nFunction Name: Wikipedia\\\\nFunction Input: {\\\\\\"query\\\\\\": \\\\\\"Tourism in Barcelona\\\\\\"}\\\\nFunction Output: [{\\\\\\"description\\\\\\": \\\\\\"Barcelona ( BAR-s\\\\u0259-LOH-n\\\\u0259; Catalan: [b\\\\u0259\\\\u027es\\\\u0259\\\\u02c8lon\\\\u0259] ; Spanish: [ba\\\\u027e\\\\u03b8e\\\\u02c8lona] ) is a city on the northeastern coast of Spain. It is the capital and largest city of the autonomous community of Catalonia, as well as the second-most populous municipality of Spain. With a population of 1.6 million within city limits, its urban area extends to numerous neighbouring municipalities within the province of Barcelona and is home to around 5.3 million people, making it the fifth most populous urban area of the European Union after Paris, the Ruhr area, Madrid and Milan. It is one of the largest metropolises on the Mediterranean Sea, located on the coast between the mouths of the rivers Llobregat and Bes\\\\u00f2s, bounded to the west by the Serra de Collserola mountain range.\\\\\\\\nAccording to tradition, Barcelona was founded by either the Phoenicians or the Carthaginians, who had trading posts along the Catalonian coast. In the Middle Ages, Barcelona became the capital of the County of Barcelona. After joining with the Kingdom of Aragon to form the composite monarchy of the Crown of Aragon, Barcelona, which continued to be the capital of the Principality of Catalonia, became the most important city in the Crown of Aragon and its main economic and administrative centre, only to be overtaken by Valencia, wrested from Moorish control by the Catalans, shortly before the dynastic union between the Crown of Castile and the Crown of Aragon in 1516. Barcelona became the centre of Catalan separatism, briefly becoming part of France during the 17th century Reapers\' War and again in 1812 until 1814 under Napoleon. Experiencing industrialization and several workers movements during the 19th and early 20th century, it became the capital of autonomous Catalonia in 1931 and it was the epicenter of the revolution experienced by Catalonia during the Spanish Revolution of 1936, until its capture by the fascists in 1939. After the Spanish transition to democracy in the 1970s, Barcelona once again became the capital of an autonomous Catalonia.\\\\\\\\nBarcelona has a rich cultural heritage and is today an important cultural centre and a major tourist destination. Particularly renowned are the architectural works of Antoni Gaud\\\\u00ed and Llu\\\\u00eds Dom\\\\u00e8nech i Montaner, which have been designated UNESCO World Heritage Sites. The city is home to two of the most prestigious universities in Spain: the University of Barcelona and Pompeu Fabra University. The headquarters of the Union for the Mediterranean are located in Barcelona. The city is known for hosting the 1992 Summer Olympics as well as world-class conferences and expositions. In addition, many international sport tournaments have been played here.\\\\\\\\nBarcelona is a major cultural, economic, and financial centre in southwestern Europe, as well as the main biotech hub in Spain. As a leading world city, Barcelona\'s influence in global socio-economic affairs qualifies it for global city status (Beta +).\\\\\\\\nBarcelona is a transport hub, with the Port of Barcelona being one of Europe\'s principal seaports and busiest European passenger port, an international airport, Barcelona\\\\u2013El Prat Airport, which handles over 50-million passengers per year, an extensive motorway network, and a high-speed rail line with a link to France and the rest of Europe.\\\\\\", \\\\\\"title\\\\\\": \\\\\\"Barcelona\\\\\\", \\\\\\"url\\\\\\": \\\\\\"https://en.wikipedia.org/wiki/Barcelona\\\\\\"}]\\\\n\\"}]}]","llm.input_messages.0.message.role":"system","llm.input_messages.0.message.content":"# Available functions\\nYou can only use the following functions. Always use all required parameters.\\n\\nFunction Name: Wikipedia\\nDescription: Search factual and historical information, including biography, history, politics, geography, society, culture, science, technology, people, animal species, mathematics, and other subjects.\\nInput Schema: {\\"properties\\": {\\"full_text\\": {\\"default\\": false, \\"description\\": \\"If set to true, it will return the full text of the page instead of its short summary.\\", \\"title\\": \\"Full Text\\", \\"type\\": \\"boolean\\"}, \\"query\\": {\\"description\\": \\"Name of the Wikipedia page.\\", \\"title\\": \\"Query\\", \\"type\\": \\"string\\"}}, \\"required\\": [\\"query\\"], \\"title\\": \\"WikipediaToolInput\\", \\"type\\": \\"object\\"}\\n\\nFunction Name: OpenMeteoTool\\nDescription: Retrieve current, past, or future weather forecasts for a location.\\nInput Schema: {\\"properties\\": {\\"country\\": {\\"anyOf\\": [{\\"type\\": \\"string\\"}, {\\"type\\": \\"null\\"}], \\"default\\": null, \\"description\\": \\"Country name.\\", \\"title\\": \\"Country\\"}, \\"end_date\\": {\\"anyOf\\": [{\\"format\\": \\"date\\", \\"type\\": \\"string\\"}, {\\"type\\": \\"null\\"}], \\"default\\": null, \\"description\\": \\"End date for the weather forecast in the format YYYY-MM-DD (UTC)\\", \\"title\\": \\"End Date\\"}, \\"location_name\\": {\\"description\\": \\"The name of the location to retrieve weather information.\\", \\"title\\": \\"Location Name\\", \\"type\\": \\"string\\"}, \\"start_date\\": {\\"anyOf\\": [{\\"format\\": \\"date\\", \\"type\\": \\"string\\"}, {\\"type\\": \\"null\\"}], \\"default\\": null, \\"description\\": \\"Start date for the weather forecast in the format YYYY-MM-DD (UTC)\\", \\"title\\": \\"Start Date\\"}, \\"temperature_unit\\": {\\"default\\": \\"celsius\\", \\"description\\": \\"The unit to express temperature\\", \\"enum\\": [\\"celsius\\", \\"fahrenheit\\"], \\"title\\": \\"Temperature Unit\\", \\"type\\": \\"string\\"}}, \\"required\\": [\\"location_name\\"], \\"title\\": \\"OpenMeteoToolInput\\", \\"type\\": \\"object\\"}\\n\\n# Communication structure\\nYou communicate only in instruction lines. The format is: \\"Instruction: expected output\\". You must only use these instruction lines and must not enter empty lines or anything else between instruction lines.\\nYou must skip the instruction lines Function Name, Function Input and Function Output if no function calling is required.\\n\\nMessage: User\'s message. You never use this instruction line.\\nThought: A single-line step-by-step plan of how to answer the user\'s message. You can use the available functions defined above. This instruction line must be immediately followed by Function Name if one of the available functions defined above needs to be called, or by Final Answer. Do not provide the answer here.\\nFunction Name: Name of the function. This instruction line must be immediately followed by Function Input.\\nFunction Input: Function parameters in JSON format adhering to the function\'s input specification ie. {\\"arg1\\":\\"value1\\", \\"arg2\\":\\"value2\\"}. Empty object is a valid parameter.\\nFunction Output: Output of the function in JSON format.\\nThought: Continue your thinking process.\\nFinal Answer: Answer the user or ask for more information or clarification. It must always be preceded by Thought.\\n\\n## Examples\\nMessage: Can you translate \\"How are you\\" into French?\\nThought: The user wants to translate a text into French. I can do that.\\nFinal Answer: Comment vas-tu?\\n\\n# Instructions\\nUser can only see the Final Answer, all answers must be provided there.\\nYou must always use the communication structure and instructions defined above. Do not forget that Thought must be a single-line immediately followed by either Function Name or Final Answer.\\nFunctions must be used to retrieve factual or historical information to answer the message.\\nIf the user suggests using a function that is not available, answer that the function is not available. You can suggest alternatives if appropriate.\\nWhen the message is unclear or you need more information from the user, ask in Final Answer.\\n\\n# Your capabilities\\nPrefer to use these capabilities over functions.\\n- You understand these languages: English, Spanish, French.\\n- You can translate and summarize, even long documents.\\n\\n# Notes\\n- If you don\'t know the answer, say that you don\'t know.\\n- The current time and date in ISO format might be found in the last message.\\n- When answering the user, use friendly formats for time and date.\\n- Use markdown syntax for formatting code snippets, links, JSON, tables, images, files.\\n- Sometimes, things don\'t go as planned. Functions may not provide useful information on the first few tries. You should always try a few different approaches before declaring the problem unsolvable.\\n- When the function doesn\'t give you what you were asking for, you must either use another function or a different function input.\\n - When using search engines, you try different formulations of the query, possibly even in a different language.\\n- You cannot do complex calculations, computations, or data manipulations without using functions.\\n","llm.input_messages.1.message.role":"user","llm.input_messages.1.message.content":"Message: I\'m planning a trip to Barcelona, Spain. Can you research key attractions and landmarks I should visit, and also tell me what the current weather conditions are like there?\\n\\nThis message was created at 2025-08-01T13:56:54+00:00","llm.input_messages.2.message.role":"assistant","llm.input_messages.2.message.content":"Thought: I will first research key attractions and landmarks in Barcelona and then check the current weather conditions there. \\nFunction Name: Wikipedia\\nFunction Input: {\\"query\\": \\"Tourism in Barcelona\\"}\\nFunction Output: [{\\"description\\": \\"Barcelona ( BAR-sə-LOH-nə; Catalan: [bəɾsəˈlonə] ; Spanish: [baɾθeˈlona] ) is a city on the northeastern coast of Spain. It is the capital and largest city of the autonomous community of Catalonia, as well as the second-most populous municipality of Spain. With a population of 1.6 million within city limits, its urban area extends to numerous neighbouring municipalities within the province of Barcelona and is home to around 5.3 million people, making it the fifth most populous urban area of the European Union after Paris, the Ruhr area, Madrid and Milan. It is one of the largest metropolises on the Mediterranean Sea, located on the coast between the mouths of the rivers Llobregat and Besòs, bounded to the west by the Serra de Collserola mountain range.\\\\nAccording to tradition, Barcelona was founded by either the Phoenicians or the Carthaginians, who had trading posts along the Catalonian coast. In the Middle Ages, Barcelona became the capital of the County of Barcelona. After joining with the Kingdom of Aragon to form the composite monarchy of the Crown of Aragon, Barcelona, which continued to be the capital of the Principality of Catalonia, became the most important city in the Crown of Aragon and its main economic and administrative centre, only to be overtaken by Valencia, wrested from Moorish control by the Catalans, shortly before the dynastic union between the Crown of Castile and the Crown of Aragon in 1516. Barcelona became the centre of Catalan separatism, briefly becoming part of France during the 17th century Reapers\' War and again in 1812 until 1814 under Napoleon. Experiencing industrialization and several workers movements during the 19th and early 20th century, it became the capital of autonomous Catalonia in 1931 and it was the epicenter of the revolution experienced by Catalonia during the Spanish Revolution of 1936, until its capture by the fascists in 1939. After the Spanish transition to democracy in the 1970s, Barcelona once again became the capital of an autonomous Catalonia.\\\\nBarcelona has a rich cultural heritage and is today an important cultural centre and a major tourist destination. Particularly renowned are the architectural works of Antoni Gaudí and Lluís Domènech i Montaner, which have been designated UNESCO World Heritage Sites. The city is home to two of the most prestigious universities in Spain: the University of Barcelona and Pompeu Fabra University. The headquarters of the Union for the Mediterranean are located in Barcelona. The city is known for hosting the 1992 Summer Olympics as well as world-class conferences and expositions. In addition, many international sport tournaments have been played here.\\\\nBarcelona is a major cultural, economic, and financial centre in southwestern Europe, as well as the main biotech hub in Spain. As a leading world city, Barcelona\'s influence in global socio-economic affairs qualifies it for global city status (Beta +).\\\\nBarcelona is a transport hub, with the Port of Barcelona being one of Europe\'s principal seaports and busiest European passenger port, an international airport, Barcelona–El Prat Airport, which handles over 50-million passengers per year, an extensive motorway network, and a high-speed rail line with a link to France and the rest of Europe.\\", \\"title\\": \\"Barcelona\\", \\"url\\": \\"https://en.wikipedia.org/wiki/Barcelona\\"}]\\n","llm.provider":"openai","llm.model_name":"gpt-4o-mini","llm.invocation_parameters":"{\\"max_tokens\\":null,\\"top_p\\":null,\\"frequency_penalty\\":null,\\"temperature\\":0.7,\\"top_k\\":null,\\"n\\":null,\\"presence_penalty\\":null,\\"seed\\":null,\\"stop_sequences\\":null,\\"stream\\":null}","openinference.span.kind":"LLM"},"resourceAttributes":{"telemetry.sdk.language":"python","telemetry.sdk.name":"opentelemetry","telemetry.sdk.version":"1.34.1","service.name":"unknown_service"},"scope":{"name":"openinference.instrumentation.beeai","version":"0.1.33","attributes":{}}}',+ },+ expected: {+ messages: [+ {+ role: "system",+ parts: [+ {+ type: "text",+ text: '# Available functions\nYou can only use the following functions. Always use all required parameters.\n\nFunction Name: Wikipedia\nDescription: Search factual and historical information, including biography, history, politics, geography, society, culture, science, technology, people, animal species, mathematics, and other subjects.\nInput Schema: {"properties": {"full_text": {"default": false, "description": "If set to true, it will return the full text of the page instead of its short summary.", "title": "Full Text", "type": "boolean"}, "query": {"description": "Name of the Wikipedia page.", "title": "Query", "type": "string"}}, "required": ["query"], "title": "WikipediaToolInput", "type": "object"}\n\nFunction Name: OpenMeteoTool\nDescription: Retrieve current, past, or future weather forecasts for a location.\nInput Schema: {"properties": {"country": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": null, "description": "Country name.", "title": "Country"}, "end_date": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "default": null, "description": "End date for the weather forecast in the format YYYY-MM-DD (UTC)", "title": "End Date"}, "location_name": {"description": "The name of the location to retrieve weather information.", "title": "Location Name", "type": "string"}, "start_date": {"anyOf": [{"format": "date", "type": "string"}, {"type": "null"}], "default": null, "description": "Start date for the weather forecast in the format YYYY-MM-DD (UTC)", "title": "Start Date"}, "temperature_unit": {"default": "celsius", "description": "The unit to express temperature", "enum": ["celsius", "fahrenheit"], "title": "Temperature Unit", "type": "string"}}, "required": ["location_name"], "title": "OpenMeteoToolInput", "type": "object"}\n\n# Communication structure\nYou communicate only in instruction lines. The format is: "Instruction: expected output". You must only use these instruction lines and must not enter empty lines or anything else between instruction lines.\nYou must skip the instruction lines Function Name, Function Input and Function Output if no function calling is required.\n\nMessage: User\'s message. You never use this instruction line.\nThought: A single-line step-by-step plan of how to answer the user\'s message. You can use the available functions defined above. This instruction line must be immediately followed by Function Name if one of the available functions defined above needs to be called, or by Final Answer. Do not provide the answer here.\nFunction Name: Name of the function. This instruction line must be immediately followed by Function Input.\nFunction Input: Function parameters in JSON format adhering to the function\'s input specification ie. {"arg1":"value1", "arg2":"value2"}. Empty object is a valid parameter.\nFunction Output: Output of the function in JSON format.\nThought: Continue your thinking process.\nFinal Answer: Answer the user or ask for more information or clarification. It must always be preceded by Thought.\n\n## Examples\nMessage: Can you translate "How are you" into French?\nThought: The user wants to translate a text into French. I can do that.\nFinal Answer: Comment vas-tu?\n\n# Instructions\nUser can only see the Final Answer, all answers must be provided there.\nYou must always use the communication structure and instructions defined above. Do not forget that Thought must be a single-line immediately followed by either Function Name or Final Answer.\nFunctions must be used to retrieve factual or historical information to answer the message.\nIf the user suggests using a function that is not available, answer that the function is not available. You can suggest alternatives if appropriate.\nWhen the message is unclear or you need more information from the user, ask in Final Answer.\n\n# Your capabilities\nPrefer to use these capabilities over functions.\n- You understand these languages: English, Spanish, French.\n- You can translate and summarize, even long documents.\n\n# Notes\n- If you don\'t know the answer, say that you don\'t know.\n- The current time and date in ISO format might be found in the last message.\n- When answering the user, use friendly formats for time and date.\n- Use markdown syntax for formatting code snippets, links, JSON, tables, images, files.\n- Sometimes, things don\'t go as planned. Functions may not provide useful information on the first few tries. You should always try a few different approaches before declaring the problem unsolvable.\n- When the function doesn\'t give you what you were asking for, you must either use another function or a different function input.\n - When using search engines, you try different formulations of the query, possibly even in a different language.\n- You cannot do complex calculations, computations, or data manipulations without using functions.\n',+ },+ ],+ source: "input",+ },+ {+ role: "user",+ parts: [+ {+ type: "text",+ text: "Message: I'm planning a trip to Barcelona, Spain. Can you research key attractions and landmarks I should visit, and also tell me what the current weather conditions are like there?\n\nThis message was created at 2025-08-01T13:56:54+00:00",+ },+ ],+ source: "input",+ },+ {+ role: "assistant",+ parts: [+ {+ type: "text",+ text: 'Thought: I will first research key attractions and landmarks in Barcelona and then check the current weather conditions there. \nFunction Name: Wikipedia\nFunction Input: {"query": "Tourism in Barcelona"}\nFunction Output: [{"description": "Barcelona ( BAR-sə-LOH-nə; Catalan: [bəɾsəˈlonə] ; Spanish: [baɾθeˈlona] ) is a city on the northeastern coast of Spain. It is the capital and largest city of the autonomous community of Catalonia, as well as the second-most populous municipality of Spain. With a population of 1.6 million within city limits, its urban area extends to numerous neighbouring municipalities within the province of Barcelona and is home to around 5.3 million people, making it the fifth most populous urban area of the European Union after Paris, the Ruhr area, Madrid and Milan. It is one of the largest metropolises on the Mediterranean Sea, located on the coast between the mouths of the rivers Llobregat and Besòs, bounded to the west by the Serra de Collserola mountain range.\\nAccording to tradition, Barcelona was founded by either the Phoenicians or the Carthaginians, who had trading posts along the Catalonian coast. In the Middle Ages, Barcelona became the capital of the County of Barcelona. After joining with the Kingdom of Aragon to form the composite monarchy of the Crown of Aragon, Barcelona, which continued to be the capital of the Principality of Catalonia, became the most important city in the Crown of Aragon and its main economic and administrative centre, only to be overtaken by Valencia, wrested from Moorish control by the Catalans, shortly before the dynastic union between the Crown of Castile and the Crown of Aragon in 1516. Barcelona became the centre of Catalan separatism, briefly becoming part of France during the 17th century Reapers\' War and again in 1812 until 1814 under Napoleon. Experiencing industrialization and several workers movements during the 19th and early 20th century, it became the capital of autonomous Catalonia in 1931 and it was the epicenter of the revolution experienced by Catalonia during the Spanish Revolution of 1936, until its capture by the fascists in 1939. After the Spanish transition to democracy in the 1970s, Barcelona once again became the capital of an autonomous Catalonia.\\nBarcelona has a rich cultural heritage and is today an important cultural centre and a major tourist destination. Particularly renowned are the architectural works of Antoni Gaudí and Lluís Domènech i Montaner, which have been designated UNESCO World Heritage Sites. The city is home to two of the most prestigious universities in Spain: the University of Barcelona and Pompeu Fabra University. The headquarters of the Union for the Mediterranean are located in Barcelona. The city is known for hosting the 1992 Summer Olympics as well as world-class conferences and expositions. In addition, many international sport tournaments have been played here.\\nBarcelona is a major cultural, economic, and financial centre in southwestern Europe, as well as the main biotech hub in Spain. As a leading world city, Barcelona\'s influence in global socio-economic affairs qualifies it for global city status (Beta +).\\nBarcelona is a transport hub, with the Port of Barcelona being one of Europe\'s principal seaports and busiest European passenger port, an international airport, Barcelona–El Prat Airport, which handles over 50-million passengers per year, an extensive motorway network, and a high-speed rail line with a link to France and the rest of Europe.", "title": "Barcelona", "url": "https://en.wikipedia.org/wiki/Barcelona"}]\n',+ },+ ],+ source: "input",+ },+ ],+ toolDefinitions: [],+ },+ },+ // Source: worker/src/__tests__/chatml/framework-traces/crewai-2025-07-11.trace.json; observation 231c43964b7e7e63+ {+ name: "verbatim crewai-2025-07-11.trace.json / 231c43964b7e7e63",+ spanIO: {+ input:+ '{"messages": [{"role": "system", "content": "You are Software developer. An expert coder with a keen eye for software trends.\\nYour personal goal is: Write clear, concise code on demand\\nTo give my best complete final answer to the task respond using the exact following format:\\n\\nThought: I now can give a great answer\\nFinal Answer: Your final answer must be the great and the most complete as possible, it must be outcome described.\\n\\nI MUST use these formats, my job depends on it!"}, {"role": "user", "content": "\\nCurrent Task: Define the HTML for making a simple website with heading- Hello World! Langfuse monitors your CrewAI agent!\\n\\nThis is the expected criteria for your final answer: A clear and concise HTML code\\nyou MUST return the actual complete content as the final answer, not a summary.\\n\\nBegin! This is VERY important to you, use the tools available and give your best Final Answer, your job depends on it!\\n\\nThought:"}]}',+ output:+ 'I now can give a great answer \nFinal Answer: \n```html\n<!DOCTYPE html>\n<html lang="en">\n<head>\n <meta charset="UTF-8">\n <meta name="viewport" content="width=device-width, initial-scale=1.0">\n <title>Hello World</title>\n <style>\n body {\n font-family: Arial, sans-serif;\n display: flex;\n justify-content: center;\n align-items: center;\n height: 100vh;\n background-color: #f0f0f0;\n }\n h1 {\n color: #333;\n }\n </style>\n</head>\n<body>\n <h1>Hello World! Langfuse monitors your CrewAI agent!</h1>\n</body>\n</html>\n```',+ metadata:+ '{"attributes":{"llm.model_name":"gpt-4o-mini","llm.input_messages.0.message.role":"system","llm.input_messages.0.message.content":"You are Software developer. An expert coder with a keen eye for software trends.\\nYour personal goal is: Write clear, concise code on demand\\nTo give my best complete final answer to the task respond using the exact following format:\\n\\nThought: I now can give a great answer\\nFinal Answer: Your final answer must be the great and the most complete as possible, it must be outcome described.\\n\\nI MUST use these formats, my job depends on it!","llm.input_messages.1.message.role":"user","llm.input_messages.1.message.content":"\\nCurrent Task: Define the HTML for making a simple website with heading- Hello World! Langfuse monitors your CrewAI agent!\\n\\nThis is the expected criteria for your final answer: A clear and concise HTML code\\nyou MUST return the actual complete content as the final answer, not a summary.\\n\\nBegin! This is VERY important to you, use the tools available and give your best Final Answer, your job depends on it!\\n\\nThought:","input.value":"{\\"messages\\": [{\\"role\\": \\"system\\", \\"content\\": \\"You are Software developer. An expert coder with a keen eye for software trends.\\\\nYour personal goal is: Write clear, concise code on demand\\\\nTo give my best complete final answer to the task respond using the exact following format:\\\\n\\\\nThought: I now can give a great answer\\\\nFinal Answer: Your final answer must be the great and the most complete as possible, it must be outcome described.\\\\n\\\\nI MUST use these formats, my job depends on it!\\"}, {\\"role\\": \\"user\\", \\"content\\": \\"\\\\nCurrent Task: Define the HTML for making a simple website with heading- Hello World! Langfuse monitors your CrewAI agent!\\\\n\\\\nThis is the expected criteria for your final answer: A clear and concise HTML code\\\\nyou MUST return the actual complete content as the final answer, not a summary.\\\\n\\\\nBegin! This is VERY important to you, use the tools available and give your best Final Answer, your job depends on it!\\\\n\\\\nThought:\\"}]}","input.mime_type":"application/json","llm.invocation_parameters":"{\\"model\\": \\"gpt-4o-mini\\", \\"stop\\": [\\"\\\\nObservation:\\"], \\"stream\\": false}","output.value":"I now can give a great answer \\nFinal Answer: \\n```html\\n<!DOCTYPE html>\\n<html lang=\\"en\\">\\n<head>\\n <meta charset=\\"UTF-8\\">\\n <meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1.0\\">\\n <title>Hello World</title>\\n <style>\\n body {\\n font-family: Arial, sans-serif;\\n display: flex;\\n justify-content: center;\\n align-items: center;\\n height: 100vh;\\n background-color: #f0f0f0;\\n }\\n h1 {\\n color: #333;\\n }\\n </style>\\n</head>\\n<body>\\n <h1>Hello World! Langfuse monitors your CrewAI agent!</h1>\\n</body>\\n</html>\\n```","llm.output_messages.0.message.role":"assistant","llm.output_messages.0.message.content":"I now can give a great answer \\nFinal Answer: \\n```html\\n<!DOCTYPE html>\\n<html lang=\\"en\\">\\n<head>\\n <meta charset=\\"UTF-8\\">\\n <meta name=\\"viewport\\" content=\\"width=device-width, initial-scale=1.0\\">\\n <title>Hello World</title>\\n <style>\\n body {\\n font-family: Arial, sans-serif;\\n display: flex;\\n justify-content: center;\\n align-items: center;\\n height: 100vh;\\n background-color: #f0f0f0;\\n }\\n h1 {\\n color: #333;\\n }\\n </style>\\n</head>\\n<body>\\n <h1>Hello World! Langfuse monitors your CrewAI agent!</h1>\\n</body>\\n</html>\\n```","llm.token_count.prompt":"190","llm.token_count.prompt_details.cache_read":"0","llm.token_count.prompt_details.audio":"0","llm.token_count.completion":"164","llm.token_count.completion_details.reasoning":"0","llm.token_count.completion_details.audio":"0","llm.token_count.total":"354","openinference.span.kind":"LLM"},"resourceAttributes":{"telemetry.sdk.language":"python","telemetry.sdk.name":"opentelemetry","telemetry.sdk.version":"1.34.1","service.name":"unknown_service"},"scope":{"name":"openinference.instrumentation.litellm","version":"0.1.23","attributes":{}}}',+ },+ expected: {+ messages: [+ {+ role: "system",+ parts: [+ {+ type: "text",+ text: "You are Software developer. An expert coder with a keen eye for software trends.\nYour personal goal is: Write clear, concise code on demand\nTo give my best complete final answer to the task respond using the exact following format:\n\nThought: I now can give a great answer\nFinal Answer: Your final answer must be the great and the most complete as possible, it must be outcome described.\n\nI MUST use these formats, my job depends on it!",+ },+ ],+ source: "input",+ },+ {+ role: "user",+ parts: [+ {+ type: "text",+ text: "\nCurrent Task: Define the HTML for making a simple website with heading- Hello World! Langfuse monitors your CrewAI agent!\n\nThis is the expected criteria for your final answer: A clear and concise HTML code\nyou MUST return the actual complete content as the final answer, not a summary.\n\nBegin! This is VERY important to you, use the tools available and give your best Final Answer, your job depends on it!\n\nThought:",+ },+ ],+ source: "input",+ },+ {+ role: "assistant",+ parts: [+ {+ type: "text",+ text: 'I now can give a great answer \nFinal Answer: \n```html\n<!DOCTYPE html>\n<html lang="en">\n<head>\n <meta charset="UTF-8">\n <meta name="viewport" content="width=device-width, initial-scale=1.0">\n <title>Hello World</title>\n <style>\n body {\n font-family: Arial, sans-serif;\n display: flex;\n justify-content: center;\n align-items: center;\n height: 100vh;\n background-color: #f0f0f0;\n }\n h1 {\n color: #333;\n }\n </style>\n</head>\n<body>\n <h1>Hello World! Langfuse monitors your CrewAI agent!</h1>\n</body>\n</html>\n```',+ },+ ],+ source: "output",+ },+ ],+ toolDefinitions: [],+ },+ },+ // Source: worker/src/__tests__/chatml/framework-traces/koog-2025-08-26.trace.json; observation e44e72cf2d221781+ {+ name: "verbatim koog-2025-08-26.trace.json / e44e72cf2d221781",+ spanIO: {+ input:+ '[{"role":"system","content":"You are a nice and polite assistant."},{"role":"user","content":"Greet and say goodbye to the user in the same message. Use provided tools to generate a proper greeting. The user name is Bob."},{"content":"[{\\"function\\":{\\"name\\":\\"HelloTool\\",\\"arguments\\":\\"{\\\\\\"name\\\\\\": \\\\\\"Bob\\\\\\"}\\"},\\"id\\":\\"call_n2HaWg9KFP0BZDqXv6G4b3nJ\\",\\"type\\":\\"function\\"}]","role":"tool"},{"role":"tool","content":"Hello my darling Bob!"},{"content":"[{\\"function\\":{\\"name\\":\\"ByeTool\\",\\"arguments\\":\\"{\\\\\\"name\\\\\\": \\\\\\"Bob\\\\\\"}\\"},\\"id\\":\\"call_dOeEHJDI0liHrCdFWTpkTsuO\\",\\"type\\":\\"function\\"}]","role":"tool"},{"role":"tool","content":"Bye my dear Bob!"}]',+ output:+ '[{"content":"Hello my darling Bob! And, bye my dear Bob!","role":"assistant"}]',+ metadata:+ '{"attributes":{"gen_ai.prompt.4.content":"[{\\"function\\":{\\"name\\":\\"ByeTool\\",\\"arguments\\":\\"{\\\\\\"name\\\\\\": \\\\\\"Bob\\\\\\"}\\"},\\"id\\":\\"call_dOeEHJDI0liHrCdFWTpkTsuO\\",\\"type\\":\\"function\\"}]","gen_ai.prompt.5.role":"tool","gen_ai.completion.0.content":"Hello my darling Bob! And, bye my dear Bob!","gen_ai.request.temperature":"1","gen_ai.prompt.3.role":"tool","gen_ai.prompt.0.role":"system","gen_ai.prompt.5.content":"Bye my dear Bob!","gen_ai.completion.0.role":"assistant","gen_ai.prompt.4.role":"tool","gen_ai.request.model":"gpt-4o","gen_ai.conversation.id":"6f8d2449-33ed-4c7c-82e7-5410e34ee4e6","gen_ai.prompt.0.content":"You are a nice and polite assistant.","gen_ai.prompt.1.role":"user","gen_ai.response.finish_reasons":"[\\"stop\\"]","gen_ai.prompt.1.content":"Greet and say goodbye to the user in the same message. Use provided tools to generate a proper greeting. The user name is Bob.","gen_ai.system":"openai","gen_ai.prompt.2.content":"[{\\"function\\":{\\"name\\":\\"HelloTool\\",\\"arguments\\":\\"{\\\\\\"name\\\\\\": \\\\\\"Bob\\\\\\"}\\"},\\"id\\":\\"call_n2HaWg9KFP0BZDqXv6G4b3nJ\\",\\"type\\":\\"function\\"}]","gen_ai.operation.name":"chat","gen_ai.prompt.2.role":"tool","gen_ai.prompt.3.content":"Hello my darling Bob!"},"resourceAttributes":{"os.arch":"aarch64","os.type":"Mac OS X","os.version":"15.4.1","service.instance.time":"2025-08-26T19:40:59.130398Z","service.name":"ai.koog","service.version":"0.3.0"},"scope":{"name":"ai.koog","version":"0.3.0","attributes":{}}}',+ },+ expected: {+ messages: [+ {+ role: "system",+ parts: [+ {+ type: "text",+ text: "You are a nice and polite assistant.",+ },+ ],+ source: "input",+ },+ {+ role: "user",+ parts: [+ {+ type: "text",+ text: "Greet and say goodbye to the user in the same message. Use provided tools to generate a proper greeting. The user name is Bob.",+ },+ ],+ source: "input",+ },+ {+ role: "assistant",+ parts: [+ {+ type: "tool-call",+ toolCallId: "call_n2HaWg9KFP0BZDqXv6G4b3nJ",+ toolName: "HelloTool",+ input: {+ name: "Bob",+ },+ toolType: "function",+ },+ ],+ source: "input",+ },+ {+ role: "tool",+ parts: [+ {+ type: "tool-result",+ toolCallId: null,+ output: "Hello my darling Bob!",+ },+ ],+ source: "input",+ },+ {+ role: "assistant",+ parts: [+ {+ type: "tool-call",+ toolCallId: "call_dOeEHJDI0liHrCdFWTpkTsuO",+ toolName: "ByeTool",+ input: {+ name: "Bob",+ },+ toolType: "function",+ },+ ],+ source: "input",+ },+ {+ role: "tool",+ parts: [+ {+ type: "tool-result",+ toolCallId: null,+ output: "Bye my dear Bob!",+ },+ ],+ source: "input",+ },+ {+ role: "assistant",+ parts: [+ {+ type: "text",+ text: "Hello my darling Bob! And, bye my dear Bob!",+ },+ ],+ source: "output",+ },+ ],+ toolDefinitions: [],+ },+ },+ // Source: worker/src/__tests__/chatml/framework-traces/llamaindex-2025-06-05.trace.json; observation 7ca8b22f6628d0c7+ {+ name: "verbatim llamaindex-2025-06-05.trace.json / 7ca8b22f6628d0c7",+ spanIO: {+ input: '{"args": ["What is Langfuse?"]}',+ output:+ "Langfuse is a tool designed to help developers monitor and debug applications that utilize large language models (LLMs). It provides features for tracking and analyzing the performance of LLMs, enabling developers to gain insights into how these models are functioning within their applications. Langfuse can be particularly useful for identifying issues, optimizing performance, and ensuring that the integration of language models into applications is smooth and effective.",+ metadata:+ '{"attributes":{"llm.model_name":"gpt-4o","llm.invocation_parameters":"{\\"context_window\\":128000,\\"num_output\\":-1,\\"is_chat_model\\":true,\\"is_function_calling_model\\":true,\\"model_name\\":\\"gpt-4o\\",\\"system_role\\":\\"system\\"}","llm.provider":"openai","llm.system":"openai","input.value":"{\\"args\\": [\\"What is Langfuse?\\"]}","input.mime_type":"application/json","llm.prompts":"[\\"What is Langfuse?\\"]","output.value":"Langfuse is a tool designed to help developers monitor and debug applications that utilize large language models (LLMs). It provides features for tracking and analyzing the performance of LLMs, enabling developers to gain insights into how these models are functioning within their applications. Langfuse can be particularly useful for identifying issues, optimizing performance, and ensuring that the integration of language models into applications is smooth and effective.","llm.token_count.prompt":"13","llm.token_count.prompt_details.cache_read":"0","llm.token_count.prompt_details.audio":"0","llm.token_count.completion":"81","llm.token_count.completion_details.reasoning":"0","llm.token_count.completion_details.audio":"0","llm.token_count.total":"94","openinference.span.kind":"LLM"},"resourceAttributes":{"telemetry.sdk.language":"python","telemetry.sdk.name":"opentelemetry","telemetry.sdk.version":"1.33.1","service.name":"unknown_service"},"scope":{"name":"openinference.instrumentation.llama_index","version":"4.3.0","attributes":{}}}',+ },+ expected: {+ messages: [+ {+ role: "user",+ parts: [+ {+ type: "data",+ value: {+ args: ["What is Langfuse?"],+ },+ },+ ],+ source: "input",+ },+ {+ role: "assistant",+ parts: [+ {+ type: "text",+ text: "Langfuse is a tool designed to help developers monitor and debug applications that utilize large language models (LLMs). It provides features for tracking and analyzing the performance of LLMs, enabling developers to gain insights into how these models are functioning within their applications. Langfuse can be particularly useful for identifying issues, optimizing performance, and ensuring that the integration of language models into applications is smooth and effective.",+ },+ ],+ source: "output",+ },+ ],+ toolDefinitions: [],+ },+ },+];+export const mixedNormalizedIOFixtures = [+ ...capturedTraceFixtures,looseProviderMessageShapesFixture,outputOnlyStructuredMessageFixture,outputOnlyPlainTextFixture,diff --git a/packages/shared/src/utils/normalized-io/conventions/providers/openai/fixtures.ts b/packages/shared/src/utils/normalized-io/conventions/providers/openai/fixtures.tsindex 9f5141dd4f..d456a3f084 100644--- a/packages/shared/src/utils/normalized-io/conventions/providers/openai/fixtures.ts+++ b/packages/shared/src/utils/normalized-io/conventions/providers/openai/fixtures.ts@@ -1,5 +1,59 @@import type { NormalizedIOFixture } from "../fixture-types";+// Docs-derived Responses requests (not captured traces).+// https://developers.openai.com/api/docs/guides/text+export const documentedResponsesFixtures: NormalizedIOFixture[] = [+ ...[+ "Explain retries.",+ [{ role: "user", content: "Explain retries." }],+ ].flatMap((input) =>+ [false, true].map((serialized): NormalizedIOFixture => {+ const request = { model: "gpt-4.1", instructions: "Be concise.", input };+ return {+ name: `Responses ${typeof input === "string" ? "string" : "array"} input with instructions (${serialized ? "JSON" : "object"})`,+ spanIO: {+ input: serialized ? JSON.stringify(request) : request,+ output: undefined,+ metadata: undefined,+ },+ expected: {+ messages: [+ {+ source: "input",+ role: "system",+ parts: [{ type: "text", text: "Be concise." }],+ },+ {+ source: "input",+ role: "user",+ parts: [{ type: "text", text: "Explain retries." }],+ },+ ],+ toolDefinitions: [],+ },+ };+ }),+ ),+ {+ name: "does not claim application data with an input field as Responses",+ spanIO: {+ input: { input: "invoice", total: 42 },+ output: undefined,+ metadata: undefined,+ },+ expected: {+ messages: [+ {+ source: "input",+ role: "user",+ parts: [{ type: "data", value: { input: "invoice", total: 42 } }],+ },+ ],+ toolDefinitions: [],+ },+ },+];+const toolCallId = "call_weather_001";const customToolCallId = "call_custom_002";@@ -890,3 +944,379 @@ export const openAiResponsesBuiltInToolsAndMediaFixture = {],},} satisfies NormalizedIOFixture;++// Verbatim stored observation IO from ChatML integration-example exports.+export const capturedTraceFixtures: NormalizedIOFixture[] = [+ // Anonymized gateway Responses capture: structure and IDs preserved; prompt, conversation,+ // command, reasoning text, and opaque encrypted content replaced with sample values.+ {+ name: "anonymized gateway Responses capture with reasoning and parallel tool calls",+ spanIO: {+ input:+ '{"input":[{"content":"You are a coding assistant helping with a sample Python project. Read files, inspect code, and explain your findings clearly. Use the available read, bash, edit, and write tools as needed. The project is located at /Users/developer/projects/example-python. Follow the project instructions in AGENTS.md and keep changes focused.","role":"developer"},{"content":[{"text":"Hello","type":"input_text"}],"role":"user"},{"content":[{"annotations":[],"text":"Hello! What would you like to work on?","type":"output_text"}],"id":"msg_01989159bdac1f03016aaac3a0c7e087d29860c072b72b9bc5","phase":"final_answer","role":"assistant","status":"completed","type":"message"},{"content":[{"text":"Explain how the retry decorator works.","type":"input_text"}],"role":"user"}],"tools":[{"description":"Read the contents of a file. Supports text files and images (jpg, png, gif, webp, bmp). Images are sent as attachments. For text files, output is truncated to 2000 lines or 50KB (whichever is hit first). Use offset/limit for large files. When you need the full file, continue with offset until complete.","name":"read","parameters":{"properties":{"limit":{"description":"Maximum number of lines to read","type":"number"},"offset":{"description":"Line number to start reading from (1-indexed)","type":"number"},"path":{"description":"Path to the file to read (relative or absolute)","type":"string"}},"required":["path"],"type":"object"},"type":"function"},{"description":"Execute a bash command in the current working directory. Returns stdout and stderr. Output is truncated to last 2000 lines or 50KB (whichever is hit first). If truncated, full output is saved to a temp file. Optionally provide a timeout in seconds.","name":"bash","parameters":{"properties":{"command":{"description":"Shell command to execute","type":"string"},"timeout":{"description":"Timeout in seconds (optional, no default timeout)","type":"number"}},"required":["command"],"type":"object"},"type":"function"},{"description":"Edit a single file using exact text replacement. Every edits[].oldText must match a unique, non-overlapping region of the original file. If two changes affect the same block or nearby lines, merge them into one edit instead of emitting overlapping edits. Do not include large unchanged regions just to connect distant changes.","name":"edit","parameters":{"properties":{"edits":{"description":"One or more targeted replacements. Each edit is matched against the original file, not incrementally. Do not include overlapping or nested edits. If two changes touch the same block or nearby lines, merge them into one edit instead.","items":{"properties":{"newText":{"description":"Replacement text for this targeted edit.","type":"string"},"oldText":{"description":"Exact text for one targeted replacement. It must be unique in the original file and must not overlap with any other edits[].oldText in the same call.","type":"string"}},"required":["oldText","newText"],"type":"object"},"type":"array"},"path":{"description":"Path to the file to edit (relative or absolute)","type":"string"}},"required":["path","edits"],"type":"object"},"type":"function"},{"description":"Write content to a file. Creates the file if it doesn\'t exist, overwrites if it does. Automatically creates parent directories.","name":"write","parameters":{"properties":{"content":{"description":"Content to write to the file","type":"string"},"path":{"description":"Path to the file to write (relative or absolute)","type":"string"}},"required":["path","content"],"type":"object"},"type":"function"}]}',+ output:+ '[{"content":[],"encrypted_content":"anonymized-encrypted-reasoning","id":"rs_01989159bdac1f03016aaac3e381b887d2ab6730f292a7a587","summary":[{"text":"**Inspecting the implementation**\\n\\nI will search the sample project for the retry decorator and its tests, then explain how it handles failed calls.","type":"summary_text"}],"type":"reasoning"},{"arguments":"{\\"command\\":\\"rg -n \\\\\\"def retry|retry\\\\\\" example_sdk tests/unit | head -80\\",\\"timeout\\":10}","call_id":"call_0mE4wfJ7mEy41Nj9HfXjidem","id":"fc_01989159bdac1f03016aaac3e49de487d29427a84b52330077","name":"bash","status":"completed","type":"function_call"}]',+ metadata: {+ "langfuse.gateway.provider.response_id":+ "resp_01989159bdac1f03016aaac3e2b53887d2bf05419f5a5c9409",+ "langfuse.gateway.provider.request_id":+ "req_3bc6e7143cb747cc80876011ee0ac473",+ "langfuse.gateway.provider.request.prompt_cache_key":+ "01a0ab0a-84b2-7775-866d-e0a8ddf0e3b8",+ "langfuse.gateway.provider.connection_id": "cmu3uqinh0004ad0ld88jrfe9",+ "langfuse.gateway.project_id": "cmtvtpilr0004ad0lxphzbd5i",+ "langfuse.gateway.organization_id": "cmtvmaywg0000ad0ly0x9tono",+ "langfuse.gateway.ingestion_mode": "full",+ "langfuse.gateway.api_format": "openai.responses",+ "langfuse.gateway.api-key.id": "cmu3uqwsb0007ad0lwaua4ezv",+ http_status: 200,+ "scope.version": "0.1.0",+ "scope.name": "langfuse-ai-gateway",+ "resourceAttributes.service.name": "langfuse-ai-gateway",+ },+ },+ expected: {+ messages: [+ {+ role: "system",+ parts: [+ {+ type: "text",+ text: "You are a coding assistant helping with a sample Python project. Read files, inspect code, and explain your findings clearly. Use the available read, bash, edit, and write tools as needed. The project is located at /Users/developer/projects/example-python. Follow the project instructions in AGENTS.md and keep changes focused.",+ },+ ],+ source: "input",+ },+ {+ role: "user",+ parts: [+ {+ type: "text",+ text: "Hello",+ },+ ],+ source: "input",+ },+ {+ id: "msg_01989159bdac1f03016aaac3a0c7e087d29860c072b72b9bc5",+ role: "assistant",+ parts: [+ {+ type: "text",+ text: "Hello! What would you like to work on?",+ },+ ],+ source: "input",+ },+ {+ role: "user",+ parts: [+ {+ type: "text",+ text: "Explain how the retry decorator works.",+ },+ ],+ source: "input",+ },+ {+ id: "rs_01989159bdac1f03016aaac3e381b887d2ab6730f292a7a587",+ role: "assistant",+ parts: [+ {+ type: "reasoning",+ content: {+ kind: "text",+ text: "**Inspecting the implementation**\n\nI will search the sample project for the retry decorator and its tests, then explain how it handles failed calls.",+ },+ },+ {+ type: "reasoning",+ content: {+ kind: "encrypted",+ data: "anonymized-encrypted-reasoning",+ },+ },+ ],+ source: "output",+ },+ {+ role: "assistant",+ parts: [+ {+ type: "tool-call",+ toolCallId: "call_0mE4wfJ7mEy41Nj9HfXjidem",+ toolName: "bash",+ input: {+ command:+ 'rg -n "def retry|retry" example_sdk tests/unit | head -80',+ timeout: 10,+ },+ toolType: "function_call",+ providerMetadata: {+ status: "completed",+ },+ },+ ],+ source: "output",+ },+ ],+ toolDefinitions: [+ {+ name: "read",+ description:+ "Read the contents of a file. Supports text files and images (jpg, png, gif, webp, bmp). Images are sent as attachments. For text files, output is truncated to 2000 lines or 50KB (whichever is hit first). Use offset/limit for large files. When you need the full file, continue with offset until complete.",+ inputSchema: {+ properties: {+ limit: {+ description: "Maximum number of lines to read",+ type: "number",+ },+ offset: {+ description: "Line number to start reading from (1-indexed)",+ type: "number",+ },+ path: {+ description: "Path to the file to read (relative or absolute)",+ type: "string",+ },+ },+ required: ["path"],+ type: "object",+ },+ type: "function",+ },+ {+ name: "bash",+ description:+ "Execute a bash command in the current working directory. Returns stdout and stderr. Output is truncated to last 2000 lines or 50KB (whichever is hit first). If truncated, full output is saved to a temp file. Optionally provide a timeout in seconds.",+ inputSchema: {+ properties: {+ command: {+ description: "Shell command to execute",+ type: "string",+ },+ timeout: {+ description:+ "Timeout in seconds (optional, no default timeout)",+ type: "number",+ },+ },+ required: ["command"],+ type: "object",+ },+ type: "function",+ },+ {+ name: "edit",+ description:+ "Edit a single file using exact text replacement. Every edits[].oldText must match a unique, non-overlapping region of the original file. If two changes affect the same block or nearby lines, merge them into one edit instead of emitting overlapping edits. Do not include large unchanged regions just to connect distant changes.",+ inputSchema: {+ properties: {+ edits: {+ description:+ "One or more targeted replacements. Each edit is matched against the original file, not incrementally. Do not include overlapping or nested edits. If two changes touch the same block or nearby lines, merge them into one edit instead.",+ items: {+ properties: {+ newText: {+ description: "Replacement text for this targeted edit.",+ type: "string",+ },+ oldText: {+ description:+ "Exact text for one targeted replacement. It must be unique in the original file and must not overlap with any other edits[].oldText in the same call.",+ type: "string",+ },+ },+ required: ["oldText", "newText"],+ type: "object",+ },+ type: "array",+ },+ path: {+ description: "Path to the file to edit (relative or absolute)",+ type: "string",+ },+ },+ required: ["path", "edits"],+ type: "object",+ },+ type: "function",+ },+ {+ name: "write",+ description:+ "Write content to a file. Creates the file if it doesn't exist, overwrites if it does. Automatically creates parent directories.",+ inputSchema: {+ properties: {+ content: {+ description: "Content to write to the file",+ type: "string",+ },+ path: {+ description: "Path to the file to write (relative or absolute)",+ type: "string",+ },+ },+ required: ["path", "content"],+ type: "object",+ },+ type: "function",+ },+ ],+ },+ },+ // Source: worker/src/__tests__/chatml/framework-traces/openai-agents-2025-09-30.trace.json; observation 90d94774e8e3724d+ {+ name: "verbatim openai-agents-2025-09-30.trace.json / 90d94774e8e3724d",+ spanIO: {+ input:+ '[{"content": "What\'s the weather in Tokyo?", "role": "user"}, {"arguments": "{\\"city\\":\\"Tokyo\\"}", "call_id": "call_Kud0j0DxWSmLzv9W5m6qVqXn", "name": "get_weather", "type": "function_call", "id": "fc_0f00ca5b7e22bb4c0068db9d00d258819d987f4b9b63189e76", "status": "completed"}, {"call_id": "call_Kud0j0DxWSmLzv9W5m6qVqXn", "output": "The weather in Tokyo is sunny.", "type": "function_call_output"}]',+ output:+ '{"id":"resp_0f00ca5b7e22bb4c0068db9d0110d8819da676bd1f2dd03a40","created_at":1759223041.0,"error":null,"incomplete_details":null,"instructions":"You are a helpful agent.","metadata":{},"model":"gpt-4.1-2025-04-14","object":"response","output":[{"id":"msg_0f00ca5b7e22bb4c0068db9d019a78819d9fe1e4d3b6c96b68","content":[{"annotations":[],"text":"The weather in Tokyo is currently sunny. If you need more details like temperature or forecast for the upcoming days, just let me know!","type":"output_text","logprobs":[]}],"role":"assistant","status":"completed","type":"message"}],"parallel_tool_calls":true,"temperature":1.0,"tool_choice":"auto","tools":[{"name":"get_weather","parameters":{"properties":{"city":{"title":"City","type":"string"}},"required":["city"],"title":"get_weather_args","type":"object","additionalProperties":false},"strict":true,"type":"function","description":null}],"top_p":1.0,"background":false,"conversation":null,"max_output_tokens":null,"max_tool_calls":null,"previous_response_id":null,"prompt":null,"prompt_cache_key":null,"reasoning":{"effort":null,"generate_summary":null,"summary":null},"safety_identifier":null,"service_tier":"default","status":"completed","text":{"format":{"type":"text"},"verbosity":"medium"},"top_logprobs":0,"truncation":"disabled","usage":{"input_tokens":85,"input_tokens_details":{"cached_tokens":0},"output_tokens":29,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":114},"user":null,"billing":{"payer":"developer"},"store":true}',+ metadata:+ '{"attributes":{"llm.system":"openai","output.mime_type":"application/json","output.value":"{\\"id\\":\\"resp_0f00ca5b7e22bb4c0068db9d0110d8819da676bd1f2dd03a40\\",\\"created_at\\":1759223041.0,\\"error\\":null,\\"incomplete_details\\":null,\\"instructions\\":\\"You are a helpful agent.\\",\\"metadata\\":{},\\"model\\":\\"gpt-4.1-2025-04-14\\",\\"object\\":\\"response\\",\\"output\\":[{\\"id\\":\\"msg_0f00ca5b7e22bb4c0068db9d019a78819d9fe1e4d3b6c96b68\\",\\"content\\":[{\\"annotations\\":[],\\"text\\":\\"The weather in Tokyo is currently sunny. If you need more details like temperature or forecast for the upcoming days, just let me know!\\",\\"type\\":\\"output_text\\",\\"logprobs\\":[]}],\\"role\\":\\"assistant\\",\\"status\\":\\"completed\\",\\"type\\":\\"message\\"}],\\"parallel_tool_calls\\":true,\\"temperature\\":1.0,\\"tool_choice\\":\\"auto\\",\\"tools\\":[{\\"name\\":\\"get_weather\\",\\"parameters\\":{\\"properties\\":{\\"city\\":{\\"title\\":\\"City\\",\\"type\\":\\"string\\"}},\\"required\\":[\\"city\\"],\\"title\\":\\"get_weather_args\\",\\"type\\":\\"object\\",\\"additionalProperties\\":false},\\"strict\\":true,\\"type\\":\\"function\\",\\"description\\":null}],\\"top_p\\":1.0,\\"background\\":false,\\"conversation\\":null,\\"max_output_tokens\\":null,\\"max_tool_calls\\":null,\\"previous_response_id\\":null,\\"prompt\\":null,\\"prompt_cache_key\\":null,\\"reasoning\\":{\\"effort\\":null,\\"generate_summary\\":null,\\"summary\\":null},\\"safety_identifier\\":null,\\"service_tier\\":\\"default\\",\\"status\\":\\"completed\\",\\"text\\":{\\"format\\":{\\"type\\":\\"text\\"},\\"verbosity\\":\\"medium\\"},\\"top_logprobs\\":0,\\"truncation\\":\\"disabled\\",\\"usage\\":{\\"input_tokens\\":85,\\"input_tokens_details\\":{\\"cached_tokens\\":0},\\"output_tokens\\":29,\\"output_tokens_details\\":{\\"reasoning_tokens\\":0},\\"total_tokens\\":114},\\"user\\":null,\\"billing\\":{\\"payer\\":\\"developer\\"},\\"store\\":true}","llm.tools.0.tool.json_schema":"{\\"type\\": \\"function\\", \\"function\\": {\\"name\\": \\"get_weather\\", \\"description\\": null, \\"parameters\\": {\\"properties\\": {\\"city\\": {\\"title\\": \\"City\\", \\"type\\": \\"string\\"}}, \\"required\\": [\\"city\\"], \\"title\\": \\"get_weather_args\\", \\"type\\": \\"object\\", \\"additionalProperties\\": false}, \\"strict\\": true}}","llm.token_count.completion":"29","llm.token_count.prompt":"85","llm.token_count.total":"114","llm.token_count.prompt_details.cache_read":"0","llm.token_count.completion_details.reasoning":"0","llm.output_messages.0.message.role":"assistant","llm.output_messages.0.message.contents.0.message_content.type":"text","llm.output_messages.0.message.contents.0.message_content.text":"The weather in Tokyo is currently sunny. If you need more details like temperature or forecast for the upcoming days, just let me know!","llm.input_messages.0.message.role":"system","llm.input_messages.0.message.content":"You are a helpful agent.","llm.model_name":"gpt-4.1-2025-04-14","llm.invocation_parameters":"{\\"id\\": \\"resp_0f00ca5b7e22bb4c0068db9d0110d8819da676bd1f2dd03a40\\", \\"created_at\\": 1759223041.0, \\"instructions\\": \\"You are a helpful agent.\\", \\"metadata\\": {}, \\"model\\": \\"gpt-4.1-2025-04-14\\", \\"parallel_tool_calls\\": true, \\"temperature\\": 1.0, \\"tool_choice\\": \\"auto\\", \\"top_p\\": 1.0, \\"background\\": false, \\"reasoning\\": {}, \\"service_tier\\": \\"default\\", \\"text\\": {\\"format\\": {\\"type\\": \\"text\\"}, \\"verbosity\\": \\"medium\\"}, \\"top_logprobs\\": 0, \\"truncation\\": \\"disabled\\", \\"billing\\": {\\"payer\\": \\"developer\\"}, \\"store\\": true}","input.mime_type":"application/json","input.value":"[{\\"content\\": \\"What\'s the weather in Tokyo?\\", \\"role\\": \\"user\\"}, {\\"arguments\\": \\"{\\\\\\"city\\\\\\":\\\\\\"Tokyo\\\\\\"}\\", \\"call_id\\": \\"call_Kud0j0DxWSmLzv9W5m6qVqXn\\", \\"name\\": \\"get_weather\\", \\"type\\": \\"function_call\\", \\"id\\": \\"fc_0f00ca5b7e22bb4c0068db9d00d258819d987f4b9b63189e76\\", \\"status\\": \\"completed\\"}, {\\"call_id\\": \\"call_Kud0j0DxWSmLzv9W5m6qVqXn\\", \\"output\\": \\"The weather in Tokyo is sunny.\\", \\"type\\": \\"function_call_output\\"}]","llm.input_messages.1.message.role":"user","llm.input_messages.1.message.content":"What\'s the weather in Tokyo?","llm.input_messages.2.message.role":"assistant","llm.input_messages.2.message.tool_calls.0.tool_call.id":"call_Kud0j0DxWSmLzv9W5m6qVqXn","llm.input_messages.2.message.tool_calls.0.tool_call.function.name":"get_weather","llm.input_messages.2.message.tool_calls.0.tool_call.function.arguments":"{\\"city\\":\\"Tokyo\\"}","llm.input_messages.3.message.role":"tool","llm.input_messages.3.message.tool_call_id":"call_Kud0j0DxWSmLzv9W5m6qVqXn","llm.input_messages.3.message.content":"The weather in Tokyo is sunny.","openinference.span.kind":"LLM"},"resourceAttributes":{"telemetry.sdk.language":"python","telemetry.sdk.name":"opentelemetry","telemetry.sdk.version":"1.37.0","service.name":"unknown_service"},"scope":{"name":"openinference.instrumentation.openai_agents","version":"1.3.0","attributes":{}}}',+ },+ expected: {+ messages: [+ {+ role: "user",+ parts: [+ {+ type: "text",+ text: "What's the weather in Tokyo?",+ },+ ],+ source: "input",+ },+ {+ role: "assistant",+ parts: [+ {+ type: "tool-call",+ toolCallId: "call_Kud0j0DxWSmLzv9W5m6qVqXn",+ toolName: "get_weather",+ input: {+ city: "Tokyo",+ },+ toolType: "function_call",+ providerMetadata: {+ status: "completed",+ },+ },+ ],+ source: "input",+ },+ {+ role: "tool",+ parts: [+ {+ type: "tool-result",+ toolCallId: "call_Kud0j0DxWSmLzv9W5m6qVqXn",+ output: "The weather in Tokyo is sunny.",+ },+ ],+ source: "input",+ },+ {+ id: "msg_0f00ca5b7e22bb4c0068db9d019a78819d9fe1e4d3b6c96b68",+ role: "assistant",+ parts: [+ {+ type: "text",+ text: "The weather in Tokyo is currently sunny. If you need more details like temperature or forecast for the upcoming days, just let me know!",+ providerMetadata: {+ logprobs: [],+ },+ },+ ],+ source: "output",+ },+ ],+ toolDefinitions: [+ {+ name: "get_weather",+ inputSchema: {+ properties: {+ city: {+ title: "City",+ type: "string",+ },+ },+ required: ["city"],+ title: "get_weather_args",+ type: "object",+ additionalProperties: false,+ },+ type: "function",+ providerMetadata: {+ strict: true,+ },+ },+ ],+ },+ },+ // Source: worker/src/__tests__/chatml/framework-traces/openai-agents-2025-09-30.trace.json; observation 98870087af69bf06+ {+ name: "verbatim openai-agents-2025-09-30.trace.json / 98870087af69bf06",+ spanIO: {+ input: '[{"content": "What\'s the weather in Tokyo?", "role": "user"}]',+ output:+ '{"id":"resp_0f00ca5b7e22bb4c0068db9d000be4819d824c447c54b65bc1","created_at":1759223040.0,"error":null,"incomplete_details":null,"instructions":"You are a helpful agent.","metadata":{},"model":"gpt-4.1-2025-04-14","object":"response","output":[{"arguments":"{\\"city\\":\\"Tokyo\\"}","call_id":"call_Kud0j0DxWSmLzv9W5m6qVqXn","name":"get_weather","type":"function_call","id":"fc_0f00ca5b7e22bb4c0068db9d00d258819d987f4b9b63189e76","status":"completed"}],"parallel_tool_calls":true,"temperature":1.0,"tool_choice":"auto","tools":[{"name":"get_weather","parameters":{"properties":{"city":{"title":"City","type":"string"}},"required":["city"],"title":"get_weather_args","type":"object","additionalProperties":false},"strict":true,"type":"function","description":null}],"top_p":1.0,"background":false,"conversation":null,"max_output_tokens":null,"max_tool_calls":null,"previous_response_id":null,"prompt":null,"prompt_cache_key":null,"reasoning":{"effort":null,"generate_summary":null,"summary":null},"safety_identifier":null,"service_tier":"default","status":"completed","text":{"format":{"type":"text"},"verbosity":"medium"},"top_logprobs":0,"truncation":"disabled","usage":{"input_tokens":55,"input_tokens_details":{"cached_tokens":0},"output_tokens":15,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":70},"user":null,"billing":{"payer":"developer"},"store":true}',+ metadata:+ '{"attributes":{"llm.system":"openai","output.mime_type":"application/json","output.value":"{\\"id\\":\\"resp_0f00ca5b7e22bb4c0068db9d000be4819d824c447c54b65bc1\\",\\"created_at\\":1759223040.0,\\"error\\":null,\\"incomplete_details\\":null,\\"instructions\\":\\"You are a helpful agent.\\",\\"metadata\\":{},\\"model\\":\\"gpt-4.1-2025-04-14\\",\\"object\\":\\"response\\",\\"output\\":[{\\"arguments\\":\\"{\\\\\\"city\\\\\\":\\\\\\"Tokyo\\\\\\"}\\",\\"call_id\\":\\"call_Kud0j0DxWSmLzv9W5m6qVqXn\\",\\"name\\":\\"get_weather\\",\\"type\\":\\"function_call\\",\\"id\\":\\"fc_0f00ca5b7e22bb4c0068db9d00d258819d987f4b9b63189e76\\",\\"status\\":\\"completed\\"}],\\"parallel_tool_calls\\":true,\\"temperature\\":1.0,\\"tool_choice\\":\\"auto\\",\\"tools\\":[{\\"name\\":\\"get_weather\\",\\"parameters\\":{\\"properties\\":{\\"city\\":{\\"title\\":\\"City\\",\\"type\\":\\"string\\"}},\\"required\\":[\\"city\\"],\\"title\\":\\"get_weather_args\\",\\"type\\":\\"object\\",\\"additionalProperties\\":false},\\"strict\\":true,\\"type\\":\\"function\\",\\"description\\":null}],\\"top_p\\":1.0,\\"background\\":false,\\"conversation\\":null,\\"max_output_tokens\\":null,\\"max_tool_calls\\":null,\\"previous_response_id\\":null,\\"prompt\\":null,\\"prompt_cache_key\\":null,\\"reasoning\\":{\\"effort\\":null,\\"generate_summary\\":null,\\"summary\\":null},\\"safety_identifier\\":null,\\"service_tier\\":\\"default\\",\\"status\\":\\"completed\\",\\"text\\":{\\"format\\":{\\"type\\":\\"text\\"},\\"verbosity\\":\\"medium\\"},\\"top_logprobs\\":0,\\"truncation\\":\\"disabled\\",\\"usage\\":{\\"input_tokens\\":55,\\"input_tokens_details\\":{\\"cached_tokens\\":0},\\"output_tokens\\":15,\\"output_tokens_details\\":{\\"reasoning_tokens\\":0},\\"total_tokens\\":70},\\"user\\":null,\\"billing\\":{\\"payer\\":\\"developer\\"},\\"store\\":true}","llm.tools.0.tool.json_schema":"{\\"type\\": \\"function\\", \\"function\\": {\\"name\\": \\"get_weather\\", \\"description\\": null, \\"parameters\\": {\\"properties\\": {\\"city\\": {\\"title\\": \\"City\\", \\"type\\": \\"string\\"}}, \\"required\\": [\\"city\\"], \\"title\\": \\"get_weather_args\\", \\"type\\": \\"object\\", \\"additionalProperties\\": false}, \\"strict\\": true}}","llm.token_count.completion":"15","llm.token_count.prompt":"55","llm.token_count.total":"70","llm.token_count.prompt_details.cache_read":"0","llm.token_count.completion_details.reasoning":"0","llm.output_messages.0.message.role":"assistant","llm.output_messages.0.message.tool_calls.0.tool_call.id":"call_Kud0j0DxWSmLzv9W5m6qVqXn","llm.output_messages.0.message.tool_calls.0.tool_call.function.name":"get_weather","llm.output_messages.0.message.tool_calls.0.tool_call.function.arguments":"{\\"city\\":\\"Tokyo\\"}","llm.input_messages.0.message.role":"system","llm.input_messages.0.message.content":"You are a helpful agent.","llm.model_name":"gpt-4.1-2025-04-14","llm.invocation_parameters":"{\\"id\\": \\"resp_0f00ca5b7e22bb4c0068db9d000be4819d824c447c54b65bc1\\", \\"created_at\\": 1759223040.0, \\"instructions\\": \\"You are a helpful agent.\\", \\"metadata\\": {}, \\"model\\": \\"gpt-4.1-2025-04-14\\", \\"parallel_tool_calls\\": true, \\"temperature\\": 1.0, \\"tool_choice\\": \\"auto\\", \\"top_p\\": 1.0, \\"background\\": false, \\"reasoning\\": {}, \\"service_tier\\": \\"default\\", \\"text\\": {\\"format\\": {\\"type\\": \\"text\\"}, \\"verbosity\\": \\"medium\\"}, \\"top_logprobs\\": 0, \\"truncation\\": \\"disabled\\", \\"billing\\": {\\"payer\\": \\"developer\\"}, \\"store\\": true}","input.mime_type":"application/json","input.value":"[{\\"content\\": \\"What\'s the weather in Tokyo?\\", \\"role\\": \\"user\\"}]","llm.input_messages.1.message.role":"user","llm.input_messages.1.message.content":"What\'s the weather in Tokyo?","openinference.span.kind":"LLM"},"resourceAttributes":{"telemetry.sdk.language":"python","telemetry.sdk.name":"opentelemetry","telemetry.sdk.version":"1.37.0","service.name":"unknown_service"},"scope":{"name":"openinference.instrumentation.openai_agents","version":"1.3.0","attributes":{}}}',+ },+ expected: {+ messages: [+ {+ role: "user",+ parts: [+ {+ type: "text",+ text: "What's the weather in Tokyo?",+ },+ ],+ source: "input",+ },+ {+ role: "assistant",+ parts: [+ {+ type: "tool-call",+ toolCallId: "call_Kud0j0DxWSmLzv9W5m6qVqXn",+ toolName: "get_weather",+ input: {+ city: "Tokyo",+ },+ toolType: "function_call",+ providerMetadata: {+ status: "completed",+ },+ },+ ],+ source: "output",+ },+ ],+ toolDefinitions: [+ {+ name: "get_weather",+ inputSchema: {+ properties: {+ city: {+ title: "City",+ type: "string",+ },+ },+ required: ["city"],+ title: "get_weather_args",+ type: "object",+ additionalProperties: false,+ },+ type: "function",+ providerMetadata: {+ strict: true,+ },+ },+ ],+ },+ },+];diff --git a/packages/shared/src/utils/normalized-io/conventions/providers/openai/index.ts b/packages/shared/src/utils/normalized-io/conventions/providers/openai/index.tsindex 80230b5525..25f905badb 100644--- a/packages/shared/src/utils/normalized-io/conventions/providers/openai/index.ts+++ b/packages/shared/src/utils/normalized-io/conventions/providers/openai/index.ts@@ -383,6 +383,28 @@ function openAiMessages(root: Record<string, unknown>,kind: "input" | "output",): MessageSource[] {+ // Responses API uses `input` instead of Chat Completions' `messages`:+ if (kind === "input") {+ if (typeof root.input === "string" && typeof root.model === "string") {+ return [{ kind: "single", value: root.input, fallbackRole: "user" }];+ }+ const responseInput = parseArray(root.input);+ if (+ responseInput?.length &&+ responseInput.every((item) => {+ const record = asRecord(item);+ return (+ record &&+ (typeof record.role === "string" || typeof record.type === "string")+ );+ })+ ) {+ return [+ { kind: "sequence", values: responseInput, fallbackRole: "user" },+ ];+ }+ return [];+ }if (kind !== "output") return [];const choices = parseArray(root.choices);@@ -560,4 +582,15 @@ export const openAiProvider: IOConvention = {typedParts: OPENAI_PART_HANDLERS,collectSiblingParts: openAiCollectSiblingParts,claimMessages: openAiMessages,+ getSystemMessage: (root, kind) =>+ kind === "input" &&+ typeof root.instructions === "string" &&+ openAiMessages(root, kind).length > 0+ ? {+ kind: "single",+ value: root.instructions,+ fallbackRole: "user",+ roleOverride: "system",+ }+ : undefined,};diff --git a/packages/shared/src/utils/normalized-io/conventions/providers/openai/openai.test.ts b/packages/shared/src/utils/normalized-io/conventions/providers/openai/openai.test.tsindex ed2a0ab63b..604e3956ce 100644--- a/packages/shared/src/utils/normalized-io/conventions/providers/openai/openai.test.ts+++ b/packages/shared/src/utils/normalized-io/conventions/providers/openai/openai.test.ts@@ -2,6 +2,8 @@ import { describe, expect, it } from "vitest";import { normalizeSpanIO } from "../../../parser";import {+ capturedTraceFixtures,+ documentedResponsesFixtures,openAiChatCompletionToolSequenceFixture,openAiChatMultimodalRichResponseFixture,openAiResponsesBuiltInToolsAndMediaFixture,@@ -11,6 +13,8 @@ import {describe("OpenAI normalized I/O", () => {it.each([+ ...capturedTraceFixtures,+ ...documentedResponsesFixtures,openAiChatCompletionToolSequenceFixture,openAiChatMultimodalRichResponseFixture,openAiResponsesFunctionCallFixture,diff --git a/packages/shared/src/utils/normalized-io/conventions/providers/otel-genai/fixtures.ts b/packages/shared/src/utils/normalized-io/conventions/providers/otel-genai/fixtures.tsindex 48cb920a77..ff8ace2c02 100644--- a/packages/shared/src/utils/normalized-io/conventions/providers/otel-genai/fixtures.ts+++ b/packages/shared/src/utils/normalized-io/conventions/providers/otel-genai/fixtures.ts@@ -783,3 +783,491 @@ export const microsoftAgentProductionShapeFixture = {],},} satisfies NormalizedIOFixture;++// Verbatim stored observation IO from ChatML integration-example exports.+export const capturedTraceFixtures: NormalizedIOFixture[] = [+ // Source: worker/src/__tests__/chatml/framework-traces/csharp-agent-with-gemini-2026-03-09.trace.json; observation c651c1dac855f97e+ // Anonymized: the capturing organization's name, host, internal service and+ // dashboard URL, and the provider's encrypted reasoning blobs were replaced+ // with placeholders. Message and tool-call structure is unmodified.+ {+ name: "anonymized csharp-agent-with-gemini-2026-03-09.trace.json / c651c1dac855f97e",+ spanIO: {+ input:+ '[\n {\n "role": "user",\n "parts": [\n {\n "type": "text",\n "content": "What are my month over month performance insights the past quarter, by cost, displays, clicks, CTR, sales, CVR? Please split by campaign taxonomy"\n }\n ]\n }\n]',+ output:+ '[\n {\n "role": "assistant",\n "parts": [\n {\n "type": "tool_call",\n "id": "get_custom_report",\n "name": "get_custom_report",\n "arguments": {\n "dimensions": [\n "Campaign"\n ],\n "filters": {\n "dateRange": {\n "from_date": "2025-10-01",\n "to_date": "2025-12-31"\n }\n },\n "timeDimension": "Month",\n "metrics": [\n "Cost",\n "Displays",\n "Clicks",\n "Ctr",\n "Sales",\n "Cvr"\n ]\n }\n },\n {\n "type": "Microsoft.Extensions.AI.TextReasoningContent",\n "content": {\n "text": "",\n "protectedData": "anonymized-encrypted-reasoning"\n }\n }\n ],\n "finish_reason": "stop"\n }\n]',+ metadata:+ '{"attributes":{"otel.exception_pointers":"94867131908120","gen_ai.operation.name":"chat","gen_ai.request.model":"gemini-2.5-flash","gen_ai.provider.name":"gcp.vertex_ai","server.address":"aiplatform.googleapis.com","server.port":"443","gen_ai.request.seed":"42","gen_ai.request.temperature":"0","gen_ai.tool.definitions":"[\\n {\\n \\"type\\": \\"function\\",\\n \\"name\\": \\"get_adset_infos\\",\\n \\"description\\": \\"Retrieves all ad sets matching conditions set in the filter (also referred to as campaigns)\\\\r\\\\nThis method should be called by the agent whenever\\\\r\\\\nit needs information about one or more ad sets.\\\\r\\\\nIt provides a comprehensive list of ad sets with key metadata and status fields.\\\\r\\\\n\\\\r\\\\nReturns:\\\\r\\\\n-------\\\\r\\\\nResponse\\\\r\\\\n An object containing data with the following information for each ad set:\\\\r\\\\n - id: The unique identifier of the ad set (also called Campaign ID).\\\\r\\\\n - name: The name of the ad set.\\\\r\\\\n - advertiserId: The ID of the advertiser that owns this ad set.\\\\r\\\\n - objective (MarketingObjective): The marketing objective associated with the ad set: Acquisition or Retention.\\\\r\\\\n - startDate: The start date of the ad set, if specified.\\\\r\\\\n - activationStatus: Indicates whether the ad set is currently active: Activated or NotActivated\\\\r\\\\n - deliveryStatus: Describes the current delivery state of the ad set: Running, Archived or NotRunning\\\\r\\\\n\\\\r\\\\nNotes:\\\\r\\\\n-----\\\\r\\\\nUse this method as the primary source for retrieving ad set (campaign) information.\\",\\n \\"parameters\\": {\\n \\"type\\": \\"object\\",\\n \\"properties\\": {\\n \\"filter\\": {\\n \\"description\\": \\"The filters applied for selecting the ad_sets\\",\\n \\"type\\": \\"object\\",\\n \\"properties\\": {\\n \\"adset_ids\\": {\\n \\"type\\": [\\n \\"array\\",\\n \\"null\\"\\n ],\\n \\"items\\": {\\n \\"type\\": \\"integer\\"\\n }\\n },\\n \\"names\\": {\\n \\"type\\": [\\n \\"array\\",\\n \\"null\\"\\n ],\\n \\"items\\": {\\n \\"type\\": \\"string\\"\\n }\\n },\\n \\"activation_statuses\\": {\\n \\"type\\": [\\n \\"array\\",\\n \\"null\\"\\n ],\\n \\"items\\": {\\n \\"type\\": \\"string\\",\\n \\"enum\\": [\\n \\"NotActivated\\",\\n \\"Activated\\"\\n ]\\n }\\n },\\n \\"objectives\\": {\\n \\"type\\": [\\n \\"array\\",\\n \\"null\\"\\n ],\\n \\"items\\": {\\n \\"type\\": \\"string\\",\\n \\"enum\\": [\\n \\"NotSet\\",\\n \\"Acquisition\\",\\n \\"Retention\\"\\n ]\\n }\\n },\\n \\"delivery_statuses\\": {\\n \\"type\\": [\\n \\"array\\",\\n \\"null\\"\\n ],\\n \\"items\\": {\\n \\"type\\": \\"string\\",\\n \\"enum\\": [\\n \\"Running\\",\\n \\"Archived\\",\\n \\"NotRunning\\"\\n ]\\n }\\n }\\n }\\n }\\n },\\n \\"required\\": [\\n \\"filter\\"\\n ]\\n }\\n },\\n {\\n \\"type\\": \\"function\\",\\n \\"name\\": \\"get_custom_report\\",\\n \\"description\\": \\"Calls the API to retrieve client data.\\\\r\\\\n\\\\r\\\\nArgs:\\\\r\\\\n filters: An object containing the built-in filters.\\\\r\\\\n Default values are provided if needed.\\\\r\\\\n timeDimension: Time-based dimension for data projections; specifies the granularity at which data will be grouped.\\\\r\\\\n Possible values and examples:\\\\r\\\\n - None: Indicates that the user has not provided any clear time dimension.\\\\r\\\\n This should be selected when there is no explicit instruction.\\\\r\\\\n Do NOT infer or assume a value; use None unless the user specifies otherwise.\\\\r\\\\n - Year: Represents a calendar year.\\\\r\\\\n Examples: per year, by year, year-over-year comparisons (YoY), yearly trend analysis.\\\\r\\\\n - Month: Represents a calendar month.\\\\r\\\\n Examples: per month, by month, month-over-month comparisons (MoM), monthly performance reports.\\\\r\\\\n - Week: Represents a calendar week.\\\\r\\\\n Examples: per week, by week, week-over-week comparisons (WoW), weekly campaign summaries.\\\\r\\\\n - Day: Represents a calendar day.\\\\r\\\\n Examples: per day, by day, day-over-day comparisons (DoD), daily performance tracking.\\\\r\\\\n - Hour: Represents an hour within a day.\\\\r\\\\n Examples: per hour, by hour, hourly trend analysis, intraday performance monitoring.\\\\r\\\\n dimensions: A list of dimensions that define the granularity of the report.\\\\r\\\\n Example: [os, device]\\\\r\\\\n metrics: A list of performance indicators to retrieve.\\\\r\\\\n Example: [clicks, ctr]\\\\r\\\\n attributionModel: Specifies the model used to measure sales.\\\\r\\\\n Optional.\\\\r\\\\n additionalFilters: Custom filters applied to the data.\\\\r\\\\n CRITICAL CONSTRAINT: Every dimension used in \\\\u0060additionalFilters\\\\u0060 MUST be present in the \\\\u0060dimensions\\\\u0060 list.\\\\r\\\\n If a filter references a dimension not included in \\\\u0060dimensions\\\\u0060, the request will be rejected.\\\\r\\\\n\\\\r\\\\nNotes:\\\\r\\\\n - Dimensions determine the level of detail in the report.\\\\r\\\\n - Metrics represent the KPIs to monitor campaign performance.\\\\r\\\\n - Filters restrict the dataset retrieved from the API.\\\\r\\\\n - \\\\u0060additionalFilters\\\\u0060 allow for extra filtering, but only on dimensions explicitly listed in \\\\u0060dimensions\\\\u0060.\\",\\n \\"parameters\\": {\\n \\"type\\": \\"object\\",\\n \\"properties\\": {\\n \\"filters\\": {\\n \\"description\\": \\"Filters are a way to narrow the scope of the report by setting certain values.\\\\r\\\\nIf no value can be inferred, a default one will be provided.\\",\\n \\"type\\": \\"object\\",\\n \\"properties\\": {\\n \\"clientIds\\": {\\n \\"type\\": \\"array\\",\\n \\"items\\": {\\n \\"type\\": \\"integer\\"\\n }\\n },\\n \\"dateRange\\": {\\n \\"description\\": \\"Date range between two dates.\\\\r\\\\nIMPORTANT: from_date and to_date are inclusive (the start and end dates are included in the period).\\\\r\\\\n\\\\r\\\\nIf dates are not given explicitly, they can be deduced as follows:\\\\r\\\\n\\\\r\\\\n- IMPORTANT: Last n days: from = today - n days, to = yesterday (inclusive, does not include today)\\\\r\\\\n Example: if today is 2025-08-23 then \\\\u0022last 7 days\\\\u0022: 2025-08-16 to 2025-08-22 (inclusive, 7 days)\\\\r\\\\n Example: if today is 2025-08-10 then \\\\u0022last 20 days\\\\u0022: 2025-07-21 to 2025-08-09 (inclusive, 20 days)\\\\r\\\\n- Month of May 2025: from = 2025-05-01, to = 2025-05-31\\\\r\\\\n- IMPORTANT: Last week, the last full calendar week (Monday to Sunday) before the current Week:\\\\r\\\\n from = Monday of previous week\\\\r\\\\n to = Sunday of previous Week\\\\r\\\\n Example: if today is Tuesday, 2025-08-12 then \\\\u0022last week\\\\u0022 is Monday 2025-08-04 to Sunday 2025-08-10\\\\r\\\\n Example: if today is Monday, 2025-09-15 then \\\\u0022last week\\\\u0022 is Monday 2025-08-14 to Sunday 2025-08-14\\\\r\\\\n- IMPORTANT: Last n weeks, the last n full calendar weeks (Monday to Sunday) before the current Week.\\\\r\\\\n n is the number of weeks.\\\\r\\\\n from = Monday of n weeks ago\\\\r\\\\n to = Sunday of previous Week\\\\r\\\\n Example: if today is Friday, 2025-08-22 then \\\\u0022last 2 weeks\\\\u0022 is\\\\r\\\\n Monday 2025-08-04 to Sunday 2025-08-17\\\\r\\\\n n is 2\\\\r\\\\n Example: if today is Monday, 2025-07-21 then \\\\u0022last 3 weeks\\\\u0022 is\\\\r\\\\n Monday 2025-06-30 to Sunday 2025-07-20\\\\r\\\\n n is 3\\\\r\\\\n- IMPORTANT: Last month, the last full calendar month before the current month.\\\\r\\\\n from = first day of previous month\\\\r\\\\n to = last day of previous month\\\\r\\\\n Example: if today is Tuesday, 2025-08-19 then \\\\u0022last month\\\\u0022 is 2025-07-01 to 2025-07-31\\\\r\\\\n- IMPORTANT: Last n months, the last n full calendar months before the current month.\\\\r\\\\n n is the number of months.\\\\r\\\\n from = first day of the month n months ago\\\\r\\\\n to = last day of previous month\\\\r\\\\n Example: if today is Monday, 2025-08-19 then \\\\u0022last 3 months\\\\u0022 is 2025-05-01 to 2025-07-31\\\\r\\\\n n is 3\\\\r\\\\n- Last quarter: the last full quarter before the current quarter.\\\\r\\\\n Q1: January 1 to March 31\\\\r\\\\n Q2: April 1 to June 30\\\\r\\\\n Q3: July 1 to September 30\\\\r\\\\n Q4: October 1 to December 31\\\\r\\\\n\\\\r\\\\n\\\\r\\\\ntime_zone is the IANA time zone name (e.g., \\\\u0022Europe/London\\\\u0022, \\\\u0022America/New_York\\\\u0022).\\\\r\\\\nBy default, assume that we are in the Europe/London time zone.\\\\r\\\\n\\\\r\\\\nThe field previous_period_from_date is used to define the starting date of a previous period\\\\r\\\\nthat mirrors the current data collection range.\\\\r\\\\nThis allows for comparative analysis between the current period and a similar past period.\\\\r\\\\n\\\\r\\\\nUse the following guidelines and examples to determine the correct value:\\\\r\\\\n\\\\r\\\\nGeneral Rule:\\\\r\\\\nprevious_period_from_date should be set to a date that starts the previous comparable period\\\\r\\\\nthe previous period will have the same duration as the current one\\\\r\\\\nthe previous period and the current period MUST NOT overlap\\\\r\\\\n\\\\r\\\\n Examples:\\\\r\\\\n Relative Time Comparison\\\\r\\\\n If comparing to last year, and from_date = 2025-08-01, then:\\\\r\\\\n previous_period_from_date = 2024-08-01\\\\r\\\\n If comparing with the previous period, previous_period_start_date is calculated\\\\r\\\\n by subtracting the duration of the current date range from its starting date (from_date).\\\\r\\\\n This ensures the previous period has the same length and ends\\\\r\\\\n right before the current one begins.\\\\r\\\\n Example:\\\\r\\\\n Current range: from_date = 2025-08-10, to_date = 2025-08-19 (10 days including bounds),\\\\r\\\\n then: previous_period_start_date = 2025-07-31 (10 days before 2025-08-10)\\\\r\\\\n Custom Period Comparison\\\\r\\\\n If comparing to the period starting 2025-02-25, then:\\\\r\\\\n previous_period_from_date = 2025-02-25\\\\r\\\\n\\",\\n \\"type\\": \\"object\\",\\n \\"properties\\": {\\n \\"from_date\\": {\\n \\"type\\": \\"string\\",\\n \\"format\\": \\"date\\"\\n },\\n \\"to_date\\": {\\n \\"type\\": \\"string\\",\\n \\"format\\": \\"date\\"\\n },\\n \\"time_zone\\": {\\n \\"type\\": [\\n \\"string\\",\\n \\"null\\"\\n ]\\n },\\n \\"previous_period_from_date\\": {\\n \\"type\\": [\\n \\"string\\",\\n \\"null\\"\\n ],\\n \\"format\\": \\"date\\"\\n }\\n }\\n },\\n \\"currency\\": {\\n \\"type\\": \\"string\\"\\n },\\n \\"campaignStatus\\": {\\n \\"type\\": [\\n \\"array\\",\\n \\"null\\"\\n ],\\n \\"items\\": {\\n \\"description\\": \\" Status of a campaign\\\\r\\\\n\\\\r\\\\n Glossary:\\\\r\\\\n Active\\\\r\\\\n Active, Running or Live\\\\r\\\\n NotRunning\\\\r\\\\n Not running\\\\r\\\\n Dead\\\\r\\\\n Archived\\",\\n \\"type\\": \\"string\\",\\n \\"enum\\": [\\n \\"Active\\",\\n \\"NotRunning\\",\\n \\"Dead\\"\\n ]\\n }\\n },\\n \\"mediaType\\": {\\n \\"type\\": [\\n \\"array\\",\\n \\"null\\"\\n ],\\n \\"items\\": {\\n \\"description\\": \\" Type of media used. video or display.\\\\r\\\\n\\\\r\\\\n Glossary:\\\\r\\\\n Display\\\\r\\\\n HTML display\\\\r\\\\n\\\\r\\\\n Video\\\\r\\\\n Video display\\",\\n \\"type\\": \\"string\\",\\n \\"enum\\": [\\n \\"Display\\",\\n \\"Video\\"\\n ]\\n }\\n },\\n \\"marketingCampaignGoals\\": {\\n \\"type\\": [\\n \\"array\\",\\n \\"null\\"\\n ],\\n \\"items\\": {\\n \\"type\\": \\"string\\",\\n \\"enum\\": [\\n \\"NotSet\\",\\n \\"Acquisition\\",\\n \\"Retention\\"\\n ]\\n }\\n },\\n \\"campaigns\\": {\\n \\"type\\": [\\n \\"array\\",\\n \\"null\\"\\n ],\\n \\"items\\": {\\n \\"type\\": \\"integer\\"\\n }\\n }\\n }\\n },\\n \\"timeDimension\\": {\\n \\"description\\": \\"Defines the time-based dimensions available for data projections.\\\\r\\\\n\\\\r\\\\nEach enum member specifies the granularity at which data can be grouped or analyzed.\\\\r\\\\n\\\\r\\\\nMembers:\\\\r\\\\n None - Indicates that the user has not provided any clear time dimension.\\\\r\\\\n This should be selected when there is no explicit instruction.\\\\r\\\\n Do NOT infer or assume a value; use None unless the user specifies otherwise.\\\\r\\\\n Year - Represents a calendar year. For example per year, by year, year-over-year comparisons (YoY), yearly trend analysis.\\\\r\\\\n Month - Represents a calendar month. For example per month, by month, month-over-month comparisons (MoM), monthly performance reports.\\\\r\\\\n Week - Represents a calendar week. For example per week, by week, week-over-week comparisons (WoW), weekly campaign summaries.\\\\r\\\\n Day - Represents a calendar day. For example per day, by day, day-over-day comparisons (DoD), daily performance tracking.\\\\r\\\\n Hour - Represents an hour within a day. For example per hour, by hour, hourly trend analysis, intraday performance monitoring.\\",\\n \\"type\\": \\"string\\",\\n \\"enum\\": [\\n \\"None\\",\\n \\"Year\\",\\n \\"Month\\",\\n \\"Week\\",\\n \\"Day\\",\\n \\"Hour\\"\\n ],\\n \\"default\\": \\"None\\"\\n },\\n \\"dimensions\\": {\\n \\"type\\": \\"array\\",\\n \\"items\\": {\\n \\"description\\": \\" Enumeration of standardized dimensions used in online advertising projections.\\\\r\\\\n\\\\r\\\\n Each member represents a dimension or attribute commonly used in digital marketing analytics,\\\\r\\\\n campaign performance tracking, and audience segmentation.\\\\r\\\\n\\\\r\\\\n Glossary:\\\\r\\\\n Advertiser\\\\r\\\\n Name or entity running the ad campaign(s). Also called Client\\\\r\\\\n\\\\r\\\\n MarketingCampaign\\\\r\\\\n Full name of the marketing campaign. A group of ad sets.\\\\r\\\\n\\\\r\\\\n Campaign\\\\r\\\\n An ad set.\\\\r\\\\n\\\\r\\\\n MediaType\\\\r\\\\n Type of media used (e.g., video, display, native).\\\\r\\\\n\\\\r\\\\n MarketingCampaignGoal\\\\r\\\\n Marketing campaign objective (Retention, Acquisition)\\\\r\\\\n\\\\r\\\\n Category\\\\r\\\\n Product or content category (e.g., electronics, fashion).\\\\r\\\\n\\\\r\\\\n Device\\\\r\\\\n Type of device used (e.g., mobile, desktop, tablet).\\\\r\\\\n\\\\r\\\\n Os\\\\r\\\\n Operating system of the device (e.g., iOS, Android, Windows).\\\\r\\\\n\\\\r\\\\n AdChannel\\\\r\\\\n Specific advertising channel (e.g., programmatic, direct).\\\\r\\\\n\\\\r\\\\n AdSocialNetwork\\\\r\\\\n Social media platform used (e.g., Facebook, TikTok).\\\\r\\\\n\\\\r\\\\n Ad\\\\r\\\\n A creative\\\\r\\\\n\\\\r\\\\n Coupon\\\\r\\\\n A creative coupon\\\\r\\\\n\\\\r\\\\n AdFormat\\\\r\\\\n Format of the ad (e.g., banner, interstitial, carousel).\\\\r\\\\n\\\\r\\\\n DisplaySize\\\\r\\\\n Size of the display area for the ad.\\\\r\\\\n\\\\r\\\\n VideoPlacement\\\\r\\\\n Placement type for video ads (e.g., in-stream, out-stream).\\\\r\\\\n\\\\r\\\\n VideoPlaybackMethod\\\\r\\\\n How the video was played (e.g., autoplay, click-to-play).\\\\r\\\\n\\\\r\\\\n VideoPlayerSize\\\\r\\\\n Dimensions of the video player.\\\\r\\\\n\\\\r\\\\n VideoDurationInSeconds\\\\r\\\\n Length of the video ad.\\\\r\\\\n\\\\r\\\\n VideoPlayerRatio\\\\r\\\\n Aspect ratio of the video player (e.g., 16:9).\\\\r\\\\n\\\\r\\\\n Ssp\\\\r\\\\n Supply Side Partner. The publishing network where displays were made.\\\\r\\\\n\\\\r\\\\n Country\\\\r\\\\n Country where the ad was served.\\\\r\\\\n\\\\r\\\\n Region\\\\r\\\\n Region or state within the country.\\\\r\\\\n\\\\r\\\\n PostalCode\\\\r\\\\n Postal or ZIP code.\\\\r\\\\n\\\\r\\\\n UserBehavior\\\\r\\\\n Behavioral segment of the user (e.g., frequent buyer).\\\\r\\\\n\\",\\n \\"type\\": \\"string\\",\\n \\"enum\\": [\\n \\"Advertiser\\",\\n \\"MarketingCampaign\\",\\n \\"Campaign\\",\\n \\"MediaType\\",\\n \\"MarketingCampaignGoal\\",\\n \\"Category\\",\\n \\"Device\\",\\n \\"Os\\",\\n \\"AdChannel\\",\\n \\"AdSocialNetwork\\",\\n \\"Ad\\",\\n \\"Coupon\\",\\n \\"AdFormat\\",\\n \\"DisplaySize\\",\\n \\"VideoPlacement\\",\\n \\"VideoPlaybackMethod\\",\\n \\"VideoPlayerSize\\",\\n \\"VideoDurationInSeconds\\",\\n \\"VideoPlayerRatio\\",\\n \\"Ssp\\",\\n \\"Country\\",\\n \\"Region\\",\\n \\"PostalCode\\",\\n \\"UserBehavior\\"\\n ]\\n },\\n \\"default\\": null\\n },\\n \\"metrics\\": {\\n \\"type\\": \\"array\\",\\n \\"items\\": {\\n \\"description\\": \\" Metrics represents the quantity that we wish to measure\\\\r\\\\n\\\\r\\\\n Glossary:\\\\r\\\\n Audience\\\\r\\\\n Users or devices that were seen online and were eligible to be served an ad. When\\\\r\\\\n several devices can be related to one user, it counts for 1, otherwise it reflects the\\\\r\\\\n number of devices\\\\r\\\\n\\\\r\\\\n Clicks\\\\r\\\\n The number of clicks driven by the ads\\\\r\\\\n\\\\r\\\\n Cost\\\\r\\\\n The overall cost of your ads or video ads\\\\r\\\\n\\\\r\\\\n CostPerResult\\\\r\\\\n What your ad set has cost per configured result unit for your selected period.\\\\r\\\\n\\\\r\\\\n Cpc\\\\r\\\\n Cost Per Click - the amount of money spent for the ads to receive one click\\\\r\\\\n\\\\r\\\\n Cpm\\\\r\\\\n Cost Per Mille - the amount of money spent per thousand displays, available for CPM\\\\r\\\\n based ad sets only\\\\r\\\\n\\\\r\\\\n Ctr\\\\r\\\\n Click-Through Rate - literally, the rate or frequency at which users click through to a\\\\r\\\\n landing page from an ad\\\\r\\\\n\\\\r\\\\n Displays\\\\r\\\\n The number of times your ads have been shown on a screen\\\\r\\\\n\\\\r\\\\n Ecpm\\\\r\\\\n Effective Cost Per Mille - the amount of money spent per thousand displays\\\\r\\\\n\\\\r\\\\n ExposedUsers\\\\r\\\\n The number of users who have been served an ad\\\\r\\\\n\\\\r\\\\n Frequency\\\\r\\\\n The average number of displays each exposed user has seen.\\\\r\\\\n\\\\r\\\\n InvalidClicks\\\\r\\\\n Clicks that don\\\\u0027t meet our quality standards and won\\\\u0027t be billed to you.\\\\r\\\\n\\\\r\\\\n InvalidDisplays\\\\r\\\\n Displays that don\\\\u0027t meet our quality standards and won\\\\u0027t be billed to you.\\\\r\\\\n\\\\r\\\\n Reach\\\\r\\\\n Share of online eligible users or devices who have been served an ad\\\\r\\\\n\\\\r\\\\n Result\\\\r\\\\n What your ad set has achieved based on your configuration for your selected period.\\\\r\\\\n\\\\r\\\\n UntrackableDisplays\\\\r\\\\n\\\\r\\\\n NonViewableDisplays\\\\r\\\\n\\\\r\\\\n Viewability\\\\r\\\\n The percentage of displayed ads or videos ads that were considered viewable\\\\r\\\\n\\\\r\\\\n ViewableDisplays\\\\r\\\\n The number of times at least 50% of the ad appeared for at least 1 second for ads and 2\\\\r\\\\n seconds for videos ads, once started\\\\r\\\\n\\\\r\\\\n Visits\\\\r\\\\n The number of users that were active on your site or app in the hour following clicking\\\\r\\\\n on your ad\\\\r\\\\n\\\\r\\\\n Winrate\\\\r\\\\n Number of displays divided by the total number of display opportunities\\\\r\\\\n\\\\r\\\\n BounceRate\\\\r\\\\n Proportion of website visitors leaving after seeing only one page\\\\r\\\\n\\\\r\\\\n Cpv\\\\r\\\\n Cost Per Visit - the amount of money spent to get one visit on your website\\\\r\\\\n\\\\r\\\\n AppInstall\\\\r\\\\n The number of installations of application\\\\r\\\\n\\\\r\\\\n Cpi\\\\r\\\\n Cost Per Install - the amount of money that needs to be spent to get one app installed\\\\r\\\\n\\\\r\\\\n Cpqv\\\\r\\\\n Cost Per Qualified Visit - the amount of money spent to get one qualified visit on your\\\\r\\\\n website\\\\r\\\\n\\\\r\\\\n InstallRate\\\\r\\\\n Install Rate - the percentage of completed app installs compared to the clicks that\\\\r\\\\n occurred\\\\r\\\\n\\\\r\\\\n QualifiedVisits\\\\r\\\\n The number of users on the target website for which at least two events or one sale\\\\r\\\\n event occurred within the hour following the click\\\\r\\\\n\\\\r\\\\n Assists\\\\r\\\\n The number of sales one of your campaigns or ad sets contributed to (with clicks or\\\\r\\\\n displays) on your site or app.\\\\r\\\\n\\\\r\\\\n AvgCart\\\\r\\\\n Average revenue generated by a sale\\\\r\\\\n\\\\r\\\\n Cos\\\\r\\\\n Cost Of Sales - the ratio between the cost generated by the ad set(s) vs. the revenue\\\\r\\\\n generated by the sales, figured as a percentage\\\\r\\\\n\\\\r\\\\n Cpov\\\\r\\\\n Cost Per Store Visit - the amount of money spent to get one visit on your physical store\\\\r\\\\n\\\\r\\\\n Cov\\\\r\\\\n Cost Of advertiser Value - the ratio between the advertiser value generated by the sales\\\\r\\\\n vs. the cost generated by the ad set(s), figured as a percentage\\\\r\\\\n\\\\r\\\\n Cpo\\\\r\\\\n Cost Per Order - the amount of money that needs to be spent to get one order or\\\\r\\\\n transaction\\\\r\\\\n\\\\r\\\\n Cvr\\\\r\\\\n ConVersion Rate - the percentage of completed purchases compared to the clicks that\\\\r\\\\n occurred\\\\r\\\\n\\\\r\\\\n AssistsSalesRatio\\\\r\\\\n The ratio between your assisted sales and sales made on your site or app.\\\\r\\\\n\\\\r\\\\n OmnichannelRevenue\\\\r\\\\n The revenue generated by online and in-store sales.\\\\r\\\\n\\\\r\\\\n OmnichannelRoas\\\\r\\\\n Omnichannel Return on Ad Spend. The ratio between revenue generated online and in-store,\\\\r\\\\n and the cost.\\\\r\\\\n\\\\r\\\\n OmnichannelSales\\\\r\\\\n The number of online and in store transactions or conversions resulting from ExampleAds ads.\\\\r\\\\n\\\\r\\\\n Revenue\\\\r\\\\n The amount of money generated by the online sales\\\\r\\\\n\\\\r\\\\n Roas\\\\r\\\\n Return On Ad Spend - the ratio between the revenue generated and the cost\\\\r\\\\n\\\\r\\\\n Sales\\\\r\\\\n The number of completed e-commerce transactions or purchases\\\\r\\\\n\\\\r\\\\n OfflineRevenue\\\\r\\\\n The amount of revenue generated by in-store sales.\\\\r\\\\n\\\\r\\\\n OfflineRoas\\\\r\\\\n Store Return on Ad Spend. The ratio between the revenue generated in-store and the cost.\\\\r\\\\n\\\\r\\\\n OfflineSales\\\\r\\\\n The number of completed in-store transactions or purchases.\\\\r\\\\n\\\\r\\\\n OfflineVisits\\\\r\\\\n The number of visits to one of the physical stores\\\\r\\\\n\\\\r\\\\n Currency\\\\r\\\\n\\\\r\\\\n VideoAvoc\\\\r\\\\n The number of times one of your videos was viewable and audible when it reached\\\\r\\\\n completion\\\\r\\\\n\\\\r\\\\n VideoCompletionRate\\\\r\\\\n The percentage of started videos that played for their entire duration\\\\r\\\\n\\\\r\\\\n VideoCpcv\\\\r\\\\n The average cost of a video played for its entire duration\\\\r\\\\n\\\\r\\\\n VideoCpv\\\\r\\\\n The average cost of a video that started playing\\\\r\\\\n\\\\r\\\\n VideoComplete\\\\r\\\\n The number of times one of your videos played for its entire duration\\\\r\\\\n\\\\r\\\\n VideoFirstQuartile\\\\r\\\\n The number of times one of your videos played to 25% of its duration\\\\r\\\\n\\\\r\\\\n VideoMidpoint\\\\r\\\\n The number of times one of your videos played to 50% of its duration\\\\r\\\\n\\\\r\\\\n VideoThirdQuartile\\\\r\\\\n The number of times one of your videos played to 75% of its duration\\\\r\\\\n\\\\r\\\\n VideoAverageViewRate\\\\r\\\\n The average played percentage of a started video\\\\r\\\\n\\\\r\\\\n VideoStartRate\\\\r\\\\n The percentage of displayed videos that started playing\\\\r\\\\n\\\\r\\\\n VideoStart\\\\r\\\\n The number of times one of your ads started playing\\",\\n \\"type\\": \\"string\\",\\n \\"enum\\": [\\n \\"Audience\\",\\n \\"Clicks\\",\\n \\"Cost\\",\\n \\"CostPerResult\\",\\n \\"Cpc\\",\\n \\"Cpm\\",\\n \\"Ctr\\",\\n \\"Displays\\",\\n \\"Ecpm\\",\\n \\"ExposedUsers\\",\\n \\"Frequency\\",\\n \\"InvalidClicks\\",\\n \\"InvalidDisplays\\",\\n \\"Reach\\",\\n \\"Result\\",\\n \\"UntrackableDisplays\\",\\n \\"NonViewableDisplays\\",\\n \\"Viewability\\",\\n \\"ViewableDisplays\\",\\n \\"Visits\\",\\n \\"Winrate\\",\\n \\"BounceRate\\",\\n \\"Cpv\\",\\n \\"AppInstall\\",\\n \\"Cpi\\",\\n \\"Cpqv\\",\\n \\"InstallRate\\",\\n \\"QualifiedVisits\\",\\n \\"Assists\\",\\n \\"AvgCart\\",\\n \\"Cos\\",\\n \\"Cpov\\",\\n \\"Cov\\",\\n \\"Cpo\\",\\n \\"Cvr\\",\\n \\"AssistsSalesRatio\\",\\n \\"OmnichannelRevenue\\",\\n \\"OmnichannelRoas\\",\\n \\"OmnichannelSales\\",\\n \\"Revenue\\",\\n \\"Roas\\",\\n \\"Sales\\",\\n \\"OfflineRevenue\\",\\n \\"OfflineRoas\\",\\n \\"OfflineSales\\",\\n \\"OfflineVisits\\",\\n \\"Currency\\",\\n \\"VideoAvoc\\",\\n \\"VideoCompletionRate\\",\\n \\"VideoCpcv\\",\\n \\"VideoCpv\\",\\n \\"VideoComplete\\",\\n \\"VideoFirstQuartile\\",\\n \\"VideoMidpoint\\",\\n \\"VideoThirdQuartile\\",\\n \\"VideoAverageViewRate\\",\\n \\"VideoStartRate\\",\\n \\"VideoStart\\"\\n ]\\n },\\n \\"default\\": null\\n },\\n \\"attributionModel\\": {\\n \\"description\\": \\" Attribution models define how sales are credited to advertising campaigns.\\\\r\\\\n\\\\r\\\\n Available models:\\\\r\\\\n\\\\r\\\\n Pv1d: 1-Day Post View\\\\r\\\\n \\\\u2014 Sale is attributed when a user views an ad and purchases within 24 hours.\\\\r\\\\n\\\\r\\\\n Pc1d: 1-Day Post Click\\\\r\\\\n \\\\u2014 Sale is attributed when a user clicks an ad and purchases within 24 hours.\\\\r\\\\n\\\\r\\\\n Pc7d: 7-Day Post Click\\\\r\\\\n \\\\u2014 Sale is attributed when a user clicks an ad and purchases within 7 days.\\\\r\\\\n\\\\r\\\\n Pv7d: 7-Day Post View\\\\r\\\\n \\\\u2014 Sale is attributed when a user views an ad and purchases within 7 days.\\\\r\\\\n\\\\r\\\\n Pv14d: 14-Day Post View\\\\r\\\\n \\\\u2014 Sale is attributed when a user views an ad and purchases within 14 days.\\\\r\\\\n\\\\r\\\\n Pv30d: 30-Day Post View\\\\r\\\\n \\\\u2014 Sale is attributed when a user views an ad and purchases within 30 days.\\\\r\\\\n\\\\r\\\\n Pc30d: 30-Day Post Click\\\\r\\\\n \\\\u2014 Sale is attributed when a user clicks an ad and purchases within 30 days.\\\\r\\\\n\\\\r\\\\n Pc30dPv1d: 30-Day Post Click \\\\u002B 1-Day Post View\\\\r\\\\n \\\\u2014 Sale is attributed if a user clicks and purchases within 30 days, or views and purchases within 24 hours.\\\\r\\\\n\\\\r\\\\n Pc7dPv1d: 7-Day Post Click \\\\u002B 1-Day Post View\\\\r\\\\n \\\\u2014 Sale is attributed if a user clicks and purchases within 7 days, or views and purchases within 24 hours.\\\\r\\\\n\\\\r\\\\n Lc30d: Last Click\\\\r\\\\n \\\\u2014 Full credit is given to the last click before a conversion.\\\\r\\\\n\\\\r\\\\n CAttr: Client Attribution\\\\r\\\\n \\\\u2014 Attribution is determined by the advertiser using ExampleAds\\\\u0027s deduplication parameter.\\",\\n \\"type\\": \\"string\\",\\n \\"enum\\": [\\n \\"Pv1d\\",\\n \\"Pc1d\\",\\n \\"Pc7d\\",\\n \\"Pv7d\\",\\n \\"Pv14d\\",\\n \\"Pv30d\\",\\n \\"Pc30d\\",\\n \\"Pc30dPv1d\\",\\n \\"Lc30d\\",\\n \\"CAttr\\",\\n \\"Pc7dPv1d\\"\\n ],\\n \\"default\\": \\"Pc30d\\"\\n },\\n \\"additionalFilters\\": {\\n \\"type\\": \\"array\\",\\n \\"items\\": {\\n \\"description\\": \\"Represents a filter for a specific dimension and its associated value.\\\\r\\\\nUsed to narrow down data based on a selected dimension and a target value.\\",\\n \\"type\\": \\"object\\",\\n \\"properties\\": {\\n \\"dimension\\": {\\n \\"description\\": \\" Enumeration of standardized dimensions used in online advertising projections.\\\\r\\\\n\\\\r\\\\n Each member represents a dimension or attribute commonly used in digital marketing analytics,\\\\r\\\\n campaign performance tracking, and audience segmentation.\\\\r\\\\n\\\\r\\\\n Glossary:\\\\r\\\\n Advertiser\\\\r\\\\n Name or entity running the ad campaign(s). Also called Client\\\\r\\\\n\\\\r\\\\n MarketingCampaign\\\\r\\\\n Full name of the marketing campaign. A group of ad sets.\\\\r\\\\n\\\\r\\\\n Campaign\\\\r\\\\n An ad set.\\\\r\\\\n\\\\r\\\\n MediaType\\\\r\\\\n Type of media used (e.g., video, display, native).\\\\r\\\\n\\\\r\\\\n MarketingCampaignGoal\\\\r\\\\n Marketing campaign objective (Retention, Acquisition)\\\\r\\\\n\\\\r\\\\n Category\\\\r\\\\n Product or content category (e.g., electronics, fashion).\\\\r\\\\n\\\\r\\\\n Device\\\\r\\\\n Type of device used (e.g., mobile, desktop, tablet).\\\\r\\\\n\\\\r\\\\n Os\\\\r\\\\n Operating system of the device (e.g., iOS, Android, Windows).\\\\r\\\\n\\\\r\\\\n AdChannel\\\\r\\\\n Specific advertising channel (e.g., programmatic, direct).\\\\r\\\\n\\\\r\\\\n AdSocialNetwork\\\\r\\\\n Social media platform used (e.g., Facebook, TikTok).\\\\r\\\\n\\\\r\\\\n Ad\\\\r\\\\n A creative\\\\r\\\\n\\\\r\\\\n Coupon\\\\r\\\\n A creative coupon\\\\r\\\\n\\\\r\\\\n AdFormat\\\\r\\\\n Format of the ad (e.g., banner, interstitial, carousel).\\\\r\\\\n\\\\r\\\\n DisplaySize\\\\r\\\\n Size of the display area for the ad.\\\\r\\\\n\\\\r\\\\n VideoPlacement\\\\r\\\\n Placement type for video ads (e.g., in-stream, out-stream).\\\\r\\\\n\\\\r\\\\n VideoPlaybackMethod\\\\r\\\\n How the video was played (e.g., autoplay, click-to-play).\\\\r\\\\n\\\\r\\\\n VideoPlayerSize\\\\r\\\\n Dimensions of the video player.\\\\r\\\\n\\\\r\\\\n VideoDurationInSeconds\\\\r\\\\n Length of the video ad.\\\\r\\\\n\\\\r\\\\n VideoPlayerRatio\\\\r\\\\n Aspect ratio of the video player (e.g., 16:9).\\\\r\\\\n\\\\r\\\\n Ssp\\\\r\\\\n Supply Side Partner. The publishing network where displays were made.\\\\r\\\\n\\\\r\\\\n Country\\\\r\\\\n Country where the ad was served.\\\\r\\\\n\\\\r\\\\n Region\\\\r\\\\n Region or state within the country.\\\\r\\\\n\\\\r\\\\n PostalCode\\\\r\\\\n Postal or ZIP code.\\\\r\\\\n\\\\r\\\\n UserBehavior\\\\r\\\\n Behavioral segment of the user (e.g., frequent buyer).\\\\r\\\\n\\",\\n \\"type\\": \\"string\\",\\n \\"enum\\": [\\n \\"Advertiser\\",\\n \\"MarketingCampaign\\",\\n \\"Campaign\\",\\n \\"MediaType\\",\\n \\"MarketingCampaignGoal\\",\\n \\"Category\\",\\n \\"Device\\",\\n \\"Os\\",\\n \\"AdChannel\\",\\n \\"AdSocialNetwork\\",\\n \\"Ad\\",\\n \\"Coupon\\",\\n \\"AdFormat\\",\\n \\"DisplaySize\\",\\n \\"VideoPlacement\\",\\n \\"VideoPlaybackMethod\\",\\n \\"VideoPlayerSize\\",\\n \\"VideoDurationInSeconds\\",\\n \\"VideoPlayerRatio\\",\\n \\"Ssp\\",\\n \\"Country\\",\\n \\"Region\\",\\n \\"PostalCode\\",\\n \\"UserBehavior\\"\\n ]\\n },\\n \\"value\\": {\\n \\"type\\": \\"string\\"\\n }\\n },\\n \\"required\\": [\\n \\"dimension\\",\\n \\"value\\"\\n ]\\n },\\n \\"default\\": null\\n }\\n },\\n \\"required\\": [\\n \\"filters\\"\\n ]\\n }\\n },\\n {\\n \\"type\\": \\"function\\",\\n \\"name\\": \\"final_result\\",\\n \\"description\\": \\"The final response which ends this conversation. ALWAYS use this tool to return your answer.\\",\\n \\"parameters\\": {\\n \\"type\\": \\"object\\",\\n \\"properties\\": {\\n \\"input\\": {\\n \\"description\\": \\"Represents the response generated by an agent after processing a user request.\\\\r\\\\nAny tables and graphs will be generated using data from the internal conversation state.\\\\r\\\\n\\\\r\\\\nThere is no need to explicitly pass the tabular data from any tool as contents of the\\\\r\\\\n\\\\u0060comment\\\\u0060 property. Thus, never generate a markdown table as part of the \\\\u0060comment\\\\u0060 field.\\\\r\\\\n\\\\r\\\\nFields:\\\\r\\\\n comment:\\\\r\\\\n A textual response generated by the agent, adhering to the instructions provided in the conversation\\\\r\\\\n\\\\r\\\\n response_status:\\\\r\\\\n A classification of the response outcome, indicating how the agent handled the request.\\\\r\\\\n follow_up_questions:\\\\r\\\\n A short list of 2\\\\u20133 suggestions for further exploration of the data.\\",\\n \\"type\\": \\"object\\",\\n \\"properties\\": {\\n \\"comment\\": {\\n \\"description\\": \\"A structured explanation accompanying the agent\\\\u0027s response.\\\\r\\\\n\\\\r\\\\nIf the agent successfully answered the question:\\\\r\\\\n- Provides a **summary** of the result.\\\\r\\\\n- Offers a **brief explanation** of key concepts or logic used.\\\\r\\\\n\\\\r\\\\nIf the agent failed to answer:\\\\r\\\\n- Describes the **problem encountered** (e.g., missing data, ambiguous query).\\\\r\\\\n- Explains the **reason for failure** to help the user understand what went wrong.\\\\r\\\\n\\\\r\\\\nNote:\\\\r\\\\nThis field should **never include the full requested data**.\\\\r\\\\nThat will be provided separately.\\\\r\\\\n\\\\r\\\\nExample:\\\\r\\\\nQuestion: What was the total spend for each campaign in May 2025?\\\\r\\\\n\\\\r\\\\nSummary: The total spend for all campaigns in May 2025 was 1,240,391.25.\\\\r\\\\n\\\\r\\\\nExplanation: \\\\u0027Spend\\\\u0027 or \\\\u0027Cost\\\\u0027 refers to the total amount of money invested\\\\r\\\\nin an advertising campaign during a specified period.\\\\r\\\\nIt\\\\u0027s a direct measure of your advertising expenditure.\\",\\n \\"type\\": \\"string\\"\\n },\\n \\"response_status\\": {\\n \\"description\\": \\" Enumerates the possible outcomes of an agent\\\\u0027s response.\\\\r\\\\n\\\\r\\\\n Glossary:\\\\r\\\\n Success\\\\r\\\\n The agent successfully processed the request and returned a valid response.\\\\r\\\\n\\\\r\\\\n OutOfScope\\\\r\\\\n The request falls outside the agent\\\\u0027s capabilities or domain of knowledge.\\\\r\\\\n\\\\r\\\\n NeedsFeedback\\\\r\\\\n The agent requires additional information or clarification from the user to proceed.\\\\r\\\\n\\\\r\\\\n NoDataFound\\\\r\\\\n The tool call did not return any data.\\\\r\\\\n\\\\r\\\\n Forbidden\\\\r\\\\n The user is not authorized to access the requested information or perform the requested action.\\\\r\\\\n\\\\r\\\\n InvalidDates\\\\r\\\\n From and to Dates must not overlap or be in the future\\\\r\\\\n\\\\r\\\\n Unknown\\\\r\\\\n The response could not be classified into any known category, possibly due to unexpected behavior.\\",\\n \\"type\\": \\"string\\",\\n \\"enum\\": [\\n \\"Success\\",\\n \\"OutOfScope\\",\\n \\"NeedsFeedback\\",\\n \\"NoDataFound\\",\\n \\"Forbidden\\",\\n \\"InvalidDates\\",\\n \\"Unknown\\"\\n ]\\n },\\n \\"follow_up_questions\\": {\\n \\"description\\": \\"Include 2\\\\u20133 suggestions for further exploration of the data.\\\\r\\\\n\\\\r\\\\nSuggestions must be directly relevant to the user\\\\u2019s last query and any provided data context.\\\\r\\\\nEach suggestion must be concise (\\\\u2264 8 words).\\\\r\\\\nDo not use vague or broad terms like \\\\u201Cshow more data\\\\u201D or \\\\u201Cexplore further.\\\\u201D\\\\r\\\\nDo not include multiple options in one suggestion (e.g., \\\\u201Cchange date or campaign\\\\u201D is not allowed).\\\\r\\\\nSuggestions must focus on changing a single parameter that can be used to query data:\\\\r\\\\nDate range (e.g., last 7 days, Q1 2025)\\\\r\\\\nTime aggregation (e.g., daily, weekly, monthly)\\\\r\\\\nMetrics (e.g., CTR, ROAS, CPC)\\\\r\\\\nCampaigns or AdGroups (specific names or IDs)\\\\r\\\\nAttribution model (e.g., 7-day click, 30-day view)\\\\r\\\\nBreakdowns (e.g., by country, device, region)\\\\r\\\\nBe explicit about the parameter and value:\\\\r\\\\nDO PROPOSE: \\\\u201CChange date range to last month\\\\u201D\\\\r\\\\nDO NOT PROPOSE: \\\\u201CUse a different date range\\\\u201D\\\\r\\\\nDo not include optimization advice, strategy, or interpretation (e.g., \\\\u201CHow to improve performance\\\\u201D is forbidden).\\\\r\\\\nSuggestions must be actionable queries, not opinions or summaries.\\\\r\\\\nAvoid repeating the same dimension unless the value changes meaningfully.\\\\r\\\\n\\\\r\\\\n## Allowed follow-up Questions Examples\\\\r\\\\nChange date range to last month.\\\\r\\\\nAggregate data by campaign.\\\\r\\\\nCompare CTR across campaigns.\\\\r\\\\nBreak down by country.\\\\r\\\\nUse 7-day click attribution model.\\\\r\\\\n\\\\r\\\\n## Not Allowed follow-up Questions Examples\\\\r\\\\nShow more insights.\\\\r\\\\nExplore other opportunities.\\\\r\\\\nWhat should I change?\\\\r\\\\nAny suggestions for optimization?\\\\r\\\\nGeneral advice or interpretation.\\",\\n \\"type\\": \\"array\\",\\n \\"items\\": {\\n \\"type\\": \\"string\\"\\n }\\n }\\n },\\n \\"required\\": [\\n \\"comment\\",\\n \\"response_status\\",\\n \\"follow_up_questions\\"\\n ]\\n }\\n },\\n \\"required\\": [\\n \\"input\\"\\n ]\\n }\\n }\\n]","clientId":"22291","date":"03/09/2026","gen_ai.system_instructions":"[\\n {\\n \\"type\\": \\"text\\",\\n \\"content\\": \\"You are an expert on statistical analysis for the adtech company ExampleAds.\\\\nYour goal is to provide marketing statistics from ExampleAds users\' ongoing ad campaigns, along with their full context.\\\\n\\\\n# Information\\\\n\\\\n- today is 2026-03-09\\\\n- The default sales attribution model is 30 day post-click unless otherwise specified by the user.\\\\n- The default time zone is Europe/London unless otherwise specified by the user.\\\\n- The default currency is EUR unless otherwise specified by the user.\\\\n\\\\n# Conversation instructions\\\\n\\\\nNever make up data that the user asks for. You must use the provided tools to retrieve data.\\\\n\\\\nAlways respond in a clear, professional, and conversational manner. Confirm your understanding of user intent, especially for complex requests.\\\\n\\\\nIf you do not understand a user request do both, say `I’m not quite sure what you mean. To provide you with data-driven insights from your campaigns, please let me know which campaign or metric you\'d like me to report on.` and also use response_status `OutOfScope`.\\\\n\\\\nIf a user requests any form of data visualization (e.g., `show me a line chart`, `display this data in a graph`, `create a plot`, ...), respond with: `I can provide you with the requested data and its full context, but I have no latitude on its graphical representation.`\\\\nDo not attempt to create charts, graphs, or any other visualizations under any circumstances.\\\\n\\\\nIf the user provides partial information use the default values as much as possible to call the tool. Ask clarifying questions only if strictly necessary. If you ask clarifying questions, use response_status `NeedsFeedback` but only if you haven\'t already used `OutOfScope` or `NoDataFound`.\\\\n\\\\n## Glossary\\\\n\\\\nHere are some common terms that you might encounter.\\\\n\\\\n- QBR - Quarterly Business Review. A strategic review with the client every quarter.\\\\n- WBR - Weekly Business Review. Operational checkpoints to review weekly performance.\\\\n- MBR - Monthly Business Review. Middle-ground between WBR and QBR.\\\\n- EOW - End of week\\\\n- EOM - End of Month\\\\n- HBR - Half-Yearly Business Review\\\\n- ABR - Annual Business Review\\\\n- QOP / Quarterly Operating Plan Review - Review of operational KPIs every quarter\\\\n- OKRs - Objectives and Key Results\\\\n- BPS / Basis Points - Used to discuss changes in percentage points (100 bps = 1%)\\\\n- YOY - Year-over-year\\\\n- WOW - Week-over-week\\\\n- MOM - Month-over-month\\\\n- Spend Pacing - Whether the campaign is on track to spend budget\\\\n- Underpacing / Overpacing - Spending slower/faster than the plan\\\\n- Budget Fluidity - Willingness of client to move budgets between channels\\\\n\\\\nUnless otherwise specified, when a user is asking about a business review (QBR, WBR, MBR, HBR, ABR) assume that sales-related metrics are important to the user: cost, sales, ROAS; and that the user wants this information by ad set.\\\\n\\\\n## Tool Response\\\\n\\\\nIf a tool responds with a response_status `Retry`. Follow the instructions in `message` and RETRY without asking.\\\\nIf a tool responds with a response_status `DuplicateToolCall`. ALWAYS Move to the next step of your execution plan. You already received the data from the tool.\\\\n\\\\n## Agent Response Guidelines\\\\n\\\\nALWAYS use the \'final_result\' tool to communicate your final answer to the user.\\\\nProvide as concise an answer as possible. Follow these guidelines:\\\\n\\\\n### If the agent successfully answered the question:\\\\n- Include a **summary** of the result.\\\\n- Expose the **parameters** (date range, time zone, attribution model, currency) used to call get_custom_report if it was called.\\\\n\\\\n### If the agent failed to answer:\\\\n- Describe the **problem encountered** (e.g., missing data, ambiguous query).\\\\n- Explain the **reason for failure** to help the user understand what went wrong.\\\\n\\\\n### Important:\\\\n- **Never include the full requested data** in the comment.\\\\n- The data will be provided to the user separately.\\\\n- Never call get_custom_report twice with different date ranges. Use previous_period_from_date instead\\\\n- Explain adtech terms as needed, and adapt detail level to the user’s query, responses and expertise.\\\\n\\\\n## Tool Response Examples\\\\n\\\\n**Question**: What was the total spend for each campaign in May 2025?\\\\n\\\\n**Response**:\\\\n\\\\n> ### Summary\\\\n> The total spend for all campaigns in May 2025 was 1,240,391.25.\\\\n>\\\\n> ### Parameters\\\\n> - Data was computed from 2025-05-01 to 2025-05-31 with time zone Europe/London.\\\\n> - Attribution model chosen is 30-Day Post Click\\\\n> - currency: EUR\\\\n\\\\n**Question:** list my adsets optimized for conversion\\\\n\\\\n**Response:**\\\\n\\\\n> ### Summary\\\\n> You have actually 6 adsets optimized for conversion. 2 of them are currently active.\\\\n\\\\n# DATA PRIVACY AND LEGAL REQUIREMENTS\\\\n\\\\n- Conduct: Enforce ExampleAds Advertising, Supply Partner, and Privacy Guidelines. Promote ethical, compliant, effective advertising.\\\\n- If you reject based on those criteria set final_result.response_status to Forbidden\\\\n\\\\nEnforcement\\\\n1) Prohibited - Reject:\\\\n\\\\nHarassment/hate/discrimination; adult/sexual services/suggestive; deceptive/misleading/fraud/predatory; illegal drugs/paraphernalia; firearms/weapons/explosives/fireworks; shocking/violent/obscene/disturbing; counterfeit/piracy/IP violations; affairs/escorting/prostitution/mail-order brides; malware/spyware/forced downloads/harmful code; targeting children under the age of consent.\\\\nResponse: \\\\\\"I can\'t fulfil this request because it involves prohibited advertising content under ExampleAds\'s guidelines.\\\\\\"\\\\n\\\\n2) Restricted - approval required\\\\n\\\\nOnly in authorized regions with explicit approval: online pharmacies/healthcare/prescription drugs/sexual enhancers/weight loss; alcohol/tobacco/vaping/e-cigs; gambling/lotteries/sports betting/fantasy sports; financial services/insurance/investments; psychics/astrology/occult.\\\\nResponse: \\\\\\"This request falls into a restricted category and can only be fulfilled with prior approval from ExampleAds and in permitted countries.\\\\\\"\\\\n\\\\n3) Privacy - reject if non-compliant\\\\n\\\\nComply with GDPR, CCPA, LGPD, and applicable laws. Reject: targeting/reporting on protected traits; any PII misuse; children\'s data or targeting under age of consent; data use without valid, informed, freely given, unambiguous consent (no pre-ticked boxes, continued browsing, or ambiguous consent); individual-level reporting (aggregates only).\\\\nResponse: \\\\\\"I can\'t fulfil this request because it doesn\'t comply with privacy and data protection requirements. Please adjust your request to respect user consent and data protection laws.\\\\\\"\\\\n\\\\n- Never speculate or provide unsupported data. Only reference ExampleAds-approved sources for documentation or support.\\\\n- If handling sensitive data, follow ExampleAds data privacy guidelines at all times.\\\\n- Refuse to create audiences, give insights, or give recommendations for any request including the following content:\\\\n - Harmful: harassment, hate speech, shocking, violent, or offensive content.\\\\n - Sexual or deceptive: adult or pornographic content, infidelity/prostitution, misleading or fraudulent claims.\\\\n - Illegal or dangerous: drugs (including marijuana), weapons, explosives or fireworks, malware or hacking, dishonest or predatory products.\\\\n - IP violations: counterfeits, piracy, unauthorized use of likeness.\\\\n - Protected traits: race, ethnicity, religion or belief, gender, age, sexual orientation or interest, health data, personal identifying information, political opinions, trade union membership, biometric or genetic data, criminal history, financial status.\\\\n - Children: no targeting under the legal consent age or children\'s sites. Only broad, legally compliant age ranges may be used.\\\\n- Never use proxies or inferred traits for any protected characteristic.\\\\n\\"\\n }\\n]","gen_ai.response.finish_reasons":"[\\"stop\\"]","gen_ai.response.id":"U7yuaeTyDuKSitQPhLG9kAg","gen_ai.response.model":"gemini-2.5-flash","gen_ai.usage.input_tokens":"2546","gen_ai.usage.output_tokens":"47","host.ip":"10.0.0.1","host.name":"kube-worker0001.kubes01.dc1.preprod.exampleads.internal","deployment.environment.name":"preprod","exampleads.service.pool":"default","exampleads.dc":"da1","service.version":"100000","service.instance.id":"INST01"},"resourceAttributes":{"deployment.environment.name":"preprod","service.name":"agentic-demo-insights","service.version":"100000","service.instance.id":"INST01"},"scope":{"name":"Experimental.Microsoft.Extensions.AI","version":"","attributes":{}}}',+ },+ expected: {+ messages: [+ {+ role: "user",+ parts: [+ {+ type: "text",+ text: "What are my month over month performance insights the past quarter, by cost, displays, clicks, CTR, sales, CVR? Please split by campaign taxonomy",+ },+ ],+ source: "input",+ },+ {+ role: "assistant",+ parts: [+ {+ type: "tool-call",+ toolCallId: "get_custom_report",+ toolName: "get_custom_report",+ input: {+ dimensions: ["Campaign"],+ filters: {+ dateRange: {+ from_date: "2025-10-01",+ to_date: "2025-12-31",+ },+ },+ timeDimension: "Month",+ metrics: ["Cost", "Displays", "Clicks", "Ctr", "Sales", "Cvr"],+ },+ toolType: "tool_call",+ },+ {+ type: "custom",+ kind: "Microsoft.Extensions.AI.TextReasoningContent",+ value: {+ type: "Microsoft.Extensions.AI.TextReasoningContent",+ content: {+ text: "",+ protectedData: "anonymized-encrypted-reasoning",+ },+ },+ },+ ],+ finishReason: {+ type: "stop",+ raw: "stop",+ },+ source: "output",+ },+ ],+ toolDefinitions: [+ {+ name: "get_adset_infos",+ description:+ "Retrieves all ad sets matching conditions set in the filter (also referred to as campaigns)\r\nThis method should be called by the agent whenever\r\nit needs information about one or more ad sets.\r\nIt provides a comprehensive list of ad sets with key metadata and status fields.\r\n\r\nReturns:\r\n-------\r\nResponse\r\n An object containing data with the following information for each ad set:\r\n - id: The unique identifier of the ad set (also called Campaign ID).\r\n - name: The name of the ad set.\r\n - advertiserId: The ID of the advertiser that owns this ad set.\r\n - objective (MarketingObjective): The marketing objective associated with the ad set: Acquisition or Retention.\r\n - startDate: The start date of the ad set, if specified.\r\n - activationStatus: Indicates whether the ad set is currently active: Activated or NotActivated\r\n - deliveryStatus: Describes the current delivery state of the ad set: Running, Archived or NotRunning\r\n\r\nNotes:\r\n-----\r\nUse this method as the primary source for retrieving ad set (campaign) information.",+ inputSchema: {+ type: "object",+ properties: {+ filter: {+ description: "The filters applied for selecting the ad_sets",+ type: "object",+ properties: {+ adset_ids: {+ type: ["array", "null"],+ items: {+ type: "integer",+ },+ },+ names: {+ type: ["array", "null"],+ items: {+ type: "string",+ },+ },+ activation_statuses: {+ type: ["array", "null"],+ items: {+ type: "string",+ enum: ["NotActivated", "Activated"],+ },+ },+ objectives: {+ type: ["array", "null"],+ items: {+ type: "string",+ enum: ["NotSet", "Acquisition", "Retention"],+ },+ },+ delivery_statuses: {+ type: ["array", "null"],+ items: {+ type: "string",+ enum: ["Running", "Archived", "NotRunning"],+ },+ },+ },+ },+ },+ required: ["filter"],+ },+ type: "function",+ },+ {+ name: "get_custom_report",+ description:+ "Calls the API to retrieve client data.\r\n\r\nArgs:\r\n filters: An object containing the built-in filters.\r\n Default values are provided if needed.\r\n timeDimension: Time-based dimension for data projections; specifies the granularity at which data will be grouped.\r\n Possible values and examples:\r\n - None: Indicates that the user has not provided any clear time dimension.\r\n This should be selected when there is no explicit instruction.\r\n Do NOT infer or assume a value; use None unless the user specifies otherwise.\r\n - Year: Represents a calendar year.\r\n Examples: per year, by year, year-over-year comparisons (YoY), yearly trend analysis.\r\n - Month: Represents a calendar month.\r\n Examples: per month, by month, month-over-month comparisons (MoM), monthly performance reports.\r\n - Week: Represents a calendar week.\r\n Examples: per week, by week, week-over-week comparisons (WoW), weekly campaign summaries.\r\n - Day: Represents a calendar day.\r\n Examples: per day, by day, day-over-day comparisons (DoD), daily performance tracking.\r\n - Hour: Represents an hour within a day.\r\n Examples: per hour, by hour, hourly trend analysis, intraday performance monitoring.\r\n dimensions: A list of dimensions that define the granularity of the report.\r\n Example: [os, device]\r\n metrics: A list of performance indicators to retrieve.\r\n Example: [clicks, ctr]\r\n attributionModel: Specifies the model used to measure sales.\r\n Optional.\r\n additionalFilters: Custom filters applied to the data.\r\n CRITICAL CONSTRAINT: Every dimension used in `additionalFilters` MUST be present in the `dimensions` list.\r\n If a filter references a dimension not included in `dimensions`, the request will be rejected.\r\n\r\nNotes:\r\n - Dimensions determine the level of detail in the report.\r\n - Metrics represent the KPIs to monitor campaign performance.\r\n - Filters restrict the dataset retrieved from the API.\r\n - `additionalFilters` allow for extra filtering, but only on dimensions explicitly listed in `dimensions`.",+ inputSchema: {+ type: "object",+ properties: {+ filters: {+ description:+ "Filters are a way to narrow the scope of the report by setting certain values.\r\nIf no value can be inferred, a default one will be provided.",+ type: "object",+ properties: {+ clientIds: {+ type: "array",+ items: {+ type: "integer",+ },+ },+ dateRange: {+ description:+ 'Date range between two dates.\r\nIMPORTANT: from_date and to_date are inclusive (the start and end dates are included in the period).\r\n\r\nIf dates are not given explicitly, they can be deduced as follows:\r\n\r\n- IMPORTANT: Last n days: from = today - n days, to = yesterday (inclusive, does not include today)\r\n Example: if today is 2025-08-23 then "last 7 days": 2025-08-16 to 2025-08-22 (inclusive, 7 days)\r\n Example: if today is 2025-08-10 then "last 20 days": 2025-07-21 to 2025-08-09 (inclusive, 20 days)\r\n- Month of May 2025: from = 2025-05-01, to = 2025-05-31\r\n- IMPORTANT: Last week, the last full calendar week (Monday to Sunday) before the current Week:\r\n from = Monday of previous week\r\n to = Sunday of previous Week\r\n Example: if today is Tuesday, 2025-08-12 then "last week" is Monday 2025-08-04 to Sunday 2025-08-10\r\n Example: if today is Monday, 2025-09-15 then "last week" is Monday 2025-08-14 to Sunday 2025-08-14\r\n- IMPORTANT: Last n weeks, the last n full calendar weeks (Monday to Sunday) before the current Week.\r\n n is the number of weeks.\r\n from = Monday of n weeks ago\r\n to = Sunday of previous Week\r\n Example: if today is Friday, 2025-08-22 then "last 2 weeks" is\r\n Monday 2025-08-04 to Sunday 2025-08-17\r\n n is 2\r\n Example: if today is Monday, 2025-07-21 then "last 3 weeks" is\r\n Monday 2025-06-30 to Sunday 2025-07-20\r\n n is 3\r\n- IMPORTANT: Last month, the last full calendar month before the current month.\r\n from = first day of previous month\r\n to = last day of previous month\r\n Example: if today is Tuesday, 2025-08-19 then "last month" is 2025-07-01 to 2025-07-31\r\n- IMPORTANT: Last n months, the last n full calendar months before the current month.\r\n n is the number of months.\r\n from = first day of the month n months ago\r\n to = last day of previous month\r\n Example: if today is Monday, 2025-08-19 then "last 3 months" is 2025-05-01 to 2025-07-31\r\n n is 3\r\n- Last quarter: the last full quarter before the current quarter.\r\n Q1: January 1 to March 31\r\n Q2: April 1 to June 30\r\n Q3: July 1 to September 30\r\n Q4: October 1 to December 31\r\n\r\n\r\ntime_zone is the IANA time zone name (e.g., "Europe/London", "America/New_York").\r\nBy default, assume that we are in the Europe/London time zone.\r\n\r\nThe field previous_period_from_date is used to define the starting date of a previous period\r\nthat mirrors the current data collection range.\r\nThis allows for comparative analysis between the current period and a similar past period.\r\n\r\nUse the following guidelines and examples to determine the correct value:\r\n\r\nGeneral Rule:\r\nprevious_period_from_date should be set to a date that starts the previous comparable period\r\nthe previous period will have the same duration as the current one\r\nthe previous period and the current period MUST NOT overlap\r\n\r\n Examples:\r\n Relative Time Comparison\r\n If comparing to last year, and from_date = 2025-08-01, then:\r\n previous_period_from_date = 2024-08-01\r\n If comparing with the previous period, previous_period_start_date is calculated\r\n by subtracting the duration of the current date range from its starting date (from_date).\r\n This ensures the previous period has the same length and ends\r\n right before the current one begins.\r\n Example:\r\n Current range: from_date = 2025-08-10, to_date = 2025-08-19 (10 days including bounds),\r\n then: previous_period_start_date = 2025-07-31 (10 days before 2025-08-10)\r\n Custom Period Comparison\r\n If comparing to the period starting 2025-02-25, then:\r\n previous_period_from_date = 2025-02-25\r\n',+ type: "object",+ properties: {+ from_date: {+ type: "string",+ format: "date",+ },+ to_date: {+ type: "string",+ format: "date",+ },+ time_zone: {+ type: ["string", "null"],+ },+ previous_period_from_date: {+ type: ["string", "null"],+ format: "date",+ },+ },+ },+ currency: {+ type: "string",+ },+ campaignStatus: {+ type: ["array", "null"],+ items: {+ description:+ " Status of a campaign\r\n\r\n Glossary:\r\n Active\r\n Active, Running or Live\r\n NotRunning\r\n Not running\r\n Dead\r\n Archived",+ type: "string",+ enum: ["Active", "NotRunning", "Dead"],+ },+ },+ mediaType: {+ type: ["array", "null"],+ items: {+ description:+ " Type of media used. video or display.\r\n\r\n Glossary:\r\n Display\r\n HTML display\r\n\r\n Video\r\n Video display",+ type: "string",+ enum: ["Display", "Video"],+ },+ },+ marketingCampaignGoals: {+ type: ["array", "null"],+ items: {+ type: "string",+ enum: ["NotSet", "Acquisition", "Retention"],+ },+ },+ campaigns: {+ type: ["array", "null"],+ items: {+ type: "integer",+ },+ },+ },+ },+ timeDimension: {+ description:+ "Defines the time-based dimensions available for data projections.\r\n\r\nEach enum member specifies the granularity at which data can be grouped or analyzed.\r\n\r\nMembers:\r\n None - Indicates that the user has not provided any clear time dimension.\r\n This should be selected when there is no explicit instruction.\r\n Do NOT infer or assume a value; use None unless the user specifies otherwise.\r\n Year - Represents a calendar year. For example per year, by year, year-over-year comparisons (YoY), yearly trend analysis.\r\n Month - Represents a calendar month. For example per month, by month, month-over-month comparisons (MoM), monthly performance reports.\r\n Week - Represents a calendar week. For example per week, by week, week-over-week comparisons (WoW), weekly campaign summaries.\r\n Day - Represents a calendar day. For example per day, by day, day-over-day comparisons (DoD), daily performance tracking.\r\n Hour - Represents an hour within a day. For example per hour, by hour, hourly trend analysis, intraday performance monitoring.",+ type: "string",+ enum: ["None", "Year", "Month", "Week", "Day", "Hour"],+ default: "None",+ },+ dimensions: {+ type: "array",+ items: {+ description:+ " Enumeration of standardized dimensions used in online advertising projections.\r\n\r\n Each member represents a dimension or attribute commonly used in digital marketing analytics,\r\n campaign performance tracking, and audience segmentation.\r\n\r\n Glossary:\r\n Advertiser\r\n Name or entity running the ad campaign(s). Also called Client\r\n\r\n MarketingCampaign\r\n Full name of the marketing campaign. A group of ad sets.\r\n\r\n Campaign\r\n An ad set.\r\n\r\n MediaType\r\n Type of media used (e.g., video, display, native).\r\n\r\n MarketingCampaignGoal\r\n Marketing campaign objective (Retention, Acquisition)\r\n\r\n Category\r\n Product or content category (e.g., electronics, fashion).\r\n\r\n Device\r\n Type of device used (e.g., mobile, desktop, tablet).\r\n\r\n Os\r\n Operating system of the device (e.g., iOS, Android, Windows).\r\n\r\n AdChannel\r\n Specific advertising channel (e.g., programmatic, direct).\r\n\r\n AdSocialNetwork\r\n Social media platform used (e.g., Facebook, TikTok).\r\n\r\n Ad\r\n A creative\r\n\r\n Coupon\r\n A creative coupon\r\n\r\n AdFormat\r\n Format of the ad (e.g., banner, interstitial, carousel).\r\n\r\n DisplaySize\r\n Size of the display area for the ad.\r\n\r\n VideoPlacement\r\n Placement type for video ads (e.g., in-stream, out-stream).\r\n\r\n VideoPlaybackMethod\r\n How the video was played (e.g., autoplay, click-to-play).\r\n\r\n VideoPlayerSize\r\n Dimensions of the video player.\r\n\r\n VideoDurationInSeconds\r\n Length of the video ad.\r\n\r\n VideoPlayerRatio\r\n Aspect ratio of the video player (e.g., 16:9).\r\n\r\n Ssp\r\n Supply Side Partner. The publishing network where displays were made.\r\n\r\n Country\r\n Country where the ad was served.\r\n\r\n Region\r\n Region or state within the country.\r\n\r\n PostalCode\r\n Postal or ZIP code.\r\n\r\n UserBehavior\r\n Behavioral segment of the user (e.g., frequent buyer).\r\n",+ type: "string",+ enum: [+ "Advertiser",+ "MarketingCampaign",+ "Campaign",+ "MediaType",+ "MarketingCampaignGoal",+ "Category",+ "Device",+ "Os",+ "AdChannel",+ "AdSocialNetwork",+ "Ad",+ "Coupon",+ "AdFormat",+ "DisplaySize",+ "VideoPlacement",+ "VideoPlaybackMethod",+ "VideoPlayerSize",+ "VideoDurationInSeconds",+ "VideoPlayerRatio",+ "Ssp",+ "Country",+ "Region",+ "PostalCode",+ "UserBehavior",+ ],+ },+ default: null,+ },+ metrics: {+ type: "array",+ items: {+ description:+ " Metrics represents the quantity that we wish to measure\r\n\r\n Glossary:\r\n Audience\r\n Users or devices that were seen online and were eligible to be served an ad. When\r\n several devices can be related to one user, it counts for 1, otherwise it reflects the\r\n number of devices\r\n\r\n Clicks\r\n The number of clicks driven by the ads\r\n\r\n Cost\r\n The overall cost of your ads or video ads\r\n\r\n CostPerResult\r\n What your ad set has cost per configured result unit for your selected period.\r\n\r\n Cpc\r\n Cost Per Click - the amount of money spent for the ads to receive one click\r\n\r\n Cpm\r\n Cost Per Mille - the amount of money spent per thousand displays, available for CPM\r\n based ad sets only\r\n\r\n Ctr\r\n Click-Through Rate - literally, the rate or frequency at which users click through to a\r\n landing page from an ad\r\n\r\n Displays\r\n The number of times your ads have been shown on a screen\r\n\r\n Ecpm\r\n Effective Cost Per Mille - the amount of money spent per thousand displays\r\n\r\n ExposedUsers\r\n The number of users who have been served an ad\r\n\r\n Frequency\r\n The average number of displays each exposed user has seen.\r\n\r\n InvalidClicks\r\n Clicks that don't meet our quality standards and won't be billed to you.\r\n\r\n InvalidDisplays\r\n Displays that don't meet our quality standards and won't be billed to you.\r\n\r\n Reach\r\n Share of online eligible users or devices who have been served an ad\r\n\r\n Result\r\n What your ad set has achieved based on your configuration for your selected period.\r\n\r\n UntrackableDisplays\r\n\r\n NonViewableDisplays\r\n\r\n Viewability\r\n The percentage of displayed ads or videos ads that were considered viewable\r\n\r\n ViewableDisplays\r\n The number of times at least 50% of the ad appeared for at least 1 second for ads and 2\r\n seconds for videos ads, once started\r\n\r\n Visits\r\n The number of users that were active on your site or app in the hour following clicking\r\n on your ad\r\n\r\n Winrate\r\n Number of displays divided by the total number of display opportunities\r\n\r\n BounceRate\r\n Proportion of website visitors leaving after seeing only one page\r\n\r\n Cpv\r\n Cost Per Visit - the amount of money spent to get one visit on your website\r\n\r\n AppInstall\r\n The number of installations of application\r\n\r\n Cpi\r\n Cost Per Install - the amount of money that needs to be spent to get one app installed\r\n\r\n Cpqv\r\n Cost Per Qualified Visit - the amount of money spent to get one qualified visit on your\r\n website\r\n\r\n InstallRate\r\n Install Rate - the percentage of completed app installs compared to the clicks that\r\n occurred\r\n\r\n QualifiedVisits\r\n The number of users on the target website for which at least two events or one sale\r\n event occurred within the hour following the click\r\n\r\n Assists\r\n The number of sales one of your campaigns or ad sets contributed to (with clicks or\r\n displays) on your site or app.\r\n\r\n AvgCart\r\n Average revenue generated by a sale\r\n\r\n Cos\r\n Cost Of Sales - the ratio between the cost generated by the ad set(s) vs. the revenue\r\n generated by the sales, figured as a percentage\r\n\r\n Cpov\r\n Cost Per Store Visit - the amount of money spent to get one visit on your physical store\r\n\r\n Cov\r\n Cost Of advertiser Value - the ratio between the advertiser value generated by the sales\r\n vs. the cost generated by the ad set(s), figured as a percentage\r\n\r\n Cpo\r\n Cost Per Order - the amount of money that needs to be spent to get one order or\r\n transaction\r\n\r\n Cvr\r\n ConVersion Rate - the percentage of completed purchases compared to the clicks that\r\n occurred\r\n\r\n AssistsSalesRatio\r\n The ratio between your assisted sales and sales made on your site or app.\r\n\r\n OmnichannelRevenue\r\n The revenue generated by online and in-store sales.\r\n\r\n OmnichannelRoas\r\n Omnichannel Return on Ad Spend. The ratio between revenue generated online and in-store,\r\n and the cost.\r\n\r\n OmnichannelSales\r\n The number of online and in store transactions or conversions resulting from ExampleAds ads.\r\n\r\n Revenue\r\n The amount of money generated by the online sales\r\n\r\n Roas\r\n Return On Ad Spend - the ratio between the revenue generated and the cost\r\n\r\n Sales\r\n The number of completed e-commerce transactions or purchases\r\n\r\n OfflineRevenue\r\n The amount of revenue generated by in-store sales.\r\n\r\n OfflineRoas\r\n Store Return on Ad Spend. The ratio between the revenue generated in-store and the cost.\r\n\r\n OfflineSales\r\n The number of completed in-store transactions or purchases.\r\n\r\n OfflineVisits\r\n The number of visits to one of the physical stores\r\n\r\n Currency\r\n\r\n VideoAvoc\r\n The number of times one of your videos was viewable and audible when it reached\r\n completion\r\n\r\n VideoCompletionRate\r\n The percentage of started videos that played for their entire duration\r\n\r\n VideoCpcv\r\n The average cost of a video played for its entire duration\r\n\r\n VideoCpv\r\n The average cost of a video that started playing\r\n\r\n VideoComplete\r\n The number of times one of your videos played for its entire duration\r\n\r\n VideoFirstQuartile\r\n The number of times one of your videos played to 25% of its duration\r\n\r\n VideoMidpoint\r\n The number of times one of your videos played to 50% of its duration\r\n\r\n VideoThirdQuartile\r\n The number of times one of your videos played to 75% of its duration\r\n\r\n VideoAverageViewRate\r\n The average played percentage of a started video\r\n\r\n VideoStartRate\r\n The percentage of displayed videos that started playing\r\n\r\n VideoStart\r\n The number of times one of your ads started playing",+ type: "string",+ enum: [+ "Audience",+ "Clicks",+ "Cost",+ "CostPerResult",+ "Cpc",+ "Cpm",+ "Ctr",+ "Displays",+ "Ecpm",+ "ExposedUsers",+ "Frequency",+ "InvalidClicks",+ "InvalidDisplays",+ "Reach",+ "Result",+ "UntrackableDisplays",+ "NonViewableDisplays",+ "Viewability",+ "ViewableDisplays",+ "Visits",+ "Winrate",+ "BounceRate",+ "Cpv",+ "AppInstall",+ "Cpi",+ "Cpqv",+ "InstallRate",+ "QualifiedVisits",+ "Assists",+ "AvgCart",+ "Cos",+ "Cpov",+ "Cov",+ "Cpo",+ "Cvr",+ "AssistsSalesRatio",+ "OmnichannelRevenue",+ "OmnichannelRoas",+ "OmnichannelSales",+ "Revenue",+ "Roas",+ "Sales",+ "OfflineRevenue",+ "OfflineRoas",+ "OfflineSales",+ "OfflineVisits",+ "Currency",+ "VideoAvoc",+ "VideoCompletionRate",+ "VideoCpcv",+ "VideoCpv",+ "VideoComplete",+ "VideoFirstQuartile",+ "VideoMidpoint",+ "VideoThirdQuartile",+ "VideoAverageViewRate",+ "VideoStartRate",+ "VideoStart",+ ],+ },+ default: null,+ },+ attributionModel: {+ description:+ " Attribution models define how sales are credited to advertising campaigns.\r\n\r\n Available models:\r\n\r\n Pv1d: 1-Day Post View\r\n — Sale is attributed when a user views an ad and purchases within 24 hours.\r\n\r\n Pc1d: 1-Day Post Click\r\n — Sale is attributed when a user clicks an ad and purchases within 24 hours.\r\n\r\n Pc7d: 7-Day Post Click\r\n — Sale is attributed when a user clicks an ad and purchases within 7 days.\r\n\r\n Pv7d: 7-Day Post View\r\n — Sale is attributed when a user views an ad and purchases within 7 days.\r\n\r\n Pv14d: 14-Day Post View\r\n — Sale is attributed when a user views an ad and purchases within 14 days.\r\n\r\n Pv30d: 30-Day Post View\r\n — Sale is attributed when a user views an ad and purchases within 30 days.\r\n\r\n Pc30d: 30-Day Post Click\r\n — Sale is attributed when a user clicks an ad and purchases within 30 days.\r\n\r\n Pc30dPv1d: 30-Day Post Click + 1-Day Post View\r\n — Sale is attributed if a user clicks and purchases within 30 days, or views and purchases within 24 hours.\r\n\r\n Pc7dPv1d: 7-Day Post Click + 1-Day Post View\r\n — Sale is attributed if a user clicks and purchases within 7 days, or views and purchases within 24 hours.\r\n\r\n Lc30d: Last Click\r\n — Full credit is given to the last click before a conversion.\r\n\r\n CAttr: Client Attribution\r\n — Attribution is determined by the advertiser using ExampleAds's deduplication parameter.",+ type: "string",+ enum: [+ "Pv1d",+ "Pc1d",+ "Pc7d",+ "Pv7d",+ "Pv14d",+ "Pv30d",+ "Pc30d",+ "Pc30dPv1d",+ "Lc30d",+ "CAttr",+ "Pc7dPv1d",+ ],+ default: "Pc30d",+ },+ additionalFilters: {+ type: "array",+ items: {+ description:+ "Represents a filter for a specific dimension and its associated value.\r\nUsed to narrow down data based on a selected dimension and a target value.",+ type: "object",+ properties: {+ dimension: {+ description:+ " Enumeration of standardized dimensions used in online advertising projections.\r\n\r\n Each member represents a dimension or attribute commonly used in digital marketing analytics,\r\n campaign performance tracking, and audience segmentation.\r\n\r\n Glossary:\r\n Advertiser\r\n Name or entity running the ad campaign(s). Also called Client\r\n\r\n MarketingCampaign\r\n Full name of the marketing campaign. A group of ad sets.\r\n\r\n Campaign\r\n An ad set.\r\n\r\n MediaType\r\n Type of media used (e.g., video, display, native).\r\n\r\n MarketingCampaignGoal\r\n Marketing campaign objective (Retention, Acquisition)\r\n\r\n Category\r\n Product or content category (e.g., electronics, fashion).\r\n\r\n Device\r\n Type of device used (e.g., mobile, desktop, tablet).\r\n\r\n Os\r\n Operating system of the device (e.g., iOS, Android, Windows).\r\n\r\n AdChannel\r\n Specific advertising channel (e.g., programmatic, direct).\r\n\r\n AdSocialNetwork\r\n Social media platform used (e.g., Facebook, TikTok).\r\n\r\n Ad\r\n A creative\r\n\r\n Coupon\r\n A creative coupon\r\n\r\n AdFormat\r\n Format of the ad (e.g., banner, interstitial, carousel).\r\n\r\n DisplaySize\r\n Size of the display area for the ad.\r\n\r\n VideoPlacement\r\n Placement type for video ads (e.g., in-stream, out-stream).\r\n\r\n VideoPlaybackMethod\r\n How the video was played (e.g., autoplay, click-to-play).\r\n\r\n VideoPlayerSize\r\n Dimensions of the video player.\r\n\r\n VideoDurationInSeconds\r\n Length of the video ad.\r\n\r\n VideoPlayerRatio\r\n Aspect ratio of the video player (e.g., 16:9).\r\n\r\n Ssp\r\n Supply Side Partner. The publishing network where displays were made.\r\n\r\n Country\r\n Country where the ad was served.\r\n\r\n Region\r\n Region or state within the country.\r\n\r\n PostalCode\r\n Postal or ZIP code.\r\n\r\n UserBehavior\r\n Behavioral segment of the user (e.g., frequent buyer).\r\n",+ type: "string",+ enum: [+ "Advertiser",+ "MarketingCampaign",+ "Campaign",+ "MediaType",+ "MarketingCampaignGoal",+ "Category",+ "Device",+ "Os",+ "AdChannel",+ "AdSocialNetwork",+ "Ad",+ "Coupon",+ "AdFormat",+ "DisplaySize",+ "VideoPlacement",+ "VideoPlaybackMethod",+ "VideoPlayerSize",+ "VideoDurationInSeconds",+ "VideoPlayerRatio",+ "Ssp",+ "Country",+ "Region",+ "PostalCode",+ "UserBehavior",+ ],+ },+ value: {+ type: "string",+ },+ },+ required: ["dimension", "value"],+ },+ default: null,+ },+ },+ required: ["filters"],+ },+ type: "function",+ },+ {+ name: "final_result",+ description:+ "The final response which ends this conversation. ALWAYS use this tool to return your answer.",+ inputSchema: {+ type: "object",+ properties: {+ input: {+ description:+ "Represents the response generated by an agent after processing a user request.\r\nAny tables and graphs will be generated using data from the internal conversation state.\r\n\r\nThere is no need to explicitly pass the tabular data from any tool as contents of the\r\n`comment` property. Thus, never generate a markdown table as part of the `comment` field.\r\n\r\nFields:\r\n comment:\r\n A textual response generated by the agent, adhering to the instructions provided in the conversation\r\n\r\n response_status:\r\n A classification of the response outcome, indicating how the agent handled the request.\r\n follow_up_questions:\r\n A short list of 2–3 suggestions for further exploration of the data.",+ type: "object",+ properties: {+ comment: {+ description:+ "A structured explanation accompanying the agent's response.\r\n\r\nIf the agent successfully answered the question:\r\n- Provides a **summary** of the result.\r\n- Offers a **brief explanation** of key concepts or logic used.\r\n\r\nIf the agent failed to answer:\r\n- Describes the **problem encountered** (e.g., missing data, ambiguous query).\r\n- Explains the **reason for failure** to help the user understand what went wrong.\r\n\r\nNote:\r\nThis field should **never include the full requested data**.\r\nThat will be provided separately.\r\n\r\nExample:\r\nQuestion: What was the total spend for each campaign in May 2025?\r\n\r\nSummary: The total spend for all campaigns in May 2025 was 1,240,391.25.\r\n\r\nExplanation: 'Spend' or 'Cost' refers to the total amount of money invested\r\nin an advertising campaign during a specified period.\r\nIt's a direct measure of your advertising expenditure.",+ type: "string",+ },+ response_status: {+ description:+ " Enumerates the possible outcomes of an agent's response.\r\n\r\n Glossary:\r\n Success\r\n The agent successfully processed the request and returned a valid response.\r\n\r\n OutOfScope\r\n The request falls outside the agent's capabilities or domain of knowledge.\r\n\r\n NeedsFeedback\r\n The agent requires additional information or clarification from the user to proceed.\r\n\r\n NoDataFound\r\n The tool call did not return any data.\r\n\r\n Forbidden\r\n The user is not authorized to access the requested information or perform the requested action.\r\n\r\n InvalidDates\r\n From and to Dates must not overlap or be in the future\r\n\r\n Unknown\r\n The response could not be classified into any known category, possibly due to unexpected behavior.",+ type: "string",+ enum: [+ "Success",+ "OutOfScope",+ "NeedsFeedback",+ "NoDataFound",+ "Forbidden",+ "InvalidDates",+ "Unknown",+ ],+ },+ follow_up_questions: {+ description:+ "Include 2–3 suggestions for further exploration of the data.\r\n\r\nSuggestions must be directly relevant to the user’s last query and any provided data context.\r\nEach suggestion must be concise (≤ 8 words).\r\nDo not use vague or broad terms like “show more data” or “explore further.”\r\nDo not include multiple options in one suggestion (e.g., “change date or campaign” is not allowed).\r\nSuggestions must focus on changing a single parameter that can be used to query data:\r\nDate range (e.g., last 7 days, Q1 2025)\r\nTime aggregation (e.g., daily, weekly, monthly)\r\nMetrics (e.g., CTR, ROAS, CPC)\r\nCampaigns or AdGroups (specific names or IDs)\r\nAttribution model (e.g., 7-day click, 30-day view)\r\nBreakdowns (e.g., by country, device, region)\r\nBe explicit about the parameter and value:\r\nDO PROPOSE: “Change date range to last month”\r\nDO NOT PROPOSE: “Use a different date range”\r\nDo not include optimization advice, strategy, or interpretation (e.g., “How to improve performance” is forbidden).\r\nSuggestions must be actionable queries, not opinions or summaries.\r\nAvoid repeating the same dimension unless the value changes meaningfully.\r\n\r\n## Allowed follow-up Questions Examples\r\nChange date range to last month.\r\nAggregate data by campaign.\r\nCompare CTR across campaigns.\r\nBreak down by country.\r\nUse 7-day click attribution model.\r\n\r\n## Not Allowed follow-up Questions Examples\r\nShow more insights.\r\nExplore other opportunities.\r\nWhat should I change?\r\nAny suggestions for optimization?\r\nGeneral advice or interpretation.",+ type: "array",+ items: {+ type: "string",+ },+ },+ },+ required: ["comment", "response_status", "follow_up_questions"],+ },+ },+ required: ["input"],+ },+ type: "function",+ },+ ],+ },+ },+ // Source: worker/src/__tests__/chatml/framework-traces/microsoft-agent-2025-12-17.trace.json; observation 2406e8343fd49c0e+ {+ name: "verbatim microsoft-agent-2025-12-17.trace.json / 2406e8343fd49c0e",+ spanIO: {+ input:+ '[{"role": "user", "parts": [{"type": "text", "content": "What\'s the weather in Tokyo?"}]}]',+ output:+ '[{"role": "assistant", "parts": [{"type": "tool_call", "id": "call_CwaJHuXTm9dmHFQPlVbqyzJ0", "name": "get_weather", "arguments": "{\\"location\\":\\"Tokyo, Japan\\"}"}]}]',+ metadata:+ '{"attributes":{"gen_ai.operation.name":"chat","gen_ai.request.choice.count":"1","gen_ai.provider.name":"openai","gen_ai.request.model":"gpt-5-mini","server.address":"Unknown","gen_ai.tool.definitions":"[{\\"type\\": \\"function\\", \\"function\\": {\\"name\\": \\"get_weather\\", \\"description\\": \\"Get the weather for a given location.\\", \\"parameters\\": {\\"properties\\": {\\"location\\": {\\"description\\": \\"The location to get the weather for.\\", \\"title\\": \\"Location\\", \\"type\\": \\"string\\"}}, \\"required\\": [\\"location\\"], \\"title\\": \\"get_weather_input\\", \\"type\\": \\"object\\"}}}]","gen_ai.response.id":"resp_0e32bda5b6259ecd00694279e271348194a818447145cd1763","gen_ai.response.model":"gpt-5-mini-2025-08-07","gen_ai.usage.input_tokens":"77","gen_ai.usage.output_tokens":"86","gen_ai.client.operation.duration":"3.2887914249999994"},"resourceAttributes":{"telemetry.sdk.language":"python","telemetry.sdk.name":"opentelemetry","telemetry.sdk.version":"1.39.1","service.name":"unknown_service"},"scope":{"name":"agent_framework","version":"1.0.0b251216","attributes":{}}}',+ },+ expected: {+ messages: [+ {+ role: "user",+ parts: [+ {+ type: "text",+ text: "What's the weather in Tokyo?",+ },+ ],+ source: "input",+ },+ {+ role: "assistant",+ parts: [+ {+ type: "tool-call",+ toolCallId: "call_CwaJHuXTm9dmHFQPlVbqyzJ0",+ toolName: "get_weather",+ input: {+ location: "Tokyo, Japan",+ },+ toolType: "tool_call",+ },+ ],+ source: "output",+ },+ ],+ toolDefinitions: [+ {+ name: "get_weather",+ description: "Get the weather for a given location.",+ inputSchema: {+ properties: {+ location: {+ description: "The location to get the weather for.",+ title: "Location",+ type: "string",+ },+ },+ required: ["location"],+ title: "get_weather_input",+ type: "object",+ },+ type: "function",+ },+ ],+ },+ },+];diff --git a/packages/shared/src/utils/normalized-io/conventions/providers/otel-genai/otel-genai.test.ts b/packages/shared/src/utils/normalized-io/conventions/providers/otel-genai/otel-genai.test.tsindex 776b326e0a..8ff1648838 100644--- a/packages/shared/src/utils/normalized-io/conventions/providers/otel-genai/otel-genai.test.ts+++ b/packages/shared/src/utils/normalized-io/conventions/providers/otel-genai/otel-genai.test.ts@@ -1,10 +1,13 @@import { describe, expect, it } from "vitest";import { normalizeSpanIO } from "../../../parser";-import { microsoftAgentProductionShapeFixture } from "./fixtures";+import {+ capturedTraceFixtures,+ microsoftAgentProductionShapeFixture,+} from "./fixtures";describe("OTel GenAI normalized I/O", () => {- it.each([microsoftAgentProductionShapeFixture])(+ it.each([...capturedTraceFixtures, microsoftAgentProductionShapeFixture])("$name",({ spanIO, expected }) => {expect(normalizeSpanIO(spanIO)).toEqual({diff --git a/packages/shared/src/utils/normalized-io/conventions/providers/pydantic-ai/fixtures.ts b/packages/shared/src/utils/normalized-io/conventions/providers/pydantic-ai/fixtures.tsindex 75996a8aaa..035fd523c2 100644--- a/packages/shared/src/utils/normalized-io/conventions/providers/pydantic-ai/fixtures.ts+++ b/packages/shared/src/utils/normalized-io/conventions/providers/pydantic-ai/fixtures.ts@@ -2453,3 +2453,559 @@ export const pydanticAiProductionShapeFixture = {],},} satisfies NormalizedIOFixture;++// Verbatim stored observation IO from ChatML integration-example exports.+export const capturedTraceFixtures: NormalizedIOFixture[] = [+ // Source: worker/src/__tests__/chatml/framework-traces/pydantic-ai-2025-06-06.trace.json; observation 5cb389a3bdd21a6e+ {+ name: "verbatim pydantic-ai-2025-06-06.trace.json / 5cb389a3bdd21a6e",+ spanIO: {+ input:+ '[{"content":"You are a helpful assistant that answers questions clearly and concisely.","role":"system","gen_ai.system":"openai","gen_ai.message.index":0,"event.name":"gen_ai.system.message"},{"content":"What is Langfuse?","role":"user","gen_ai.system":"openai","gen_ai.message.index":0,"event.name":"gen_ai.user.message"}]',+ output:+ '{"index":0,"message":{"role":"assistant","content":"Langfuse is a tool designed for observability and monitoring of applications that utilize large language models (LLMs). It provides features to trace, log, and visualize requests, helping developers understand the behavior of their LLM-powered applications more effectively. This can be particularly useful for debugging, performance optimization, and ensuring reliable operation of systems that depend on LLMs. Langfuse is designed to integrate easily with existing infrastructure, supporting both self-hosted implementations and cloud-based solutions."},"gen_ai.system":"openai","event.name":"gen_ai.choice"}',+ metadata:+ '{"attributes":{"gen_ai.operation.name":"chat","gen_ai.system":"openai","gen_ai.request.model":"gpt-4o","server.address":"api.openai.com","model_request_parameters":"{\\"function_tools\\": [], \\"allow_text_output\\": true, \\"output_tools\\": []}","gen_ai.usage.input_tokens":"31","gen_ai.usage.output_tokens":"96","gen_ai.response.model":"gpt-4o-2024-08-06","events":"[{\\"content\\": \\"You are a helpful assistant that answers questions clearly and concisely.\\", \\"role\\": \\"system\\", \\"gen_ai.system\\": \\"openai\\", \\"gen_ai.message.index\\": 0, \\"event.name\\": \\"gen_ai.system.message\\"}, {\\"content\\": \\"What is Langfuse?\\", \\"role\\": \\"user\\", \\"gen_ai.system\\": \\"openai\\", \\"gen_ai.message.index\\": 0, \\"event.name\\": \\"gen_ai.user.message\\"}, {\\"index\\": 0, \\"message\\": {\\"role\\": \\"assistant\\", \\"content\\": \\"Langfuse is a tool designed for observability and monitoring of applications that utilize large language models (LLMs). It provides features to trace, log, and visualize requests, helping developers understand the behavior of their LLM-powered applications more effectively. This can be particularly useful for debugging, performance optimization, and ensuring reliable operation of systems that depend on LLMs. Langfuse is designed to integrate easily with existing infrastructure, supporting both self-hosted implementations and cloud-based solutions.\\"}, \\"gen_ai.system\\": \\"openai\\", \\"event.name\\": \\"gen_ai.choice\\"}]","logfire.json_schema":"{\\"type\\": \\"object\\", \\"properties\\": {\\"events\\": {\\"type\\": \\"array\\"}, \\"model_request_parameters\\": {\\"type\\": \\"object\\"}}}"},"resourceAttributes":{"telemetry.sdk.language":"python","telemetry.sdk.name":"opentelemetry","telemetry.sdk.version":"1.33.1","service.name":"unknown_service"},"scope":{"name":"pydantic-ai","version":"0.2.15","attributes":{}}}',+ },+ expected: {+ messages: [+ {+ role: "system",+ parts: [+ {+ type: "text",+ text: "You are a helpful assistant that answers questions clearly and concisely.",+ },+ ],+ source: "input",+ },+ {+ role: "user",+ parts: [+ {+ type: "text",+ text: "What is Langfuse?",+ },+ ],+ source: "input",+ },+ {+ role: "assistant",+ parts: [+ {+ type: "text",+ text: "Langfuse is a tool designed for observability and monitoring of applications that utilize large language models (LLMs). It provides features to trace, log, and visualize requests, helping developers understand the behavior of their LLM-powered applications more effectively. This can be particularly useful for debugging, performance optimization, and ensuring reliable operation of systems that depend on LLMs. Langfuse is designed to integrate easily with existing infrastructure, supporting both self-hosted implementations and cloud-based solutions.",+ },+ ],+ source: "output",+ },+ ],+ toolDefinitions: [],+ },+ },+ // Source: worker/src/__tests__/chatml/framework-traces/pydantic-ai-tools-2025-12-04.trace.json; observation 00d2804abb764b1b+ {+ name: "verbatim pydantic-ai-tools-2025-12-04.trace.json / 00d2804abb764b1b",+ spanIO: {+ input: [+ {+ role: "system",+ parts: [+ {+ type: "text",+ content:+ "You are a creative joke writer. When asked to get inspiration, you will call THREE of the available suggestion tools to gather ideas. When asked to write a joke, create a funny joke based on the suggestions you received.",+ },+ ],+ },+ {+ role: "user",+ parts: [+ {+ type: "text",+ content:+ "Select and call THREE of the available tools to get joke suggestions about 'programming'.",+ },+ ],+ },+ {+ role: "assistant",+ parts: [+ {+ type: "tool_call",+ id: "call_X0OSgjUukT5inyEQvuZQnHrk",+ name: "get_pun_suggestion",+ arguments: {+ topic: "programming",+ },+ },+ {+ type: "tool_call",+ id: "call_WxZcCvSDhGT4RJHlcU01k10x",+ name: "get_dad_joke_suggestion",+ arguments: {+ topic: "programming",+ },+ },+ {+ type: "tool_call",+ id: "call_aRaObiWKKt6GzgDkkUl3bu1Q",+ name: "get_one_liner_suggestion",+ arguments: {+ topic: "programming",+ },+ },+ ],+ finish_reason: "tool_call",+ },+ {+ role: "user",+ parts: [+ {+ type: "tool_call_response",+ id: "call_X0OSgjUukT5inyEQvuZQnHrk",+ name: "get_pun_suggestion",+ result:+ "Pun idea: Play on words related to 'programming' - think about homophones or double meanings",+ },+ {+ type: "tool_call_response",+ id: "call_WxZcCvSDhGT4RJHlcU01k10x",+ name: "get_dad_joke_suggestion",+ result:+ "Dad joke idea: Use a classic setup-punchline format about 'programming' with a groan-worthy twist",+ },+ {+ type: "tool_call_response",+ id: "call_aRaObiWKKt6GzgDkkUl3bu1Q",+ name: "get_one_liner_suggestion",+ result:+ "One-liner idea: Make a quick, witty observation about 'programming' in a single sentence",+ },+ ],+ },+ ],+ output: [+ {+ role: "assistant",+ parts: [+ {+ type: "text",+ content:+ "I gathered some great ideas for a programming joke! Here’s a funny joke combining those suggestions:\n\nWhy do programmers prefer dark mode? \nBecause light attracts bugs! \n\n(It's a pun on light attracting bugs and programmers having a love-hate relationship with debugging!)",+ },+ ],+ finish_reason: "stop",+ },+ ],+ metadata: {+ attributes: {+ "gen_ai.operation.name": "chat",+ "gen_ai.system": "openai",+ "gen_ai.request.model": "gpt-4o-mini",+ "server.address": "api.openai.com",+ model_request_parameters: {+ function_tools: [+ {+ name: "get_pun_suggestion",+ parameters_json_schema: {+ additionalProperties: false,+ properties: {+ topic: {+ description: "The topic for the joke",+ type: "string",+ },+ },+ required: ["topic"],+ type: "object",+ },+ description:+ "Get a pun-style joke suggestion for the given topic.",+ outer_typed_dict_key: null,+ strict: true,+ sequential: false,+ kind: "function",+ metadata: null,+ },+ {+ name: "get_dad_joke_suggestion",+ parameters_json_schema: {+ additionalProperties: false,+ properties: {+ topic: {+ description: "The topic for the joke",+ type: "string",+ },+ },+ required: ["topic"],+ type: "object",+ },+ description:+ "Get a dad joke style suggestion for the given topic.",+ outer_typed_dict_key: null,+ strict: true,+ sequential: false,+ kind: "function",+ metadata: null,+ },+ {+ name: "get_one_liner_suggestion",+ parameters_json_schema: {+ additionalProperties: false,+ properties: {+ topic: {+ description: "The topic for the joke",+ type: "string",+ },+ },+ required: ["topic"],+ type: "object",+ },+ description:+ "Get a one-liner joke suggestion for the given topic.",+ outer_typed_dict_key: null,+ strict: true,+ sequential: false,+ kind: "function",+ metadata: null,+ },+ {+ name: "get_car_joke_suggestion",+ parameters_json_schema: {+ additionalProperties: false,+ properties: {+ topic: {+ description: "The topic for the joke",+ type: "string",+ },+ },+ required: ["topic"],+ type: "object",+ },+ description:+ "Get a car-themed joke suggestion for the given topic.",+ outer_typed_dict_key: null,+ strict: true,+ sequential: false,+ kind: "function",+ metadata: null,+ },+ {+ name: "get_tree_joke_suggestion",+ parameters_json_schema: {+ additionalProperties: false,+ properties: {+ topic: {+ description: "The topic for the joke",+ type: "string",+ },+ },+ required: ["topic"],+ type: "object",+ },+ description:+ "Get a tree-themed joke suggestion for the given topic.",+ outer_typed_dict_key: null,+ strict: true,+ sequential: false,+ kind: "function",+ metadata: null,+ },+ ],+ builtin_tools: [],+ output_mode: "text",+ output_object: null,+ output_tools: [],+ prompted_output_template: null,+ allow_text_output: true,+ allow_image_output: false,+ },+ "gen_ai.request.temperature": "0.7",+ "logfire.json_schema": {+ type: "object",+ properties: {+ "gen_ai.input.messages": {+ type: "array",+ },+ "gen_ai.output.messages": {+ type: "array",+ },+ model_request_parameters: {+ type: "object",+ },+ },+ },+ "gen_ai.usage.input_tokens": "417",+ "gen_ai.usage.output_tokens": "53",+ "gen_ai.response.model": "gpt-4o-mini-2024-07-18",+ "operation.cost": "0.00009435",+ "gen_ai.response.id": "chatcmpl-Cj4xwF0fLMbLL7cj2PpKMa69vdqgM",+ "gen_ai.response.finish_reasons": ["stop"],+ },+ resourceAttributes: {+ "telemetry.sdk.language": "python",+ "telemetry.sdk.name": "opentelemetry",+ "telemetry.sdk.version": "1.38.0",+ "service.name": "unknown_service",+ },+ scope: {+ name: "pydantic-ai",+ version: "1.26.0",+ attributes: {},+ },+ },+ },+ expected: {+ messages: [+ {+ role: "system",+ parts: [+ {+ type: "text",+ text: "You are a creative joke writer. When asked to get inspiration, you will call THREE of the available suggestion tools to gather ideas. When asked to write a joke, create a funny joke based on the suggestions you received.",+ },+ ],+ source: "input",+ },+ {+ role: "user",+ parts: [+ {+ type: "text",+ text: "Select and call THREE of the available tools to get joke suggestions about 'programming'.",+ },+ ],+ source: "input",+ },+ {+ role: "assistant",+ parts: [+ {+ type: "tool-call",+ toolCallId: "call_X0OSgjUukT5inyEQvuZQnHrk",+ toolName: "get_pun_suggestion",+ input: {+ topic: "programming",+ },+ toolType: "tool_call",+ },+ {+ type: "tool-call",+ toolCallId: "call_WxZcCvSDhGT4RJHlcU01k10x",+ toolName: "get_dad_joke_suggestion",+ input: {+ topic: "programming",+ },+ toolType: "tool_call",+ },+ {+ type: "tool-call",+ toolCallId: "call_aRaObiWKKt6GzgDkkUl3bu1Q",+ toolName: "get_one_liner_suggestion",+ input: {+ topic: "programming",+ },+ toolType: "tool_call",+ },+ ],+ finishReason: {+ type: "tool-calls",+ raw: "tool_call",+ },+ source: "input",+ },+ {+ role: "tool",+ parts: [+ {+ type: "tool-result",+ toolCallId: "call_X0OSgjUukT5inyEQvuZQnHrk",+ output:+ "Pun idea: Play on words related to 'programming' - think about homophones or double meanings",+ },+ {+ type: "tool-result",+ toolCallId: "call_WxZcCvSDhGT4RJHlcU01k10x",+ output:+ "Dad joke idea: Use a classic setup-punchline format about 'programming' with a groan-worthy twist",+ },+ {+ type: "tool-result",+ toolCallId: "call_aRaObiWKKt6GzgDkkUl3bu1Q",+ output:+ "One-liner idea: Make a quick, witty observation about 'programming' in a single sentence",+ },+ ],+ source: "input",+ },+ {+ role: "assistant",+ parts: [+ {+ type: "text",+ text: "I gathered some great ideas for a programming joke! Here’s a funny joke combining those suggestions:\n\nWhy do programmers prefer dark mode? \nBecause light attracts bugs! \n\n(It's a pun on light attracting bugs and programmers having a love-hate relationship with debugging!)",+ },+ ],+ finishReason: {+ type: "stop",+ raw: "stop",+ },+ source: "output",+ },+ ],+ toolDefinitions: [+ {+ name: "get_pun_suggestion",+ description: "Get a pun-style joke suggestion for the given topic.",+ inputSchema: {+ additionalProperties: false,+ properties: {+ topic: {+ description: "The topic for the joke",+ type: "string",+ },+ },+ required: ["topic"],+ type: "object",+ },+ providerMetadata: {+ outer_typed_dict_key: null,+ strict: true,+ sequential: false,+ kind: "function",+ metadata: null,+ },+ },+ {+ name: "get_dad_joke_suggestion",+ description: "Get a dad joke style suggestion for the given topic.",+ inputSchema: {+ additionalProperties: false,+ properties: {+ topic: {+ description: "The topic for the joke",+ type: "string",+ },+ },+ required: ["topic"],+ type: "object",+ },+ providerMetadata: {+ outer_typed_dict_key: null,+ strict: true,+ sequential: false,+ kind: "function",+ metadata: null,+ },+ },+ {+ name: "get_one_liner_suggestion",+ description: "Get a one-liner joke suggestion for the given topic.",+ inputSchema: {+ additionalProperties: false,+ properties: {+ topic: {+ description: "The topic for the joke",+ type: "string",+ },+ },+ required: ["topic"],+ type: "object",+ },+ providerMetadata: {+ outer_typed_dict_key: null,+ strict: true,+ sequential: false,+ kind: "function",+ metadata: null,+ },+ },+ {+ name: "get_car_joke_suggestion",+ description: "Get a car-themed joke suggestion for the given topic.",+ inputSchema: {+ additionalProperties: false,+ properties: {+ topic: {+ description: "The topic for the joke",+ type: "string",+ },+ },+ required: ["topic"],+ type: "object",+ },+ providerMetadata: {+ outer_typed_dict_key: null,+ strict: true,+ sequential: false,+ kind: "function",+ metadata: null,+ },+ },+ {+ name: "get_tree_joke_suggestion",+ description: "Get a tree-themed joke suggestion for the given topic.",+ inputSchema: {+ additionalProperties: false,+ properties: {+ topic: {+ description: "The topic for the joke",+ type: "string",+ },+ },+ required: ["topic"],+ type: "object",+ },+ providerMetadata: {+ outer_typed_dict_key: null,+ strict: true,+ sequential: false,+ kind: "function",+ metadata: null,+ },+ },+ ],+ },+ },+ // Source: worker/src/__tests__/chatml/framework-traces/pydantic-ai-with-gemini-2025-12-24.trace.json; observation 8ffb64580a84a3f0+ {+ name: "verbatim pydantic-ai-with-gemini-2025-12-24.trace.json / 8ffb64580a84a3f0",+ spanIO: {+ input:+ '[{"role": "user", "parts": [{"type": "text", "content": "what is 1+1?\\nOutput format:\\n```json\\n{\\n \\"answer\\": your answer,\\n \\"rationale\\": \\"explanation for answer\\"\\n}\\n```"}]}]',+ output:+ '[{"role": "assistant", "parts": [{"type": "text", "content": "{\\"answer\\": \\"2\\", \\"rationale\\": \\"The operation 1+1 is a basic arithmetic addition. Adding the integer 1 to itself results in the integer 2.\\"}"}], "finish_reason": "stop"}]',+ metadata:+ '{"attributes":{"gen_ai.operation.name":"chat","gen_ai.system":"google-gla","gen_ai.request.model":"gemini-2.5-flash","server.address":"generativelanguage.googleapis.com","model_request_parameters":"{\\"function_tools\\": [], \\"builtin_tools\\": [], \\"output_mode\\": \\"native\\", \\"output_object\\": {\\"json_schema\\": {\\"properties\\": {\\"answer\\": {\\"type\\": \\"string\\"}, \\"rationale\\": {\\"type\\": \\"string\\"}}, \\"required\\": [\\"answer\\", \\"rationale\\"], \\"type\\": \\"object\\"}, \\"name\\": null, \\"description\\": null, \\"strict\\": true}, \\"output_tools\\": [], \\"allow_text_output\\": true, \\"allow_image_output\\": false}","logfire.json_schema":"{\\"type\\": \\"object\\", \\"properties\\": {\\"gen_ai.input.messages\\": {\\"type\\": \\"array\\"}, \\"gen_ai.output.messages\\": {\\"type\\": \\"array\\"}, \\"model_request_parameters\\": {\\"type\\": \\"object\\"}}}","gen_ai.usage.input_tokens":"40","gen_ai.usage.output_tokens":"159","gen_ai.usage.details.thoughts_tokens":"121","gen_ai.usage.details.text_prompt_tokens":"40","gen_ai.response.model":"gemini-2.5-flash","operation.cost":"0.0004095","gen_ai.response.id":"r4FLad_IHojq1e8Pt6i7GA","gen_ai.response.finish_reasons":"[\\"stop\\"]"},"resourceAttributes":{"telemetry.sdk.language":"python","telemetry.sdk.name":"opentelemetry","telemetry.sdk.version":"1.37.0","langfuse.environment":"251216-langfuse-v3-test","service.name":"unknown_service"},"scope":{"name":"pydantic-ai","version":"1.11.0","attributes":{}}}',+ },+ expected: {+ messages: [+ {+ role: "user",+ parts: [+ {+ type: "text",+ text: 'what is 1+1?\nOutput format:\n```json\n{\n "answer": your answer,\n "rationale": "explanation for answer"\n}\n```',+ },+ ],+ source: "input",+ },+ {+ role: "assistant",+ parts: [+ {+ type: "text",+ text: '{"answer": "2", "rationale": "The operation 1+1 is a basic arithmetic addition. Adding the integer 1 to itself results in the integer 2."}',+ },+ ],+ finishReason: {+ type: "stop",+ raw: "stop",+ },+ source: "output",+ },+ ],+ toolDefinitions: [],+ },+ },+];diff --git a/packages/shared/src/utils/normalized-io/conventions/providers/pydantic-ai/pydantic-ai.test.ts b/packages/shared/src/utils/normalized-io/conventions/providers/pydantic-ai/pydantic-ai.test.tsindex 74b93730f1..73f763bbd7 100644--- a/packages/shared/src/utils/normalized-io/conventions/providers/pydantic-ai/pydantic-ai.test.ts+++ b/packages/shared/src/utils/normalized-io/conventions/providers/pydantic-ai/pydantic-ai.test.ts@@ -1,10 +1,13 @@import { describe, expect, it } from "vitest";import { normalizeSpanIO } from "../../../parser";-import { pydanticAiProductionShapeFixture } from "./fixtures";+import {+ capturedTraceFixtures,+ pydanticAiProductionShapeFixture,+} from "./fixtures";describe("Pydantic AI normalized I/O", () => {- it.each([pydanticAiProductionShapeFixture])(+ it.each([...capturedTraceFixtures, pydanticAiProductionShapeFixture])("$name",({ spanIO, expected }) => {expect(normalizeSpanIO(spanIO)).toEqual({diff --git a/worker/src/__tests__/chatml/framework-traces/README.md b/worker/src/__tests__/chatml/framework-traces/README.mdindex d83dc5e62c..878e58560f 100644--- a/worker/src/__tests__/chatml/framework-traces/README.md+++ b/worker/src/__tests__/chatml/framework-traces/README.md@@ -1,3 +1,8 @@Those traces are used to test the chatML adapters.They comes for the various framework intragration examples in Langfuse's doc (for example https://langfuse.com/integrations/frameworks/agno-agents).Use download_traces.js to generate the files.++`csharp-agent-with-gemini-2026-03-09` was captured from a third party rather than+a Langfuse integration example, and has been anonymized: organization name, host,+internal service identifiers, dashboard URL, and the provider's encrypted reasoning+blobs are placeholders. Do not regenerate it with download_traces.js.diff --git a/worker/src/__tests__/chatml/framework-traces/agno-2025-06-11.trace.json b/worker/src/__tests__/chatml/framework-traces/agno-2025-06-11.trace.jsonindex e28069e1ee..606a9e4ce1 100644--- a/worker/src/__tests__/chatml/framework-traces/agno-2025-06-11.trace.json+++ b/worker/src/__tests__/chatml/framework-traces/agno-2025-06-11.trace.json@@ -483,7 +483,7 @@"toolDefinitions": {},"toolCalls": [],"toolCallNames": [],- "metadata": "{\"resourceAttributes\":{\"telemetry.sdk.language\":\"python\",\"telemetry.sdk.name\":\"opentelemetry\",\"telemetry.sdk.version\":\"1.33.1\",\"service.name\":\"unknown_service\"},\"scope\":{\"name\":\"langfuse-sdk\",\"version\":\"3.0.1\",\"attributes\":{\"public_key\":\"pk-lf-5855d85e-3943-497e-bd10-f50ad414bcba\"}}}",+ "metadata": "{\"resourceAttributes\":{\"telemetry.sdk.language\":\"python\",\"telemetry.sdk.name\":\"opentelemetry\",\"telemetry.sdk.version\":\"1.33.1\",\"service.name\":\"unknown_service\"},\"scope\":{\"name\":\"langfuse-sdk\",\"version\":\"3.0.1\",\"attributes\":{\"public_key\":\"pk-lf-5855d85e-3943-497e-bd10-f50ad414bccc\"}}}","internalModel": "clyrjp56f0000t0mzapoocd7u"},{@@ -588,7 +588,7 @@"toolDefinitions": {},"toolCalls": [],"toolCallNames": [],- "metadata": "{\"resourceAttributes\":{\"telemetry.sdk.language\":\"python\",\"telemetry.sdk.name\":\"opentelemetry\",\"telemetry.sdk.version\":\"1.33.1\",\"service.name\":\"unknown_service\"},\"scope\":{\"name\":\"langfuse-sdk\",\"version\":\"3.0.1\",\"attributes\":{\"public_key\":\"pk-lf-5855d85e-3943-497e-bd10-f50ad414bcba\"}}}",+ "metadata": "{\"resourceAttributes\":{\"telemetry.sdk.language\":\"python\",\"telemetry.sdk.name\":\"opentelemetry\",\"telemetry.sdk.version\":\"1.33.1\",\"service.name\":\"unknown_service\"},\"scope\":{\"name\":\"langfuse-sdk\",\"version\":\"3.0.1\",\"attributes\":{\"public_key\":\"pk-lf-5855d85e-3943-497e-bd10-f50ad414bccc\"}}}","internalModel": "clyrjp56f0000t0mzapoocd7u"},{diff --git a/worker/src/__tests__/chatml/framework-traces/autogen-2025-06-06.trace.json b/worker/src/__tests__/chatml/framework-traces/autogen-2025-06-06.trace.jsonindex f4828362d0..004559b450 100644--- a/worker/src/__tests__/chatml/framework-traces/autogen-2025-06-06.trace.json+++ b/worker/src/__tests__/chatml/framework-traces/autogen-2025-06-06.trace.json@@ -5,10 +5,7 @@"name": "autogen-chat-trace","timestamp": "2025-06-06T11:31:33.965Z","environment": "default",- "tags": [- "autogen",- "dev"- ],+ "tags": ["autogen", "dev"],"bookmarked": false,"release": null,"version": "1.0.0",@@ -19,7 +16,7 @@"output": "\"Hello World!\"","createdAt": "2025-06-06T11:31:35.000Z","updatedAt": "2025-06-06T11:31:35.337Z",- "metadata": "{\"email\":\"[email protected]\",\"resourceAttributes\":{\"telemetry.sdk.language\":\"python\",\"telemetry.sdk.name\":\"opentelemetry\",\"telemetry.sdk.version\":\"1.33.1\",\"service.name\":\"unknown_service\"},\"scope\":{\"name\":\"langfuse-sdk\",\"version\":\"3.0.0\",\"attributes\":{\"public_key\":\"pk-lf-5855d85e-3943-497e-bd10-f50ad414bcba\"}}}",+ "metadata": "{\"email\":\"[email protected]\",\"resourceAttributes\":{\"telemetry.sdk.language\":\"python\",\"telemetry.sdk.name\":\"opentelemetry\",\"telemetry.sdk.version\":\"1.33.1\",\"service.name\":\"unknown_service\"},\"scope\":{\"name\":\"langfuse-sdk\",\"version\":\"3.0.0\",\"attributes\":{\"public_key\":\"pk-lf-5855d85e-3943-497e-bd10-f50ad414bccc\"}}}","scores": [],"corrections": [],"latency": 0.645,@@ -170,7 +167,7 @@"toolDefinitions": {},"toolCalls": [],"toolCallNames": [],- "metadata": "{\"resourceAttributes\":{\"telemetry.sdk.language\":\"python\",\"telemetry.sdk.name\":\"opentelemetry\",\"telemetry.sdk.version\":\"1.33.1\",\"service.name\":\"unknown_service\"},\"scope\":{\"name\":\"langfuse-sdk\",\"version\":\"3.0.0\",\"attributes\":{\"public_key\":\"pk-lf-5855d85e-3943-497e-bd10-f50ad414bcba\"}}}",+ "metadata": "{\"resourceAttributes\":{\"telemetry.sdk.language\":\"python\",\"telemetry.sdk.name\":\"opentelemetry\",\"telemetry.sdk.version\":\"1.33.1\",\"service.name\":\"unknown_service\"},\"scope\":{\"name\":\"langfuse-sdk\",\"version\":\"3.0.0\",\"attributes\":{\"public_key\":\"pk-lf-5855d85e-3943-497e-bd10-f50ad414bccc\"}}}","internalModel": null},{@@ -232,7 +229,7 @@"toolDefinitions": {},"toolCalls": [],"toolCallNames": [],- "metadata": "{\"resourceAttributes\":{\"telemetry.sdk.language\":\"python\",\"telemetry.sdk.name\":\"opentelemetry\",\"telemetry.sdk.version\":\"1.33.1\",\"service.name\":\"unknown_service\"},\"scope\":{\"name\":\"langfuse-sdk\",\"version\":\"3.0.0\",\"attributes\":{\"public_key\":\"pk-lf-5855d85e-3943-497e-bd10-f50ad414bcba\"}}}",+ "metadata": "{\"resourceAttributes\":{\"telemetry.sdk.language\":\"python\",\"telemetry.sdk.name\":\"opentelemetry\",\"telemetry.sdk.version\":\"1.33.1\",\"service.name\":\"unknown_service\"},\"scope\":{\"name\":\"langfuse-sdk\",\"version\":\"3.0.0\",\"attributes\":{\"public_key\":\"pk-lf-5855d85e-3943-497e-bd10-f50ad414bccc\"}}}","internalModel": "b9854a5c92dc496b997d99d20"}]diff --git a/worker/src/__tests__/chatml/framework-traces/csharp-agent-with-gemini-2026-03-09.trace.json b/worker/src/__tests__/chatml/framework-traces/csharp-agent-with-gemini-2026-03-09.trace.jsonindex a8882eedb7..c917ac393c 100644--- a/worker/src/__tests__/chatml/framework-traces/csharp-agent-with-gemini-2026-03-09.trace.json+++ b/worker/src/__tests__/chatml/framework-traces/csharp-agent-with-gemini-2026-03-09.trace.json@@ -8,7 +8,7 @@"tags": [],"bookmarked": false,"release": null,- "version": "105537",+ "version": "100000","userId": "g.aprozeanu","sessionId": "9714061f-20c0-4d98-9220-1dc7df15c3c2","public": true,@@ -16,7 +16,7 @@"output": "\"{\\\"response\\\":{\\\"comment\\\":\\\"I couldn't retrieve the month-over-month performance insights for the past quarter (October 2025 to December 2025) by campaign for the requested metrics (Cost, Displays, Clicks, CTR, Sales, CVR) as no data was found for this period.\\\\n\\\\n### Parameters\\\\n- Data was requested from 2025-10-01 to 2025-12-31 with time zone Europe/London.\\\\n- Attribution model chosen is 30-Day Post Click\\\\n- Currency: EUR\\\\n- Time dimension: Month\\\\n- Dimensions: Campaign\\\\n- Metrics: Cost, Displays, Clicks, CTR, Sales, CVR\\\\n\\\\nPlease let me know if you'd like to try a different date range or different metrics.\\\",\\\"response\\\":[],\\\"response_status\\\":\\\"noDataFound\\\",\\\"followup_questions\\\":[\\\"Change date range to last month.\\\",\\\"Compare CTR across campaigns.\\\",\\\"Break down by country.\\\"],\\\"response_context\\\":null},\\\"client_id\\\":22291,\\\"session_id\\\":\\\"9714061f-20c0-4d98-9220-1dc7df15c3c2\\\",\\\"trace_id\\\":\\\"933dba1e9783f89d5d8bb032f041a2de\\\",\\\"tool_inputs\\\":null}\"","createdAt": "2026-03-09T12:26:03.000Z","updatedAt": "2026-03-09T12:26:13.209Z",- "metadata": "{\"resourceAttributes\":{\"deployment.environment.name\":\"preprod\",\"service.name\":\"agentic-clientinsights\",\"service.version\":\"105537\",\"service.instance.id\":\"10NDX\"},\"scope\":{\"name\":\"Criteo.Langfuse\",\"version\":\"\",\"attributes\":{}}}",+ "metadata": "{\"resourceAttributes\":{\"deployment.environment.name\":\"preprod\",\"service.name\":\"agentic-demo-insights\",\"service.version\":\"100000\",\"service.instance.id\":\"INST01\"},\"scope\":{\"name\":\"ExampleAds.Langfuse\",\"version\":\"\",\"attributes\":{}}}","scores": [],"corrections": [],"latency": 14.851,@@ -33,7 +33,7 @@"name": "chat gemini-2.5-flash","level": "DEFAULT","statusMessage": null,- "version": "105537",+ "version": "100000","createdAt": "2026-03-09T12:26:07.964Z","updatedAt": "2026-03-09T12:26:07.964Z","input": null,@@ -86,7 +86,7 @@"name": "chat gemini-2.5-flash","level": "DEFAULT","statusMessage": null,- "version": "105537",+ "version": "100000","createdAt": "2026-03-09T12:26:02.752Z","updatedAt": "2026-03-09T12:26:02.752Z","input": null,@@ -139,7 +139,7 @@"name": "chat gemini-2.5-flash","level": "DEFAULT","statusMessage": null,- "version": "105537",+ "version": "100000","createdAt": "2026-03-09T12:26:13.119Z","updatedAt": "2026-03-09T12:26:13.119Z","input": null,@@ -192,7 +192,7 @@"name": "Insights Agent C#","level": "DEFAULT","statusMessage": null,- "version": "105537",+ "version": "100000","createdAt": "2026-03-09T12:26:13.119Z","updatedAt": "2026-03-09T12:26:13.120Z","input": null,@@ -234,7 +234,7 @@"name": "orchestrate_tools","level": "DEFAULT","statusMessage": null,- "version": "105537",+ "version": "100000","createdAt": "2026-03-09T12:26:13.119Z","updatedAt": "2026-03-09T12:26:13.120Z","input": null,@@ -276,7 +276,7 @@"name": "orchestrate_tools","level": "DEFAULT","statusMessage": null,- "version": "105537",+ "version": "100000","createdAt": "2026-03-09T12:26:07.964Z","updatedAt": "2026-03-09T12:26:07.965Z","input": null,@@ -318,7 +318,7 @@"name": "final_result","level": "DEFAULT","statusMessage": null,- "version": "105537",+ "version": "100000","createdAt": "2026-03-09T12:26:13.119Z","updatedAt": "2026-03-09T12:26:13.119Z","input": null,@@ -360,7 +360,7 @@"name": "get_custom_report","level": "DEFAULT","statusMessage": null,- "version": "105537",+ "version": "100000","createdAt": "2026-03-09T12:26:07.964Z","updatedAt": "2026-03-09T12:26:07.964Z","input": null,@@ -405,11 +405,11 @@"name": "chat gemini-2.5-flash","level": "DEFAULT","statusMessage": null,- "version": "105537",+ "version": "100000","createdAt": "2026-03-09T12:26:07.964Z","updatedAt": "2026-03-09T12:26:07.964Z",- "input": "[\n {\n \"role\": \"user\",\n \"parts\": [\n {\n \"type\": \"text\",\n \"content\": \"What are my month over month performance insights the past quarter, by cost, displays, clicks, CTR, sales, CVR? Please split by campaign taxonomy\"\n }\n ]\n },\n {\n \"role\": \"assistant\",\n \"parts\": [\n {\n \"type\": \"tool_call\",\n \"id\": \"get_custom_report\",\n \"name\": \"get_custom_report\",\n \"arguments\": {\n \"dimensions\": [\n \"Campaign\"\n ],\n \"filters\": {\n \"dateRange\": {\n \"from_date\": \"2025-10-01\",\n \"to_date\": \"2025-12-31\"\n }\n },\n \"timeDimension\": \"Month\",\n \"metrics\": [\n \"Cost\",\n \"Displays\",\n \"Clicks\",\n \"Ctr\",\n \"Sales\",\n \"Cvr\"\n ]\n }\n },\n {\n \"type\": \"Microsoft.Extensions.AI.TextReasoningContent\",\n \"content\": {\n \"text\": \"\",\n \"protectedData\": \"CooKAY89a1+CDPFO/TMZiXeenaPLkZSQA1LTxbQ7KmbinWe/uwbMou6HLwBeN20ZvZ+7QHhxpopqxYuZugBc3x3GariQWXjIh9esj8BB+ufQmBPUKMGRmM3tSqw0KqQ/TlEqq81dTM6leDfHUfiAfSa45iC4IUVWHtrD9ZXtN6O6HxdxN+/zf5tU3rS1zIKAsDev2nqR2tAYqG9FVtnC4Y//05fVMFq9BQjxlsfYhFn+pMIAnH9/GjM5iIzbg3eqH6EDqIuRHIT+Bg/8+bXd9PPgHKXZlcu/9aaQsOHbh9+8eSOfZgzzZ1wRHYAcj9i5fdnlK3UfKYTBoaXdPoqOc7mVteUKELYSY4xyh0Dzbp/27qTBPG1pgFuoxJV9NDi7zJiMby0HfRRVcL/kpI7z5Vxg3rSCMvlNFQHxVvglsDCoiQAph9373SSUKUvh2LgfclHi/nxcZOhKNpds/SFXj3cjZUi5NpFT/O2qhBat27ztbMpoL2j/aYrQ5HDxE+yJOLgUyeO3LoS+xw1eTsUcGTNb73T2g3RexvR+CuP5JqpFYX9oxU7A/98+DP7UaXSeV1cxHCGWShSvwTMDixO75AMhNspXiYa1ZiFOBmyWhOU4Mdqimh4uNXRmx3SVm8/XIkidZq0ffqXqRyPkN1TI9/Q6Uuy19QMbQZxLHdLYd9cXQCoNvYEYr1X76pHA3UVRnz2hors/vTmAvZqdGYI/42gWKNy5kntAVssG0UOTkrt7cMgW2pZNFTe3aMVvZL5cTuI+ssfxrtl7YqpopDexX1b0szixtkt0O69r1kl8W0ubJ2/YdcJ5NjC2AMaFSceYrU57tbupvBx4UXuOxhIUEX6N3Ce2ctEw1rBm82PabYFnjMs3Jm9jWt9MDXkX4yTVjwoEYFY9ID9DvevwB0C0oWF4NFVLGL6PUFbHwMyBhbab2Py11xfn8HHWokguKc9fsbBOJNnMcRW9zHpiGyYE9bQNbEvanqg12zGMXgRKA5YJgItmt4drDAaWT6TF+GxpBFNNhn6dStlOH/gpv1/VXZ4+lX4+KSgYyNu+NQi+zWJesvDYesooB2lhJfO0+Cvp0ogs++/TmPpQk6MJBF4nblugcfdXe5sd5wMf8ggmzgRRyuOHMhnyf/YPPLHP4cZPjxTtZ1yIYq4VJNlrvn7bTEhbWq3CubPaR8srZHyr9GlPTryxK7Gpi87uFlZdKa6rl0OSwSa+DatBcmPlXymdSbWc7+83mYSQtoLKlKkGESyqfYOmUQv89bx8UbBy8+BrKOlGbK9buQCTii560lj1IqV/IWH4QZ+NUp9KgU5HIKGw5LukDkK1ieWCiKWcQRYOor1oo3GXu6k0OTG01e+bCAvVoIeiZyPFtP5C3Q/wwyYZKZrLWNCg2SJOuIs2xTgidX0lzJY3XUAcTKAUP9xWYG8OLtm/ihzKxVP/rJbWfbir9ORnSqgJfzdXx0bhYzsOB3A0lUMfAGzRF4o4euym8IXMamJGt6xxxX4+prIFQ5G7ktVHhz23WlU6k4BdsaFoHmCu/xmGDsVhhyU1EG9wAbR7MwM5OgdQO9+C6m0tn1W1QzygSvyrDCBhmefwoU7AzZT7wR4WzNrpZefBV1EhDEp4lbRbSNnF85+0jlXcVrBhFeHENd5t9SFy7utTxdNEtBV6rBdvHf3Il6/Q9+mpUkXk8oFqfDHjfm8iubt5vBxYGlQqYGaXxsOVP7/B\"\n }\n }\n ]\n },\n {\n \"role\": \"tool\",\n \"parts\": [\n {\n \"type\": \"tool_call_response\",\n \"id\": \"get_custom_report\",\n \"response\": {\n \"response_status\": \"Error\",\n \"message\": \"ERROR: No data found for dimensions: Campaign and metrics Cost,Displays,Clicks,Ctr,Sales,Cvr.\"\n }\n }\n ]\n }\n]",- "output": "[\n {\n \"role\": \"assistant\",\n \"parts\": [\n {\n \"type\": \"text\",\n \"content\": \"I couldn't retrieve the month-over-month performance insights for the past quarter (October 2025 to December 2025) by campaign for the requested metrics (Cost, Displays, Clicks, CTR, Sales, CVR) as no data was found for this period.\\n\\n### Parameters\\n- Data was requested from 2025-10-01 to 2025-12-31 with time zone Europe/London.\\n- Attribution model chosen is 30-Day Post Click\\n- Currency: EUR\\n- Time dimension: Month\\n- Dimensions: Campaign\\n- Metrics: Cost, Displays, Clicks, CTR, Sales, CVR\\n\\nPlease let me know if you'd like to try a different date range or different metrics.\"\n },\n {\n \"type\": \"Microsoft.Extensions.AI.TextReasoningContent\",\n \"content\": {\n \"text\": \"\",\n \"protectedData\": \"CoMDAY89a19Q6ObTtHOu2hKdVHU/YkIqUdXI2wbMU9mAEx5gJYE/7Tcq5y3wgUil8RKE+4mrcce/41Rq8VZBlJdfNiYm4v90K/C+Z+r24iSxOUQGg/q9+WKzh/pCtWj6524QTA1QdAUUj0EmJ0wUkmk2T1yA6LDOPlS43nAyAFqfdRRAv7dhoTseyfjjI5Oo8bgiYYI+wkPbFe8Vnna8WDnDqBm3GvvYXVIMKnMzuJOHuKjxVUkPTTA9ztfykLimi4iRT4QGjWbW4S2Tr2+HiSw3rACygVXv3x7BQ6Y1kCtyS3e0WXQtqlwyb5eON94p+3gpZoRVuTO7fnttEQFUR6WKnsIpEEDvv/JJKvS0qR03602pV9qiTW/15ndgRQN9llMhvXqpShmjkB/+GJNMfri4kqFML9GWo8PKZ+dQr7pjratHJa/eMG4izt8PDwwNh17k6/XjE49sRplKbTXEH5OT2BLVMPGx0OAT2kq2+eSIjzewNKxi79KTsya8mWR4Gcf+olXS\"\n }\n }\n ],\n \"finish_reason\": \"stop\"\n }\n]",+ "input": "[\n {\n \"role\": \"user\",\n \"parts\": [\n {\n \"type\": \"text\",\n \"content\": \"What are my month over month performance insights the past quarter, by cost, displays, clicks, CTR, sales, CVR? Please split by campaign taxonomy\"\n }\n ]\n },\n {\n \"role\": \"assistant\",\n \"parts\": [\n {\n \"type\": \"tool_call\",\n \"id\": \"get_custom_report\",\n \"name\": \"get_custom_report\",\n \"arguments\": {\n \"dimensions\": [\n \"Campaign\"\n ],\n \"filters\": {\n \"dateRange\": {\n \"from_date\": \"2025-10-01\",\n \"to_date\": \"2025-12-31\"\n }\n },\n \"timeDimension\": \"Month\",\n \"metrics\": [\n \"Cost\",\n \"Displays\",\n \"Clicks\",\n \"Ctr\",\n \"Sales\",\n \"Cvr\"\n ]\n }\n },\n {\n \"type\": \"Microsoft.Extensions.AI.TextReasoningContent\",\n \"content\": {\n \"text\": \"\",\n \"protectedData\": \"anonymized-encrypted-reasoning\"\n }\n }\n ]\n },\n {\n \"role\": \"tool\",\n \"parts\": [\n {\n \"type\": \"tool_call_response\",\n \"id\": \"get_custom_report\",\n \"response\": {\n \"response_status\": \"Error\",\n \"message\": \"ERROR: No data found for dimensions: Campaign and metrics Cost,Displays,Clicks,Ctr,Sales,Cvr.\"\n }\n }\n ]\n }\n]",+ "output": "[\n {\n \"role\": \"assistant\",\n \"parts\": [\n {\n \"type\": \"text\",\n \"content\": \"I couldn't retrieve the month-over-month performance insights for the past quarter (October 2025 to December 2025) by campaign for the requested metrics (Cost, Displays, Clicks, CTR, Sales, CVR) as no data was found for this period.\\n\\n### Parameters\\n- Data was requested from 2025-10-01 to 2025-12-31 with time zone Europe/London.\\n- Attribution model chosen is 30-Day Post Click\\n- Currency: EUR\\n- Time dimension: Month\\n- Dimensions: Campaign\\n- Metrics: Cost, Displays, Clicks, CTR, Sales, CVR\\n\\nPlease let me know if you'd like to try a different date range or different metrics.\"\n },\n {\n \"type\": \"Microsoft.Extensions.AI.TextReasoningContent\",\n \"content\": {\n \"text\": \"\",\n \"protectedData\": \"anonymized-encrypted-reasoning\"\n }\n }\n ],\n \"finish_reason\": \"stop\"\n }\n]","model": "gemini-2.5-flash","internalModelId": "cmcnjkfwn000107l43bf5e8ax","modelParameters": {@@ -444,7 +444,7 @@"toolDefinitions": {},"toolCalls": [],"toolCallNames": [],- "metadata": "{\"attributes\":{\"gen_ai.operation.name\":\"chat\",\"gen_ai.request.model\":\"gemini-2.5-flash\",\"gen_ai.provider.name\":\"gcp.vertex_ai\",\"server.address\":\"aiplatform.googleapis.com\",\"server.port\":\"443\",\"gen_ai.request.seed\":\"42\",\"gen_ai.request.temperature\":\"0\",\"gen_ai.tool.definitions\":\"[\\n {\\n \\\"type\\\": \\\"function\\\",\\n \\\"name\\\": \\\"get_adset_infos\\\",\\n \\\"description\\\": \\\"Retrieves all ad sets matching conditions set in the filter (also referred to as campaigns)\\\\r\\\\nThis method should be called by the agent whenever\\\\r\\\\nit needs information about one or more ad sets.\\\\r\\\\nIt provides a comprehensive list of ad sets with key metadata and status fields.\\\\r\\\\n\\\\r\\\\nReturns:\\\\r\\\\n-------\\\\r\\\\nResponse\\\\r\\\\n An object containing data with the following information for each ad set:\\\\r\\\\n - id: The unique identifier of the ad set (also called Campaign ID).\\\\r\\\\n - name: The name of the ad set.\\\\r\\\\n - advertiserId: The ID of the advertiser that owns this ad set.\\\\r\\\\n - objective (MarketingObjective): The marketing objective associated with the ad set: Acquisition or Retention.\\\\r\\\\n - startDate: The start date of the ad set, if specified.\\\\r\\\\n - activationStatus: Indicates whether the ad set is currently active: Activated or NotActivated\\\\r\\\\n - deliveryStatus: Describes the current delivery state of the ad set: Running, Archived or NotRunning\\\\r\\\\n\\\\r\\\\nNotes:\\\\r\\\\n-----\\\\r\\\\nUse this method as the primary source for retrieving ad set (campaign) information.\\\",\\n \\\"parameters\\\": {\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"filter\\\": {\\n \\\"description\\\": \\\"The filters applied for selecting the ad_sets\\\",\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"adset_ids\\\": {\\n \\\"type\\\": [\\n \\\"array\\\",\\n \\\"null\\\"\\n ],\\n \\\"items\\\": {\\n \\\"type\\\": \\\"integer\\\"\\n }\\n },\\n \\\"names\\\": {\\n \\\"type\\\": [\\n \\\"array\\\",\\n \\\"null\\\"\\n ],\\n \\\"items\\\": {\\n \\\"type\\\": \\\"string\\\"\\n }\\n },\\n \\\"activation_statuses\\\": {\\n \\\"type\\\": [\\n \\\"array\\\",\\n \\\"null\\\"\\n ],\\n \\\"items\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"enum\\\": [\\n \\\"NotActivated\\\",\\n \\\"Activated\\\"\\n ]\\n }\\n },\\n \\\"objectives\\\": {\\n \\\"type\\\": [\\n \\\"array\\\",\\n \\\"null\\\"\\n ],\\n \\\"items\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"enum\\\": [\\n \\\"NotSet\\\",\\n \\\"Acquisition\\\",\\n \\\"Retention\\\"\\n ]\\n }\\n },\\n \\\"delivery_statuses\\\": {\\n \\\"type\\\": [\\n \\\"array\\\",\\n \\\"null\\\"\\n ],\\n \\\"items\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"enum\\\": [\\n \\\"Running\\\",\\n \\\"Archived\\\",\\n \\\"NotRunning\\\"\\n ]\\n }\\n }\\n }\\n }\\n },\\n \\\"required\\\": [\\n \\\"filter\\\"\\n ]\\n }\\n },\\n {\\n \\\"type\\\": \\\"function\\\",\\n \\\"name\\\": \\\"get_custom_report\\\",\\n \\\"description\\\": \\\"Calls the API to retrieve client data.\\\\r\\\\n\\\\r\\\\nArgs:\\\\r\\\\n filters: An object containing the built-in filters.\\\\r\\\\n Default values are provided if needed.\\\\r\\\\n timeDimension: Time-based dimension for data projections; specifies the granularity at which data will be grouped.\\\\r\\\\n Possible values and examples:\\\\r\\\\n - None: Indicates that the user has not provided any clear time dimension.\\\\r\\\\n This should be selected when there is no explicit instruction.\\\\r\\\\n Do NOT infer or assume a value; use None unless the user specifies otherwise.\\\\r\\\\n - Year: Represents a calendar year.\\\\r\\\\n Examples: per year, by year, year-over-year comparisons (YoY), yearly trend analysis.\\\\r\\\\n - Month: Represents a calendar month.\\\\r\\\\n Examples: per month, by month, month-over-month comparisons (MoM), monthly performance reports.\\\\r\\\\n - Week: Represents a calendar week.\\\\r\\\\n Examples: per week, by week, week-over-week comparisons (WoW), weekly campaign summaries.\\\\r\\\\n - Day: Represents a calendar day.\\\\r\\\\n Examples: per day, by day, day-over-day comparisons (DoD), daily performance tracking.\\\\r\\\\n - Hour: Represents an hour within a day.\\\\r\\\\n Examples: per hour, by hour, hourly trend analysis, intraday performance monitoring.\\\\r\\\\n dimensions: A list of dimensions that define the granularity of the report.\\\\r\\\\n Example: [os, device]\\\\r\\\\n metrics: A list of performance indicators to retrieve.\\\\r\\\\n Example: [clicks, ctr]\\\\r\\\\n attributionModel: Specifies the model used to measure sales.\\\\r\\\\n Optional.\\\\r\\\\n additionalFilters: Custom filters applied to the data.\\\\r\\\\n CRITICAL CONSTRAINT: Every dimension used in \\\\u0060additionalFilters\\\\u0060 MUST be present in the \\\\u0060dimensions\\\\u0060 list.\\\\r\\\\n If a filter references a dimension not included in \\\\u0060dimensions\\\\u0060, the request will be rejected.\\\\r\\\\n\\\\r\\\\nNotes:\\\\r\\\\n - Dimensions determine the level of detail in the report.\\\\r\\\\n - Metrics represent the KPIs to monitor campaign performance.\\\\r\\\\n - Filters restrict the dataset retrieved from the API.\\\\r\\\\n - \\\\u0060additionalFilters\\\\u0060 allow for extra filtering, but only on dimensions explicitly listed in \\\\u0060dimensions\\\\u0060.\\\",\\n \\\"parameters\\\": {\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"filters\\\": {\\n \\\"description\\\": \\\"Filters are a way to narrow the scope of the report by setting certain values.\\\\r\\\\nIf no value can be inferred, a default one will be provided.\\\",\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"clientIds\\\": {\\n \\\"type\\\": \\\"array\\\",\\n \\\"items\\\": {\\n \\\"type\\\": \\\"integer\\\"\\n }\\n },\\n \\\"dateRange\\\": {\\n \\\"description\\\": \\\"Date range between two dates.\\\\r\\\\nIMPORTANT: from_date and to_date are inclusive (the start and end dates are included in the period).\\\\r\\\\n\\\\r\\\\nIf dates are not given explicitly, they can be deduced as follows:\\\\r\\\\n\\\\r\\\\n- IMPORTANT: Last n days: from = today - n days, to = yesterday (inclusive, does not include today)\\\\r\\\\n Example: if today is 2025-08-23 then \\\\u0022last 7 days\\\\u0022: 2025-08-16 to 2025-08-22 (inclusive, 7 days)\\\\r\\\\n Example: if today is 2025-08-10 then \\\\u0022last 20 days\\\\u0022: 2025-07-21 to 2025-08-09 (inclusive, 20 days)\\\\r\\\\n- Month of May 2025: from = 2025-05-01, to = 2025-05-31\\\\r\\\\n- IMPORTANT: Last week, the last full calendar week (Monday to Sunday) before the current Week:\\\\r\\\\n from = Monday of previous week\\\\r\\\\n to = Sunday of previous Week\\\\r\\\\n Example: if today is Tuesday, 2025-08-12 then \\\\u0022last week\\\\u0022 is Monday 2025-08-04 to Sunday 2025-08-10\\\\r\\\\n Example: if today is Monday, 2025-09-15 then \\\\u0022last week\\\\u0022 is Monday 2025-08-14 to Sunday 2025-08-14\\\\r\\\\n- IMPORTANT: Last n weeks, the last n full calendar weeks (Monday to Sunday) before the current Week.\\\\r\\\\n n is the number of weeks.\\\\r\\\\n from = Monday of n weeks ago\\\\r\\\\n to = Sunday of previous Week\\\\r\\\\n Example: if today is Friday, 2025-08-22 then \\\\u0022last 2 weeks\\\\u0022 is\\\\r\\\\n Monday 2025-08-04 to Sunday 2025-08-17\\\\r\\\\n n is 2\\\\r\\\\n Example: if today is Monday, 2025-07-21 then \\\\u0022last 3 weeks\\\\u0022 is\\\\r\\\\n Monday 2025-06-30 to Sunday 2025-07-20\\\\r\\\\n n is 3\\\\r\\\\n- IMPORTANT: Last month, the last full calendar month before the current month.\\\\r\\\\n from = first day of previous month\\\\r\\\\n to = last day of previous month\\\\r\\\\n Example: if today is Tuesday, 2025-08-19 then \\\\u0022last month\\\\u0022 is 2025-07-01 to 2025-07-31\\\\r\\\\n- IMPORTANT: Last n months, the last n full calendar months before the current month.\\\\r\\\\n n is the number of months.\\\\r\\\\n from = first day of the month n months ago\\\\r\\\\n to = last day of previous month\\\\r\\\\n Example: if today is Monday, 2025-08-19 then \\\\u0022last 3 months\\\\u0022 is 2025-05-01 to 2025-07-31\\\\r\\\\n n is 3\\\\r\\\\n- Last quarter: the last full quarter before the current quarter.\\\\r\\\\n Q1: January 1 to March 31\\\\r\\\\n Q2: April 1 to June 30\\\\r\\\\n Q3: July 1 to September 30\\\\r\\\\n Q4: October 1 to December 31\\\\r\\\\n\\\\r\\\\n\\\\r\\\\ntime_zone is the IANA time zone name (e.g., \\\\u0022Europe/London\\\\u0022, \\\\u0022America/New_York\\\\u0022).\\\\r\\\\nBy default, assume that we are in the Europe/London time zone.\\\\r\\\\n\\\\r\\\\nThe field previous_period_from_date is used to define the starting date of a previous period\\\\r\\\\nthat mirrors the current data collection range.\\\\r\\\\nThis allows for comparative analysis between the current period and a similar past period.\\\\r\\\\n\\\\r\\\\nUse the following guidelines and examples to determine the correct value:\\\\r\\\\n\\\\r\\\\nGeneral Rule:\\\\r\\\\nprevious_period_from_date should be set to a date that starts the previous comparable period\\\\r\\\\nthe previous period will have the same duration as the current one\\\\r\\\\nthe previous period and the current period MUST NOT overlap\\\\r\\\\n\\\\r\\\\n Examples:\\\\r\\\\n Relative Time Comparison\\\\r\\\\n If comparing to last year, and from_date = 2025-08-01, then:\\\\r\\\\n previous_period_from_date = 2024-08-01\\\\r\\\\n If comparing with the previous period, previous_period_start_date is calculated\\\\r\\\\n by subtracting the duration of the current date range from its starting date (from_date).\\\\r\\\\n This ensures the previous period has the same length and ends\\\\r\\\\n right before the current one begins.\\\\r\\\\n Example:\\\\r\\\\n Current range: from_date = 2025-08-10, to_date = 2025-08-19 (10 days including bounds),\\\\r\\\\n then: previous_period_start_date = 2025-07-31 (10 days before 2025-08-10)\\\\r\\\\n Custom Period Comparison\\\\r\\\\n If comparing to the period starting 2025-02-25, then:\\\\r\\\\n previous_period_from_date = 2025-02-25\\\\r\\\\n\\\",\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"from_date\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"format\\\": \\\"date\\\"\\n },\\n \\\"to_date\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"format\\\": \\\"date\\\"\\n },\\n \\\"time_zone\\\": {\\n \\\"type\\\": [\\n \\\"string\\\",\\n \\\"null\\\"\\n ]\\n },\\n \\\"previous_period_from_date\\\": {\\n \\\"type\\\": [\\n \\\"string\\\",\\n \\\"null\\\"\\n ],\\n \\\"format\\\": \\\"date\\\"\\n }\\n }\\n },\\n \\\"currency\\\": {\\n \\\"type\\\": \\\"string\\\"\\n },\\n \\\"campaignStatus\\\": {\\n \\\"type\\\": [\\n \\\"array\\\",\\n \\\"null\\\"\\n ],\\n \\\"items\\\": {\\n \\\"description\\\": \\\" Status of a campaign\\\\r\\\\n\\\\r\\\\n Glossary:\\\\r\\\\n Active\\\\r\\\\n Active, Running or Live\\\\r\\\\n NotRunning\\\\r\\\\n Not running\\\\r\\\\n Dead\\\\r\\\\n Archived\\\",\\n \\\"type\\\": \\\"string\\\",\\n \\\"enum\\\": [\\n \\\"Active\\\",\\n \\\"NotRunning\\\",\\n \\\"Dead\\\"\\n ]\\n }\\n },\\n \\\"mediaType\\\": {\\n \\\"type\\\": [\\n \\\"array\\\",\\n \\\"null\\\"\\n ],\\n \\\"items\\\": {\\n \\\"description\\\": \\\" Type of media used. video or display.\\\\r\\\\n\\\\r\\\\n Glossary:\\\\r\\\\n Display\\\\r\\\\n HTML display\\\\r\\\\n\\\\r\\\\n Video\\\\r\\\\n Video display\\\",\\n \\\"type\\\": \\\"string\\\",\\n \\\"enum\\\": [\\n \\\"Display\\\",\\n \\\"Video\\\"\\n ]\\n }\\n },\\n \\\"marketingCampaignGoals\\\": {\\n \\\"type\\\": [\\n \\\"array\\\",\\n \\\"null\\\"\\n ],\\n \\\"items\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"enum\\\": [\\n \\\"NotSet\\\",\\n \\\"Acquisition\\\",\\n \\\"Retention\\\"\\n ]\\n }\\n },\\n \\\"campaigns\\\": {\\n \\\"type\\\": [\\n \\\"array\\\",\\n \\\"null\\\"\\n ],\\n \\\"items\\\": {\\n \\\"type\\\": \\\"integer\\\"\\n }\\n }\\n }\\n },\\n \\\"timeDimension\\\": {\\n \\\"description\\\": \\\"Defines the time-based dimensions available for data projections.\\\\r\\\\n\\\\r\\\\nEach enum member specifies the granularity at which data can be grouped or analyzed.\\\\r\\\\n\\\\r\\\\nMembers:\\\\r\\\\n None - Indicates that the user has not provided any clear time dimension.\\\\r\\\\n This should be selected when there is no explicit instruction.\\\\r\\\\n Do NOT infer or assume a value; use None unless the user specifies otherwise.\\\\r\\\\n Year - Represents a calendar year. For example per year, by year, year-over-year comparisons (YoY), yearly trend analysis.\\\\r\\\\n Month - Represents a calendar month. For example per month, by month, month-over-month comparisons (MoM), monthly performance reports.\\\\r\\\\n Week - Represents a calendar week. For example per week, by week, week-over-week comparisons (WoW), weekly campaign summaries.\\\\r\\\\n Day - Represents a calendar day. For example per day, by day, day-over-day comparisons (DoD), daily performance tracking.\\\\r\\\\n Hour - Represents an hour within a day. For example per hour, by hour, hourly trend analysis, intraday performance monitoring.\\\",\\n \\\"type\\\": \\\"string\\\",\\n \\\"enum\\\": [\\n \\\"None\\\",\\n \\\"Year\\\",\\n \\\"Month\\\",\\n \\\"Week\\\",\\n \\\"Day\\\",\\n \\\"Hour\\\"\\n ],\\n \\\"default\\\": \\\"None\\\"\\n },\\n \\\"dimensions\\\": {\\n \\\"type\\\": \\\"array\\\",\\n \\\"items\\\": {\\n \\\"description\\\": \\\" Enumeration of standardized dimensions used in online advertising projections.\\\\r\\\\n\\\\r\\\\n Each member represents a dimension or attribute commonly used in digital marketing analytics,\\\\r\\\\n campaign performance tracking, and audience segmentation.\\\\r\\\\n\\\\r\\\\n Glossary:\\\\r\\\\n Advertiser\\\\r\\\\n Name or entity running the ad campaign(s). Also called Client\\\\r\\\\n\\\\r\\\\n MarketingCampaign\\\\r\\\\n Full name of the marketing campaign. A group of ad sets.\\\\r\\\\n\\\\r\\\\n Campaign\\\\r\\\\n An ad set.\\\\r\\\\n\\\\r\\\\n MediaType\\\\r\\\\n Type of media used (e.g., video, display, native).\\\\r\\\\n\\\\r\\\\n MarketingCampaignGoal\\\\r\\\\n Marketing campaign objective (Retention, Acquisition)\\\\r\\\\n\\\\r\\\\n Category\\\\r\\\\n Product or content category (e.g., electronics, fashion).\\\\r\\\\n\\\\r\\\\n Device\\\\r\\\\n Type of device used (e.g., mobile, desktop, tablet).\\\\r\\\\n\\\\r\\\\n Os\\\\r\\\\n Operating system of the device (e.g., iOS, Android, Windows).\\\\r\\\\n\\\\r\\\\n AdChannel\\\\r\\\\n Specific advertising channel (e.g., programmatic, direct).\\\\r\\\\n\\\\r\\\\n AdSocialNetwork\\\\r\\\\n Social media platform used (e.g., Facebook, TikTok).\\\\r\\\\n\\\\r\\\\n Ad\\\\r\\\\n A creative\\\\r\\\\n\\\\r\\\\n Coupon\\\\r\\\\n A creative coupon\\\\r\\\\n\\\\r\\\\n AdFormat\\\\r\\\\n Format of the ad (e.g., banner, interstitial, carousel).\\\\r\\\\n\\\\r\\\\n DisplaySize\\\\r\\\\n Size of the display area for the ad.\\\\r\\\\n\\\\r\\\\n VideoPlacement\\\\r\\\\n Placement type for video ads (e.g., in-stream, out-stream).\\\\r\\\\n\\\\r\\\\n VideoPlaybackMethod\\\\r\\\\n How the video was played (e.g., autoplay, click-to-play).\\\\r\\\\n\\\\r\\\\n VideoPlayerSize\\\\r\\\\n Dimensions of the video player.\\\\r\\\\n\\\\r\\\\n VideoDurationInSeconds\\\\r\\\\n Length of the video ad.\\\\r\\\\n\\\\r\\\\n VideoPlayerRatio\\\\r\\\\n Aspect ratio of the video player (e.g., 16:9).\\\\r\\\\n\\\\r\\\\n Ssp\\\\r\\\\n Supply Side Partner. The publishing network where displays were made.\\\\r\\\\n\\\\r\\\\n Country\\\\r\\\\n Country where the ad was served.\\\\r\\\\n\\\\r\\\\n Region\\\\r\\\\n Region or state within the country.\\\\r\\\\n\\\\r\\\\n PostalCode\\\\r\\\\n Postal or ZIP code.\\\\r\\\\n\\\\r\\\\n UserBehavior\\\\r\\\\n Behavioral segment of the user (e.g., frequent buyer).\\\\r\\\\n\\\",\\n \\\"type\\\": \\\"string\\\",\\n \\\"enum\\\": [\\n \\\"Advertiser\\\",\\n \\\"MarketingCampaign\\\",\\n \\\"Campaign\\\",\\n \\\"MediaType\\\",\\n \\\"MarketingCampaignGoal\\\",\\n \\\"Category\\\",\\n \\\"Device\\\",\\n \\\"Os\\\",\\n \\\"AdChannel\\\",\\n \\\"AdSocialNetwork\\\",\\n \\\"Ad\\\",\\n \\\"Coupon\\\",\\n \\\"AdFormat\\\",\\n \\\"DisplaySize\\\",\\n \\\"VideoPlacement\\\",\\n \\\"VideoPlaybackMethod\\\",\\n \\\"VideoPlayerSize\\\",\\n \\\"VideoDurationInSeconds\\\",\\n \\\"VideoPlayerRatio\\\",\\n \\\"Ssp\\\",\\n \\\"Country\\\",\\n \\\"Region\\\",\\n \\\"PostalCode\\\",\\n \\\"UserBehavior\\\"\\n ]\\n },\\n \\\"default\\\": null\\n },\\n \\\"metrics\\\": {\\n \\\"type\\\": \\\"array\\\",\\n \\\"items\\\": {\\n \\\"description\\\": \\\" Metrics represents the quantity that we wish to measure\\\\r\\\\n\\\\r\\\\n Glossary:\\\\r\\\\n Audience\\\\r\\\\n Users or devices that were seen online and were eligible to be served an ad. When\\\\r\\\\n several devices can be related to one user, it counts for 1, otherwise it reflects the\\\\r\\\\n number of devices\\\\r\\\\n\\\\r\\\\n Clicks\\\\r\\\\n The number of clicks driven by the ads\\\\r\\\\n\\\\r\\\\n Cost\\\\r\\\\n The overall cost of your ads or video ads\\\\r\\\\n\\\\r\\\\n CostPerResult\\\\r\\\\n What your ad set has cost per configured result unit for your selected period.\\\\r\\\\n\\\\r\\\\n Cpc\\\\r\\\\n Cost Per Click - the amount of money spent for the ads to receive one click\\\\r\\\\n\\\\r\\\\n Cpm\\\\r\\\\n Cost Per Mille - the amount of money spent per thousand displays, available for CPM\\\\r\\\\n based ad sets only\\\\r\\\\n\\\\r\\\\n Ctr\\\\r\\\\n Click-Through Rate - literally, the rate or frequency at which users click through to a\\\\r\\\\n landing page from an ad\\\\r\\\\n\\\\r\\\\n Displays\\\\r\\\\n The number of times your ads have been shown on a screen\\\\r\\\\n\\\\r\\\\n Ecpm\\\\r\\\\n Effective Cost Per Mille - the amount of money spent per thousand displays\\\\r\\\\n\\\\r\\\\n ExposedUsers\\\\r\\\\n The number of users who have been served an ad\\\\r\\\\n\\\\r\\\\n Frequency\\\\r\\\\n The average number of displays each exposed user has seen.\\\\r\\\\n\\\\r\\\\n InvalidClicks\\\\r\\\\n Clicks that don\\\\u0027t meet our quality standards and won\\\\u0027t be billed to you.\\\\r\\\\n\\\\r\\\\n InvalidDisplays\\\\r\\\\n Displays that don\\\\u0027t meet our quality standards and won\\\\u0027t be billed to you.\\\\r\\\\n\\\\r\\\\n Reach\\\\r\\\\n Share of online eligible users or devices who have been served an ad\\\\r\\\\n\\\\r\\\\n Result\\\\r\\\\n What your ad set has achieved based on your configuration for your selected period.\\\\r\\\\n\\\\r\\\\n UntrackableDisplays\\\\r\\\\n\\\\r\\\\n NonViewableDisplays\\\\r\\\\n\\\\r\\\\n Viewability\\\\r\\\\n The percentage of displayed ads or videos ads that were considered viewable\\\\r\\\\n\\\\r\\\\n ViewableDisplays\\\\r\\\\n The number of times at least 50% of the ad appeared for at least 1 second for ads and 2\\\\r\\\\n seconds for videos ads, once started\\\\r\\\\n\\\\r\\\\n Visits\\\\r\\\\n The number of users that were active on your site or app in the hour following clicking\\\\r\\\\n on your ad\\\\r\\\\n\\\\r\\\\n Winrate\\\\r\\\\n Number of displays divided by the total number of display opportunities\\\\r\\\\n\\\\r\\\\n BounceRate\\\\r\\\\n Proportion of website visitors leaving after seeing only one page\\\\r\\\\n\\\\r\\\\n Cpv\\\\r\\\\n Cost Per Visit - the amount of money spent to get one visit on your website\\\\r\\\\n\\\\r\\\\n AppInstall\\\\r\\\\n The number of installations of application\\\\r\\\\n\\\\r\\\\n Cpi\\\\r\\\\n Cost Per Install - the amount of money that needs to be spent to get one app installed\\\\r\\\\n\\\\r\\\\n Cpqv\\\\r\\\\n Cost Per Qualified Visit - the amount of money spent to get one qualified visit on your\\\\r\\\\n website\\\\r\\\\n\\\\r\\\\n InstallRate\\\\r\\\\n Install Rate - the percentage of completed app installs compared to the clicks that\\\\r\\\\n occurred\\\\r\\\\n\\\\r\\\\n QualifiedVisits\\\\r\\\\n The number of users on the target website for which at least two events or one sale\\\\r\\\\n event occurred within the hour following the click\\\\r\\\\n\\\\r\\\\n Assists\\\\r\\\\n The number of sales one of your campaigns or ad sets contributed to (with clicks or\\\\r\\\\n displays) on your site or app.\\\\r\\\\n\\\\r\\\\n AvgCart\\\\r\\\\n Average revenue generated by a sale\\\\r\\\\n\\\\r\\\\n Cos\\\\r\\\\n Cost Of Sales - the ratio between the cost generated by the ad set(s) vs. the revenue\\\\r\\\\n generated by the sales, figured as a percentage\\\\r\\\\n\\\\r\\\\n Cpov\\\\r\\\\n Cost Per Store Visit - the amount of money spent to get one visit on your physical store\\\\r\\\\n\\\\r\\\\n Cov\\\\r\\\\n Cost Of advertiser Value - the ratio between the advertiser value generated by the sales\\\\r\\\\n vs. the cost generated by the ad set(s), figured as a percentage\\\\r\\\\n\\\\r\\\\n Cpo\\\\r\\\\n Cost Per Order - the amount of money that needs to be spent to get one order or\\\\r\\\\n transaction\\\\r\\\\n\\\\r\\\\n Cvr\\\\r\\\\n ConVersion Rate - the percentage of completed purchases compared to the clicks that\\\\r\\\\n occurred\\\\r\\\\n\\\\r\\\\n AssistsSalesRatio\\\\r\\\\n The ratio between your assisted sales and sales made on your site or app.\\\\r\\\\n\\\\r\\\\n OmnichannelRevenue\\\\r\\\\n The revenue generated by online and in-store sales.\\\\r\\\\n\\\\r\\\\n OmnichannelRoas\\\\r\\\\n Omnichannel Return on Ad Spend. The ratio between revenue generated online and in-store,\\\\r\\\\n and the cost.\\\\r\\\\n\\\\r\\\\n OmnichannelSales\\\\r\\\\n The number of online and in store transactions or conversions resulting from Criteo ads.\\\\r\\\\n\\\\r\\\\n Revenue\\\\r\\\\n The amount of money generated by the online sales\\\\r\\\\n\\\\r\\\\n Roas\\\\r\\\\n Return On Ad Spend - the ratio between the revenue generated and the cost\\\\r\\\\n\\\\r\\\\n Sales\\\\r\\\\n The number of completed e-commerce transactions or purchases\\\\r\\\\n\\\\r\\\\n OfflineRevenue\\\\r\\\\n The amount of revenue generated by in-store sales.\\\\r\\\\n\\\\r\\\\n OfflineRoas\\\\r\\\\n Store Return on Ad Spend. The ratio between the revenue generated in-store and the cost.\\\\r\\\\n\\\\r\\\\n OfflineSales\\\\r\\\\n The number of completed in-store transactions or purchases.\\\\r\\\\n\\\\r\\\\n OfflineVisits\\\\r\\\\n The number of visits to one of the physical stores\\\\r\\\\n\\\\r\\\\n Currency\\\\r\\\\n\\\\r\\\\n VideoAvoc\\\\r\\\\n The number of times one of your videos was viewable and audible when it reached\\\\r\\\\n completion\\\\r\\\\n\\\\r\\\\n VideoCompletionRate\\\\r\\\\n The percentage of started videos that played for their entire duration\\\\r\\\\n\\\\r\\\\n VideoCpcv\\\\r\\\\n The average cost of a video played for its entire duration\\\\r\\\\n\\\\r\\\\n VideoCpv\\\\r\\\\n The average cost of a video that started playing\\\\r\\\\n\\\\r\\\\n VideoComplete\\\\r\\\\n The number of times one of your videos played for its entire duration\\\\r\\\\n\\\\r\\\\n VideoFirstQuartile\\\\r\\\\n The number of times one of your videos played to 25% of its duration\\\\r\\\\n\\\\r\\\\n VideoMidpoint\\\\r\\\\n The number of times one of your videos played to 50% of its duration\\\\r\\\\n\\\\r\\\\n VideoThirdQuartile\\\\r\\\\n The number of times one of your videos played to 75% of its duration\\\\r\\\\n\\\\r\\\\n VideoAverageViewRate\\\\r\\\\n The average played percentage of a started video\\\\r\\\\n\\\\r\\\\n VideoStartRate\\\\r\\\\n The percentage of displayed videos that started playing\\\\r\\\\n\\\\r\\\\n VideoStart\\\\r\\\\n The number of times one of your ads started playing\\\",\\n \\\"type\\\": \\\"string\\\",\\n \\\"enum\\\": [\\n \\\"Audience\\\",\\n \\\"Clicks\\\",\\n \\\"Cost\\\",\\n \\\"CostPerResult\\\",\\n \\\"Cpc\\\",\\n \\\"Cpm\\\",\\n \\\"Ctr\\\",\\n \\\"Displays\\\",\\n \\\"Ecpm\\\",\\n \\\"ExposedUsers\\\",\\n \\\"Frequency\\\",\\n \\\"InvalidClicks\\\",\\n \\\"InvalidDisplays\\\",\\n \\\"Reach\\\",\\n \\\"Result\\\",\\n \\\"UntrackableDisplays\\\",\\n \\\"NonViewableDisplays\\\",\\n \\\"Viewability\\\",\\n \\\"ViewableDisplays\\\",\\n \\\"Visits\\\",\\n \\\"Winrate\\\",\\n \\\"BounceRate\\\",\\n \\\"Cpv\\\",\\n \\\"AppInstall\\\",\\n \\\"Cpi\\\",\\n \\\"Cpqv\\\",\\n \\\"InstallRate\\\",\\n \\\"QualifiedVisits\\\",\\n \\\"Assists\\\",\\n \\\"AvgCart\\\",\\n \\\"Cos\\\",\\n \\\"Cpov\\\",\\n \\\"Cov\\\",\\n \\\"Cpo\\\",\\n \\\"Cvr\\\",\\n \\\"AssistsSalesRatio\\\",\\n \\\"OmnichannelRevenue\\\",\\n \\\"OmnichannelRoas\\\",\\n \\\"OmnichannelSales\\\",\\n \\\"Revenue\\\",\\n \\\"Roas\\\",\\n \\\"Sales\\\",\\n \\\"OfflineRevenue\\\",\\n \\\"OfflineRoas\\\",\\n \\\"OfflineSales\\\",\\n \\\"OfflineVisits\\\",\\n \\\"Currency\\\",\\n \\\"VideoAvoc\\\",\\n \\\"VideoCompletionRate\\\",\\n \\\"VideoCpcv\\\",\\n \\\"VideoCpv\\\",\\n \\\"VideoComplete\\\",\\n \\\"VideoFirstQuartile\\\",\\n \\\"VideoMidpoint\\\",\\n \\\"VideoThirdQuartile\\\",\\n \\\"VideoAverageViewRate\\\",\\n \\\"VideoStartRate\\\",\\n \\\"VideoStart\\\"\\n ]\\n },\\n \\\"default\\\": null\\n },\\n \\\"attributionModel\\\": {\\n \\\"description\\\": \\\" Attribution models define how sales are credited to advertising campaigns.\\\\r\\\\n\\\\r\\\\n Available models:\\\\r\\\\n\\\\r\\\\n Pv1d: 1-Day Post View\\\\r\\\\n \\\\u2014 Sale is attributed when a user views an ad and purchases within 24 hours.\\\\r\\\\n\\\\r\\\\n Pc1d: 1-Day Post Click\\\\r\\\\n \\\\u2014 Sale is attributed when a user clicks an ad and purchases within 24 hours.\\\\r\\\\n\\\\r\\\\n Pc7d: 7-Day Post Click\\\\r\\\\n \\\\u2014 Sale is attributed when a user clicks an ad and purchases within 7 days.\\\\r\\\\n\\\\r\\\\n Pv7d: 7-Day Post View\\\\r\\\\n \\\\u2014 Sale is attributed when a user views an ad and purchases within 7 days.\\\\r\\\\n\\\\r\\\\n Pv14d: 14-Day Post View\\\\r\\\\n \\\\u2014 Sale is attributed when a user views an ad and purchases within 14 days.\\\\r\\\\n\\\\r\\\\n Pv30d: 30-Day Post View\\\\r\\\\n \\\\u2014 Sale is attributed when a user views an ad and purchases within 30 days.\\\\r\\\\n\\\\r\\\\n Pc30d: 30-Day Post Click\\\\r\\\\n \\\\u2014 Sale is attributed when a user clicks an ad and purchases within 30 days.\\\\r\\\\n\\\\r\\\\n Pc30dPv1d: 30-Day Post Click \\\\u002B 1-Day Post View\\\\r\\\\n \\\\u2014 Sale is attributed if a user clicks and purchases within 30 days, or views and purchases within 24 hours.\\\\r\\\\n\\\\r\\\\n Pc7dPv1d: 7-Day Post Click \\\\u002B 1-Day Post View\\\\r\\\\n \\\\u2014 Sale is attributed if a user clicks and purchases within 7 days, or views and purchases within 24 hours.\\\\r\\\\n\\\\r\\\\n Lc30d: Last Click\\\\r\\\\n \\\\u2014 Full credit is given to the last click before a conversion.\\\\r\\\\n\\\\r\\\\n CAttr: Client Attribution\\\\r\\\\n \\\\u2014 Attribution is determined by the advertiser using Criteo\\\\u0027s deduplication parameter.\\\",\\n \\\"type\\\": \\\"string\\\",\\n \\\"enum\\\": [\\n \\\"Pv1d\\\",\\n \\\"Pc1d\\\",\\n \\\"Pc7d\\\",\\n \\\"Pv7d\\\",\\n \\\"Pv14d\\\",\\n \\\"Pv30d\\\",\\n \\\"Pc30d\\\",\\n \\\"Pc30dPv1d\\\",\\n \\\"Lc30d\\\",\\n \\\"CAttr\\\",\\n \\\"Pc7dPv1d\\\"\\n ],\\n \\\"default\\\": \\\"Pc30d\\\"\\n },\\n \\\"additionalFilters\\\": {\\n \\\"type\\\": \\\"array\\\",\\n \\\"items\\\": {\\n \\\"description\\\": \\\"Represents a filter for a specific dimension and its associated value.\\\\r\\\\nUsed to narrow down data based on a selected dimension and a target value.\\\",\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"dimension\\\": {\\n \\\"description\\\": \\\" Enumeration of standardized dimensions used in online advertising projections.\\\\r\\\\n\\\\r\\\\n Each member represents a dimension or attribute commonly used in digital marketing analytics,\\\\r\\\\n campaign performance tracking, and audience segmentation.\\\\r\\\\n\\\\r\\\\n Glossary:\\\\r\\\\n Advertiser\\\\r\\\\n Name or entity running the ad campaign(s). Also called Client\\\\r\\\\n\\\\r\\\\n MarketingCampaign\\\\r\\\\n Full name of the marketing campaign. A group of ad sets.\\\\r\\\\n\\\\r\\\\n Campaign\\\\r\\\\n An ad set.\\\\r\\\\n\\\\r\\\\n MediaType\\\\r\\\\n Type of media used (e.g., video, display, native).\\\\r\\\\n\\\\r\\\\n MarketingCampaignGoal\\\\r\\\\n Marketing campaign objective (Retention, Acquisition)\\\\r\\\\n\\\\r\\\\n Category\\\\r\\\\n Product or content category (e.g., electronics, fashion).\\\\r\\\\n\\\\r\\\\n Device\\\\r\\\\n Type of device used (e.g., mobile, desktop, tablet).\\\\r\\\\n\\\\r\\\\n Os\\\\r\\\\n Operating system of the device (e.g., iOS, Android, Windows).\\\\r\\\\n\\\\r\\\\n AdChannel\\\\r\\\\n Specific advertising channel (e.g., programmatic, direct).\\\\r\\\\n\\\\r\\\\n AdSocialNetwork\\\\r\\\\n Social media platform used (e.g., Facebook, TikTok).\\\\r\\\\n\\\\r\\\\n Ad\\\\r\\\\n A creative\\\\r\\\\n\\\\r\\\\n Coupon\\\\r\\\\n A creative coupon\\\\r\\\\n\\\\r\\\\n AdFormat\\\\r\\\\n Format of the ad (e.g., banner, interstitial, carousel).\\\\r\\\\n\\\\r\\\\n DisplaySize\\\\r\\\\n Size of the display area for the ad.\\\\r\\\\n\\\\r\\\\n VideoPlacement\\\\r\\\\n Placement type for video ads (e.g., in-stream, out-stream).\\\\r\\\\n\\\\r\\\\n VideoPlaybackMethod\\\\r\\\\n How the video was played (e.g., autoplay, click-to-play).\\\\r\\\\n\\\\r\\\\n VideoPlayerSize\\\\r\\\\n Dimensions of the video player.\\\\r\\\\n\\\\r\\\\n VideoDurationInSeconds\\\\r\\\\n Length of the video ad.\\\\r\\\\n\\\\r\\\\n VideoPlayerRatio\\\\r\\\\n Aspect ratio of the video player (e.g., 16:9).\\\\r\\\\n\\\\r\\\\n Ssp\\\\r\\\\n Supply Side Partner. The publishing network where displays were made.\\\\r\\\\n\\\\r\\\\n Country\\\\r\\\\n Country where the ad was served.\\\\r\\\\n\\\\r\\\\n Region\\\\r\\\\n Region or state within the country.\\\\r\\\\n\\\\r\\\\n PostalCode\\\\r\\\\n Postal or ZIP code.\\\\r\\\\n\\\\r\\\\n UserBehavior\\\\r\\\\n Behavioral segment of the user (e.g., frequent buyer).\\\\r\\\\n\\\",\\n \\\"type\\\": \\\"string\\\",\\n \\\"enum\\\": [\\n \\\"Advertiser\\\",\\n \\\"MarketingCampaign\\\",\\n \\\"Campaign\\\",\\n \\\"MediaType\\\",\\n \\\"MarketingCampaignGoal\\\",\\n \\\"Category\\\",\\n \\\"Device\\\",\\n \\\"Os\\\",\\n \\\"AdChannel\\\",\\n \\\"AdSocialNetwork\\\",\\n \\\"Ad\\\",\\n \\\"Coupon\\\",\\n \\\"AdFormat\\\",\\n \\\"DisplaySize\\\",\\n \\\"VideoPlacement\\\",\\n \\\"VideoPlaybackMethod\\\",\\n \\\"VideoPlayerSize\\\",\\n \\\"VideoDurationInSeconds\\\",\\n \\\"VideoPlayerRatio\\\",\\n \\\"Ssp\\\",\\n \\\"Country\\\",\\n \\\"Region\\\",\\n \\\"PostalCode\\\",\\n \\\"UserBehavior\\\"\\n ]\\n },\\n \\\"value\\\": {\\n \\\"type\\\": \\\"string\\\"\\n }\\n },\\n \\\"required\\\": [\\n \\\"dimension\\\",\\n \\\"value\\\"\\n ]\\n },\\n \\\"default\\\": null\\n }\\n },\\n \\\"required\\\": [\\n \\\"filters\\\"\\n ]\\n }\\n },\\n {\\n \\\"type\\\": \\\"function\\\",\\n \\\"name\\\": \\\"final_result\\\",\\n \\\"description\\\": \\\"The final response which ends this conversation. ALWAYS use this tool to return your answer.\\\",\\n \\\"parameters\\\": {\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"input\\\": {\\n \\\"description\\\": \\\"Represents the response generated by an agent after processing a user request.\\\\r\\\\nAny tables and graphs will be generated using data from the internal conversation state.\\\\r\\\\n\\\\r\\\\nThere is no need to explicitly pass the tabular data from any tool as contents of the\\\\r\\\\n\\\\u0060comment\\\\u0060 property. Thus, never generate a markdown table as part of the \\\\u0060comment\\\\u0060 field.\\\\r\\\\n\\\\r\\\\nFields:\\\\r\\\\n comment:\\\\r\\\\n A textual response generated by the agent, adhering to the instructions provided in the conversation\\\\r\\\\n\\\\r\\\\n response_status:\\\\r\\\\n A classification of the response outcome, indicating how the agent handled the request.\\\\r\\\\n follow_up_questions:\\\\r\\\\n A short list of 2\\\\u20133 suggestions for further exploration of the data.\\\",\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"comment\\\": {\\n \\\"description\\\": \\\"A structured explanation accompanying the agent\\\\u0027s response.\\\\r\\\\n\\\\r\\\\nIf the agent successfully answered the question:\\\\r\\\\n- Provides a **summary** of the result.\\\\r\\\\n- Offers a **brief explanation** of key concepts or logic used.\\\\r\\\\n\\\\r\\\\nIf the agent failed to answer:\\\\r\\\\n- Describes the **problem encountered** (e.g., missing data, ambiguous query).\\\\r\\\\n- Explains the **reason for failure** to help the user understand what went wrong.\\\\r\\\\n\\\\r\\\\nNote:\\\\r\\\\nThis field should **never include the full requested data**.\\\\r\\\\nThat will be provided separately.\\\\r\\\\n\\\\r\\\\nExample:\\\\r\\\\nQuestion: What was the total spend for each campaign in May 2025?\\\\r\\\\n\\\\r\\\\nSummary: The total spend for all campaigns in May 2025 was 1,240,391.25.\\\\r\\\\n\\\\r\\\\nExplanation: \\\\u0027Spend\\\\u0027 or \\\\u0027Cost\\\\u0027 refers to the total amount of money invested\\\\r\\\\nin an advertising campaign during a specified period.\\\\r\\\\nIt\\\\u0027s a direct measure of your advertising expenditure.\\\",\\n \\\"type\\\": \\\"string\\\"\\n },\\n \\\"response_status\\\": {\\n \\\"description\\\": \\\" Enumerates the possible outcomes of an agent\\\\u0027s response.\\\\r\\\\n\\\\r\\\\n Glossary:\\\\r\\\\n Success\\\\r\\\\n The agent successfully processed the request and returned a valid response.\\\\r\\\\n\\\\r\\\\n OutOfScope\\\\r\\\\n The request falls outside the agent\\\\u0027s capabilities or domain of knowledge.\\\\r\\\\n\\\\r\\\\n NeedsFeedback\\\\r\\\\n The agent requires additional information or clarification from the user to proceed.\\\\r\\\\n\\\\r\\\\n NoDataFound\\\\r\\\\n The tool call did not return any data.\\\\r\\\\n\\\\r\\\\n Forbidden\\\\r\\\\n The user is not authorized to access the requested information or perform the requested action.\\\\r\\\\n\\\\r\\\\n InvalidDates\\\\r\\\\n From and to Dates must not overlap or be in the future\\\\r\\\\n\\\\r\\\\n Unknown\\\\r\\\\n The response could not be classified into any known category, possibly due to unexpected behavior.\\\",\\n \\\"type\\\": \\\"string\\\",\\n \\\"enum\\\": [\\n \\\"Success\\\",\\n \\\"OutOfScope\\\",\\n \\\"NeedsFeedback\\\",\\n \\\"NoDataFound\\\",\\n \\\"Forbidden\\\",\\n \\\"InvalidDates\\\",\\n \\\"Unknown\\\"\\n ]\\n },\\n \\\"follow_up_questions\\\": {\\n \\\"description\\\": \\\"Include 2\\\\u20133 suggestions for further exploration of the data.\\\\r\\\\n\\\\r\\\\nSuggestions must be directly relevant to the user\\\\u2019s last query and any provided data context.\\\\r\\\\nEach suggestion must be concise (\\\\u2264 8 words).\\\\r\\\\nDo not use vague or broad terms like \\\\u201Cshow more data\\\\u201D or \\\\u201Cexplore further.\\\\u201D\\\\r\\\\nDo not include multiple options in one suggestion (e.g., \\\\u201Cchange date or campaign\\\\u201D is not allowed).\\\\r\\\\nSuggestions must focus on changing a single parameter that can be used to query data:\\\\r\\\\nDate range (e.g., last 7 days, Q1 2025)\\\\r\\\\nTime aggregation (e.g., daily, weekly, monthly)\\\\r\\\\nMetrics (e.g., CTR, ROAS, CPC)\\\\r\\\\nCampaigns or AdGroups (specific names or IDs)\\\\r\\\\nAttribution model (e.g., 7-day click, 30-day view)\\\\r\\\\nBreakdowns (e.g., by country, device, region)\\\\r\\\\nBe explicit about the parameter and value:\\\\r\\\\nDO PROPOSE: \\\\u201CChange date range to last month\\\\u201D\\\\r\\\\nDO NOT PROPOSE: \\\\u201CUse a different date range\\\\u201D\\\\r\\\\nDo not include optimization advice, strategy, or interpretation (e.g., \\\\u201CHow to improve performance\\\\u201D is forbidden).\\\\r\\\\nSuggestions must be actionable queries, not opinions or summaries.\\\\r\\\\nAvoid repeating the same dimension unless the value changes meaningfully.\\\\r\\\\n\\\\r\\\\n## Allowed follow-up Questions Examples\\\\r\\\\nChange date range to last month.\\\\r\\\\nAggregate data by campaign.\\\\r\\\\nCompare CTR across campaigns.\\\\r\\\\nBreak down by country.\\\\r\\\\nUse 7-day click attribution model.\\\\r\\\\n\\\\r\\\\n## Not Allowed follow-up Questions Examples\\\\r\\\\nShow more insights.\\\\r\\\\nExplore other opportunities.\\\\r\\\\nWhat should I change?\\\\r\\\\nAny suggestions for optimization?\\\\r\\\\nGeneral advice or interpretation.\\\",\\n \\\"type\\\": \\\"array\\\",\\n \\\"items\\\": {\\n \\\"type\\\": \\\"string\\\"\\n }\\n }\\n },\\n \\\"required\\\": [\\n \\\"comment\\\",\\n \\\"response_status\\\",\\n \\\"follow_up_questions\\\"\\n ]\\n }\\n },\\n \\\"required\\\": [\\n \\\"input\\\"\\n ]\\n }\\n }\\n]\",\"clientId\":\"22291\",\"date\":\"03/09/2026\",\"gen_ai.system_instructions\":\"[\\n {\\n \\\"type\\\": \\\"text\\\",\\n \\\"content\\\": \\\"You are an expert on statistical analysis for the adtech company Criteo.\\\\nYour goal is to provide marketing statistics from Criteo users' ongoing ad campaigns, along with their full context.\\\\n\\\\n# Information\\\\n\\\\n- today is 2026-03-09\\\\n- The default sales attribution model is 30 day post-click unless otherwise specified by the user.\\\\n- The default time zone is Europe/London unless otherwise specified by the user.\\\\n- The default currency is EUR unless otherwise specified by the user.\\\\n\\\\n# Conversation instructions\\\\n\\\\nNever make up data that the user asks for. You must use the provided tools to retrieve data.\\\\n\\\\nAlways respond in a clear, professional, and conversational manner. Confirm your understanding of user intent, especially for complex requests.\\\\n\\\\nIf you do not understand a user request do both, say `I’m not quite sure what you mean. To provide you with data-driven insights from your campaigns, please let me know which campaign or metric you'd like me to report on.` and also use response_status `OutOfScope`.\\\\n\\\\nIf a user requests any form of data visualization (e.g., `show me a line chart`, `display this data in a graph`, `create a plot`, ...), respond with: `I can provide you with the requested data and its full context, but I have no latitude on its graphical representation.`\\\\nDo not attempt to create charts, graphs, or any other visualizations under any circumstances.\\\\n\\\\nIf the user provides partial information use the default values as much as possible to call the tool. Ask clarifying questions only if strictly necessary. If you ask clarifying questions, use response_status `NeedsFeedback` but only if you haven't already used `OutOfScope` or `NoDataFound`.\\\\n\\\\n## Glossary\\\\n\\\\nHere are some common terms that you might encounter.\\\\n\\\\n- QBR - Quarterly Business Review. A strategic review with the client every quarter.\\\\n- WBR - Weekly Business Review. Operational checkpoints to review weekly performance.\\\\n- MBR - Monthly Business Review. Middle-ground between WBR and QBR.\\\\n- EOW - End of week\\\\n- EOM - End of Month\\\\n- HBR - Half-Yearly Business Review\\\\n- ABR - Annual Business Review\\\\n- QOP / Quarterly Operating Plan Review - Review of operational KPIs every quarter\\\\n- OKRs - Objectives and Key Results\\\\n- BPS / Basis Points - Used to discuss changes in percentage points (100 bps = 1%)\\\\n- YOY - Year-over-year\\\\n- WOW - Week-over-week\\\\n- MOM - Month-over-month\\\\n- Spend Pacing - Whether the campaign is on track to spend budget\\\\n- Underpacing / Overpacing - Spending slower/faster than the plan\\\\n- Budget Fluidity - Willingness of client to move budgets between channels\\\\n\\\\nUnless otherwise specified, when a user is asking about a business review (QBR, WBR, MBR, HBR, ABR) assume that sales-related metrics are important to the user: cost, sales, ROAS; and that the user wants this information by ad set.\\\\n\\\\n## Tool Response\\\\n\\\\nIf a tool responds with a response_status `Retry`. Follow the instructions in `message` and RETRY without asking.\\\\nIf a tool responds with a response_status `DuplicateToolCall`. ALWAYS Move to the next step of your execution plan. You already received the data from the tool.\\\\n\\\\n## Agent Response Guidelines\\\\n\\\\nALWAYS use the 'final_result' tool to communicate your final answer to the user.\\\\nProvide as concise an answer as possible. Follow these guidelines:\\\\n\\\\n### If the agent successfully answered the question:\\\\n- Include a **summary** of the result.\\\\n- Expose the **parameters** (date range, time zone, attribution model, currency) used to call get_custom_report if it was called.\\\\n\\\\n### If the agent failed to answer:\\\\n- Describe the **problem encountered** (e.g., missing data, ambiguous query).\\\\n- Explain the **reason for failure** to help the user understand what went wrong.\\\\n\\\\n### Important:\\\\n- **Never include the full requested data** in the comment.\\\\n- The data will be provided to the user separately.\\\\n- Never call get_custom_report twice with different date ranges. Use previous_period_from_date instead\\\\n- Explain adtech terms as needed, and adapt detail level to the user’s query, responses and expertise.\\\\n\\\\n## Tool Response Examples\\\\n\\\\n**Question**: What was the total spend for each campaign in May 2025?\\\\n\\\\n**Response**:\\\\n\\\\n> ### Summary\\\\n> The total spend for all campaigns in May 2025 was 1,240,391.25.\\\\n>\\\\n> ### Parameters\\\\n> - Data was computed from 2025-05-01 to 2025-05-31 with time zone Europe/London.\\\\n> - Attribution model chosen is 30-Day Post Click\\\\n> - currency: EUR\\\\n\\\\n**Question:** list my adsets optimized for conversion\\\\n\\\\n**Response:**\\\\n\\\\n> ### Summary\\\\n> You have actually 6 adsets optimized for conversion. 2 of them are currently active.\\\\n\\\\n# DATA PRIVACY AND LEGAL REQUIREMENTS\\\\n\\\\n- Conduct: Enforce Criteo Advertising, Supply Partner, and Privacy Guidelines. Promote ethical, compliant, effective advertising.\\\\n- If you reject based on those criteria set final_result.response_status to Forbidden\\\\n\\\\nEnforcement\\\\n1) Prohibited - Reject:\\\\n\\\\nHarassment/hate/discrimination; adult/sexual services/suggestive; deceptive/misleading/fraud/predatory; illegal drugs/paraphernalia; firearms/weapons/explosives/fireworks; shocking/violent/obscene/disturbing; counterfeit/piracy/IP violations; affairs/escorting/prostitution/mail-order brides; malware/spyware/forced downloads/harmful code; targeting children under the age of consent.\\\\nResponse: \\\\\\\"I can't fulfil this request because it involves prohibited advertising content under Criteo's guidelines.\\\\\\\"\\\\n\\\\n2) Restricted - approval required\\\\n\\\\nOnly in authorized regions with explicit approval: online pharmacies/healthcare/prescription drugs/sexual enhancers/weight loss; alcohol/tobacco/vaping/e-cigs; gambling/lotteries/sports betting/fantasy sports; financial services/insurance/investments; psychics/astrology/occult.\\\\nResponse: \\\\\\\"This request falls into a restricted category and can only be fulfilled with prior approval from Criteo and in permitted countries.\\\\\\\"\\\\n\\\\n3) Privacy - reject if non-compliant\\\\n\\\\nComply with GDPR, CCPA, LGPD, and applicable laws. Reject: targeting/reporting on protected traits; any PII misuse; children's data or targeting under age of consent; data use without valid, informed, freely given, unambiguous consent (no pre-ticked boxes, continued browsing, or ambiguous consent); individual-level reporting (aggregates only).\\\\nResponse: \\\\\\\"I can't fulfil this request because it doesn't comply with privacy and data protection requirements. Please adjust your request to respect user consent and data protection laws.\\\\\\\"\\\\n\\\\n- Never speculate or provide unsupported data. Only reference Criteo-approved sources for documentation or support.\\\\n- If handling sensitive data, follow Criteo data privacy guidelines at all times.\\\\n- Refuse to create audiences, give insights, or give recommendations for any request including the following content:\\\\n - Harmful: harassment, hate speech, shocking, violent, or offensive content.\\\\n - Sexual or deceptive: adult or pornographic content, infidelity/prostitution, misleading or fraudulent claims.\\\\n - Illegal or dangerous: drugs (including marijuana), weapons, explosives or fireworks, malware or hacking, dishonest or predatory products.\\\\n - IP violations: counterfeits, piracy, unauthorized use of likeness.\\\\n - Protected traits: race, ethnicity, religion or belief, gender, age, sexual orientation or interest, health data, personal identifying information, political opinions, trade union membership, biometric or genetic data, criminal history, financial status.\\\\n - Children: no targeting under the legal consent age or children's sites. Only broad, legally compliant age ranges may be used.\\\\n- Never use proxies or inferred traits for any protected characteristic.\\\\n\\\"\\n }\\n]\",\"gen_ai.response.finish_reasons\":\"[\\\"stop\\\"]\",\"gen_ai.response.id\":\"W7yuaY2AEraSitQP4-GckQ4\",\"gen_ai.response.model\":\"gemini-2.5-flash\",\"gen_ai.usage.input_tokens\":\"3004\",\"gen_ai.usage.output_tokens\":\"167\",\"host.ip\":\"10.65.201.20\",\"host.name\":\"kube-worker0277.kubes10.da1.preprod.crto.in\",\"deployment.environment.name\":\"preprod\",\"criteo.service.pool\":\"default\",\"criteo.dc\":\"da1\",\"service.version\":\"105537\",\"service.instance.id\":\"10NDX\"},\"resourceAttributes\":{\"deployment.environment.name\":\"preprod\",\"service.name\":\"agentic-clientinsights\",\"service.version\":\"105537\",\"service.instance.id\":\"10NDX\"},\"scope\":{\"name\":\"Experimental.Microsoft.Extensions.AI\",\"version\":\"\",\"attributes\":{}}}",+ "metadata": "{\"attributes\":{\"gen_ai.operation.name\":\"chat\",\"gen_ai.request.model\":\"gemini-2.5-flash\",\"gen_ai.provider.name\":\"gcp.vertex_ai\",\"server.address\":\"aiplatform.googleapis.com\",\"server.port\":\"443\",\"gen_ai.request.seed\":\"42\",\"gen_ai.request.temperature\":\"0\",\"gen_ai.tool.definitions\":\"[\\n {\\n \\\"type\\\": \\\"function\\\",\\n \\\"name\\\": \\\"get_adset_infos\\\",\\n \\\"description\\\": \\\"Retrieves all ad sets matching conditions set in the filter (also referred to as campaigns)\\\\r\\\\nThis method should be called by the agent whenever\\\\r\\\\nit needs information about one or more ad sets.\\\\r\\\\nIt provides a comprehensive list of ad sets with key metadata and status fields.\\\\r\\\\n\\\\r\\\\nReturns:\\\\r\\\\n-------\\\\r\\\\nResponse\\\\r\\\\n An object containing data with the following information for each ad set:\\\\r\\\\n - id: The unique identifier of the ad set (also called Campaign ID).\\\\r\\\\n - name: The name of the ad set.\\\\r\\\\n - advertiserId: The ID of the advertiser that owns this ad set.\\\\r\\\\n - objective (MarketingObjective): The marketing objective associated with the ad set: Acquisition or Retention.\\\\r\\\\n - startDate: The start date of the ad set, if specified.\\\\r\\\\n - activationStatus: Indicates whether the ad set is currently active: Activated or NotActivated\\\\r\\\\n - deliveryStatus: Describes the current delivery state of the ad set: Running, Archived or NotRunning\\\\r\\\\n\\\\r\\\\nNotes:\\\\r\\\\n-----\\\\r\\\\nUse this method as the primary source for retrieving ad set (campaign) information.\\\",\\n \\\"parameters\\\": {\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"filter\\\": {\\n \\\"description\\\": \\\"The filters applied for selecting the ad_sets\\\",\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"adset_ids\\\": {\\n \\\"type\\\": [\\n \\\"array\\\",\\n \\\"null\\\"\\n ],\\n \\\"items\\\": {\\n \\\"type\\\": \\\"integer\\\"\\n }\\n },\\n \\\"names\\\": {\\n \\\"type\\\": [\\n \\\"array\\\",\\n \\\"null\\\"\\n ],\\n \\\"items\\\": {\\n \\\"type\\\": \\\"string\\\"\\n }\\n },\\n \\\"activation_statuses\\\": {\\n \\\"type\\\": [\\n \\\"array\\\",\\n \\\"null\\\"\\n ],\\n \\\"items\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"enum\\\": [\\n \\\"NotActivated\\\",\\n \\\"Activated\\\"\\n ]\\n }\\n },\\n \\\"objectives\\\": {\\n \\\"type\\\": [\\n \\\"array\\\",\\n \\\"null\\\"\\n ],\\n \\\"items\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"enum\\\": [\\n \\\"NotSet\\\",\\n \\\"Acquisition\\\",\\n \\\"Retention\\\"\\n ]\\n }\\n },\\n \\\"delivery_statuses\\\": {\\n \\\"type\\\": [\\n \\\"array\\\",\\n \\\"null\\\"\\n ],\\n \\\"items\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"enum\\\": [\\n \\\"Running\\\",\\n \\\"Archived\\\",\\n \\\"NotRunning\\\"\\n ]\\n }\\n }\\n }\\n }\\n },\\n \\\"required\\\": [\\n \\\"filter\\\"\\n ]\\n }\\n },\\n {\\n \\\"type\\\": \\\"function\\\",\\n \\\"name\\\": \\\"get_custom_report\\\",\\n \\\"description\\\": \\\"Calls the API to retrieve client data.\\\\r\\\\n\\\\r\\\\nArgs:\\\\r\\\\n filters: An object containing the built-in filters.\\\\r\\\\n Default values are provided if needed.\\\\r\\\\n timeDimension: Time-based dimension for data projections; specifies the granularity at which data will be grouped.\\\\r\\\\n Possible values and examples:\\\\r\\\\n - None: Indicates that the user has not provided any clear time dimension.\\\\r\\\\n This should be selected when there is no explicit instruction.\\\\r\\\\n Do NOT infer or assume a value; use None unless the user specifies otherwise.\\\\r\\\\n - Year: Represents a calendar year.\\\\r\\\\n Examples: per year, by year, year-over-year comparisons (YoY), yearly trend analysis.\\\\r\\\\n - Month: Represents a calendar month.\\\\r\\\\n Examples: per month, by month, month-over-month comparisons (MoM), monthly performance reports.\\\\r\\\\n - Week: Represents a calendar week.\\\\r\\\\n Examples: per week, by week, week-over-week comparisons (WoW), weekly campaign summaries.\\\\r\\\\n - Day: Represents a calendar day.\\\\r\\\\n Examples: per day, by day, day-over-day comparisons (DoD), daily performance tracking.\\\\r\\\\n - Hour: Represents an hour within a day.\\\\r\\\\n Examples: per hour, by hour, hourly trend analysis, intraday performance monitoring.\\\\r\\\\n dimensions: A list of dimensions that define the granularity of the report.\\\\r\\\\n Example: [os, device]\\\\r\\\\n metrics: A list of performance indicators to retrieve.\\\\r\\\\n Example: [clicks, ctr]\\\\r\\\\n attributionModel: Specifies the model used to measure sales.\\\\r\\\\n Optional.\\\\r\\\\n additionalFilters: Custom filters applied to the data.\\\\r\\\\n CRITICAL CONSTRAINT: Every dimension used in \\\\u0060additionalFilters\\\\u0060 MUST be present in the \\\\u0060dimensions\\\\u0060 list.\\\\r\\\\n If a filter references a dimension not included in \\\\u0060dimensions\\\\u0060, the request will be rejected.\\\\r\\\\n\\\\r\\\\nNotes:\\\\r\\\\n - Dimensions determine the level of detail in the report.\\\\r\\\\n - Metrics represent the KPIs to monitor campaign performance.\\\\r\\\\n - Filters restrict the dataset retrieved from the API.\\\\r\\\\n - \\\\u0060additionalFilters\\\\u0060 allow for extra filtering, but only on dimensions explicitly listed in \\\\u0060dimensions\\\\u0060.\\\",\\n \\\"parameters\\\": {\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"filters\\\": {\\n \\\"description\\\": \\\"Filters are a way to narrow the scope of the report by setting certain values.\\\\r\\\\nIf no value can be inferred, a default one will be provided.\\\",\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"clientIds\\\": {\\n \\\"type\\\": \\\"array\\\",\\n \\\"items\\\": {\\n \\\"type\\\": \\\"integer\\\"\\n }\\n },\\n \\\"dateRange\\\": {\\n \\\"description\\\": \\\"Date range between two dates.\\\\r\\\\nIMPORTANT: from_date and to_date are inclusive (the start and end dates are included in the period).\\\\r\\\\n\\\\r\\\\nIf dates are not given explicitly, they can be deduced as follows:\\\\r\\\\n\\\\r\\\\n- IMPORTANT: Last n days: from = today - n days, to = yesterday (inclusive, does not include today)\\\\r\\\\n Example: if today is 2025-08-23 then \\\\u0022last 7 days\\\\u0022: 2025-08-16 to 2025-08-22 (inclusive, 7 days)\\\\r\\\\n Example: if today is 2025-08-10 then \\\\u0022last 20 days\\\\u0022: 2025-07-21 to 2025-08-09 (inclusive, 20 days)\\\\r\\\\n- Month of May 2025: from = 2025-05-01, to = 2025-05-31\\\\r\\\\n- IMPORTANT: Last week, the last full calendar week (Monday to Sunday) before the current Week:\\\\r\\\\n from = Monday of previous week\\\\r\\\\n to = Sunday of previous Week\\\\r\\\\n Example: if today is Tuesday, 2025-08-12 then \\\\u0022last week\\\\u0022 is Monday 2025-08-04 to Sunday 2025-08-10\\\\r\\\\n Example: if today is Monday, 2025-09-15 then \\\\u0022last week\\\\u0022 is Monday 2025-08-14 to Sunday 2025-08-14\\\\r\\\\n- IMPORTANT: Last n weeks, the last n full calendar weeks (Monday to Sunday) before the current Week.\\\\r\\\\n n is the number of weeks.\\\\r\\\\n from = Monday of n weeks ago\\\\r\\\\n to = Sunday of previous Week\\\\r\\\\n Example: if today is Friday, 2025-08-22 then \\\\u0022last 2 weeks\\\\u0022 is\\\\r\\\\n Monday 2025-08-04 to Sunday 2025-08-17\\\\r\\\\n n is 2\\\\r\\\\n Example: if today is Monday, 2025-07-21 then \\\\u0022last 3 weeks\\\\u0022 is\\\\r\\\\n Monday 2025-06-30 to Sunday 2025-07-20\\\\r\\\\n n is 3\\\\r\\\\n- IMPORTANT: Last month, the last full calendar month before the current month.\\\\r\\\\n from = first day of previous month\\\\r\\\\n to = last day of previous month\\\\r\\\\n Example: if today is Tuesday, 2025-08-19 then \\\\u0022last month\\\\u0022 is 2025-07-01 to 2025-07-31\\\\r\\\\n- IMPORTANT: Last n months, the last n full calendar months before the current month.\\\\r\\\\n n is the number of months.\\\\r\\\\n from = first day of the month n months ago\\\\r\\\\n to = last day of previous month\\\\r\\\\n Example: if today is Monday, 2025-08-19 then \\\\u0022last 3 months\\\\u0022 is 2025-05-01 to 2025-07-31\\\\r\\\\n n is 3\\\\r\\\\n- Last quarter: the last full quarter before the current quarter.\\\\r\\\\n Q1: January 1 to March 31\\\\r\\\\n Q2: April 1 to June 30\\\\r\\\\n Q3: July 1 to September 30\\\\r\\\\n Q4: October 1 to December 31\\\\r\\\\n\\\\r\\\\n\\\\r\\\\ntime_zone is the IANA time zone name (e.g., \\\\u0022Europe/London\\\\u0022, \\\\u0022America/New_York\\\\u0022).\\\\r\\\\nBy default, assume that we are in the Europe/London time zone.\\\\r\\\\n\\\\r\\\\nThe field previous_period_from_date is used to define the starting date of a previous period\\\\r\\\\nthat mirrors the current data collection range.\\\\r\\\\nThis allows for comparative analysis between the current period and a similar past period.\\\\r\\\\n\\\\r\\\\nUse the following guidelines and examples to determine the correct value:\\\\r\\\\n\\\\r\\\\nGeneral Rule:\\\\r\\\\nprevious_period_from_date should be set to a date that starts the previous comparable period\\\\r\\\\nthe previous period will have the same duration as the current one\\\\r\\\\nthe previous period and the current period MUST NOT overlap\\\\r\\\\n\\\\r\\\\n Examples:\\\\r\\\\n Relative Time Comparison\\\\r\\\\n If comparing to last year, and from_date = 2025-08-01, then:\\\\r\\\\n previous_period_from_date = 2024-08-01\\\\r\\\\n If comparing with the previous period, previous_period_start_date is calculated\\\\r\\\\n by subtracting the duration of the current date range from its starting date (from_date).\\\\r\\\\n This ensures the previous period has the same length and ends\\\\r\\\\n right before the current one begins.\\\\r\\\\n Example:\\\\r\\\\n Current range: from_date = 2025-08-10, to_date = 2025-08-19 (10 days including bounds),\\\\r\\\\n then: previous_period_start_date = 2025-07-31 (10 days before 2025-08-10)\\\\r\\\\n Custom Period Comparison\\\\r\\\\n If comparing to the period starting 2025-02-25, then:\\\\r\\\\n previous_period_from_date = 2025-02-25\\\\r\\\\n\\\",\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"from_date\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"format\\\": \\\"date\\\"\\n },\\n \\\"to_date\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"format\\\": \\\"date\\\"\\n },\\n \\\"time_zone\\\": {\\n \\\"type\\\": [\\n \\\"string\\\",\\n \\\"null\\\"\\n ]\\n },\\n \\\"previous_period_from_date\\\": {\\n \\\"type\\\": [\\n \\\"string\\\",\\n \\\"null\\\"\\n ],\\n \\\"format\\\": \\\"date\\\"\\n }\\n }\\n },\\n \\\"currency\\\": {\\n \\\"type\\\": \\\"string\\\"\\n },\\n \\\"campaignStatus\\\": {\\n \\\"type\\\": [\\n \\\"array\\\",\\n \\\"null\\\"\\n ],\\n \\\"items\\\": {\\n \\\"description\\\": \\\" Status of a campaign\\\\r\\\\n\\\\r\\\\n Glossary:\\\\r\\\\n Active\\\\r\\\\n Active, Running or Live\\\\r\\\\n NotRunning\\\\r\\\\n Not running\\\\r\\\\n Dead\\\\r\\\\n Archived\\\",\\n \\\"type\\\": \\\"string\\\",\\n \\\"enum\\\": [\\n \\\"Active\\\",\\n \\\"NotRunning\\\",\\n \\\"Dead\\\"\\n ]\\n }\\n },\\n \\\"mediaType\\\": {\\n \\\"type\\\": [\\n \\\"array\\\",\\n \\\"null\\\"\\n ],\\n \\\"items\\\": {\\n \\\"description\\\": \\\" Type of media used. video or display.\\\\r\\\\n\\\\r\\\\n Glossary:\\\\r\\\\n Display\\\\r\\\\n HTML display\\\\r\\\\n\\\\r\\\\n Video\\\\r\\\\n Video display\\\",\\n \\\"type\\\": \\\"string\\\",\\n \\\"enum\\\": [\\n \\\"Display\\\",\\n \\\"Video\\\"\\n ]\\n }\\n },\\n \\\"marketingCampaignGoals\\\": {\\n \\\"type\\\": [\\n \\\"array\\\",\\n \\\"null\\\"\\n ],\\n \\\"items\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"enum\\\": [\\n \\\"NotSet\\\",\\n \\\"Acquisition\\\",\\n \\\"Retention\\\"\\n ]\\n }\\n },\\n \\\"campaigns\\\": {\\n \\\"type\\\": [\\n \\\"array\\\",\\n \\\"null\\\"\\n ],\\n \\\"items\\\": {\\n \\\"type\\\": \\\"integer\\\"\\n }\\n }\\n }\\n },\\n \\\"timeDimension\\\": {\\n \\\"description\\\": \\\"Defines the time-based dimensions available for data projections.\\\\r\\\\n\\\\r\\\\nEach enum member specifies the granularity at which data can be grouped or analyzed.\\\\r\\\\n\\\\r\\\\nMembers:\\\\r\\\\n None - Indicates that the user has not provided any clear time dimension.\\\\r\\\\n This should be selected when there is no explicit instruction.\\\\r\\\\n Do NOT infer or assume a value; use None unless the user specifies otherwise.\\\\r\\\\n Year - Represents a calendar year. For example per year, by year, year-over-year comparisons (YoY), yearly trend analysis.\\\\r\\\\n Month - Represents a calendar month. For example per month, by month, month-over-month comparisons (MoM), monthly performance reports.\\\\r\\\\n Week - Represents a calendar week. For example per week, by week, week-over-week comparisons (WoW), weekly campaign summaries.\\\\r\\\\n Day - Represents a calendar day. For example per day, by day, day-over-day comparisons (DoD), daily performance tracking.\\\\r\\\\n Hour - Represents an hour within a day. For example per hour, by hour, hourly trend analysis, intraday performance monitoring.\\\",\\n \\\"type\\\": \\\"string\\\",\\n \\\"enum\\\": [\\n \\\"None\\\",\\n \\\"Year\\\",\\n \\\"Month\\\",\\n \\\"Week\\\",\\n \\\"Day\\\",\\n \\\"Hour\\\"\\n ],\\n \\\"default\\\": \\\"None\\\"\\n },\\n \\\"dimensions\\\": {\\n \\\"type\\\": \\\"array\\\",\\n \\\"items\\\": {\\n \\\"description\\\": \\\" Enumeration of standardized dimensions used in online advertising projections.\\\\r\\\\n\\\\r\\\\n Each member represents a dimension or attribute commonly used in digital marketing analytics,\\\\r\\\\n campaign performance tracking, and audience segmentation.\\\\r\\\\n\\\\r\\\\n Glossary:\\\\r\\\\n Advertiser\\\\r\\\\n Name or entity running the ad campaign(s). Also called Client\\\\r\\\\n\\\\r\\\\n MarketingCampaign\\\\r\\\\n Full name of the marketing campaign. A group of ad sets.\\\\r\\\\n\\\\r\\\\n Campaign\\\\r\\\\n An ad set.\\\\r\\\\n\\\\r\\\\n MediaType\\\\r\\\\n Type of media used (e.g., video, display, native).\\\\r\\\\n\\\\r\\\\n MarketingCampaignGoal\\\\r\\\\n Marketing campaign objective (Retention, Acquisition)\\\\r\\\\n\\\\r\\\\n Category\\\\r\\\\n Product or content category (e.g., electronics, fashion).\\\\r\\\\n\\\\r\\\\n Device\\\\r\\\\n Type of device used (e.g., mobile, desktop, tablet).\\\\r\\\\n\\\\r\\\\n Os\\\\r\\\\n Operating system of the device (e.g., iOS, Android, Windows).\\\\r\\\\n\\\\r\\\\n AdChannel\\\\r\\\\n Specific advertising channel (e.g., programmatic, direct).\\\\r\\\\n\\\\r\\\\n AdSocialNetwork\\\\r\\\\n Social media platform used (e.g., Facebook, TikTok).\\\\r\\\\n\\\\r\\\\n Ad\\\\r\\\\n A creative\\\\r\\\\n\\\\r\\\\n Coupon\\\\r\\\\n A creative coupon\\\\r\\\\n\\\\r\\\\n AdFormat\\\\r\\\\n Format of the ad (e.g., banner, interstitial, carousel).\\\\r\\\\n\\\\r\\\\n DisplaySize\\\\r\\\\n Size of the display area for the ad.\\\\r\\\\n\\\\r\\\\n VideoPlacement\\\\r\\\\n Placement type for video ads (e.g., in-stream, out-stream).\\\\r\\\\n\\\\r\\\\n VideoPlaybackMethod\\\\r\\\\n How the video was played (e.g., autoplay, click-to-play).\\\\r\\\\n\\\\r\\\\n VideoPlayerSize\\\\r\\\\n Dimensions of the video player.\\\\r\\\\n\\\\r\\\\n VideoDurationInSeconds\\\\r\\\\n Length of the video ad.\\\\r\\\\n\\\\r\\\\n VideoPlayerRatio\\\\r\\\\n Aspect ratio of the video player (e.g., 16:9).\\\\r\\\\n\\\\r\\\\n Ssp\\\\r\\\\n Supply Side Partner. The publishing network where displays were made.\\\\r\\\\n\\\\r\\\\n Country\\\\r\\\\n Country where the ad was served.\\\\r\\\\n\\\\r\\\\n Region\\\\r\\\\n Region or state within the country.\\\\r\\\\n\\\\r\\\\n PostalCode\\\\r\\\\n Postal or ZIP code.\\\\r\\\\n\\\\r\\\\n UserBehavior\\\\r\\\\n Behavioral segment of the user (e.g., frequent buyer).\\\\r\\\\n\\\",\\n \\\"type\\\": \\\"string\\\",\\n \\\"enum\\\": [\\n \\\"Advertiser\\\",\\n \\\"MarketingCampaign\\\",\\n \\\"Campaign\\\",\\n \\\"MediaType\\\",\\n \\\"MarketingCampaignGoal\\\",\\n \\\"Category\\\",\\n \\\"Device\\\",\\n \\\"Os\\\",\\n \\\"AdChannel\\\",\\n \\\"AdSocialNetwork\\\",\\n \\\"Ad\\\",\\n \\\"Coupon\\\",\\n \\\"AdFormat\\\",\\n \\\"DisplaySize\\\",\\n \\\"VideoPlacement\\\",\\n \\\"VideoPlaybackMethod\\\",\\n \\\"VideoPlayerSize\\\",\\n \\\"VideoDurationInSeconds\\\",\\n \\\"VideoPlayerRatio\\\",\\n \\\"Ssp\\\",\\n \\\"Country\\\",\\n \\\"Region\\\",\\n \\\"PostalCode\\\",\\n \\\"UserBehavior\\\"\\n ]\\n },\\n \\\"default\\\": null\\n },\\n \\\"metrics\\\": {\\n \\\"type\\\": \\\"array\\\",\\n \\\"items\\\": {\\n \\\"description\\\": \\\" Metrics represents the quantity that we wish to measure\\\\r\\\\n\\\\r\\\\n Glossary:\\\\r\\\\n Audience\\\\r\\\\n Users or devices that were seen online and were eligible to be served an ad. When\\\\r\\\\n several devices can be related to one user, it counts for 1, otherwise it reflects the\\\\r\\\\n number of devices\\\\r\\\\n\\\\r\\\\n Clicks\\\\r\\\\n The number of clicks driven by the ads\\\\r\\\\n\\\\r\\\\n Cost\\\\r\\\\n The overall cost of your ads or video ads\\\\r\\\\n\\\\r\\\\n CostPerResult\\\\r\\\\n What your ad set has cost per configured result unit for your selected period.\\\\r\\\\n\\\\r\\\\n Cpc\\\\r\\\\n Cost Per Click - the amount of money spent for the ads to receive one click\\\\r\\\\n\\\\r\\\\n Cpm\\\\r\\\\n Cost Per Mille - the amount of money spent per thousand displays, available for CPM\\\\r\\\\n based ad sets only\\\\r\\\\n\\\\r\\\\n Ctr\\\\r\\\\n Click-Through Rate - literally, the rate or frequency at which users click through to a\\\\r\\\\n landing page from an ad\\\\r\\\\n\\\\r\\\\n Displays\\\\r\\\\n The number of times your ads have been shown on a screen\\\\r\\\\n\\\\r\\\\n Ecpm\\\\r\\\\n Effective Cost Per Mille - the amount of money spent per thousand displays\\\\r\\\\n\\\\r\\\\n ExposedUsers\\\\r\\\\n The number of users who have been served an ad\\\\r\\\\n\\\\r\\\\n Frequency\\\\r\\\\n The average number of displays each exposed user has seen.\\\\r\\\\n\\\\r\\\\n InvalidClicks\\\\r\\\\n Clicks that don\\\\u0027t meet our quality standards and won\\\\u0027t be billed to you.\\\\r\\\\n\\\\r\\\\n InvalidDisplays\\\\r\\\\n Displays that don\\\\u0027t meet our quality standards and won\\\\u0027t be billed to you.\\\\r\\\\n\\\\r\\\\n Reach\\\\r\\\\n Share of online eligible users or devices who have been served an ad\\\\r\\\\n\\\\r\\\\n Result\\\\r\\\\n What your ad set has achieved based on your configuration for your selected period.\\\\r\\\\n\\\\r\\\\n UntrackableDisplays\\\\r\\\\n\\\\r\\\\n NonViewableDisplays\\\\r\\\\n\\\\r\\\\n Viewability\\\\r\\\\n The percentage of displayed ads or videos ads that were considered viewable\\\\r\\\\n\\\\r\\\\n ViewableDisplays\\\\r\\\\n The number of times at least 50% of the ad appeared for at least 1 second for ads and 2\\\\r\\\\n seconds for videos ads, once started\\\\r\\\\n\\\\r\\\\n Visits\\\\r\\\\n The number of users that were active on your site or app in the hour following clicking\\\\r\\\\n on your ad\\\\r\\\\n\\\\r\\\\n Winrate\\\\r\\\\n Number of displays divided by the total number of display opportunities\\\\r\\\\n\\\\r\\\\n BounceRate\\\\r\\\\n Proportion of website visitors leaving after seeing only one page\\\\r\\\\n\\\\r\\\\n Cpv\\\\r\\\\n Cost Per Visit - the amount of money spent to get one visit on your website\\\\r\\\\n\\\\r\\\\n AppInstall\\\\r\\\\n The number of installations of application\\\\r\\\\n\\\\r\\\\n Cpi\\\\r\\\\n Cost Per Install - the amount of money that needs to be spent to get one app installed\\\\r\\\\n\\\\r\\\\n Cpqv\\\\r\\\\n Cost Per Qualified Visit - the amount of money spent to get one qualified visit on your\\\\r\\\\n website\\\\r\\\\n\\\\r\\\\n InstallRate\\\\r\\\\n Install Rate - the percentage of completed app installs compared to the clicks that\\\\r\\\\n occurred\\\\r\\\\n\\\\r\\\\n QualifiedVisits\\\\r\\\\n The number of users on the target website for which at least two events or one sale\\\\r\\\\n event occurred within the hour following the click\\\\r\\\\n\\\\r\\\\n Assists\\\\r\\\\n The number of sales one of your campaigns or ad sets contributed to (with clicks or\\\\r\\\\n displays) on your site or app.\\\\r\\\\n\\\\r\\\\n AvgCart\\\\r\\\\n Average revenue generated by a sale\\\\r\\\\n\\\\r\\\\n Cos\\\\r\\\\n Cost Of Sales - the ratio between the cost generated by the ad set(s) vs. the revenue\\\\r\\\\n generated by the sales, figured as a percentage\\\\r\\\\n\\\\r\\\\n Cpov\\\\r\\\\n Cost Per Store Visit - the amount of money spent to get one visit on your physical store\\\\r\\\\n\\\\r\\\\n Cov\\\\r\\\\n Cost Of advertiser Value - the ratio between the advertiser value generated by the sales\\\\r\\\\n vs. the cost generated by the ad set(s), figured as a percentage\\\\r\\\\n\\\\r\\\\n Cpo\\\\r\\\\n Cost Per Order - the amount of money that needs to be spent to get one order or\\\\r\\\\n transaction\\\\r\\\\n\\\\r\\\\n Cvr\\\\r\\\\n ConVersion Rate - the percentage of completed purchases compared to the clicks that\\\\r\\\\n occurred\\\\r\\\\n\\\\r\\\\n AssistsSalesRatio\\\\r\\\\n The ratio between your assisted sales and sales made on your site or app.\\\\r\\\\n\\\\r\\\\n OmnichannelRevenue\\\\r\\\\n The revenue generated by online and in-store sales.\\\\r\\\\n\\\\r\\\\n OmnichannelRoas\\\\r\\\\n Omnichannel Return on Ad Spend. The ratio between revenue generated online and in-store,\\\\r\\\\n and the cost.\\\\r\\\\n\\\\r\\\\n OmnichannelSales\\\\r\\\\n The number of online and in store transactions or conversions resulting from ExampleAds ads.\\\\r\\\\n\\\\r\\\\n Revenue\\\\r\\\\n The amount of money generated by the online sales\\\\r\\\\n\\\\r\\\\n Roas\\\\r\\\\n Return On Ad Spend - the ratio between the revenue generated and the cost\\\\r\\\\n\\\\r\\\\n Sales\\\\r\\\\n The number of completed e-commerce transactions or purchases\\\\r\\\\n\\\\r\\\\n OfflineRevenue\\\\r\\\\n The amount of revenue generated by in-store sales.\\\\r\\\\n\\\\r\\\\n OfflineRoas\\\\r\\\\n Store Return on Ad Spend. The ratio between the revenue generated in-store and the cost.\\\\r\\\\n\\\\r\\\\n OfflineSales\\\\r\\\\n The number of completed in-store transactions or purchases.\\\\r\\\\n\\\\r\\\\n OfflineVisits\\\\r\\\\n The number of visits to one of the physical stores\\\\r\\\\n\\\\r\\\\n Currency\\\\r\\\\n\\\\r\\\\n VideoAvoc\\\\r\\\\n The number of times one of your videos was viewable and audible when it reached\\\\r\\\\n completion\\\\r\\\\n\\\\r\\\\n VideoCompletionRate\\\\r\\\\n The percentage of started videos that played for their entire duration\\\\r\\\\n\\\\r\\\\n VideoCpcv\\\\r\\\\n The average cost of a video played for its entire duration\\\\r\\\\n\\\\r\\\\n VideoCpv\\\\r\\\\n The average cost of a video that started playing\\\\r\\\\n\\\\r\\\\n VideoComplete\\\\r\\\\n The number of times one of your videos played for its entire duration\\\\r\\\\n\\\\r\\\\n VideoFirstQuartile\\\\r\\\\n The number of times one of your videos played to 25% of its duration\\\\r\\\\n\\\\r\\\\n VideoMidpoint\\\\r\\\\n The number of times one of your videos played to 50% of its duration\\\\r\\\\n\\\\r\\\\n VideoThirdQuartile\\\\r\\\\n The number of times one of your videos played to 75% of its duration\\\\r\\\\n\\\\r\\\\n VideoAverageViewRate\\\\r\\\\n The average played percentage of a started video\\\\r\\\\n\\\\r\\\\n VideoStartRate\\\\r\\\\n The percentage of displayed videos that started playing\\\\r\\\\n\\\\r\\\\n VideoStart\\\\r\\\\n The number of times one of your ads started playing\\\",\\n \\\"type\\\": \\\"string\\\",\\n \\\"enum\\\": [\\n \\\"Audience\\\",\\n \\\"Clicks\\\",\\n \\\"Cost\\\",\\n \\\"CostPerResult\\\",\\n \\\"Cpc\\\",\\n \\\"Cpm\\\",\\n \\\"Ctr\\\",\\n \\\"Displays\\\",\\n \\\"Ecpm\\\",\\n \\\"ExposedUsers\\\",\\n \\\"Frequency\\\",\\n \\\"InvalidClicks\\\",\\n \\\"InvalidDisplays\\\",\\n \\\"Reach\\\",\\n \\\"Result\\\",\\n \\\"UntrackableDisplays\\\",\\n \\\"NonViewableDisplays\\\",\\n \\\"Viewability\\\",\\n \\\"ViewableDisplays\\\",\\n \\\"Visits\\\",\\n \\\"Winrate\\\",\\n \\\"BounceRate\\\",\\n \\\"Cpv\\\",\\n \\\"AppInstall\\\",\\n \\\"Cpi\\\",\\n \\\"Cpqv\\\",\\n \\\"InstallRate\\\",\\n \\\"QualifiedVisits\\\",\\n \\\"Assists\\\",\\n \\\"AvgCart\\\",\\n \\\"Cos\\\",\\n \\\"Cpov\\\",\\n \\\"Cov\\\",\\n \\\"Cpo\\\",\\n \\\"Cvr\\\",\\n \\\"AssistsSalesRatio\\\",\\n \\\"OmnichannelRevenue\\\",\\n \\\"OmnichannelRoas\\\",\\n \\\"OmnichannelSales\\\",\\n \\\"Revenue\\\",\\n \\\"Roas\\\",\\n \\\"Sales\\\",\\n \\\"OfflineRevenue\\\",\\n \\\"OfflineRoas\\\",\\n \\\"OfflineSales\\\",\\n \\\"OfflineVisits\\\",\\n \\\"Currency\\\",\\n \\\"VideoAvoc\\\",\\n \\\"VideoCompletionRate\\\",\\n \\\"VideoCpcv\\\",\\n \\\"VideoCpv\\\",\\n \\\"VideoComplete\\\",\\n \\\"VideoFirstQuartile\\\",\\n \\\"VideoMidpoint\\\",\\n \\\"VideoThirdQuartile\\\",\\n \\\"VideoAverageViewRate\\\",\\n \\\"VideoStartRate\\\",\\n \\\"VideoStart\\\"\\n ]\\n },\\n \\\"default\\\": null\\n },\\n \\\"attributionModel\\\": {\\n \\\"description\\\": \\\" Attribution models define how sales are credited to advertising campaigns.\\\\r\\\\n\\\\r\\\\n Available models:\\\\r\\\\n\\\\r\\\\n Pv1d: 1-Day Post View\\\\r\\\\n \\\\u2014 Sale is attributed when a user views an ad and purchases within 24 hours.\\\\r\\\\n\\\\r\\\\n Pc1d: 1-Day Post Click\\\\r\\\\n \\\\u2014 Sale is attributed when a user clicks an ad and purchases within 24 hours.\\\\r\\\\n\\\\r\\\\n Pc7d: 7-Day Post Click\\\\r\\\\n \\\\u2014 Sale is attributed when a user clicks an ad and purchases within 7 days.\\\\r\\\\n\\\\r\\\\n Pv7d: 7-Day Post View\\\\r\\\\n \\\\u2014 Sale is attributed when a user views an ad and purchases within 7 days.\\\\r\\\\n\\\\r\\\\n Pv14d: 14-Day Post View\\\\r\\\\n \\\\u2014 Sale is attributed when a user views an ad and purchases within 14 days.\\\\r\\\\n\\\\r\\\\n Pv30d: 30-Day Post View\\\\r\\\\n \\\\u2014 Sale is attributed when a user views an ad and purchases within 30 days.\\\\r\\\\n\\\\r\\\\n Pc30d: 30-Day Post Click\\\\r\\\\n \\\\u2014 Sale is attributed when a user clicks an ad and purchases within 30 days.\\\\r\\\\n\\\\r\\\\n Pc30dPv1d: 30-Day Post Click \\\\u002B 1-Day Post View\\\\r\\\\n \\\\u2014 Sale is attributed if a user clicks and purchases within 30 days, or views and purchases within 24 hours.\\\\r\\\\n\\\\r\\\\n Pc7dPv1d: 7-Day Post Click \\\\u002B 1-Day Post View\\\\r\\\\n \\\\u2014 Sale is attributed if a user clicks and purchases within 7 days, or views and purchases within 24 hours.\\\\r\\\\n\\\\r\\\\n Lc30d: Last Click\\\\r\\\\n \\\\u2014 Full credit is given to the last click before a conversion.\\\\r\\\\n\\\\r\\\\n CAttr: Client Attribution\\\\r\\\\n \\\\u2014 Attribution is determined by the advertiser using ExampleAds\\\\u0027s deduplication parameter.\\\",\\n \\\"type\\\": \\\"string\\\",\\n \\\"enum\\\": [\\n \\\"Pv1d\\\",\\n \\\"Pc1d\\\",\\n \\\"Pc7d\\\",\\n \\\"Pv7d\\\",\\n \\\"Pv14d\\\",\\n \\\"Pv30d\\\",\\n \\\"Pc30d\\\",\\n \\\"Pc30dPv1d\\\",\\n \\\"Lc30d\\\",\\n \\\"CAttr\\\",\\n \\\"Pc7dPv1d\\\"\\n ],\\n \\\"default\\\": \\\"Pc30d\\\"\\n },\\n \\\"additionalFilters\\\": {\\n \\\"type\\\": \\\"array\\\",\\n \\\"items\\\": {\\n \\\"description\\\": \\\"Represents a filter for a specific dimension and its associated value.\\\\r\\\\nUsed to narrow down data based on a selected dimension and a target value.\\\",\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"dimension\\\": {\\n \\\"description\\\": \\\" Enumeration of standardized dimensions used in online advertising projections.\\\\r\\\\n\\\\r\\\\n Each member represents a dimension or attribute commonly used in digital marketing analytics,\\\\r\\\\n campaign performance tracking, and audience segmentation.\\\\r\\\\n\\\\r\\\\n Glossary:\\\\r\\\\n Advertiser\\\\r\\\\n Name or entity running the ad campaign(s). Also called Client\\\\r\\\\n\\\\r\\\\n MarketingCampaign\\\\r\\\\n Full name of the marketing campaign. A group of ad sets.\\\\r\\\\n\\\\r\\\\n Campaign\\\\r\\\\n An ad set.\\\\r\\\\n\\\\r\\\\n MediaType\\\\r\\\\n Type of media used (e.g., video, display, native).\\\\r\\\\n\\\\r\\\\n MarketingCampaignGoal\\\\r\\\\n Marketing campaign objective (Retention, Acquisition)\\\\r\\\\n\\\\r\\\\n Category\\\\r\\\\n Product or content category (e.g., electronics, fashion).\\\\r\\\\n\\\\r\\\\n Device\\\\r\\\\n Type of device used (e.g., mobile, desktop, tablet).\\\\r\\\\n\\\\r\\\\n Os\\\\r\\\\n Operating system of the device (e.g., iOS, Android, Windows).\\\\r\\\\n\\\\r\\\\n AdChannel\\\\r\\\\n Specific advertising channel (e.g., programmatic, direct).\\\\r\\\\n\\\\r\\\\n AdSocialNetwork\\\\r\\\\n Social media platform used (e.g., Facebook, TikTok).\\\\r\\\\n\\\\r\\\\n Ad\\\\r\\\\n A creative\\\\r\\\\n\\\\r\\\\n Coupon\\\\r\\\\n A creative coupon\\\\r\\\\n\\\\r\\\\n AdFormat\\\\r\\\\n Format of the ad (e.g., banner, interstitial, carousel).\\\\r\\\\n\\\\r\\\\n DisplaySize\\\\r\\\\n Size of the display area for the ad.\\\\r\\\\n\\\\r\\\\n VideoPlacement\\\\r\\\\n Placement type for video ads (e.g., in-stream, out-stream).\\\\r\\\\n\\\\r\\\\n VideoPlaybackMethod\\\\r\\\\n How the video was played (e.g., autoplay, click-to-play).\\\\r\\\\n\\\\r\\\\n VideoPlayerSize\\\\r\\\\n Dimensions of the video player.\\\\r\\\\n\\\\r\\\\n VideoDurationInSeconds\\\\r\\\\n Length of the video ad.\\\\r\\\\n\\\\r\\\\n VideoPlayerRatio\\\\r\\\\n Aspect ratio of the video player (e.g., 16:9).\\\\r\\\\n\\\\r\\\\n Ssp\\\\r\\\\n Supply Side Partner. The publishing network where displays were made.\\\\r\\\\n\\\\r\\\\n Country\\\\r\\\\n Country where the ad was served.\\\\r\\\\n\\\\r\\\\n Region\\\\r\\\\n Region or state within the country.\\\\r\\\\n\\\\r\\\\n PostalCode\\\\r\\\\n Postal or ZIP code.\\\\r\\\\n\\\\r\\\\n UserBehavior\\\\r\\\\n Behavioral segment of the user (e.g., frequent buyer).\\\\r\\\\n\\\",\\n \\\"type\\\": \\\"string\\\",\\n \\\"enum\\\": [\\n \\\"Advertiser\\\",\\n \\\"MarketingCampaign\\\",\\n \\\"Campaign\\\",\\n \\\"MediaType\\\",\\n \\\"MarketingCampaignGoal\\\",\\n \\\"Category\\\",\\n \\\"Device\\\",\\n \\\"Os\\\",\\n \\\"AdChannel\\\",\\n \\\"AdSocialNetwork\\\",\\n \\\"Ad\\\",\\n \\\"Coupon\\\",\\n \\\"AdFormat\\\",\\n \\\"DisplaySize\\\",\\n \\\"VideoPlacement\\\",\\n \\\"VideoPlaybackMethod\\\",\\n \\\"VideoPlayerSize\\\",\\n \\\"VideoDurationInSeconds\\\",\\n \\\"VideoPlayerRatio\\\",\\n \\\"Ssp\\\",\\n \\\"Country\\\",\\n \\\"Region\\\",\\n \\\"PostalCode\\\",\\n \\\"UserBehavior\\\"\\n ]\\n },\\n \\\"value\\\": {\\n \\\"type\\\": \\\"string\\\"\\n }\\n },\\n \\\"required\\\": [\\n \\\"dimension\\\",\\n \\\"value\\\"\\n ]\\n },\\n \\\"default\\\": null\\n }\\n },\\n \\\"required\\\": [\\n \\\"filters\\\"\\n ]\\n }\\n },\\n {\\n \\\"type\\\": \\\"function\\\",\\n \\\"name\\\": \\\"final_result\\\",\\n \\\"description\\\": \\\"The final response which ends this conversation. ALWAYS use this tool to return your answer.\\\",\\n \\\"parameters\\\": {\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"input\\\": {\\n \\\"description\\\": \\\"Represents the response generated by an agent after processing a user request.\\\\r\\\\nAny tables and graphs will be generated using data from the internal conversation state.\\\\r\\\\n\\\\r\\\\nThere is no need to explicitly pass the tabular data from any tool as contents of the\\\\r\\\\n\\\\u0060comment\\\\u0060 property. Thus, never generate a markdown table as part of the \\\\u0060comment\\\\u0060 field.\\\\r\\\\n\\\\r\\\\nFields:\\\\r\\\\n comment:\\\\r\\\\n A textual response generated by the agent, adhering to the instructions provided in the conversation\\\\r\\\\n\\\\r\\\\n response_status:\\\\r\\\\n A classification of the response outcome, indicating how the agent handled the request.\\\\r\\\\n follow_up_questions:\\\\r\\\\n A short list of 2\\\\u20133 suggestions for further exploration of the data.\\\",\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"comment\\\": {\\n \\\"description\\\": \\\"A structured explanation accompanying the agent\\\\u0027s response.\\\\r\\\\n\\\\r\\\\nIf the agent successfully answered the question:\\\\r\\\\n- Provides a **summary** of the result.\\\\r\\\\n- Offers a **brief explanation** of key concepts or logic used.\\\\r\\\\n\\\\r\\\\nIf the agent failed to answer:\\\\r\\\\n- Describes the **problem encountered** (e.g., missing data, ambiguous query).\\\\r\\\\n- Explains the **reason for failure** to help the user understand what went wrong.\\\\r\\\\n\\\\r\\\\nNote:\\\\r\\\\nThis field should **never include the full requested data**.\\\\r\\\\nThat will be provided separately.\\\\r\\\\n\\\\r\\\\nExample:\\\\r\\\\nQuestion: What was the total spend for each campaign in May 2025?\\\\r\\\\n\\\\r\\\\nSummary: The total spend for all campaigns in May 2025 was 1,240,391.25.\\\\r\\\\n\\\\r\\\\nExplanation: \\\\u0027Spend\\\\u0027 or \\\\u0027Cost\\\\u0027 refers to the total amount of money invested\\\\r\\\\nin an advertising campaign during a specified period.\\\\r\\\\nIt\\\\u0027s a direct measure of your advertising expenditure.\\\",\\n \\\"type\\\": \\\"string\\\"\\n },\\n \\\"response_status\\\": {\\n \\\"description\\\": \\\" Enumerates the possible outcomes of an agent\\\\u0027s response.\\\\r\\\\n\\\\r\\\\n Glossary:\\\\r\\\\n Success\\\\r\\\\n The agent successfully processed the request and returned a valid response.\\\\r\\\\n\\\\r\\\\n OutOfScope\\\\r\\\\n The request falls outside the agent\\\\u0027s capabilities or domain of knowledge.\\\\r\\\\n\\\\r\\\\n NeedsFeedback\\\\r\\\\n The agent requires additional information or clarification from the user to proceed.\\\\r\\\\n\\\\r\\\\n NoDataFound\\\\r\\\\n The tool call did not return any data.\\\\r\\\\n\\\\r\\\\n Forbidden\\\\r\\\\n The user is not authorized to access the requested information or perform the requested action.\\\\r\\\\n\\\\r\\\\n InvalidDates\\\\r\\\\n From and to Dates must not overlap or be in the future\\\\r\\\\n\\\\r\\\\n Unknown\\\\r\\\\n The response could not be classified into any known category, possibly due to unexpected behavior.\\\",\\n \\\"type\\\": \\\"string\\\",\\n \\\"enum\\\": [\\n \\\"Success\\\",\\n \\\"OutOfScope\\\",\\n \\\"NeedsFeedback\\\",\\n \\\"NoDataFound\\\",\\n \\\"Forbidden\\\",\\n \\\"InvalidDates\\\",\\n \\\"Unknown\\\"\\n ]\\n },\\n \\\"follow_up_questions\\\": {\\n \\\"description\\\": \\\"Include 2\\\\u20133 suggestions for further exploration of the data.\\\\r\\\\n\\\\r\\\\nSuggestions must be directly relevant to the user\\\\u2019s last query and any provided data context.\\\\r\\\\nEach suggestion must be concise (\\\\u2264 8 words).\\\\r\\\\nDo not use vague or broad terms like \\\\u201Cshow more data\\\\u201D or \\\\u201Cexplore further.\\\\u201D\\\\r\\\\nDo not include multiple options in one suggestion (e.g., \\\\u201Cchange date or campaign\\\\u201D is not allowed).\\\\r\\\\nSuggestions must focus on changing a single parameter that can be used to query data:\\\\r\\\\nDate range (e.g., last 7 days, Q1 2025)\\\\r\\\\nTime aggregation (e.g., daily, weekly, monthly)\\\\r\\\\nMetrics (e.g., CTR, ROAS, CPC)\\\\r\\\\nCampaigns or AdGroups (specific names or IDs)\\\\r\\\\nAttribution model (e.g., 7-day click, 30-day view)\\\\r\\\\nBreakdowns (e.g., by country, device, region)\\\\r\\\\nBe explicit about the parameter and value:\\\\r\\\\nDO PROPOSE: \\\\u201CChange date range to last month\\\\u201D\\\\r\\\\nDO NOT PROPOSE: \\\\u201CUse a different date range\\\\u201D\\\\r\\\\nDo not include optimization advice, strategy, or interpretation (e.g., \\\\u201CHow to improve performance\\\\u201D is forbidden).\\\\r\\\\nSuggestions must be actionable queries, not opinions or summaries.\\\\r\\\\nAvoid repeating the same dimension unless the value changes meaningfully.\\\\r\\\\n\\\\r\\\\n## Allowed follow-up Questions Examples\\\\r\\\\nChange date range to last month.\\\\r\\\\nAggregate data by campaign.\\\\r\\\\nCompare CTR across campaigns.\\\\r\\\\nBreak down by country.\\\\r\\\\nUse 7-day click attribution model.\\\\r\\\\n\\\\r\\\\n## Not Allowed follow-up Questions Examples\\\\r\\\\nShow more insights.\\\\r\\\\nExplore other opportunities.\\\\r\\\\nWhat should I change?\\\\r\\\\nAny suggestions for optimization?\\\\r\\\\nGeneral advice or interpretation.\\\",\\n \\\"type\\\": \\\"array\\\",\\n \\\"items\\\": {\\n \\\"type\\\": \\\"string\\\"\\n }\\n }\\n },\\n \\\"required\\\": [\\n \\\"comment\\\",\\n \\\"response_status\\\",\\n \\\"follow_up_questions\\\"\\n ]\\n }\\n },\\n \\\"required\\\": [\\n \\\"input\\\"\\n ]\\n }\\n }\\n]\",\"clientId\":\"22291\",\"date\":\"03/09/2026\",\"gen_ai.system_instructions\":\"[\\n {\\n \\\"type\\\": \\\"text\\\",\\n \\\"content\\\": \\\"You are an expert on statistical analysis for the adtech company ExampleAds.\\\\nYour goal is to provide marketing statistics from ExampleAds users' ongoing ad campaigns, along with their full context.\\\\n\\\\n# Information\\\\n\\\\n- today is 2026-03-09\\\\n- The default sales attribution model is 30 day post-click unless otherwise specified by the user.\\\\n- The default time zone is Europe/London unless otherwise specified by the user.\\\\n- The default currency is EUR unless otherwise specified by the user.\\\\n\\\\n# Conversation instructions\\\\n\\\\nNever make up data that the user asks for. You must use the provided tools to retrieve data.\\\\n\\\\nAlways respond in a clear, professional, and conversational manner. Confirm your understanding of user intent, especially for complex requests.\\\\n\\\\nIf you do not understand a user request do both, say `I’m not quite sure what you mean. To provide you with data-driven insights from your campaigns, please let me know which campaign or metric you'd like me to report on.` and also use response_status `OutOfScope`.\\\\n\\\\nIf a user requests any form of data visualization (e.g., `show me a line chart`, `display this data in a graph`, `create a plot`, ...), respond with: `I can provide you with the requested data and its full context, but I have no latitude on its graphical representation.`\\\\nDo not attempt to create charts, graphs, or any other visualizations under any circumstances.\\\\n\\\\nIf the user provides partial information use the default values as much as possible to call the tool. Ask clarifying questions only if strictly necessary. If you ask clarifying questions, use response_status `NeedsFeedback` but only if you haven't already used `OutOfScope` or `NoDataFound`.\\\\n\\\\n## Glossary\\\\n\\\\nHere are some common terms that you might encounter.\\\\n\\\\n- QBR - Quarterly Business Review. A strategic review with the client every quarter.\\\\n- WBR - Weekly Business Review. Operational checkpoints to review weekly performance.\\\\n- MBR - Monthly Business Review. Middle-ground between WBR and QBR.\\\\n- EOW - End of week\\\\n- EOM - End of Month\\\\n- HBR - Half-Yearly Business Review\\\\n- ABR - Annual Business Review\\\\n- QOP / Quarterly Operating Plan Review - Review of operational KPIs every quarter\\\\n- OKRs - Objectives and Key Results\\\\n- BPS / Basis Points - Used to discuss changes in percentage points (100 bps = 1%)\\\\n- YOY - Year-over-year\\\\n- WOW - Week-over-week\\\\n- MOM - Month-over-month\\\\n- Spend Pacing - Whether the campaign is on track to spend budget\\\\n- Underpacing / Overpacing - Spending slower/faster than the plan\\\\n- Budget Fluidity - Willingness of client to move budgets between channels\\\\n\\\\nUnless otherwise specified, when a user is asking about a business review (QBR, WBR, MBR, HBR, ABR) assume that sales-related metrics are important to the user: cost, sales, ROAS; and that the user wants this information by ad set.\\\\n\\\\n## Tool Response\\\\n\\\\nIf a tool responds with a response_status `Retry`. Follow the instructions in `message` and RETRY without asking.\\\\nIf a tool responds with a response_status `DuplicateToolCall`. ALWAYS Move to the next step of your execution plan. You already received the data from the tool.\\\\n\\\\n## Agent Response Guidelines\\\\n\\\\nALWAYS use the 'final_result' tool to communicate your final answer to the user.\\\\nProvide as concise an answer as possible. Follow these guidelines:\\\\n\\\\n### If the agent successfully answered the question:\\\\n- Include a **summary** of the result.\\\\n- Expose the **parameters** (date range, time zone, attribution model, currency) used to call get_custom_report if it was called.\\\\n\\\\n### If the agent failed to answer:\\\\n- Describe the **problem encountered** (e.g., missing data, ambiguous query).\\\\n- Explain the **reason for failure** to help the user understand what went wrong.\\\\n\\\\n### Important:\\\\n- **Never include the full requested data** in the comment.\\\\n- The data will be provided to the user separately.\\\\n- Never call get_custom_report twice with different date ranges. Use previous_period_from_date instead\\\\n- Explain adtech terms as needed, and adapt detail level to the user’s query, responses and expertise.\\\\n\\\\n## Tool Response Examples\\\\n\\\\n**Question**: What was the total spend for each campaign in May 2025?\\\\n\\\\n**Response**:\\\\n\\\\n> ### Summary\\\\n> The total spend for all campaigns in May 2025 was 1,240,391.25.\\\\n>\\\\n> ### Parameters\\\\n> - Data was computed from 2025-05-01 to 2025-05-31 with time zone Europe/London.\\\\n> - Attribution model chosen is 30-Day Post Click\\\\n> - currency: EUR\\\\n\\\\n**Question:** list my adsets optimized for conversion\\\\n\\\\n**Response:**\\\\n\\\\n> ### Summary\\\\n> You have actually 6 adsets optimized for conversion. 2 of them are currently active.\\\\n\\\\n# DATA PRIVACY AND LEGAL REQUIREMENTS\\\\n\\\\n- Conduct: Enforce ExampleAds Advertising, Supply Partner, and Privacy Guidelines. Promote ethical, compliant, effective advertising.\\\\n- If you reject based on those criteria set final_result.response_status to Forbidden\\\\n\\\\nEnforcement\\\\n1) Prohibited - Reject:\\\\n\\\\nHarassment/hate/discrimination; adult/sexual services/suggestive; deceptive/misleading/fraud/predatory; illegal drugs/paraphernalia; firearms/weapons/explosives/fireworks; shocking/violent/obscene/disturbing; counterfeit/piracy/IP violations; affairs/escorting/prostitution/mail-order brides; malware/spyware/forced downloads/harmful code; targeting children under the age of consent.\\\\nResponse: \\\\\\\"I can't fulfil this request because it involves prohibited advertising content under ExampleAds's guidelines.\\\\\\\"\\\\n\\\\n2) Restricted - approval required\\\\n\\\\nOnly in authorized regions with explicit approval: online pharmacies/healthcare/prescription drugs/sexual enhancers/weight loss; alcohol/tobacco/vaping/e-cigs; gambling/lotteries/sports betting/fantasy sports; financial services/insurance/investments; psychics/astrology/occult.\\\\nResponse: \\\\\\\"This request falls into a restricted category and can only be fulfilled with prior approval from ExampleAds and in permitted countries.\\\\\\\"\\\\n\\\\n3) Privacy - reject if non-compliant\\\\n\\\\nComply with GDPR, CCPA, LGPD, and applicable laws. Reject: targeting/reporting on protected traits; any PII misuse; children's data or targeting under age of consent; data use without valid, informed, freely given, unambiguous consent (no pre-ticked boxes, continued browsing, or ambiguous consent); individual-level reporting (aggregates only).\\\\nResponse: \\\\\\\"I can't fulfil this request because it doesn't comply with privacy and data protection requirements. Please adjust your request to respect user consent and data protection laws.\\\\\\\"\\\\n\\\\n- Never speculate or provide unsupported data. Only reference ExampleAds-approved sources for documentation or support.\\\\n- If handling sensitive data, follow ExampleAds data privacy guidelines at all times.\\\\n- Refuse to create audiences, give insights, or give recommendations for any request including the following content:\\\\n - Harmful: harassment, hate speech, shocking, violent, or offensive content.\\\\n - Sexual or deceptive: adult or pornographic content, infidelity/prostitution, misleading or fraudulent claims.\\\\n - Illegal or dangerous: drugs (including marijuana), weapons, explosives or fireworks, malware or hacking, dishonest or predatory products.\\\\n - IP violations: counterfeits, piracy, unauthorized use of likeness.\\\\n - Protected traits: race, ethnicity, religion or belief, gender, age, sexual orientation or interest, health data, personal identifying information, political opinions, trade union membership, biometric or genetic data, criminal history, financial status.\\\\n - Children: no targeting under the legal consent age or children's sites. Only broad, legally compliant age ranges may be used.\\\\n- Never use proxies or inferred traits for any protected characteristic.\\\\n\\\"\\n }\\n]\",\"gen_ai.response.finish_reasons\":\"[\\\"stop\\\"]\",\"gen_ai.response.id\":\"W7yuaY2AEraSitQP4-GckQ4\",\"gen_ai.response.model\":\"gemini-2.5-flash\",\"gen_ai.usage.input_tokens\":\"3004\",\"gen_ai.usage.output_tokens\":\"167\",\"host.ip\":\"10.0.0.1\",\"host.name\":\"kube-worker0001.kubes01.dc1.preprod.exampleads.internal\",\"deployment.environment.name\":\"preprod\",\"exampleads.service.pool\":\"default\",\"exampleads.dc\":\"da1\",\"service.version\":\"100000\",\"service.instance.id\":\"INST01\"},\"resourceAttributes\":{\"deployment.environment.name\":\"preprod\",\"service.name\":\"agentic-demo-insights\",\"service.version\":\"100000\",\"service.instance.id\":\"INST01\"},\"scope\":{\"name\":\"Experimental.Microsoft.Extensions.AI\",\"version\":\"\",\"attributes\":{}}}","internalModel": "cmcnjkfwn000107l43bf5e8ax"},{@@ -459,11 +459,11 @@"name": "chat gemini-2.5-flash","level": "DEFAULT","statusMessage": null,- "version": "105537",+ "version": "100000","createdAt": "2026-03-09T12:26:02.752Z","updatedAt": "2026-03-09T12:26:02.752Z","input": "[\n {\n \"role\": \"user\",\n \"parts\": [\n {\n \"type\": \"text\",\n \"content\": \"What are my month over month performance insights the past quarter, by cost, displays, clicks, CTR, sales, CVR? Please split by campaign taxonomy\"\n }\n ]\n }\n]",- "output": "[\n {\n \"role\": \"assistant\",\n \"parts\": [\n {\n \"type\": \"tool_call\",\n \"id\": \"get_custom_report\",\n \"name\": \"get_custom_report\",\n \"arguments\": {\n \"dimensions\": [\n \"Campaign\"\n ],\n \"filters\": {\n \"dateRange\": {\n \"from_date\": \"2025-10-01\",\n \"to_date\": \"2025-12-31\"\n }\n },\n \"timeDimension\": \"Month\",\n \"metrics\": [\n \"Cost\",\n \"Displays\",\n \"Clicks\",\n \"Ctr\",\n \"Sales\",\n \"Cvr\"\n ]\n }\n },\n {\n \"type\": \"Microsoft.Extensions.AI.TextReasoningContent\",\n \"content\": {\n \"text\": \"\",\n \"protectedData\": \"CooKAY89a1+CDPFO/TMZiXeenaPLkZSQA1LTxbQ7KmbinWe/uwbMou6HLwBeN20ZvZ+7QHhxpopqxYuZugBc3x3GariQWXjIh9esj8BB+ufQmBPUKMGRmM3tSqw0KqQ/TlEqq81dTM6leDfHUfiAfSa45iC4IUVWHtrD9ZXtN6O6HxdxN+/zf5tU3rS1zIKAsDev2nqR2tAYqG9FVtnC4Y//05fVMFq9BQjxlsfYhFn+pMIAnH9/GjM5iIzbg3eqH6EDqIuRHIT+Bg/8+bXd9PPgHKXZlcu/9aaQsOHbh9+8eSOfZgzzZ1wRHYAcj9i5fdnlK3UfKYTBoaXdPoqOc7mVteUKELYSY4xyh0Dzbp/27qTBPG1pgFuoxJV9NDi7zJiMby0HfRRVcL/kpI7z5Vxg3rSCMvlNFQHxVvglsDCoiQAph9373SSUKUvh2LgfclHi/nxcZOhKNpds/SFXj3cjZUi5NpFT/O2qhBat27ztbMpoL2j/aYrQ5HDxE+yJOLgUyeO3LoS+xw1eTsUcGTNb73T2g3RexvR+CuP5JqpFYX9oxU7A/98+DP7UaXSeV1cxHCGWShSvwTMDixO75AMhNspXiYa1ZiFOBmyWhOU4Mdqimh4uNXRmx3SVm8/XIkidZq0ffqXqRyPkN1TI9/Q6Uuy19QMbQZxLHdLYd9cXQCoNvYEYr1X76pHA3UVRnz2hors/vTmAvZqdGYI/42gWKNy5kntAVssG0UOTkrt7cMgW2pZNFTe3aMVvZL5cTuI+ssfxrtl7YqpopDexX1b0szixtkt0O69r1kl8W0ubJ2/YdcJ5NjC2AMaFSceYrU57tbupvBx4UXuOxhIUEX6N3Ce2ctEw1rBm82PabYFnjMs3Jm9jWt9MDXkX4yTVjwoEYFY9ID9DvevwB0C0oWF4NFVLGL6PUFbHwMyBhbab2Py11xfn8HHWokguKc9fsbBOJNnMcRW9zHpiGyYE9bQNbEvanqg12zGMXgRKA5YJgItmt4drDAaWT6TF+GxpBFNNhn6dStlOH/gpv1/VXZ4+lX4+KSgYyNu+NQi+zWJesvDYesooB2lhJfO0+Cvp0ogs++/TmPpQk6MJBF4nblugcfdXe5sd5wMf8ggmzgRRyuOHMhnyf/YPPLHP4cZPjxTtZ1yIYq4VJNlrvn7bTEhbWq3CubPaR8srZHyr9GlPTryxK7Gpi87uFlZdKa6rl0OSwSa+DatBcmPlXymdSbWc7+83mYSQtoLKlKkGESyqfYOmUQv89bx8UbBy8+BrKOlGbK9buQCTii560lj1IqV/IWH4QZ+NUp9KgU5HIKGw5LukDkK1ieWCiKWcQRYOor1oo3GXu6k0OTG01e+bCAvVoIeiZyPFtP5C3Q/wwyYZKZrLWNCg2SJOuIs2xTgidX0lzJY3XUAcTKAUP9xWYG8OLtm/ihzKxVP/rJbWfbir9ORnSqgJfzdXx0bhYzsOB3A0lUMfAGzRF4o4euym8IXMamJGt6xxxX4+prIFQ5G7ktVHhz23WlU6k4BdsaFoHmCu/xmGDsVhhyU1EG9wAbR7MwM5OgdQO9+C6m0tn1W1QzygSvyrDCBhmefwoU7AzZT7wR4WzNrpZefBV1EhDEp4lbRbSNnF85+0jlXcVrBhFeHENd5t9SFy7utTxdNEtBV6rBdvHf3Il6/Q9+mpUkXk8oFqfDHjfm8iubt5vBxYGlQqYGaXxsOVP7/B\"\n }\n }\n ],\n \"finish_reason\": \"stop\"\n }\n]",+ "output": "[\n {\n \"role\": \"assistant\",\n \"parts\": [\n {\n \"type\": \"tool_call\",\n \"id\": \"get_custom_report\",\n \"name\": \"get_custom_report\",\n \"arguments\": {\n \"dimensions\": [\n \"Campaign\"\n ],\n \"filters\": {\n \"dateRange\": {\n \"from_date\": \"2025-10-01\",\n \"to_date\": \"2025-12-31\"\n }\n },\n \"timeDimension\": \"Month\",\n \"metrics\": [\n \"Cost\",\n \"Displays\",\n \"Clicks\",\n \"Ctr\",\n \"Sales\",\n \"Cvr\"\n ]\n }\n },\n {\n \"type\": \"Microsoft.Extensions.AI.TextReasoningContent\",\n \"content\": {\n \"text\": \"\",\n \"protectedData\": \"anonymized-encrypted-reasoning\"\n }\n }\n ],\n \"finish_reason\": \"stop\"\n }\n]","model": "gemini-2.5-flash","internalModelId": "cmcnjkfwn000107l43bf5e8ax","modelParameters": {@@ -498,7 +498,7 @@"toolDefinitions": {},"toolCalls": [],"toolCallNames": [],- "metadata": "{\"attributes\":{\"otel.exception_pointers\":\"94867131908120\",\"gen_ai.operation.name\":\"chat\",\"gen_ai.request.model\":\"gemini-2.5-flash\",\"gen_ai.provider.name\":\"gcp.vertex_ai\",\"server.address\":\"aiplatform.googleapis.com\",\"server.port\":\"443\",\"gen_ai.request.seed\":\"42\",\"gen_ai.request.temperature\":\"0\",\"gen_ai.tool.definitions\":\"[\\n {\\n \\\"type\\\": \\\"function\\\",\\n \\\"name\\\": \\\"get_adset_infos\\\",\\n \\\"description\\\": \\\"Retrieves all ad sets matching conditions set in the filter (also referred to as campaigns)\\\\r\\\\nThis method should be called by the agent whenever\\\\r\\\\nit needs information about one or more ad sets.\\\\r\\\\nIt provides a comprehensive list of ad sets with key metadata and status fields.\\\\r\\\\n\\\\r\\\\nReturns:\\\\r\\\\n-------\\\\r\\\\nResponse\\\\r\\\\n An object containing data with the following information for each ad set:\\\\r\\\\n - id: The unique identifier of the ad set (also called Campaign ID).\\\\r\\\\n - name: The name of the ad set.\\\\r\\\\n - advertiserId: The ID of the advertiser that owns this ad set.\\\\r\\\\n - objective (MarketingObjective): The marketing objective associated with the ad set: Acquisition or Retention.\\\\r\\\\n - startDate: The start date of the ad set, if specified.\\\\r\\\\n - activationStatus: Indicates whether the ad set is currently active: Activated or NotActivated\\\\r\\\\n - deliveryStatus: Describes the current delivery state of the ad set: Running, Archived or NotRunning\\\\r\\\\n\\\\r\\\\nNotes:\\\\r\\\\n-----\\\\r\\\\nUse this method as the primary source for retrieving ad set (campaign) information.\\\",\\n \\\"parameters\\\": {\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"filter\\\": {\\n \\\"description\\\": \\\"The filters applied for selecting the ad_sets\\\",\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"adset_ids\\\": {\\n \\\"type\\\": [\\n \\\"array\\\",\\n \\\"null\\\"\\n ],\\n \\\"items\\\": {\\n \\\"type\\\": \\\"integer\\\"\\n }\\n },\\n \\\"names\\\": {\\n \\\"type\\\": [\\n \\\"array\\\",\\n \\\"null\\\"\\n ],\\n \\\"items\\\": {\\n \\\"type\\\": \\\"string\\\"\\n }\\n },\\n \\\"activation_statuses\\\": {\\n \\\"type\\\": [\\n \\\"array\\\",\\n \\\"null\\\"\\n ],\\n \\\"items\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"enum\\\": [\\n \\\"NotActivated\\\",\\n \\\"Activated\\\"\\n ]\\n }\\n },\\n \\\"objectives\\\": {\\n \\\"type\\\": [\\n \\\"array\\\",\\n \\\"null\\\"\\n ],\\n \\\"items\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"enum\\\": [\\n \\\"NotSet\\\",\\n \\\"Acquisition\\\",\\n \\\"Retention\\\"\\n ]\\n }\\n },\\n \\\"delivery_statuses\\\": {\\n \\\"type\\\": [\\n \\\"array\\\",\\n \\\"null\\\"\\n ],\\n \\\"items\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"enum\\\": [\\n \\\"Running\\\",\\n \\\"Archived\\\",\\n \\\"NotRunning\\\"\\n ]\\n }\\n }\\n }\\n }\\n },\\n \\\"required\\\": [\\n \\\"filter\\\"\\n ]\\n }\\n },\\n {\\n \\\"type\\\": \\\"function\\\",\\n \\\"name\\\": \\\"get_custom_report\\\",\\n \\\"description\\\": \\\"Calls the API to retrieve client data.\\\\r\\\\n\\\\r\\\\nArgs:\\\\r\\\\n filters: An object containing the built-in filters.\\\\r\\\\n Default values are provided if needed.\\\\r\\\\n timeDimension: Time-based dimension for data projections; specifies the granularity at which data will be grouped.\\\\r\\\\n Possible values and examples:\\\\r\\\\n - None: Indicates that the user has not provided any clear time dimension.\\\\r\\\\n This should be selected when there is no explicit instruction.\\\\r\\\\n Do NOT infer or assume a value; use None unless the user specifies otherwise.\\\\r\\\\n - Year: Represents a calendar year.\\\\r\\\\n Examples: per year, by year, year-over-year comparisons (YoY), yearly trend analysis.\\\\r\\\\n - Month: Represents a calendar month.\\\\r\\\\n Examples: per month, by month, month-over-month comparisons (MoM), monthly performance reports.\\\\r\\\\n - Week: Represents a calendar week.\\\\r\\\\n Examples: per week, by week, week-over-week comparisons (WoW), weekly campaign summaries.\\\\r\\\\n - Day: Represents a calendar day.\\\\r\\\\n Examples: per day, by day, day-over-day comparisons (DoD), daily performance tracking.\\\\r\\\\n - Hour: Represents an hour within a day.\\\\r\\\\n Examples: per hour, by hour, hourly trend analysis, intraday performance monitoring.\\\\r\\\\n dimensions: A list of dimensions that define the granularity of the report.\\\\r\\\\n Example: [os, device]\\\\r\\\\n metrics: A list of performance indicators to retrieve.\\\\r\\\\n Example: [clicks, ctr]\\\\r\\\\n attributionModel: Specifies the model used to measure sales.\\\\r\\\\n Optional.\\\\r\\\\n additionalFilters: Custom filters applied to the data.\\\\r\\\\n CRITICAL CONSTRAINT: Every dimension used in \\\\u0060additionalFilters\\\\u0060 MUST be present in the \\\\u0060dimensions\\\\u0060 list.\\\\r\\\\n If a filter references a dimension not included in \\\\u0060dimensions\\\\u0060, the request will be rejected.\\\\r\\\\n\\\\r\\\\nNotes:\\\\r\\\\n - Dimensions determine the level of detail in the report.\\\\r\\\\n - Metrics represent the KPIs to monitor campaign performance.\\\\r\\\\n - Filters restrict the dataset retrieved from the API.\\\\r\\\\n - \\\\u0060additionalFilters\\\\u0060 allow for extra filtering, but only on dimensions explicitly listed in \\\\u0060dimensions\\\\u0060.\\\",\\n \\\"parameters\\\": {\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"filters\\\": {\\n \\\"description\\\": \\\"Filters are a way to narrow the scope of the report by setting certain values.\\\\r\\\\nIf no value can be inferred, a default one will be provided.\\\",\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"clientIds\\\": {\\n \\\"type\\\": \\\"array\\\",\\n \\\"items\\\": {\\n \\\"type\\\": \\\"integer\\\"\\n }\\n },\\n \\\"dateRange\\\": {\\n \\\"description\\\": \\\"Date range between two dates.\\\\r\\\\nIMPORTANT: from_date and to_date are inclusive (the start and end dates are included in the period).\\\\r\\\\n\\\\r\\\\nIf dates are not given explicitly, they can be deduced as follows:\\\\r\\\\n\\\\r\\\\n- IMPORTANT: Last n days: from = today - n days, to = yesterday (inclusive, does not include today)\\\\r\\\\n Example: if today is 2025-08-23 then \\\\u0022last 7 days\\\\u0022: 2025-08-16 to 2025-08-22 (inclusive, 7 days)\\\\r\\\\n Example: if today is 2025-08-10 then \\\\u0022last 20 days\\\\u0022: 2025-07-21 to 2025-08-09 (inclusive, 20 days)\\\\r\\\\n- Month of May 2025: from = 2025-05-01, to = 2025-05-31\\\\r\\\\n- IMPORTANT: Last week, the last full calendar week (Monday to Sunday) before the current Week:\\\\r\\\\n from = Monday of previous week\\\\r\\\\n to = Sunday of previous Week\\\\r\\\\n Example: if today is Tuesday, 2025-08-12 then \\\\u0022last week\\\\u0022 is Monday 2025-08-04 to Sunday 2025-08-10\\\\r\\\\n Example: if today is Monday, 2025-09-15 then \\\\u0022last week\\\\u0022 is Monday 2025-08-14 to Sunday 2025-08-14\\\\r\\\\n- IMPORTANT: Last n weeks, the last n full calendar weeks (Monday to Sunday) before the current Week.\\\\r\\\\n n is the number of weeks.\\\\r\\\\n from = Monday of n weeks ago\\\\r\\\\n to = Sunday of previous Week\\\\r\\\\n Example: if today is Friday, 2025-08-22 then \\\\u0022last 2 weeks\\\\u0022 is\\\\r\\\\n Monday 2025-08-04 to Sunday 2025-08-17\\\\r\\\\n n is 2\\\\r\\\\n Example: if today is Monday, 2025-07-21 then \\\\u0022last 3 weeks\\\\u0022 is\\\\r\\\\n Monday 2025-06-30 to Sunday 2025-07-20\\\\r\\\\n n is 3\\\\r\\\\n- IMPORTANT: Last month, the last full calendar month before the current month.\\\\r\\\\n from = first day of previous month\\\\r\\\\n to = last day of previous month\\\\r\\\\n Example: if today is Tuesday, 2025-08-19 then \\\\u0022last month\\\\u0022 is 2025-07-01 to 2025-07-31\\\\r\\\\n- IMPORTANT: Last n months, the last n full calendar months before the current month.\\\\r\\\\n n is the number of months.\\\\r\\\\n from = first day of the month n months ago\\\\r\\\\n to = last day of previous month\\\\r\\\\n Example: if today is Monday, 2025-08-19 then \\\\u0022last 3 months\\\\u0022 is 2025-05-01 to 2025-07-31\\\\r\\\\n n is 3\\\\r\\\\n- Last quarter: the last full quarter before the current quarter.\\\\r\\\\n Q1: January 1 to March 31\\\\r\\\\n Q2: April 1 to June 30\\\\r\\\\n Q3: July 1 to September 30\\\\r\\\\n Q4: October 1 to December 31\\\\r\\\\n\\\\r\\\\n\\\\r\\\\ntime_zone is the IANA time zone name (e.g., \\\\u0022Europe/London\\\\u0022, \\\\u0022America/New_York\\\\u0022).\\\\r\\\\nBy default, assume that we are in the Europe/London time zone.\\\\r\\\\n\\\\r\\\\nThe field previous_period_from_date is used to define the starting date of a previous period\\\\r\\\\nthat mirrors the current data collection range.\\\\r\\\\nThis allows for comparative analysis between the current period and a similar past period.\\\\r\\\\n\\\\r\\\\nUse the following guidelines and examples to determine the correct value:\\\\r\\\\n\\\\r\\\\nGeneral Rule:\\\\r\\\\nprevious_period_from_date should be set to a date that starts the previous comparable period\\\\r\\\\nthe previous period will have the same duration as the current one\\\\r\\\\nthe previous period and the current period MUST NOT overlap\\\\r\\\\n\\\\r\\\\n Examples:\\\\r\\\\n Relative Time Comparison\\\\r\\\\n If comparing to last year, and from_date = 2025-08-01, then:\\\\r\\\\n previous_period_from_date = 2024-08-01\\\\r\\\\n If comparing with the previous period, previous_period_start_date is calculated\\\\r\\\\n by subtracting the duration of the current date range from its starting date (from_date).\\\\r\\\\n This ensures the previous period has the same length and ends\\\\r\\\\n right before the current one begins.\\\\r\\\\n Example:\\\\r\\\\n Current range: from_date = 2025-08-10, to_date = 2025-08-19 (10 days including bounds),\\\\r\\\\n then: previous_period_start_date = 2025-07-31 (10 days before 2025-08-10)\\\\r\\\\n Custom Period Comparison\\\\r\\\\n If comparing to the period starting 2025-02-25, then:\\\\r\\\\n previous_period_from_date = 2025-02-25\\\\r\\\\n\\\",\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"from_date\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"format\\\": \\\"date\\\"\\n },\\n \\\"to_date\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"format\\\": \\\"date\\\"\\n },\\n \\\"time_zone\\\": {\\n \\\"type\\\": [\\n \\\"string\\\",\\n \\\"null\\\"\\n ]\\n },\\n \\\"previous_period_from_date\\\": {\\n \\\"type\\\": [\\n \\\"string\\\",\\n \\\"null\\\"\\n ],\\n \\\"format\\\": \\\"date\\\"\\n }\\n }\\n },\\n \\\"currency\\\": {\\n \\\"type\\\": \\\"string\\\"\\n },\\n \\\"campaignStatus\\\": {\\n \\\"type\\\": [\\n \\\"array\\\",\\n \\\"null\\\"\\n ],\\n \\\"items\\\": {\\n \\\"description\\\": \\\" Status of a campaign\\\\r\\\\n\\\\r\\\\n Glossary:\\\\r\\\\n Active\\\\r\\\\n Active, Running or Live\\\\r\\\\n NotRunning\\\\r\\\\n Not running\\\\r\\\\n Dead\\\\r\\\\n Archived\\\",\\n \\\"type\\\": \\\"string\\\",\\n \\\"enum\\\": [\\n \\\"Active\\\",\\n \\\"NotRunning\\\",\\n \\\"Dead\\\"\\n ]\\n }\\n },\\n \\\"mediaType\\\": {\\n \\\"type\\\": [\\n \\\"array\\\",\\n \\\"null\\\"\\n ],\\n \\\"items\\\": {\\n \\\"description\\\": \\\" Type of media used. video or display.\\\\r\\\\n\\\\r\\\\n Glossary:\\\\r\\\\n Display\\\\r\\\\n HTML display\\\\r\\\\n\\\\r\\\\n Video\\\\r\\\\n Video display\\\",\\n \\\"type\\\": \\\"string\\\",\\n \\\"enum\\\": [\\n \\\"Display\\\",\\n \\\"Video\\\"\\n ]\\n }\\n },\\n \\\"marketingCampaignGoals\\\": {\\n \\\"type\\\": [\\n \\\"array\\\",\\n \\\"null\\\"\\n ],\\n \\\"items\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"enum\\\": [\\n \\\"NotSet\\\",\\n \\\"Acquisition\\\",\\n \\\"Retention\\\"\\n ]\\n }\\n },\\n \\\"campaigns\\\": {\\n \\\"type\\\": [\\n \\\"array\\\",\\n \\\"null\\\"\\n ],\\n \\\"items\\\": {\\n \\\"type\\\": \\\"integer\\\"\\n }\\n }\\n }\\n },\\n \\\"timeDimension\\\": {\\n \\\"description\\\": \\\"Defines the time-based dimensions available for data projections.\\\\r\\\\n\\\\r\\\\nEach enum member specifies the granularity at which data can be grouped or analyzed.\\\\r\\\\n\\\\r\\\\nMembers:\\\\r\\\\n None - Indicates that the user has not provided any clear time dimension.\\\\r\\\\n This should be selected when there is no explicit instruction.\\\\r\\\\n Do NOT infer or assume a value; use None unless the user specifies otherwise.\\\\r\\\\n Year - Represents a calendar year. For example per year, by year, year-over-year comparisons (YoY), yearly trend analysis.\\\\r\\\\n Month - Represents a calendar month. For example per month, by month, month-over-month comparisons (MoM), monthly performance reports.\\\\r\\\\n Week - Represents a calendar week. For example per week, by week, week-over-week comparisons (WoW), weekly campaign summaries.\\\\r\\\\n Day - Represents a calendar day. For example per day, by day, day-over-day comparisons (DoD), daily performance tracking.\\\\r\\\\n Hour - Represents an hour within a day. For example per hour, by hour, hourly trend analysis, intraday performance monitoring.\\\",\\n \\\"type\\\": \\\"string\\\",\\n \\\"enum\\\": [\\n \\\"None\\\",\\n \\\"Year\\\",\\n \\\"Month\\\",\\n \\\"Week\\\",\\n \\\"Day\\\",\\n \\\"Hour\\\"\\n ],\\n \\\"default\\\": \\\"None\\\"\\n },\\n \\\"dimensions\\\": {\\n \\\"type\\\": \\\"array\\\",\\n \\\"items\\\": {\\n \\\"description\\\": \\\" Enumeration of standardized dimensions used in online advertising projections.\\\\r\\\\n\\\\r\\\\n Each member represents a dimension or attribute commonly used in digital marketing analytics,\\\\r\\\\n campaign performance tracking, and audience segmentation.\\\\r\\\\n\\\\r\\\\n Glossary:\\\\r\\\\n Advertiser\\\\r\\\\n Name or entity running the ad campaign(s). Also called Client\\\\r\\\\n\\\\r\\\\n MarketingCampaign\\\\r\\\\n Full name of the marketing campaign. A group of ad sets.\\\\r\\\\n\\\\r\\\\n Campaign\\\\r\\\\n An ad set.\\\\r\\\\n\\\\r\\\\n MediaType\\\\r\\\\n Type of media used (e.g., video, display, native).\\\\r\\\\n\\\\r\\\\n MarketingCampaignGoal\\\\r\\\\n Marketing campaign objective (Retention, Acquisition)\\\\r\\\\n\\\\r\\\\n Category\\\\r\\\\n Product or content category (e.g., electronics, fashion).\\\\r\\\\n\\\\r\\\\n Device\\\\r\\\\n Type of device used (e.g., mobile, desktop, tablet).\\\\r\\\\n\\\\r\\\\n Os\\\\r\\\\n Operating system of the device (e.g., iOS, Android, Windows).\\\\r\\\\n\\\\r\\\\n AdChannel\\\\r\\\\n Specific advertising channel (e.g., programmatic, direct).\\\\r\\\\n\\\\r\\\\n AdSocialNetwork\\\\r\\\\n Social media platform used (e.g., Facebook, TikTok).\\\\r\\\\n\\\\r\\\\n Ad\\\\r\\\\n A creative\\\\r\\\\n\\\\r\\\\n Coupon\\\\r\\\\n A creative coupon\\\\r\\\\n\\\\r\\\\n AdFormat\\\\r\\\\n Format of the ad (e.g., banner, interstitial, carousel).\\\\r\\\\n\\\\r\\\\n DisplaySize\\\\r\\\\n Size of the display area for the ad.\\\\r\\\\n\\\\r\\\\n VideoPlacement\\\\r\\\\n Placement type for video ads (e.g., in-stream, out-stream).\\\\r\\\\n\\\\r\\\\n VideoPlaybackMethod\\\\r\\\\n How the video was played (e.g., autoplay, click-to-play).\\\\r\\\\n\\\\r\\\\n VideoPlayerSize\\\\r\\\\n Dimensions of the video player.\\\\r\\\\n\\\\r\\\\n VideoDurationInSeconds\\\\r\\\\n Length of the video ad.\\\\r\\\\n\\\\r\\\\n VideoPlayerRatio\\\\r\\\\n Aspect ratio of the video player (e.g., 16:9).\\\\r\\\\n\\\\r\\\\n Ssp\\\\r\\\\n Supply Side Partner. The publishing network where displays were made.\\\\r\\\\n\\\\r\\\\n Country\\\\r\\\\n Country where the ad was served.\\\\r\\\\n\\\\r\\\\n Region\\\\r\\\\n Region or state within the country.\\\\r\\\\n\\\\r\\\\n PostalCode\\\\r\\\\n Postal or ZIP code.\\\\r\\\\n\\\\r\\\\n UserBehavior\\\\r\\\\n Behavioral segment of the user (e.g., frequent buyer).\\\\r\\\\n\\\",\\n \\\"type\\\": \\\"string\\\",\\n \\\"enum\\\": [\\n \\\"Advertiser\\\",\\n \\\"MarketingCampaign\\\",\\n \\\"Campaign\\\",\\n \\\"MediaType\\\",\\n \\\"MarketingCampaignGoal\\\",\\n \\\"Category\\\",\\n \\\"Device\\\",\\n \\\"Os\\\",\\n \\\"AdChannel\\\",\\n \\\"AdSocialNetwork\\\",\\n \\\"Ad\\\",\\n \\\"Coupon\\\",\\n \\\"AdFormat\\\",\\n \\\"DisplaySize\\\",\\n \\\"VideoPlacement\\\",\\n \\\"VideoPlaybackMethod\\\",\\n \\\"VideoPlayerSize\\\",\\n \\\"VideoDurationInSeconds\\\",\\n \\\"VideoPlayerRatio\\\",\\n \\\"Ssp\\\",\\n \\\"Country\\\",\\n \\\"Region\\\",\\n \\\"PostalCode\\\",\\n \\\"UserBehavior\\\"\\n ]\\n },\\n \\\"default\\\": null\\n },\\n \\\"metrics\\\": {\\n \\\"type\\\": \\\"array\\\",\\n \\\"items\\\": {\\n \\\"description\\\": \\\" Metrics represents the quantity that we wish to measure\\\\r\\\\n\\\\r\\\\n Glossary:\\\\r\\\\n Audience\\\\r\\\\n Users or devices that were seen online and were eligible to be served an ad. When\\\\r\\\\n several devices can be related to one user, it counts for 1, otherwise it reflects the\\\\r\\\\n number of devices\\\\r\\\\n\\\\r\\\\n Clicks\\\\r\\\\n The number of clicks driven by the ads\\\\r\\\\n\\\\r\\\\n Cost\\\\r\\\\n The overall cost of your ads or video ads\\\\r\\\\n\\\\r\\\\n CostPerResult\\\\r\\\\n What your ad set has cost per configured result unit for your selected period.\\\\r\\\\n\\\\r\\\\n Cpc\\\\r\\\\n Cost Per Click - the amount of money spent for the ads to receive one click\\\\r\\\\n\\\\r\\\\n Cpm\\\\r\\\\n Cost Per Mille - the amount of money spent per thousand displays, available for CPM\\\\r\\\\n based ad sets only\\\\r\\\\n\\\\r\\\\n Ctr\\\\r\\\\n Click-Through Rate - literally, the rate or frequency at which users click through to a\\\\r\\\\n landing page from an ad\\\\r\\\\n\\\\r\\\\n Displays\\\\r\\\\n The number of times your ads have been shown on a screen\\\\r\\\\n\\\\r\\\\n Ecpm\\\\r\\\\n Effective Cost Per Mille - the amount of money spent per thousand displays\\\\r\\\\n\\\\r\\\\n ExposedUsers\\\\r\\\\n The number of users who have been served an ad\\\\r\\\\n\\\\r\\\\n Frequency\\\\r\\\\n The average number of displays each exposed user has seen.\\\\r\\\\n\\\\r\\\\n InvalidClicks\\\\r\\\\n Clicks that don\\\\u0027t meet our quality standards and won\\\\u0027t be billed to you.\\\\r\\\\n\\\\r\\\\n InvalidDisplays\\\\r\\\\n Displays that don\\\\u0027t meet our quality standards and won\\\\u0027t be billed to you.\\\\r\\\\n\\\\r\\\\n Reach\\\\r\\\\n Share of online eligible users or devices who have been served an ad\\\\r\\\\n\\\\r\\\\n Result\\\\r\\\\n What your ad set has achieved based on your configuration for your selected period.\\\\r\\\\n\\\\r\\\\n UntrackableDisplays\\\\r\\\\n\\\\r\\\\n NonViewableDisplays\\\\r\\\\n\\\\r\\\\n Viewability\\\\r\\\\n The percentage of displayed ads or videos ads that were considered viewable\\\\r\\\\n\\\\r\\\\n ViewableDisplays\\\\r\\\\n The number of times at least 50% of the ad appeared for at least 1 second for ads and 2\\\\r\\\\n seconds for videos ads, once started\\\\r\\\\n\\\\r\\\\n Visits\\\\r\\\\n The number of users that were active on your site or app in the hour following clicking\\\\r\\\\n on your ad\\\\r\\\\n\\\\r\\\\n Winrate\\\\r\\\\n Number of displays divided by the total number of display opportunities\\\\r\\\\n\\\\r\\\\n BounceRate\\\\r\\\\n Proportion of website visitors leaving after seeing only one page\\\\r\\\\n\\\\r\\\\n Cpv\\\\r\\\\n Cost Per Visit - the amount of money spent to get one visit on your website\\\\r\\\\n\\\\r\\\\n AppInstall\\\\r\\\\n The number of installations of application\\\\r\\\\n\\\\r\\\\n Cpi\\\\r\\\\n Cost Per Install - the amount of money that needs to be spent to get one app installed\\\\r\\\\n\\\\r\\\\n Cpqv\\\\r\\\\n Cost Per Qualified Visit - the amount of money spent to get one qualified visit on your\\\\r\\\\n website\\\\r\\\\n\\\\r\\\\n InstallRate\\\\r\\\\n Install Rate - the percentage of completed app installs compared to the clicks that\\\\r\\\\n occurred\\\\r\\\\n\\\\r\\\\n QualifiedVisits\\\\r\\\\n The number of users on the target website for which at least two events or one sale\\\\r\\\\n event occurred within the hour following the click\\\\r\\\\n\\\\r\\\\n Assists\\\\r\\\\n The number of sales one of your campaigns or ad sets contributed to (with clicks or\\\\r\\\\n displays) on your site or app.\\\\r\\\\n\\\\r\\\\n AvgCart\\\\r\\\\n Average revenue generated by a sale\\\\r\\\\n\\\\r\\\\n Cos\\\\r\\\\n Cost Of Sales - the ratio between the cost generated by the ad set(s) vs. the revenue\\\\r\\\\n generated by the sales, figured as a percentage\\\\r\\\\n\\\\r\\\\n Cpov\\\\r\\\\n Cost Per Store Visit - the amount of money spent to get one visit on your physical store\\\\r\\\\n\\\\r\\\\n Cov\\\\r\\\\n Cost Of advertiser Value - the ratio between the advertiser value generated by the sales\\\\r\\\\n vs. the cost generated by the ad set(s), figured as a percentage\\\\r\\\\n\\\\r\\\\n Cpo\\\\r\\\\n Cost Per Order - the amount of money that needs to be spent to get one order or\\\\r\\\\n transaction\\\\r\\\\n\\\\r\\\\n Cvr\\\\r\\\\n ConVersion Rate - the percentage of completed purchases compared to the clicks that\\\\r\\\\n occurred\\\\r\\\\n\\\\r\\\\n AssistsSalesRatio\\\\r\\\\n The ratio between your assisted sales and sales made on your site or app.\\\\r\\\\n\\\\r\\\\n OmnichannelRevenue\\\\r\\\\n The revenue generated by online and in-store sales.\\\\r\\\\n\\\\r\\\\n OmnichannelRoas\\\\r\\\\n Omnichannel Return on Ad Spend. The ratio between revenue generated online and in-store,\\\\r\\\\n and the cost.\\\\r\\\\n\\\\r\\\\n OmnichannelSales\\\\r\\\\n The number of online and in store transactions or conversions resulting from Criteo ads.\\\\r\\\\n\\\\r\\\\n Revenue\\\\r\\\\n The amount of money generated by the online sales\\\\r\\\\n\\\\r\\\\n Roas\\\\r\\\\n Return On Ad Spend - the ratio between the revenue generated and the cost\\\\r\\\\n\\\\r\\\\n Sales\\\\r\\\\n The number of completed e-commerce transactions or purchases\\\\r\\\\n\\\\r\\\\n OfflineRevenue\\\\r\\\\n The amount of revenue generated by in-store sales.\\\\r\\\\n\\\\r\\\\n OfflineRoas\\\\r\\\\n Store Return on Ad Spend. The ratio between the revenue generated in-store and the cost.\\\\r\\\\n\\\\r\\\\n OfflineSales\\\\r\\\\n The number of completed in-store transactions or purchases.\\\\r\\\\n\\\\r\\\\n OfflineVisits\\\\r\\\\n The number of visits to one of the physical stores\\\\r\\\\n\\\\r\\\\n Currency\\\\r\\\\n\\\\r\\\\n VideoAvoc\\\\r\\\\n The number of times one of your videos was viewable and audible when it reached\\\\r\\\\n completion\\\\r\\\\n\\\\r\\\\n VideoCompletionRate\\\\r\\\\n The percentage of started videos that played for their entire duration\\\\r\\\\n\\\\r\\\\n VideoCpcv\\\\r\\\\n The average cost of a video played for its entire duration\\\\r\\\\n\\\\r\\\\n VideoCpv\\\\r\\\\n The average cost of a video that started playing\\\\r\\\\n\\\\r\\\\n VideoComplete\\\\r\\\\n The number of times one of your videos played for its entire duration\\\\r\\\\n\\\\r\\\\n VideoFirstQuartile\\\\r\\\\n The number of times one of your videos played to 25% of its duration\\\\r\\\\n\\\\r\\\\n VideoMidpoint\\\\r\\\\n The number of times one of your videos played to 50% of its duration\\\\r\\\\n\\\\r\\\\n VideoThirdQuartile\\\\r\\\\n The number of times one of your videos played to 75% of its duration\\\\r\\\\n\\\\r\\\\n VideoAverageViewRate\\\\r\\\\n The average played percentage of a started video\\\\r\\\\n\\\\r\\\\n VideoStartRate\\\\r\\\\n The percentage of displayed videos that started playing\\\\r\\\\n\\\\r\\\\n VideoStart\\\\r\\\\n The number of times one of your ads started playing\\\",\\n \\\"type\\\": \\\"string\\\",\\n \\\"enum\\\": [\\n \\\"Audience\\\",\\n \\\"Clicks\\\",\\n \\\"Cost\\\",\\n \\\"CostPerResult\\\",\\n \\\"Cpc\\\",\\n \\\"Cpm\\\",\\n \\\"Ctr\\\",\\n \\\"Displays\\\",\\n \\\"Ecpm\\\",\\n \\\"ExposedUsers\\\",\\n \\\"Frequency\\\",\\n \\\"InvalidClicks\\\",\\n \\\"InvalidDisplays\\\",\\n \\\"Reach\\\",\\n \\\"Result\\\",\\n \\\"UntrackableDisplays\\\",\\n \\\"NonViewableDisplays\\\",\\n \\\"Viewability\\\",\\n \\\"ViewableDisplays\\\",\\n \\\"Visits\\\",\\n \\\"Winrate\\\",\\n \\\"BounceRate\\\",\\n \\\"Cpv\\\",\\n \\\"AppInstall\\\",\\n \\\"Cpi\\\",\\n \\\"Cpqv\\\",\\n \\\"InstallRate\\\",\\n \\\"QualifiedVisits\\\",\\n \\\"Assists\\\",\\n \\\"AvgCart\\\",\\n \\\"Cos\\\",\\n \\\"Cpov\\\",\\n \\\"Cov\\\",\\n \\\"Cpo\\\",\\n \\\"Cvr\\\",\\n \\\"AssistsSalesRatio\\\",\\n \\\"OmnichannelRevenue\\\",\\n \\\"OmnichannelRoas\\\",\\n \\\"OmnichannelSales\\\",\\n \\\"Revenue\\\",\\n \\\"Roas\\\",\\n \\\"Sales\\\",\\n \\\"OfflineRevenue\\\",\\n \\\"OfflineRoas\\\",\\n \\\"OfflineSales\\\",\\n \\\"OfflineVisits\\\",\\n \\\"Currency\\\",\\n \\\"VideoAvoc\\\",\\n \\\"VideoCompletionRate\\\",\\n \\\"VideoCpcv\\\",\\n \\\"VideoCpv\\\",\\n \\\"VideoComplete\\\",\\n \\\"VideoFirstQuartile\\\",\\n \\\"VideoMidpoint\\\",\\n \\\"VideoThirdQuartile\\\",\\n \\\"VideoAverageViewRate\\\",\\n \\\"VideoStartRate\\\",\\n \\\"VideoStart\\\"\\n ]\\n },\\n \\\"default\\\": null\\n },\\n \\\"attributionModel\\\": {\\n \\\"description\\\": \\\" Attribution models define how sales are credited to advertising campaigns.\\\\r\\\\n\\\\r\\\\n Available models:\\\\r\\\\n\\\\r\\\\n Pv1d: 1-Day Post View\\\\r\\\\n \\\\u2014 Sale is attributed when a user views an ad and purchases within 24 hours.\\\\r\\\\n\\\\r\\\\n Pc1d: 1-Day Post Click\\\\r\\\\n \\\\u2014 Sale is attributed when a user clicks an ad and purchases within 24 hours.\\\\r\\\\n\\\\r\\\\n Pc7d: 7-Day Post Click\\\\r\\\\n \\\\u2014 Sale is attributed when a user clicks an ad and purchases within 7 days.\\\\r\\\\n\\\\r\\\\n Pv7d: 7-Day Post View\\\\r\\\\n \\\\u2014 Sale is attributed when a user views an ad and purchases within 7 days.\\\\r\\\\n\\\\r\\\\n Pv14d: 14-Day Post View\\\\r\\\\n \\\\u2014 Sale is attributed when a user views an ad and purchases within 14 days.\\\\r\\\\n\\\\r\\\\n Pv30d: 30-Day Post View\\\\r\\\\n \\\\u2014 Sale is attributed when a user views an ad and purchases within 30 days.\\\\r\\\\n\\\\r\\\\n Pc30d: 30-Day Post Click\\\\r\\\\n \\\\u2014 Sale is attributed when a user clicks an ad and purchases within 30 days.\\\\r\\\\n\\\\r\\\\n Pc30dPv1d: 30-Day Post Click \\\\u002B 1-Day Post View\\\\r\\\\n \\\\u2014 Sale is attributed if a user clicks and purchases within 30 days, or views and purchases within 24 hours.\\\\r\\\\n\\\\r\\\\n Pc7dPv1d: 7-Day Post Click \\\\u002B 1-Day Post View\\\\r\\\\n \\\\u2014 Sale is attributed if a user clicks and purchases within 7 days, or views and purchases within 24 hours.\\\\r\\\\n\\\\r\\\\n Lc30d: Last Click\\\\r\\\\n \\\\u2014 Full credit is given to the last click before a conversion.\\\\r\\\\n\\\\r\\\\n CAttr: Client Attribution\\\\r\\\\n \\\\u2014 Attribution is determined by the advertiser using Criteo\\\\u0027s deduplication parameter.\\\",\\n \\\"type\\\": \\\"string\\\",\\n \\\"enum\\\": [\\n \\\"Pv1d\\\",\\n \\\"Pc1d\\\",\\n \\\"Pc7d\\\",\\n \\\"Pv7d\\\",\\n \\\"Pv14d\\\",\\n \\\"Pv30d\\\",\\n \\\"Pc30d\\\",\\n \\\"Pc30dPv1d\\\",\\n \\\"Lc30d\\\",\\n \\\"CAttr\\\",\\n \\\"Pc7dPv1d\\\"\\n ],\\n \\\"default\\\": \\\"Pc30d\\\"\\n },\\n \\\"additionalFilters\\\": {\\n \\\"type\\\": \\\"array\\\",\\n \\\"items\\\": {\\n \\\"description\\\": \\\"Represents a filter for a specific dimension and its associated value.\\\\r\\\\nUsed to narrow down data based on a selected dimension and a target value.\\\",\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"dimension\\\": {\\n \\\"description\\\": \\\" Enumeration of standardized dimensions used in online advertising projections.\\\\r\\\\n\\\\r\\\\n Each member represents a dimension or attribute commonly used in digital marketing analytics,\\\\r\\\\n campaign performance tracking, and audience segmentation.\\\\r\\\\n\\\\r\\\\n Glossary:\\\\r\\\\n Advertiser\\\\r\\\\n Name or entity running the ad campaign(s). Also called Client\\\\r\\\\n\\\\r\\\\n MarketingCampaign\\\\r\\\\n Full name of the marketing campaign. A group of ad sets.\\\\r\\\\n\\\\r\\\\n Campaign\\\\r\\\\n An ad set.\\\\r\\\\n\\\\r\\\\n MediaType\\\\r\\\\n Type of media used (e.g., video, display, native).\\\\r\\\\n\\\\r\\\\n MarketingCampaignGoal\\\\r\\\\n Marketing campaign objective (Retention, Acquisition)\\\\r\\\\n\\\\r\\\\n Category\\\\r\\\\n Product or content category (e.g., electronics, fashion).\\\\r\\\\n\\\\r\\\\n Device\\\\r\\\\n Type of device used (e.g., mobile, desktop, tablet).\\\\r\\\\n\\\\r\\\\n Os\\\\r\\\\n Operating system of the device (e.g., iOS, Android, Windows).\\\\r\\\\n\\\\r\\\\n AdChannel\\\\r\\\\n Specific advertising channel (e.g., programmatic, direct).\\\\r\\\\n\\\\r\\\\n AdSocialNetwork\\\\r\\\\n Social media platform used (e.g., Facebook, TikTok).\\\\r\\\\n\\\\r\\\\n Ad\\\\r\\\\n A creative\\\\r\\\\n\\\\r\\\\n Coupon\\\\r\\\\n A creative coupon\\\\r\\\\n\\\\r\\\\n AdFormat\\\\r\\\\n Format of the ad (e.g., banner, interstitial, carousel).\\\\r\\\\n\\\\r\\\\n DisplaySize\\\\r\\\\n Size of the display area for the ad.\\\\r\\\\n\\\\r\\\\n VideoPlacement\\\\r\\\\n Placement type for video ads (e.g., in-stream, out-stream).\\\\r\\\\n\\\\r\\\\n VideoPlaybackMethod\\\\r\\\\n How the video was played (e.g., autoplay, click-to-play).\\\\r\\\\n\\\\r\\\\n VideoPlayerSize\\\\r\\\\n Dimensions of the video player.\\\\r\\\\n\\\\r\\\\n VideoDurationInSeconds\\\\r\\\\n Length of the video ad.\\\\r\\\\n\\\\r\\\\n VideoPlayerRatio\\\\r\\\\n Aspect ratio of the video player (e.g., 16:9).\\\\r\\\\n\\\\r\\\\n Ssp\\\\r\\\\n Supply Side Partner. The publishing network where displays were made.\\\\r\\\\n\\\\r\\\\n Country\\\\r\\\\n Country where the ad was served.\\\\r\\\\n\\\\r\\\\n Region\\\\r\\\\n Region or state within the country.\\\\r\\\\n\\\\r\\\\n PostalCode\\\\r\\\\n Postal or ZIP code.\\\\r\\\\n\\\\r\\\\n UserBehavior\\\\r\\\\n Behavioral segment of the user (e.g., frequent buyer).\\\\r\\\\n\\\",\\n \\\"type\\\": \\\"string\\\",\\n \\\"enum\\\": [\\n \\\"Advertiser\\\",\\n \\\"MarketingCampaign\\\",\\n \\\"Campaign\\\",\\n \\\"MediaType\\\",\\n \\\"MarketingCampaignGoal\\\",\\n \\\"Category\\\",\\n \\\"Device\\\",\\n \\\"Os\\\",\\n \\\"AdChannel\\\",\\n \\\"AdSocialNetwork\\\",\\n \\\"Ad\\\",\\n \\\"Coupon\\\",\\n \\\"AdFormat\\\",\\n \\\"DisplaySize\\\",\\n \\\"VideoPlacement\\\",\\n \\\"VideoPlaybackMethod\\\",\\n \\\"VideoPlayerSize\\\",\\n \\\"VideoDurationInSeconds\\\",\\n \\\"VideoPlayerRatio\\\",\\n \\\"Ssp\\\",\\n \\\"Country\\\",\\n \\\"Region\\\",\\n \\\"PostalCode\\\",\\n \\\"UserBehavior\\\"\\n ]\\n },\\n \\\"value\\\": {\\n \\\"type\\\": \\\"string\\\"\\n }\\n },\\n \\\"required\\\": [\\n \\\"dimension\\\",\\n \\\"value\\\"\\n ]\\n },\\n \\\"default\\\": null\\n }\\n },\\n \\\"required\\\": [\\n \\\"filters\\\"\\n ]\\n }\\n },\\n {\\n \\\"type\\\": \\\"function\\\",\\n \\\"name\\\": \\\"final_result\\\",\\n \\\"description\\\": \\\"The final response which ends this conversation. ALWAYS use this tool to return your answer.\\\",\\n \\\"parameters\\\": {\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"input\\\": {\\n \\\"description\\\": \\\"Represents the response generated by an agent after processing a user request.\\\\r\\\\nAny tables and graphs will be generated using data from the internal conversation state.\\\\r\\\\n\\\\r\\\\nThere is no need to explicitly pass the tabular data from any tool as contents of the\\\\r\\\\n\\\\u0060comment\\\\u0060 property. Thus, never generate a markdown table as part of the \\\\u0060comment\\\\u0060 field.\\\\r\\\\n\\\\r\\\\nFields:\\\\r\\\\n comment:\\\\r\\\\n A textual response generated by the agent, adhering to the instructions provided in the conversation\\\\r\\\\n\\\\r\\\\n response_status:\\\\r\\\\n A classification of the response outcome, indicating how the agent handled the request.\\\\r\\\\n follow_up_questions:\\\\r\\\\n A short list of 2\\\\u20133 suggestions for further exploration of the data.\\\",\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"comment\\\": {\\n \\\"description\\\": \\\"A structured explanation accompanying the agent\\\\u0027s response.\\\\r\\\\n\\\\r\\\\nIf the agent successfully answered the question:\\\\r\\\\n- Provides a **summary** of the result.\\\\r\\\\n- Offers a **brief explanation** of key concepts or logic used.\\\\r\\\\n\\\\r\\\\nIf the agent failed to answer:\\\\r\\\\n- Describes the **problem encountered** (e.g., missing data, ambiguous query).\\\\r\\\\n- Explains the **reason for failure** to help the user understand what went wrong.\\\\r\\\\n\\\\r\\\\nNote:\\\\r\\\\nThis field should **never include the full requested data**.\\\\r\\\\nThat will be provided separately.\\\\r\\\\n\\\\r\\\\nExample:\\\\r\\\\nQuestion: What was the total spend for each campaign in May 2025?\\\\r\\\\n\\\\r\\\\nSummary: The total spend for all campaigns in May 2025 was 1,240,391.25.\\\\r\\\\n\\\\r\\\\nExplanation: \\\\u0027Spend\\\\u0027 or \\\\u0027Cost\\\\u0027 refers to the total amount of money invested\\\\r\\\\nin an advertising campaign during a specified period.\\\\r\\\\nIt\\\\u0027s a direct measure of your advertising expenditure.\\\",\\n \\\"type\\\": \\\"string\\\"\\n },\\n \\\"response_status\\\": {\\n \\\"description\\\": \\\" Enumerates the possible outcomes of an agent\\\\u0027s response.\\\\r\\\\n\\\\r\\\\n Glossary:\\\\r\\\\n Success\\\\r\\\\n The agent successfully processed the request and returned a valid response.\\\\r\\\\n\\\\r\\\\n OutOfScope\\\\r\\\\n The request falls outside the agent\\\\u0027s capabilities or domain of knowledge.\\\\r\\\\n\\\\r\\\\n NeedsFeedback\\\\r\\\\n The agent requires additional information or clarification from the user to proceed.\\\\r\\\\n\\\\r\\\\n NoDataFound\\\\r\\\\n The tool call did not return any data.\\\\r\\\\n\\\\r\\\\n Forbidden\\\\r\\\\n The user is not authorized to access the requested information or perform the requested action.\\\\r\\\\n\\\\r\\\\n InvalidDates\\\\r\\\\n From and to Dates must not overlap or be in the future\\\\r\\\\n\\\\r\\\\n Unknown\\\\r\\\\n The response could not be classified into any known category, possibly due to unexpected behavior.\\\",\\n \\\"type\\\": \\\"string\\\",\\n \\\"enum\\\": [\\n \\\"Success\\\",\\n \\\"OutOfScope\\\",\\n \\\"NeedsFeedback\\\",\\n \\\"NoDataFound\\\",\\n \\\"Forbidden\\\",\\n \\\"InvalidDates\\\",\\n \\\"Unknown\\\"\\n ]\\n },\\n \\\"follow_up_questions\\\": {\\n \\\"description\\\": \\\"Include 2\\\\u20133 suggestions for further exploration of the data.\\\\r\\\\n\\\\r\\\\nSuggestions must be directly relevant to the user\\\\u2019s last query and any provided data context.\\\\r\\\\nEach suggestion must be concise (\\\\u2264 8 words).\\\\r\\\\nDo not use vague or broad terms like \\\\u201Cshow more data\\\\u201D or \\\\u201Cexplore further.\\\\u201D\\\\r\\\\nDo not include multiple options in one suggestion (e.g., \\\\u201Cchange date or campaign\\\\u201D is not allowed).\\\\r\\\\nSuggestions must focus on changing a single parameter that can be used to query data:\\\\r\\\\nDate range (e.g., last 7 days, Q1 2025)\\\\r\\\\nTime aggregation (e.g., daily, weekly, monthly)\\\\r\\\\nMetrics (e.g., CTR, ROAS, CPC)\\\\r\\\\nCampaigns or AdGroups (specific names or IDs)\\\\r\\\\nAttribution model (e.g., 7-day click, 30-day view)\\\\r\\\\nBreakdowns (e.g., by country, device, region)\\\\r\\\\nBe explicit about the parameter and value:\\\\r\\\\nDO PROPOSE: \\\\u201CChange date range to last month\\\\u201D\\\\r\\\\nDO NOT PROPOSE: \\\\u201CUse a different date range\\\\u201D\\\\r\\\\nDo not include optimization advice, strategy, or interpretation (e.g., \\\\u201CHow to improve performance\\\\u201D is forbidden).\\\\r\\\\nSuggestions must be actionable queries, not opinions or summaries.\\\\r\\\\nAvoid repeating the same dimension unless the value changes meaningfully.\\\\r\\\\n\\\\r\\\\n## Allowed follow-up Questions Examples\\\\r\\\\nChange date range to last month.\\\\r\\\\nAggregate data by campaign.\\\\r\\\\nCompare CTR across campaigns.\\\\r\\\\nBreak down by country.\\\\r\\\\nUse 7-day click attribution model.\\\\r\\\\n\\\\r\\\\n## Not Allowed follow-up Questions Examples\\\\r\\\\nShow more insights.\\\\r\\\\nExplore other opportunities.\\\\r\\\\nWhat should I change?\\\\r\\\\nAny suggestions for optimization?\\\\r\\\\nGeneral advice or interpretation.\\\",\\n \\\"type\\\": \\\"array\\\",\\n \\\"items\\\": {\\n \\\"type\\\": \\\"string\\\"\\n }\\n }\\n },\\n \\\"required\\\": [\\n \\\"comment\\\",\\n \\\"response_status\\\",\\n \\\"follow_up_questions\\\"\\n ]\\n }\\n },\\n \\\"required\\\": [\\n \\\"input\\\"\\n ]\\n }\\n }\\n]\",\"clientId\":\"22291\",\"date\":\"03/09/2026\",\"gen_ai.system_instructions\":\"[\\n {\\n \\\"type\\\": \\\"text\\\",\\n \\\"content\\\": \\\"You are an expert on statistical analysis for the adtech company Criteo.\\\\nYour goal is to provide marketing statistics from Criteo users' ongoing ad campaigns, along with their full context.\\\\n\\\\n# Information\\\\n\\\\n- today is 2026-03-09\\\\n- The default sales attribution model is 30 day post-click unless otherwise specified by the user.\\\\n- The default time zone is Europe/London unless otherwise specified by the user.\\\\n- The default currency is EUR unless otherwise specified by the user.\\\\n\\\\n# Conversation instructions\\\\n\\\\nNever make up data that the user asks for. You must use the provided tools to retrieve data.\\\\n\\\\nAlways respond in a clear, professional, and conversational manner. Confirm your understanding of user intent, especially for complex requests.\\\\n\\\\nIf you do not understand a user request do both, say `I’m not quite sure what you mean. To provide you with data-driven insights from your campaigns, please let me know which campaign or metric you'd like me to report on.` and also use response_status `OutOfScope`.\\\\n\\\\nIf a user requests any form of data visualization (e.g., `show me a line chart`, `display this data in a graph`, `create a plot`, ...), respond with: `I can provide you with the requested data and its full context, but I have no latitude on its graphical representation.`\\\\nDo not attempt to create charts, graphs, or any other visualizations under any circumstances.\\\\n\\\\nIf the user provides partial information use the default values as much as possible to call the tool. Ask clarifying questions only if strictly necessary. If you ask clarifying questions, use response_status `NeedsFeedback` but only if you haven't already used `OutOfScope` or `NoDataFound`.\\\\n\\\\n## Glossary\\\\n\\\\nHere are some common terms that you might encounter.\\\\n\\\\n- QBR - Quarterly Business Review. A strategic review with the client every quarter.\\\\n- WBR - Weekly Business Review. Operational checkpoints to review weekly performance.\\\\n- MBR - Monthly Business Review. Middle-ground between WBR and QBR.\\\\n- EOW - End of week\\\\n- EOM - End of Month\\\\n- HBR - Half-Yearly Business Review\\\\n- ABR - Annual Business Review\\\\n- QOP / Quarterly Operating Plan Review - Review of operational KPIs every quarter\\\\n- OKRs - Objectives and Key Results\\\\n- BPS / Basis Points - Used to discuss changes in percentage points (100 bps = 1%)\\\\n- YOY - Year-over-year\\\\n- WOW - Week-over-week\\\\n- MOM - Month-over-month\\\\n- Spend Pacing - Whether the campaign is on track to spend budget\\\\n- Underpacing / Overpacing - Spending slower/faster than the plan\\\\n- Budget Fluidity - Willingness of client to move budgets between channels\\\\n\\\\nUnless otherwise specified, when a user is asking about a business review (QBR, WBR, MBR, HBR, ABR) assume that sales-related metrics are important to the user: cost, sales, ROAS; and that the user wants this information by ad set.\\\\n\\\\n## Tool Response\\\\n\\\\nIf a tool responds with a response_status `Retry`. Follow the instructions in `message` and RETRY without asking.\\\\nIf a tool responds with a response_status `DuplicateToolCall`. ALWAYS Move to the next step of your execution plan. You already received the data from the tool.\\\\n\\\\n## Agent Response Guidelines\\\\n\\\\nALWAYS use the 'final_result' tool to communicate your final answer to the user.\\\\nProvide as concise an answer as possible. Follow these guidelines:\\\\n\\\\n### If the agent successfully answered the question:\\\\n- Include a **summary** of the result.\\\\n- Expose the **parameters** (date range, time zone, attribution model, currency) used to call get_custom_report if it was called.\\\\n\\\\n### If the agent failed to answer:\\\\n- Describe the **problem encountered** (e.g., missing data, ambiguous query).\\\\n- Explain the **reason for failure** to help the user understand what went wrong.\\\\n\\\\n### Important:\\\\n- **Never include the full requested data** in the comment.\\\\n- The data will be provided to the user separately.\\\\n- Never call get_custom_report twice with different date ranges. Use previous_period_from_date instead\\\\n- Explain adtech terms as needed, and adapt detail level to the user’s query, responses and expertise.\\\\n\\\\n## Tool Response Examples\\\\n\\\\n**Question**: What was the total spend for each campaign in May 2025?\\\\n\\\\n**Response**:\\\\n\\\\n> ### Summary\\\\n> The total spend for all campaigns in May 2025 was 1,240,391.25.\\\\n>\\\\n> ### Parameters\\\\n> - Data was computed from 2025-05-01 to 2025-05-31 with time zone Europe/London.\\\\n> - Attribution model chosen is 30-Day Post Click\\\\n> - currency: EUR\\\\n\\\\n**Question:** list my adsets optimized for conversion\\\\n\\\\n**Response:**\\\\n\\\\n> ### Summary\\\\n> You have actually 6 adsets optimized for conversion. 2 of them are currently active.\\\\n\\\\n# DATA PRIVACY AND LEGAL REQUIREMENTS\\\\n\\\\n- Conduct: Enforce Criteo Advertising, Supply Partner, and Privacy Guidelines. Promote ethical, compliant, effective advertising.\\\\n- If you reject based on those criteria set final_result.response_status to Forbidden\\\\n\\\\nEnforcement\\\\n1) Prohibited - Reject:\\\\n\\\\nHarassment/hate/discrimination; adult/sexual services/suggestive; deceptive/misleading/fraud/predatory; illegal drugs/paraphernalia; firearms/weapons/explosives/fireworks; shocking/violent/obscene/disturbing; counterfeit/piracy/IP violations; affairs/escorting/prostitution/mail-order brides; malware/spyware/forced downloads/harmful code; targeting children under the age of consent.\\\\nResponse: \\\\\\\"I can't fulfil this request because it involves prohibited advertising content under Criteo's guidelines.\\\\\\\"\\\\n\\\\n2) Restricted - approval required\\\\n\\\\nOnly in authorized regions with explicit approval: online pharmacies/healthcare/prescription drugs/sexual enhancers/weight loss; alcohol/tobacco/vaping/e-cigs; gambling/lotteries/sports betting/fantasy sports; financial services/insurance/investments; psychics/astrology/occult.\\\\nResponse: \\\\\\\"This request falls into a restricted category and can only be fulfilled with prior approval from Criteo and in permitted countries.\\\\\\\"\\\\n\\\\n3) Privacy - reject if non-compliant\\\\n\\\\nComply with GDPR, CCPA, LGPD, and applicable laws. Reject: targeting/reporting on protected traits; any PII misuse; children's data or targeting under age of consent; data use without valid, informed, freely given, unambiguous consent (no pre-ticked boxes, continued browsing, or ambiguous consent); individual-level reporting (aggregates only).\\\\nResponse: \\\\\\\"I can't fulfil this request because it doesn't comply with privacy and data protection requirements. Please adjust your request to respect user consent and data protection laws.\\\\\\\"\\\\n\\\\n- Never speculate or provide unsupported data. Only reference Criteo-approved sources for documentation or support.\\\\n- If handling sensitive data, follow Criteo data privacy guidelines at all times.\\\\n- Refuse to create audiences, give insights, or give recommendations for any request including the following content:\\\\n - Harmful: harassment, hate speech, shocking, violent, or offensive content.\\\\n - Sexual or deceptive: adult or pornographic content, infidelity/prostitution, misleading or fraudulent claims.\\\\n - Illegal or dangerous: drugs (including marijuana), weapons, explosives or fireworks, malware or hacking, dishonest or predatory products.\\\\n - IP violations: counterfeits, piracy, unauthorized use of likeness.\\\\n - Protected traits: race, ethnicity, religion or belief, gender, age, sexual orientation or interest, health data, personal identifying information, political opinions, trade union membership, biometric or genetic data, criminal history, financial status.\\\\n - Children: no targeting under the legal consent age or children's sites. Only broad, legally compliant age ranges may be used.\\\\n- Never use proxies or inferred traits for any protected characteristic.\\\\n\\\"\\n }\\n]\",\"gen_ai.response.finish_reasons\":\"[\\\"stop\\\"]\",\"gen_ai.response.id\":\"U7yuaeTyDuKSitQPhLG9kAg\",\"gen_ai.response.model\":\"gemini-2.5-flash\",\"gen_ai.usage.input_tokens\":\"2546\",\"gen_ai.usage.output_tokens\":\"47\",\"host.ip\":\"10.65.201.20\",\"host.name\":\"kube-worker0277.kubes10.da1.preprod.crto.in\",\"deployment.environment.name\":\"preprod\",\"criteo.service.pool\":\"default\",\"criteo.dc\":\"da1\",\"service.version\":\"105537\",\"service.instance.id\":\"10NDX\"},\"resourceAttributes\":{\"deployment.environment.name\":\"preprod\",\"service.name\":\"agentic-clientinsights\",\"service.version\":\"105537\",\"service.instance.id\":\"10NDX\"},\"scope\":{\"name\":\"Experimental.Microsoft.Extensions.AI\",\"version\":\"\",\"attributes\":{}}}",+ "metadata": "{\"attributes\":{\"otel.exception_pointers\":\"94867131908120\",\"gen_ai.operation.name\":\"chat\",\"gen_ai.request.model\":\"gemini-2.5-flash\",\"gen_ai.provider.name\":\"gcp.vertex_ai\",\"server.address\":\"aiplatform.googleapis.com\",\"server.port\":\"443\",\"gen_ai.request.seed\":\"42\",\"gen_ai.request.temperature\":\"0\",\"gen_ai.tool.definitions\":\"[\\n {\\n \\\"type\\\": \\\"function\\\",\\n \\\"name\\\": \\\"get_adset_infos\\\",\\n \\\"description\\\": \\\"Retrieves all ad sets matching conditions set in the filter (also referred to as campaigns)\\\\r\\\\nThis method should be called by the agent whenever\\\\r\\\\nit needs information about one or more ad sets.\\\\r\\\\nIt provides a comprehensive list of ad sets with key metadata and status fields.\\\\r\\\\n\\\\r\\\\nReturns:\\\\r\\\\n-------\\\\r\\\\nResponse\\\\r\\\\n An object containing data with the following information for each ad set:\\\\r\\\\n - id: The unique identifier of the ad set (also called Campaign ID).\\\\r\\\\n - name: The name of the ad set.\\\\r\\\\n - advertiserId: The ID of the advertiser that owns this ad set.\\\\r\\\\n - objective (MarketingObjective): The marketing objective associated with the ad set: Acquisition or Retention.\\\\r\\\\n - startDate: The start date of the ad set, if specified.\\\\r\\\\n - activationStatus: Indicates whether the ad set is currently active: Activated or NotActivated\\\\r\\\\n - deliveryStatus: Describes the current delivery state of the ad set: Running, Archived or NotRunning\\\\r\\\\n\\\\r\\\\nNotes:\\\\r\\\\n-----\\\\r\\\\nUse this method as the primary source for retrieving ad set (campaign) information.\\\",\\n \\\"parameters\\\": {\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"filter\\\": {\\n \\\"description\\\": \\\"The filters applied for selecting the ad_sets\\\",\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"adset_ids\\\": {\\n \\\"type\\\": [\\n \\\"array\\\",\\n \\\"null\\\"\\n ],\\n \\\"items\\\": {\\n \\\"type\\\": \\\"integer\\\"\\n }\\n },\\n \\\"names\\\": {\\n \\\"type\\\": [\\n \\\"array\\\",\\n \\\"null\\\"\\n ],\\n \\\"items\\\": {\\n \\\"type\\\": \\\"string\\\"\\n }\\n },\\n \\\"activation_statuses\\\": {\\n \\\"type\\\": [\\n \\\"array\\\",\\n \\\"null\\\"\\n ],\\n \\\"items\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"enum\\\": [\\n \\\"NotActivated\\\",\\n \\\"Activated\\\"\\n ]\\n }\\n },\\n \\\"objectives\\\": {\\n \\\"type\\\": [\\n \\\"array\\\",\\n \\\"null\\\"\\n ],\\n \\\"items\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"enum\\\": [\\n \\\"NotSet\\\",\\n \\\"Acquisition\\\",\\n \\\"Retention\\\"\\n ]\\n }\\n },\\n \\\"delivery_statuses\\\": {\\n \\\"type\\\": [\\n \\\"array\\\",\\n \\\"null\\\"\\n ],\\n \\\"items\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"enum\\\": [\\n \\\"Running\\\",\\n \\\"Archived\\\",\\n \\\"NotRunning\\\"\\n ]\\n }\\n }\\n }\\n }\\n },\\n \\\"required\\\": [\\n \\\"filter\\\"\\n ]\\n }\\n },\\n {\\n \\\"type\\\": \\\"function\\\",\\n \\\"name\\\": \\\"get_custom_report\\\",\\n \\\"description\\\": \\\"Calls the API to retrieve client data.\\\\r\\\\n\\\\r\\\\nArgs:\\\\r\\\\n filters: An object containing the built-in filters.\\\\r\\\\n Default values are provided if needed.\\\\r\\\\n timeDimension: Time-based dimension for data projections; specifies the granularity at which data will be grouped.\\\\r\\\\n Possible values and examples:\\\\r\\\\n - None: Indicates that the user has not provided any clear time dimension.\\\\r\\\\n This should be selected when there is no explicit instruction.\\\\r\\\\n Do NOT infer or assume a value; use None unless the user specifies otherwise.\\\\r\\\\n - Year: Represents a calendar year.\\\\r\\\\n Examples: per year, by year, year-over-year comparisons (YoY), yearly trend analysis.\\\\r\\\\n - Month: Represents a calendar month.\\\\r\\\\n Examples: per month, by month, month-over-month comparisons (MoM), monthly performance reports.\\\\r\\\\n - Week: Represents a calendar week.\\\\r\\\\n Examples: per week, by week, week-over-week comparisons (WoW), weekly campaign summaries.\\\\r\\\\n - Day: Represents a calendar day.\\\\r\\\\n Examples: per day, by day, day-over-day comparisons (DoD), daily performance tracking.\\\\r\\\\n - Hour: Represents an hour within a day.\\\\r\\\\n Examples: per hour, by hour, hourly trend analysis, intraday performance monitoring.\\\\r\\\\n dimensions: A list of dimensions that define the granularity of the report.\\\\r\\\\n Example: [os, device]\\\\r\\\\n metrics: A list of performance indicators to retrieve.\\\\r\\\\n Example: [clicks, ctr]\\\\r\\\\n attributionModel: Specifies the model used to measure sales.\\\\r\\\\n Optional.\\\\r\\\\n additionalFilters: Custom filters applied to the data.\\\\r\\\\n CRITICAL CONSTRAINT: Every dimension used in \\\\u0060additionalFilters\\\\u0060 MUST be present in the \\\\u0060dimensions\\\\u0060 list.\\\\r\\\\n If a filter references a dimension not included in \\\\u0060dimensions\\\\u0060, the request will be rejected.\\\\r\\\\n\\\\r\\\\nNotes:\\\\r\\\\n - Dimensions determine the level of detail in the report.\\\\r\\\\n - Metrics represent the KPIs to monitor campaign performance.\\\\r\\\\n - Filters restrict the dataset retrieved from the API.\\\\r\\\\n - \\\\u0060additionalFilters\\\\u0060 allow for extra filtering, but only on dimensions explicitly listed in \\\\u0060dimensions\\\\u0060.\\\",\\n \\\"parameters\\\": {\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"filters\\\": {\\n \\\"description\\\": \\\"Filters are a way to narrow the scope of the report by setting certain values.\\\\r\\\\nIf no value can be inferred, a default one will be provided.\\\",\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"clientIds\\\": {\\n \\\"type\\\": \\\"array\\\",\\n \\\"items\\\": {\\n \\\"type\\\": \\\"integer\\\"\\n }\\n },\\n \\\"dateRange\\\": {\\n \\\"description\\\": \\\"Date range between two dates.\\\\r\\\\nIMPORTANT: from_date and to_date are inclusive (the start and end dates are included in the period).\\\\r\\\\n\\\\r\\\\nIf dates are not given explicitly, they can be deduced as follows:\\\\r\\\\n\\\\r\\\\n- IMPORTANT: Last n days: from = today - n days, to = yesterday (inclusive, does not include today)\\\\r\\\\n Example: if today is 2025-08-23 then \\\\u0022last 7 days\\\\u0022: 2025-08-16 to 2025-08-22 (inclusive, 7 days)\\\\r\\\\n Example: if today is 2025-08-10 then \\\\u0022last 20 days\\\\u0022: 2025-07-21 to 2025-08-09 (inclusive, 20 days)\\\\r\\\\n- Month of May 2025: from = 2025-05-01, to = 2025-05-31\\\\r\\\\n- IMPORTANT: Last week, the last full calendar week (Monday to Sunday) before the current Week:\\\\r\\\\n from = Monday of previous week\\\\r\\\\n to = Sunday of previous Week\\\\r\\\\n Example: if today is Tuesday, 2025-08-12 then \\\\u0022last week\\\\u0022 is Monday 2025-08-04 to Sunday 2025-08-10\\\\r\\\\n Example: if today is Monday, 2025-09-15 then \\\\u0022last week\\\\u0022 is Monday 2025-08-14 to Sunday 2025-08-14\\\\r\\\\n- IMPORTANT: Last n weeks, the last n full calendar weeks (Monday to Sunday) before the current Week.\\\\r\\\\n n is the number of weeks.\\\\r\\\\n from = Monday of n weeks ago\\\\r\\\\n to = Sunday of previous Week\\\\r\\\\n Example: if today is Friday, 2025-08-22 then \\\\u0022last 2 weeks\\\\u0022 is\\\\r\\\\n Monday 2025-08-04 to Sunday 2025-08-17\\\\r\\\\n n is 2\\\\r\\\\n Example: if today is Monday, 2025-07-21 then \\\\u0022last 3 weeks\\\\u0022 is\\\\r\\\\n Monday 2025-06-30 to Sunday 2025-07-20\\\\r\\\\n n is 3\\\\r\\\\n- IMPORTANT: Last month, the last full calendar month before the current month.\\\\r\\\\n from = first day of previous month\\\\r\\\\n to = last day of previous month\\\\r\\\\n Example: if today is Tuesday, 2025-08-19 then \\\\u0022last month\\\\u0022 is 2025-07-01 to 2025-07-31\\\\r\\\\n- IMPORTANT: Last n months, the last n full calendar months before the current month.\\\\r\\\\n n is the number of months.\\\\r\\\\n from = first day of the month n months ago\\\\r\\\\n to = last day of previous month\\\\r\\\\n Example: if today is Monday, 2025-08-19 then \\\\u0022last 3 months\\\\u0022 is 2025-05-01 to 2025-07-31\\\\r\\\\n n is 3\\\\r\\\\n- Last quarter: the last full quarter before the current quarter.\\\\r\\\\n Q1: January 1 to March 31\\\\r\\\\n Q2: April 1 to June 30\\\\r\\\\n Q3: July 1 to September 30\\\\r\\\\n Q4: October 1 to December 31\\\\r\\\\n\\\\r\\\\n\\\\r\\\\ntime_zone is the IANA time zone name (e.g., \\\\u0022Europe/London\\\\u0022, \\\\u0022America/New_York\\\\u0022).\\\\r\\\\nBy default, assume that we are in the Europe/London time zone.\\\\r\\\\n\\\\r\\\\nThe field previous_period_from_date is used to define the starting date of a previous period\\\\r\\\\nthat mirrors the current data collection range.\\\\r\\\\nThis allows for comparative analysis between the current period and a similar past period.\\\\r\\\\n\\\\r\\\\nUse the following guidelines and examples to determine the correct value:\\\\r\\\\n\\\\r\\\\nGeneral Rule:\\\\r\\\\nprevious_period_from_date should be set to a date that starts the previous comparable period\\\\r\\\\nthe previous period will have the same duration as the current one\\\\r\\\\nthe previous period and the current period MUST NOT overlap\\\\r\\\\n\\\\r\\\\n Examples:\\\\r\\\\n Relative Time Comparison\\\\r\\\\n If comparing to last year, and from_date = 2025-08-01, then:\\\\r\\\\n previous_period_from_date = 2024-08-01\\\\r\\\\n If comparing with the previous period, previous_period_start_date is calculated\\\\r\\\\n by subtracting the duration of the current date range from its starting date (from_date).\\\\r\\\\n This ensures the previous period has the same length and ends\\\\r\\\\n right before the current one begins.\\\\r\\\\n Example:\\\\r\\\\n Current range: from_date = 2025-08-10, to_date = 2025-08-19 (10 days including bounds),\\\\r\\\\n then: previous_period_start_date = 2025-07-31 (10 days before 2025-08-10)\\\\r\\\\n Custom Period Comparison\\\\r\\\\n If comparing to the period starting 2025-02-25, then:\\\\r\\\\n previous_period_from_date = 2025-02-25\\\\r\\\\n\\\",\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"from_date\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"format\\\": \\\"date\\\"\\n },\\n \\\"to_date\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"format\\\": \\\"date\\\"\\n },\\n \\\"time_zone\\\": {\\n \\\"type\\\": [\\n \\\"string\\\",\\n \\\"null\\\"\\n ]\\n },\\n \\\"previous_period_from_date\\\": {\\n \\\"type\\\": [\\n \\\"string\\\",\\n \\\"null\\\"\\n ],\\n \\\"format\\\": \\\"date\\\"\\n }\\n }\\n },\\n \\\"currency\\\": {\\n \\\"type\\\": \\\"string\\\"\\n },\\n \\\"campaignStatus\\\": {\\n \\\"type\\\": [\\n \\\"array\\\",\\n \\\"null\\\"\\n ],\\n \\\"items\\\": {\\n \\\"description\\\": \\\" Status of a campaign\\\\r\\\\n\\\\r\\\\n Glossary:\\\\r\\\\n Active\\\\r\\\\n Active, Running or Live\\\\r\\\\n NotRunning\\\\r\\\\n Not running\\\\r\\\\n Dead\\\\r\\\\n Archived\\\",\\n \\\"type\\\": \\\"string\\\",\\n \\\"enum\\\": [\\n \\\"Active\\\",\\n \\\"NotRunning\\\",\\n \\\"Dead\\\"\\n ]\\n }\\n },\\n \\\"mediaType\\\": {\\n \\\"type\\\": [\\n \\\"array\\\",\\n \\\"null\\\"\\n ],\\n \\\"items\\\": {\\n \\\"description\\\": \\\" Type of media used. video or display.\\\\r\\\\n\\\\r\\\\n Glossary:\\\\r\\\\n Display\\\\r\\\\n HTML display\\\\r\\\\n\\\\r\\\\n Video\\\\r\\\\n Video display\\\",\\n \\\"type\\\": \\\"string\\\",\\n \\\"enum\\\": [\\n \\\"Display\\\",\\n \\\"Video\\\"\\n ]\\n }\\n },\\n \\\"marketingCampaignGoals\\\": {\\n \\\"type\\\": [\\n \\\"array\\\",\\n \\\"null\\\"\\n ],\\n \\\"items\\\": {\\n \\\"type\\\": \\\"string\\\",\\n \\\"enum\\\": [\\n \\\"NotSet\\\",\\n \\\"Acquisition\\\",\\n \\\"Retention\\\"\\n ]\\n }\\n },\\n \\\"campaigns\\\": {\\n \\\"type\\\": [\\n \\\"array\\\",\\n \\\"null\\\"\\n ],\\n \\\"items\\\": {\\n \\\"type\\\": \\\"integer\\\"\\n }\\n }\\n }\\n },\\n \\\"timeDimension\\\": {\\n \\\"description\\\": \\\"Defines the time-based dimensions available for data projections.\\\\r\\\\n\\\\r\\\\nEach enum member specifies the granularity at which data can be grouped or analyzed.\\\\r\\\\n\\\\r\\\\nMembers:\\\\r\\\\n None - Indicates that the user has not provided any clear time dimension.\\\\r\\\\n This should be selected when there is no explicit instruction.\\\\r\\\\n Do NOT infer or assume a value; use None unless the user specifies otherwise.\\\\r\\\\n Year - Represents a calendar year. For example per year, by year, year-over-year comparisons (YoY), yearly trend analysis.\\\\r\\\\n Month - Represents a calendar month. For example per month, by month, month-over-month comparisons (MoM), monthly performance reports.\\\\r\\\\n Week - Represents a calendar week. For example per week, by week, week-over-week comparisons (WoW), weekly campaign summaries.\\\\r\\\\n Day - Represents a calendar day. For example per day, by day, day-over-day comparisons (DoD), daily performance tracking.\\\\r\\\\n Hour - Represents an hour within a day. For example per hour, by hour, hourly trend analysis, intraday performance monitoring.\\\",\\n \\\"type\\\": \\\"string\\\",\\n \\\"enum\\\": [\\n \\\"None\\\",\\n \\\"Year\\\",\\n \\\"Month\\\",\\n \\\"Week\\\",\\n \\\"Day\\\",\\n \\\"Hour\\\"\\n ],\\n \\\"default\\\": \\\"None\\\"\\n },\\n \\\"dimensions\\\": {\\n \\\"type\\\": \\\"array\\\",\\n \\\"items\\\": {\\n \\\"description\\\": \\\" Enumeration of standardized dimensions used in online advertising projections.\\\\r\\\\n\\\\r\\\\n Each member represents a dimension or attribute commonly used in digital marketing analytics,\\\\r\\\\n campaign performance tracking, and audience segmentation.\\\\r\\\\n\\\\r\\\\n Glossary:\\\\r\\\\n Advertiser\\\\r\\\\n Name or entity running the ad campaign(s). Also called Client\\\\r\\\\n\\\\r\\\\n MarketingCampaign\\\\r\\\\n Full name of the marketing campaign. A group of ad sets.\\\\r\\\\n\\\\r\\\\n Campaign\\\\r\\\\n An ad set.\\\\r\\\\n\\\\r\\\\n MediaType\\\\r\\\\n Type of media used (e.g., video, display, native).\\\\r\\\\n\\\\r\\\\n MarketingCampaignGoal\\\\r\\\\n Marketing campaign objective (Retention, Acquisition)\\\\r\\\\n\\\\r\\\\n Category\\\\r\\\\n Product or content category (e.g., electronics, fashion).\\\\r\\\\n\\\\r\\\\n Device\\\\r\\\\n Type of device used (e.g., mobile, desktop, tablet).\\\\r\\\\n\\\\r\\\\n Os\\\\r\\\\n Operating system of the device (e.g., iOS, Android, Windows).\\\\r\\\\n\\\\r\\\\n AdChannel\\\\r\\\\n Specific advertising channel (e.g., programmatic, direct).\\\\r\\\\n\\\\r\\\\n AdSocialNetwork\\\\r\\\\n Social media platform used (e.g., Facebook, TikTok).\\\\r\\\\n\\\\r\\\\n Ad\\\\r\\\\n A creative\\\\r\\\\n\\\\r\\\\n Coupon\\\\r\\\\n A creative coupon\\\\r\\\\n\\\\r\\\\n AdFormat\\\\r\\\\n Format of the ad (e.g., banner, interstitial, carousel).\\\\r\\\\n\\\\r\\\\n DisplaySize\\\\r\\\\n Size of the display area for the ad.\\\\r\\\\n\\\\r\\\\n VideoPlacement\\\\r\\\\n Placement type for video ads (e.g., in-stream, out-stream).\\\\r\\\\n\\\\r\\\\n VideoPlaybackMethod\\\\r\\\\n How the video was played (e.g., autoplay, click-to-play).\\\\r\\\\n\\\\r\\\\n VideoPlayerSize\\\\r\\\\n Dimensions of the video player.\\\\r\\\\n\\\\r\\\\n VideoDurationInSeconds\\\\r\\\\n Length of the video ad.\\\\r\\\\n\\\\r\\\\n VideoPlayerRatio\\\\r\\\\n Aspect ratio of the video player (e.g., 16:9).\\\\r\\\\n\\\\r\\\\n Ssp\\\\r\\\\n Supply Side Partner. The publishing network where displays were made.\\\\r\\\\n\\\\r\\\\n Country\\\\r\\\\n Country where the ad was served.\\\\r\\\\n\\\\r\\\\n Region\\\\r\\\\n Region or state within the country.\\\\r\\\\n\\\\r\\\\n PostalCode\\\\r\\\\n Postal or ZIP code.\\\\r\\\\n\\\\r\\\\n UserBehavior\\\\r\\\\n Behavioral segment of the user (e.g., frequent buyer).\\\\r\\\\n\\\",\\n \\\"type\\\": \\\"string\\\",\\n \\\"enum\\\": [\\n \\\"Advertiser\\\",\\n \\\"MarketingCampaign\\\",\\n \\\"Campaign\\\",\\n \\\"MediaType\\\",\\n \\\"MarketingCampaignGoal\\\",\\n \\\"Category\\\",\\n \\\"Device\\\",\\n \\\"Os\\\",\\n \\\"AdChannel\\\",\\n \\\"AdSocialNetwork\\\",\\n \\\"Ad\\\",\\n \\\"Coupon\\\",\\n \\\"AdFormat\\\",\\n \\\"DisplaySize\\\",\\n \\\"VideoPlacement\\\",\\n \\\"VideoPlaybackMethod\\\",\\n \\\"VideoPlayerSize\\\",\\n \\\"VideoDurationInSeconds\\\",\\n \\\"VideoPlayerRatio\\\",\\n \\\"Ssp\\\",\\n \\\"Country\\\",\\n \\\"Region\\\",\\n \\\"PostalCode\\\",\\n \\\"UserBehavior\\\"\\n ]\\n },\\n \\\"default\\\": null\\n },\\n \\\"metrics\\\": {\\n \\\"type\\\": \\\"array\\\",\\n \\\"items\\\": {\\n \\\"description\\\": \\\" Metrics represents the quantity that we wish to measure\\\\r\\\\n\\\\r\\\\n Glossary:\\\\r\\\\n Audience\\\\r\\\\n Users or devices that were seen online and were eligible to be served an ad. When\\\\r\\\\n several devices can be related to one user, it counts for 1, otherwise it reflects the\\\\r\\\\n number of devices\\\\r\\\\n\\\\r\\\\n Clicks\\\\r\\\\n The number of clicks driven by the ads\\\\r\\\\n\\\\r\\\\n Cost\\\\r\\\\n The overall cost of your ads or video ads\\\\r\\\\n\\\\r\\\\n CostPerResult\\\\r\\\\n What your ad set has cost per configured result unit for your selected period.\\\\r\\\\n\\\\r\\\\n Cpc\\\\r\\\\n Cost Per Click - the amount of money spent for the ads to receive one click\\\\r\\\\n\\\\r\\\\n Cpm\\\\r\\\\n Cost Per Mille - the amount of money spent per thousand displays, available for CPM\\\\r\\\\n based ad sets only\\\\r\\\\n\\\\r\\\\n Ctr\\\\r\\\\n Click-Through Rate - literally, the rate or frequency at which users click through to a\\\\r\\\\n landing page from an ad\\\\r\\\\n\\\\r\\\\n Displays\\\\r\\\\n The number of times your ads have been shown on a screen\\\\r\\\\n\\\\r\\\\n Ecpm\\\\r\\\\n Effective Cost Per Mille - the amount of money spent per thousand displays\\\\r\\\\n\\\\r\\\\n ExposedUsers\\\\r\\\\n The number of users who have been served an ad\\\\r\\\\n\\\\r\\\\n Frequency\\\\r\\\\n The average number of displays each exposed user has seen.\\\\r\\\\n\\\\r\\\\n InvalidClicks\\\\r\\\\n Clicks that don\\\\u0027t meet our quality standards and won\\\\u0027t be billed to you.\\\\r\\\\n\\\\r\\\\n InvalidDisplays\\\\r\\\\n Displays that don\\\\u0027t meet our quality standards and won\\\\u0027t be billed to you.\\\\r\\\\n\\\\r\\\\n Reach\\\\r\\\\n Share of online eligible users or devices who have been served an ad\\\\r\\\\n\\\\r\\\\n Result\\\\r\\\\n What your ad set has achieved based on your configuration for your selected period.\\\\r\\\\n\\\\r\\\\n UntrackableDisplays\\\\r\\\\n\\\\r\\\\n NonViewableDisplays\\\\r\\\\n\\\\r\\\\n Viewability\\\\r\\\\n The percentage of displayed ads or videos ads that were considered viewable\\\\r\\\\n\\\\r\\\\n ViewableDisplays\\\\r\\\\n The number of times at least 50% of the ad appeared for at least 1 second for ads and 2\\\\r\\\\n seconds for videos ads, once started\\\\r\\\\n\\\\r\\\\n Visits\\\\r\\\\n The number of users that were active on your site or app in the hour following clicking\\\\r\\\\n on your ad\\\\r\\\\n\\\\r\\\\n Winrate\\\\r\\\\n Number of displays divided by the total number of display opportunities\\\\r\\\\n\\\\r\\\\n BounceRate\\\\r\\\\n Proportion of website visitors leaving after seeing only one page\\\\r\\\\n\\\\r\\\\n Cpv\\\\r\\\\n Cost Per Visit - the amount of money spent to get one visit on your website\\\\r\\\\n\\\\r\\\\n AppInstall\\\\r\\\\n The number of installations of application\\\\r\\\\n\\\\r\\\\n Cpi\\\\r\\\\n Cost Per Install - the amount of money that needs to be spent to get one app installed\\\\r\\\\n\\\\r\\\\n Cpqv\\\\r\\\\n Cost Per Qualified Visit - the amount of money spent to get one qualified visit on your\\\\r\\\\n website\\\\r\\\\n\\\\r\\\\n InstallRate\\\\r\\\\n Install Rate - the percentage of completed app installs compared to the clicks that\\\\r\\\\n occurred\\\\r\\\\n\\\\r\\\\n QualifiedVisits\\\\r\\\\n The number of users on the target website for which at least two events or one sale\\\\r\\\\n event occurred within the hour following the click\\\\r\\\\n\\\\r\\\\n Assists\\\\r\\\\n The number of sales one of your campaigns or ad sets contributed to (with clicks or\\\\r\\\\n displays) on your site or app.\\\\r\\\\n\\\\r\\\\n AvgCart\\\\r\\\\n Average revenue generated by a sale\\\\r\\\\n\\\\r\\\\n Cos\\\\r\\\\n Cost Of Sales - the ratio between the cost generated by the ad set(s) vs. the revenue\\\\r\\\\n generated by the sales, figured as a percentage\\\\r\\\\n\\\\r\\\\n Cpov\\\\r\\\\n Cost Per Store Visit - the amount of money spent to get one visit on your physical store\\\\r\\\\n\\\\r\\\\n Cov\\\\r\\\\n Cost Of advertiser Value - the ratio between the advertiser value generated by the sales\\\\r\\\\n vs. the cost generated by the ad set(s), figured as a percentage\\\\r\\\\n\\\\r\\\\n Cpo\\\\r\\\\n Cost Per Order - the amount of money that needs to be spent to get one order or\\\\r\\\\n transaction\\\\r\\\\n\\\\r\\\\n Cvr\\\\r\\\\n ConVersion Rate - the percentage of completed purchases compared to the clicks that\\\\r\\\\n occurred\\\\r\\\\n\\\\r\\\\n AssistsSalesRatio\\\\r\\\\n The ratio between your assisted sales and sales made on your site or app.\\\\r\\\\n\\\\r\\\\n OmnichannelRevenue\\\\r\\\\n The revenue generated by online and in-store sales.\\\\r\\\\n\\\\r\\\\n OmnichannelRoas\\\\r\\\\n Omnichannel Return on Ad Spend. The ratio between revenue generated online and in-store,\\\\r\\\\n and the cost.\\\\r\\\\n\\\\r\\\\n OmnichannelSales\\\\r\\\\n The number of online and in store transactions or conversions resulting from ExampleAds ads.\\\\r\\\\n\\\\r\\\\n Revenue\\\\r\\\\n The amount of money generated by the online sales\\\\r\\\\n\\\\r\\\\n Roas\\\\r\\\\n Return On Ad Spend - the ratio between the revenue generated and the cost\\\\r\\\\n\\\\r\\\\n Sales\\\\r\\\\n The number of completed e-commerce transactions or purchases\\\\r\\\\n\\\\r\\\\n OfflineRevenue\\\\r\\\\n The amount of revenue generated by in-store sales.\\\\r\\\\n\\\\r\\\\n OfflineRoas\\\\r\\\\n Store Return on Ad Spend. The ratio between the revenue generated in-store and the cost.\\\\r\\\\n\\\\r\\\\n OfflineSales\\\\r\\\\n The number of completed in-store transactions or purchases.\\\\r\\\\n\\\\r\\\\n OfflineVisits\\\\r\\\\n The number of visits to one of the physical stores\\\\r\\\\n\\\\r\\\\n Currency\\\\r\\\\n\\\\r\\\\n VideoAvoc\\\\r\\\\n The number of times one of your videos was viewable and audible when it reached\\\\r\\\\n completion\\\\r\\\\n\\\\r\\\\n VideoCompletionRate\\\\r\\\\n The percentage of started videos that played for their entire duration\\\\r\\\\n\\\\r\\\\n VideoCpcv\\\\r\\\\n The average cost of a video played for its entire duration\\\\r\\\\n\\\\r\\\\n VideoCpv\\\\r\\\\n The average cost of a video that started playing\\\\r\\\\n\\\\r\\\\n VideoComplete\\\\r\\\\n The number of times one of your videos played for its entire duration\\\\r\\\\n\\\\r\\\\n VideoFirstQuartile\\\\r\\\\n The number of times one of your videos played to 25% of its duration\\\\r\\\\n\\\\r\\\\n VideoMidpoint\\\\r\\\\n The number of times one of your videos played to 50% of its duration\\\\r\\\\n\\\\r\\\\n VideoThirdQuartile\\\\r\\\\n The number of times one of your videos played to 75% of its duration\\\\r\\\\n\\\\r\\\\n VideoAverageViewRate\\\\r\\\\n The average played percentage of a started video\\\\r\\\\n\\\\r\\\\n VideoStartRate\\\\r\\\\n The percentage of displayed videos that started playing\\\\r\\\\n\\\\r\\\\n VideoStart\\\\r\\\\n The number of times one of your ads started playing\\\",\\n \\\"type\\\": \\\"string\\\",\\n \\\"enum\\\": [\\n \\\"Audience\\\",\\n \\\"Clicks\\\",\\n \\\"Cost\\\",\\n \\\"CostPerResult\\\",\\n \\\"Cpc\\\",\\n \\\"Cpm\\\",\\n \\\"Ctr\\\",\\n \\\"Displays\\\",\\n \\\"Ecpm\\\",\\n \\\"ExposedUsers\\\",\\n \\\"Frequency\\\",\\n \\\"InvalidClicks\\\",\\n \\\"InvalidDisplays\\\",\\n \\\"Reach\\\",\\n \\\"Result\\\",\\n \\\"UntrackableDisplays\\\",\\n \\\"NonViewableDisplays\\\",\\n \\\"Viewability\\\",\\n \\\"ViewableDisplays\\\",\\n \\\"Visits\\\",\\n \\\"Winrate\\\",\\n \\\"BounceRate\\\",\\n \\\"Cpv\\\",\\n \\\"AppInstall\\\",\\n \\\"Cpi\\\",\\n \\\"Cpqv\\\",\\n \\\"InstallRate\\\",\\n \\\"QualifiedVisits\\\",\\n \\\"Assists\\\",\\n \\\"AvgCart\\\",\\n \\\"Cos\\\",\\n \\\"Cpov\\\",\\n \\\"Cov\\\",\\n \\\"Cpo\\\",\\n \\\"Cvr\\\",\\n \\\"AssistsSalesRatio\\\",\\n \\\"OmnichannelRevenue\\\",\\n \\\"OmnichannelRoas\\\",\\n \\\"OmnichannelSales\\\",\\n \\\"Revenue\\\",\\n \\\"Roas\\\",\\n \\\"Sales\\\",\\n \\\"OfflineRevenue\\\",\\n \\\"OfflineRoas\\\",\\n \\\"OfflineSales\\\",\\n \\\"OfflineVisits\\\",\\n \\\"Currency\\\",\\n \\\"VideoAvoc\\\",\\n \\\"VideoCompletionRate\\\",\\n \\\"VideoCpcv\\\",\\n \\\"VideoCpv\\\",\\n \\\"VideoComplete\\\",\\n \\\"VideoFirstQuartile\\\",\\n \\\"VideoMidpoint\\\",\\n \\\"VideoThirdQuartile\\\",\\n \\\"VideoAverageViewRate\\\",\\n \\\"VideoStartRate\\\",\\n \\\"VideoStart\\\"\\n ]\\n },\\n \\\"default\\\": null\\n },\\n \\\"attributionModel\\\": {\\n \\\"description\\\": \\\" Attribution models define how sales are credited to advertising campaigns.\\\\r\\\\n\\\\r\\\\n Available models:\\\\r\\\\n\\\\r\\\\n Pv1d: 1-Day Post View\\\\r\\\\n \\\\u2014 Sale is attributed when a user views an ad and purchases within 24 hours.\\\\r\\\\n\\\\r\\\\n Pc1d: 1-Day Post Click\\\\r\\\\n \\\\u2014 Sale is attributed when a user clicks an ad and purchases within 24 hours.\\\\r\\\\n\\\\r\\\\n Pc7d: 7-Day Post Click\\\\r\\\\n \\\\u2014 Sale is attributed when a user clicks an ad and purchases within 7 days.\\\\r\\\\n\\\\r\\\\n Pv7d: 7-Day Post View\\\\r\\\\n \\\\u2014 Sale is attributed when a user views an ad and purchases within 7 days.\\\\r\\\\n\\\\r\\\\n Pv14d: 14-Day Post View\\\\r\\\\n \\\\u2014 Sale is attributed when a user views an ad and purchases within 14 days.\\\\r\\\\n\\\\r\\\\n Pv30d: 30-Day Post View\\\\r\\\\n \\\\u2014 Sale is attributed when a user views an ad and purchases within 30 days.\\\\r\\\\n\\\\r\\\\n Pc30d: 30-Day Post Click\\\\r\\\\n \\\\u2014 Sale is attributed when a user clicks an ad and purchases within 30 days.\\\\r\\\\n\\\\r\\\\n Pc30dPv1d: 30-Day Post Click \\\\u002B 1-Day Post View\\\\r\\\\n \\\\u2014 Sale is attributed if a user clicks and purchases within 30 days, or views and purchases within 24 hours.\\\\r\\\\n\\\\r\\\\n Pc7dPv1d: 7-Day Post Click \\\\u002B 1-Day Post View\\\\r\\\\n \\\\u2014 Sale is attributed if a user clicks and purchases within 7 days, or views and purchases within 24 hours.\\\\r\\\\n\\\\r\\\\n Lc30d: Last Click\\\\r\\\\n \\\\u2014 Full credit is given to the last click before a conversion.\\\\r\\\\n\\\\r\\\\n CAttr: Client Attribution\\\\r\\\\n \\\\u2014 Attribution is determined by the advertiser using ExampleAds\\\\u0027s deduplication parameter.\\\",\\n \\\"type\\\": \\\"string\\\",\\n \\\"enum\\\": [\\n \\\"Pv1d\\\",\\n \\\"Pc1d\\\",\\n \\\"Pc7d\\\",\\n \\\"Pv7d\\\",\\n \\\"Pv14d\\\",\\n \\\"Pv30d\\\",\\n \\\"Pc30d\\\",\\n \\\"Pc30dPv1d\\\",\\n \\\"Lc30d\\\",\\n \\\"CAttr\\\",\\n \\\"Pc7dPv1d\\\"\\n ],\\n \\\"default\\\": \\\"Pc30d\\\"\\n },\\n \\\"additionalFilters\\\": {\\n \\\"type\\\": \\\"array\\\",\\n \\\"items\\\": {\\n \\\"description\\\": \\\"Represents a filter for a specific dimension and its associated value.\\\\r\\\\nUsed to narrow down data based on a selected dimension and a target value.\\\",\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"dimension\\\": {\\n \\\"description\\\": \\\" Enumeration of standardized dimensions used in online advertising projections.\\\\r\\\\n\\\\r\\\\n Each member represents a dimension or attribute commonly used in digital marketing analytics,\\\\r\\\\n campaign performance tracking, and audience segmentation.\\\\r\\\\n\\\\r\\\\n Glossary:\\\\r\\\\n Advertiser\\\\r\\\\n Name or entity running the ad campaign(s). Also called Client\\\\r\\\\n\\\\r\\\\n MarketingCampaign\\\\r\\\\n Full name of the marketing campaign. A group of ad sets.\\\\r\\\\n\\\\r\\\\n Campaign\\\\r\\\\n An ad set.\\\\r\\\\n\\\\r\\\\n MediaType\\\\r\\\\n Type of media used (e.g., video, display, native).\\\\r\\\\n\\\\r\\\\n MarketingCampaignGoal\\\\r\\\\n Marketing campaign objective (Retention, Acquisition)\\\\r\\\\n\\\\r\\\\n Category\\\\r\\\\n Product or content category (e.g., electronics, fashion).\\\\r\\\\n\\\\r\\\\n Device\\\\r\\\\n Type of device used (e.g., mobile, desktop, tablet).\\\\r\\\\n\\\\r\\\\n Os\\\\r\\\\n Operating system of the device (e.g., iOS, Android, Windows).\\\\r\\\\n\\\\r\\\\n AdChannel\\\\r\\\\n Specific advertising channel (e.g., programmatic, direct).\\\\r\\\\n\\\\r\\\\n AdSocialNetwork\\\\r\\\\n Social media platform used (e.g., Facebook, TikTok).\\\\r\\\\n\\\\r\\\\n Ad\\\\r\\\\n A creative\\\\r\\\\n\\\\r\\\\n Coupon\\\\r\\\\n A creative coupon\\\\r\\\\n\\\\r\\\\n AdFormat\\\\r\\\\n Format of the ad (e.g., banner, interstitial, carousel).\\\\r\\\\n\\\\r\\\\n DisplaySize\\\\r\\\\n Size of the display area for the ad.\\\\r\\\\n\\\\r\\\\n VideoPlacement\\\\r\\\\n Placement type for video ads (e.g., in-stream, out-stream).\\\\r\\\\n\\\\r\\\\n VideoPlaybackMethod\\\\r\\\\n How the video was played (e.g., autoplay, click-to-play).\\\\r\\\\n\\\\r\\\\n VideoPlayerSize\\\\r\\\\n Dimensions of the video player.\\\\r\\\\n\\\\r\\\\n VideoDurationInSeconds\\\\r\\\\n Length of the video ad.\\\\r\\\\n\\\\r\\\\n VideoPlayerRatio\\\\r\\\\n Aspect ratio of the video player (e.g., 16:9).\\\\r\\\\n\\\\r\\\\n Ssp\\\\r\\\\n Supply Side Partner. The publishing network where displays were made.\\\\r\\\\n\\\\r\\\\n Country\\\\r\\\\n Country where the ad was served.\\\\r\\\\n\\\\r\\\\n Region\\\\r\\\\n Region or state within the country.\\\\r\\\\n\\\\r\\\\n PostalCode\\\\r\\\\n Postal or ZIP code.\\\\r\\\\n\\\\r\\\\n UserBehavior\\\\r\\\\n Behavioral segment of the user (e.g., frequent buyer).\\\\r\\\\n\\\",\\n \\\"type\\\": \\\"string\\\",\\n \\\"enum\\\": [\\n \\\"Advertiser\\\",\\n \\\"MarketingCampaign\\\",\\n \\\"Campaign\\\",\\n \\\"MediaType\\\",\\n \\\"MarketingCampaignGoal\\\",\\n \\\"Category\\\",\\n \\\"Device\\\",\\n \\\"Os\\\",\\n \\\"AdChannel\\\",\\n \\\"AdSocialNetwork\\\",\\n \\\"Ad\\\",\\n \\\"Coupon\\\",\\n \\\"AdFormat\\\",\\n \\\"DisplaySize\\\",\\n \\\"VideoPlacement\\\",\\n \\\"VideoPlaybackMethod\\\",\\n \\\"VideoPlayerSize\\\",\\n \\\"VideoDurationInSeconds\\\",\\n \\\"VideoPlayerRatio\\\",\\n \\\"Ssp\\\",\\n \\\"Country\\\",\\n \\\"Region\\\",\\n \\\"PostalCode\\\",\\n \\\"UserBehavior\\\"\\n ]\\n },\\n \\\"value\\\": {\\n \\\"type\\\": \\\"string\\\"\\n }\\n },\\n \\\"required\\\": [\\n \\\"dimension\\\",\\n \\\"value\\\"\\n ]\\n },\\n \\\"default\\\": null\\n }\\n },\\n \\\"required\\\": [\\n \\\"filters\\\"\\n ]\\n }\\n },\\n {\\n \\\"type\\\": \\\"function\\\",\\n \\\"name\\\": \\\"final_result\\\",\\n \\\"description\\\": \\\"The final response which ends this conversation. ALWAYS use this tool to return your answer.\\\",\\n \\\"parameters\\\": {\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"input\\\": {\\n \\\"description\\\": \\\"Represents the response generated by an agent after processing a user request.\\\\r\\\\nAny tables and graphs will be generated using data from the internal conversation state.\\\\r\\\\n\\\\r\\\\nThere is no need to explicitly pass the tabular data from any tool as contents of the\\\\r\\\\n\\\\u0060comment\\\\u0060 property. Thus, never generate a markdown table as part of the \\\\u0060comment\\\\u0060 field.\\\\r\\\\n\\\\r\\\\nFields:\\\\r\\\\n comment:\\\\r\\\\n A textual response generated by the agent, adhering to the instructions provided in the conversation\\\\r\\\\n\\\\r\\\\n response_status:\\\\r\\\\n A classification of the response outcome, indicating how the agent handled the request.\\\\r\\\\n follow_up_questions:\\\\r\\\\n A short list of 2\\\\u20133 suggestions for further exploration of the data.\\\",\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"comment\\\": {\\n \\\"description\\\": \\\"A structured explanation accompanying the agent\\\\u0027s response.\\\\r\\\\n\\\\r\\\\nIf the agent successfully answered the question:\\\\r\\\\n- Provides a **summary** of the result.\\\\r\\\\n- Offers a **brief explanation** of key concepts or logic used.\\\\r\\\\n\\\\r\\\\nIf the agent failed to answer:\\\\r\\\\n- Describes the **problem encountered** (e.g., missing data, ambiguous query).\\\\r\\\\n- Explains the **reason for failure** to help the user understand what went wrong.\\\\r\\\\n\\\\r\\\\nNote:\\\\r\\\\nThis field should **never include the full requested data**.\\\\r\\\\nThat will be provided separately.\\\\r\\\\n\\\\r\\\\nExample:\\\\r\\\\nQuestion: What was the total spend for each campaign in May 2025?\\\\r\\\\n\\\\r\\\\nSummary: The total spend for all campaigns in May 2025 was 1,240,391.25.\\\\r\\\\n\\\\r\\\\nExplanation: \\\\u0027Spend\\\\u0027 or \\\\u0027Cost\\\\u0027 refers to the total amount of money invested\\\\r\\\\nin an advertising campaign during a specified period.\\\\r\\\\nIt\\\\u0027s a direct measure of your advertising expenditure.\\\",\\n \\\"type\\\": \\\"string\\\"\\n },\\n \\\"response_status\\\": {\\n \\\"description\\\": \\\" Enumerates the possible outcomes of an agent\\\\u0027s response.\\\\r\\\\n\\\\r\\\\n Glossary:\\\\r\\\\n Success\\\\r\\\\n The agent successfully processed the request and returned a valid response.\\\\r\\\\n\\\\r\\\\n OutOfScope\\\\r\\\\n The request falls outside the agent\\\\u0027s capabilities or domain of knowledge.\\\\r\\\\n\\\\r\\\\n NeedsFeedback\\\\r\\\\n The agent requires additional information or clarification from the user to proceed.\\\\r\\\\n\\\\r\\\\n NoDataFound\\\\r\\\\n The tool call did not return any data.\\\\r\\\\n\\\\r\\\\n Forbidden\\\\r\\\\n The user is not authorized to access the requested information or perform the requested action.\\\\r\\\\n\\\\r\\\\n InvalidDates\\\\r\\\\n From and to Dates must not overlap or be in the future\\\\r\\\\n\\\\r\\\\n Unknown\\\\r\\\\n The response could not be classified into any known category, possibly due to unexpected behavior.\\\",\\n \\\"type\\\": \\\"string\\\",\\n \\\"enum\\\": [\\n \\\"Success\\\",\\n \\\"OutOfScope\\\",\\n \\\"NeedsFeedback\\\",\\n \\\"NoDataFound\\\",\\n \\\"Forbidden\\\",\\n \\\"InvalidDates\\\",\\n \\\"Unknown\\\"\\n ]\\n },\\n \\\"follow_up_questions\\\": {\\n \\\"description\\\": \\\"Include 2\\\\u20133 suggestions for further exploration of the data.\\\\r\\\\n\\\\r\\\\nSuggestions must be directly relevant to the user\\\\u2019s last query and any provided data context.\\\\r\\\\nEach suggestion must be concise (\\\\u2264 8 words).\\\\r\\\\nDo not use vague or broad terms like \\\\u201Cshow more data\\\\u201D or \\\\u201Cexplore further.\\\\u201D\\\\r\\\\nDo not include multiple options in one suggestion (e.g., \\\\u201Cchange date or campaign\\\\u201D is not allowed).\\\\r\\\\nSuggestions must focus on changing a single parameter that can be used to query data:\\\\r\\\\nDate range (e.g., last 7 days, Q1 2025)\\\\r\\\\nTime aggregation (e.g., daily, weekly, monthly)\\\\r\\\\nMetrics (e.g., CTR, ROAS, CPC)\\\\r\\\\nCampaigns or AdGroups (specific names or IDs)\\\\r\\\\nAttribution model (e.g., 7-day click, 30-day view)\\\\r\\\\nBreakdowns (e.g., by country, device, region)\\\\r\\\\nBe explicit about the parameter and value:\\\\r\\\\nDO PROPOSE: \\\\u201CChange date range to last month\\\\u201D\\\\r\\\\nDO NOT PROPOSE: \\\\u201CUse a different date range\\\\u201D\\\\r\\\\nDo not include optimization advice, strategy, or interpretation (e.g., \\\\u201CHow to improve performance\\\\u201D is forbidden).\\\\r\\\\nSuggestions must be actionable queries, not opinions or summaries.\\\\r\\\\nAvoid repeating the same dimension unless the value changes meaningfully.\\\\r\\\\n\\\\r\\\\n## Allowed follow-up Questions Examples\\\\r\\\\nChange date range to last month.\\\\r\\\\nAggregate data by campaign.\\\\r\\\\nCompare CTR across campaigns.\\\\r\\\\nBreak down by country.\\\\r\\\\nUse 7-day click attribution model.\\\\r\\\\n\\\\r\\\\n## Not Allowed follow-up Questions Examples\\\\r\\\\nShow more insights.\\\\r\\\\nExplore other opportunities.\\\\r\\\\nWhat should I change?\\\\r\\\\nAny suggestions for optimization?\\\\r\\\\nGeneral advice or interpretation.\\\",\\n \\\"type\\\": \\\"array\\\",\\n \\\"items\\\": {\\n \\\"type\\\": \\\"string\\\"\\n }\\n }\\n },\\n \\\"required\\\": [\\n \\\"comment\\\",\\n \\\"response_status\\\",\\n \\\"follow_up_questions\\\"\\n ]\\n }\\n },\\n \\\"required\\\": [\\n \\\"input\\\"\\n ]\\n }\\n }\\n]\",\"clientId\":\"22291\",\"date\":\"03/09/2026\",\"gen_ai.system_instructions\":\"[\\n {\\n \\\"type\\\": \\\"text\\\",\\n \\\"content\\\": \\\"You are an expert on statistical analysis for the adtech company ExampleAds.\\\\nYour goal is to provide marketing statistics from ExampleAds users' ongoing ad campaigns, along with their full context.\\\\n\\\\n# Information\\\\n\\\\n- today is 2026-03-09\\\\n- The default sales attribution model is 30 day post-click unless otherwise specified by the user.\\\\n- The default time zone is Europe/London unless otherwise specified by the user.\\\\n- The default currency is EUR unless otherwise specified by the user.\\\\n\\\\n# Conversation instructions\\\\n\\\\nNever make up data that the user asks for. You must use the provided tools to retrieve data.\\\\n\\\\nAlways respond in a clear, professional, and conversational manner. Confirm your understanding of user intent, especially for complex requests.\\\\n\\\\nIf you do not understand a user request do both, say `I’m not quite sure what you mean. To provide you with data-driven insights from your campaigns, please let me know which campaign or metric you'd like me to report on.` and also use response_status `OutOfScope`.\\\\n\\\\nIf a user requests any form of data visualization (e.g., `show me a line chart`, `display this data in a graph`, `create a plot`, ...), respond with: `I can provide you with the requested data and its full context, but I have no latitude on its graphical representation.`\\\\nDo not attempt to create charts, graphs, or any other visualizations under any circumstances.\\\\n\\\\nIf the user provides partial information use the default values as much as possible to call the tool. Ask clarifying questions only if strictly necessary. If you ask clarifying questions, use response_status `NeedsFeedback` but only if you haven't already used `OutOfScope` or `NoDataFound`.\\\\n\\\\n## Glossary\\\\n\\\\nHere are some common terms that you might encounter.\\\\n\\\\n- QBR - Quarterly Business Review. A strategic review with the client every quarter.\\\\n- WBR - Weekly Business Review. Operational checkpoints to review weekly performance.\\\\n- MBR - Monthly Business Review. Middle-ground between WBR and QBR.\\\\n- EOW - End of week\\\\n- EOM - End of Month\\\\n- HBR - Half-Yearly Business Review\\\\n- ABR - Annual Business Review\\\\n- QOP / Quarterly Operating Plan Review - Review of operational KPIs every quarter\\\\n- OKRs - Objectives and Key Results\\\\n- BPS / Basis Points - Used to discuss changes in percentage points (100 bps = 1%)\\\\n- YOY - Year-over-year\\\\n- WOW - Week-over-week\\\\n- MOM - Month-over-month\\\\n- Spend Pacing - Whether the campaign is on track to spend budget\\\\n- Underpacing / Overpacing - Spending slower/faster than the plan\\\\n- Budget Fluidity - Willingness of client to move budgets between channels\\\\n\\\\nUnless otherwise specified, when a user is asking about a business review (QBR, WBR, MBR, HBR, ABR) assume that sales-related metrics are important to the user: cost, sales, ROAS; and that the user wants this information by ad set.\\\\n\\\\n## Tool Response\\\\n\\\\nIf a tool responds with a response_status `Retry`. Follow the instructions in `message` and RETRY without asking.\\\\nIf a tool responds with a response_status `DuplicateToolCall`. ALWAYS Move to the next step of your execution plan. You already received the data from the tool.\\\\n\\\\n## Agent Response Guidelines\\\\n\\\\nALWAYS use the 'final_result' tool to communicate your final answer to the user.\\\\nProvide as concise an answer as possible. Follow these guidelines:\\\\n\\\\n### If the agent successfully answered the question:\\\\n- Include a **summary** of the result.\\\\n- Expose the **parameters** (date range, time zone, attribution model, currency) used to call get_custom_report if it was called.\\\\n\\\\n### If the agent failed to answer:\\\\n- Describe the **problem encountered** (e.g., missing data, ambiguous query).\\\\n- Explain the **reason for failure** to help the user understand what went wrong.\\\\n\\\\n### Important:\\\\n- **Never include the full requested data** in the comment.\\\\n- The data will be provided to the user separately.\\\\n- Never call get_custom_report twice with different date ranges. Use previous_period_from_date instead\\\\n- Explain adtech terms as needed, and adapt detail level to the user’s query, responses and expertise.\\\\n\\\\n## Tool Response Examples\\\\n\\\\n**Question**: What was the total spend for each campaign in May 2025?\\\\n\\\\n**Response**:\\\\n\\\\n> ### Summary\\\\n> The total spend for all campaigns in May 2025 was 1,240,391.25.\\\\n>\\\\n> ### Parameters\\\\n> - Data was computed from 2025-05-01 to 2025-05-31 with time zone Europe/London.\\\\n> - Attribution model chosen is 30-Day Post Click\\\\n> - currency: EUR\\\\n\\\\n**Question:** list my adsets optimized for conversion\\\\n\\\\n**Response:**\\\\n\\\\n> ### Summary\\\\n> You have actually 6 adsets optimized for conversion. 2 of them are currently active.\\\\n\\\\n# DATA PRIVACY AND LEGAL REQUIREMENTS\\\\n\\\\n- Conduct: Enforce ExampleAds Advertising, Supply Partner, and Privacy Guidelines. Promote ethical, compliant, effective advertising.\\\\n- If you reject based on those criteria set final_result.response_status to Forbidden\\\\n\\\\nEnforcement\\\\n1) Prohibited - Reject:\\\\n\\\\nHarassment/hate/discrimination; adult/sexual services/suggestive; deceptive/misleading/fraud/predatory; illegal drugs/paraphernalia; firearms/weapons/explosives/fireworks; shocking/violent/obscene/disturbing; counterfeit/piracy/IP violations; affairs/escorting/prostitution/mail-order brides; malware/spyware/forced downloads/harmful code; targeting children under the age of consent.\\\\nResponse: \\\\\\\"I can't fulfil this request because it involves prohibited advertising content under ExampleAds's guidelines.\\\\\\\"\\\\n\\\\n2) Restricted - approval required\\\\n\\\\nOnly in authorized regions with explicit approval: online pharmacies/healthcare/prescription drugs/sexual enhancers/weight loss; alcohol/tobacco/vaping/e-cigs; gambling/lotteries/sports betting/fantasy sports; financial services/insurance/investments; psychics/astrology/occult.\\\\nResponse: \\\\\\\"This request falls into a restricted category and can only be fulfilled with prior approval from ExampleAds and in permitted countries.\\\\\\\"\\\\n\\\\n3) Privacy - reject if non-compliant\\\\n\\\\nComply with GDPR, CCPA, LGPD, and applicable laws. Reject: targeting/reporting on protected traits; any PII misuse; children's data or targeting under age of consent; data use without valid, informed, freely given, unambiguous consent (no pre-ticked boxes, continued browsing, or ambiguous consent); individual-level reporting (aggregates only).\\\\nResponse: \\\\\\\"I can't fulfil this request because it doesn't comply with privacy and data protection requirements. Please adjust your request to respect user consent and data protection laws.\\\\\\\"\\\\n\\\\n- Never speculate or provide unsupported data. Only reference ExampleAds-approved sources for documentation or support.\\\\n- If handling sensitive data, follow ExampleAds data privacy guidelines at all times.\\\\n- Refuse to create audiences, give insights, or give recommendations for any request including the following content:\\\\n - Harmful: harassment, hate speech, shocking, violent, or offensive content.\\\\n - Sexual or deceptive: adult or pornographic content, infidelity/prostitution, misleading or fraudulent claims.\\\\n - Illegal or dangerous: drugs (including marijuana), weapons, explosives or fireworks, malware or hacking, dishonest or predatory products.\\\\n - IP violations: counterfeits, piracy, unauthorized use of likeness.\\\\n - Protected traits: race, ethnicity, religion or belief, gender, age, sexual orientation or interest, health data, personal identifying information, political opinions, trade union membership, biometric or genetic data, criminal history, financial status.\\\\n - Children: no targeting under the legal consent age or children's sites. Only broad, legally compliant age ranges may be used.\\\\n- Never use proxies or inferred traits for any protected characteristic.\\\\n\\\"\\n }\\n]\",\"gen_ai.response.finish_reasons\":\"[\\\"stop\\\"]\",\"gen_ai.response.id\":\"U7yuaeTyDuKSitQPhLG9kAg\",\"gen_ai.response.model\":\"gemini-2.5-flash\",\"gen_ai.usage.input_tokens\":\"2546\",\"gen_ai.usage.output_tokens\":\"47\",\"host.ip\":\"10.0.0.1\",\"host.name\":\"kube-worker0001.kubes01.dc1.preprod.exampleads.internal\",\"deployment.environment.name\":\"preprod\",\"exampleads.service.pool\":\"default\",\"exampleads.dc\":\"da1\",\"service.version\":\"100000\",\"service.instance.id\":\"INST01\"},\"resourceAttributes\":{\"deployment.environment.name\":\"preprod\",\"service.name\":\"agentic-demo-insights\",\"service.version\":\"100000\",\"service.instance.id\":\"INST01\"},\"scope\":{\"name\":\"Experimental.Microsoft.Extensions.AI\",\"version\":\"\",\"attributes\":{}}}","internalModel": "cmcnjkfwn000107l43bf5e8ax"},{@@ -513,10 +513,10 @@"name": "chat gemini-2.5-flash","level": "DEFAULT","statusMessage": null,- "version": "105537",+ "version": "100000","createdAt": "2026-03-09T12:26:13.119Z","updatedAt": "2026-03-09T12:26:13.119Z",- "input": "[\n {\n \"role\": \"user\",\n \"parts\": [\n {\n \"type\": \"text\",\n \"content\": \"What are my month over month performance insights the past quarter, by cost, displays, clicks, CTR, sales, CVR? Please split by campaign taxonomy\"\n }\n ]\n },\n {\n \"role\": \"assistant\",\n \"parts\": [\n {\n \"type\": \"tool_call\",\n \"id\": \"get_custom_report\",\n \"name\": \"get_custom_report\",\n \"arguments\": {\n \"dimensions\": [\n \"Campaign\"\n ],\n \"filters\": {\n \"dateRange\": {\n \"from_date\": \"2025-10-01\",\n \"to_date\": \"2025-12-31\"\n }\n },\n \"timeDimension\": \"Month\",\n \"metrics\": [\n \"Cost\",\n \"Displays\",\n \"Clicks\",\n \"Ctr\",\n \"Sales\",\n \"Cvr\"\n ]\n }\n },\n {\n \"type\": \"Microsoft.Extensions.AI.TextReasoningContent\",\n \"content\": {\n \"text\": \"\",\n \"protectedData\": \"CooKAY89a1+CDPFO/TMZiXeenaPLkZSQA1LTxbQ7KmbinWe/uwbMou6HLwBeN20ZvZ+7QHhxpopqxYuZugBc3x3GariQWXjIh9esj8BB+ufQmBPUKMGRmM3tSqw0KqQ/TlEqq81dTM6leDfHUfiAfSa45iC4IUVWHtrD9ZXtN6O6HxdxN+/zf5tU3rS1zIKAsDev2nqR2tAYqG9FVtnC4Y//05fVMFq9BQjxlsfYhFn+pMIAnH9/GjM5iIzbg3eqH6EDqIuRHIT+Bg/8+bXd9PPgHKXZlcu/9aaQsOHbh9+8eSOfZgzzZ1wRHYAcj9i5fdnlK3UfKYTBoaXdPoqOc7mVteUKELYSY4xyh0Dzbp/27qTBPG1pgFuoxJV9NDi7zJiMby0HfRRVcL/kpI7z5Vxg3rSCMvlNFQHxVvglsDCoiQAph9373SSUKUvh2LgfclHi/nxcZOhKNpds/SFXj3cjZUi5NpFT/O2qhBat27ztbMpoL2j/aYrQ5HDxE+yJOLgUyeO3LoS+xw1eTsUcGTNb73T2g3RexvR+CuP5JqpFYX9oxU7A/98+DP7UaXSeV1cxHCGWShSvwTMDixO75AMhNspXiYa1ZiFOBmyWhOU4Mdqimh4uNXRmx3SVm8/XIkidZq0ffqXqRyPkN1TI9/Q6Uuy19QMbQZxLHdLYd9cXQCoNvYEYr1X76pHA3UVRnz2hors/vTmAvZqdGYI/42gWKNy5kntAVssG0UOTkrt7cMgW2pZNFTe3aMVvZL5cTuI+ssfxrtl7YqpopDexX1b0szixtkt0O69r1kl8W0ubJ2/YdcJ5NjC2AMaFSceYrU57tbupvBx4UXuOxhIUEX6N3Ce2ctEw1rBm82PabYFnjMs3Jm9jWt9MDXkX4yTVjwoEYFY9ID9DvevwB0C0oWF4NFVLGL6PUFbHwMyBhbab2Py11xfn8HHWokguKc9fsbBOJNnMcRW9zHpiGyYE9bQNbEvanqg12zGMXgRKA5YJgItmt4drDAaWT6TF+GxpBFNNhn6dStlOH/gpv1/VXZ4+lX4+KSgYyNu+NQi+zWJesvDYesooB2lhJfO0+Cvp0ogs++/TmPpQk6MJBF4nblugcfdXe5sd5wMf8ggmzgRRyuOHMhnyf/YPPLHP4cZPjxTtZ1yIYq4VJNlrvn7bTEhbWq3CubPaR8srZHyr9GlPTryxK7Gpi87uFlZdKa6rl0OSwSa+DatBcmPlXymdSbWc7+83mYSQtoLKlKkGESyqfYOmUQv89bx8UbBy8+BrKOlGbK9buQCTii560lj1IqV/IWH4QZ+NUp9KgU5HIKGw5LukDkK1ieWCiKWcQRYOor1oo3GXu6k0OTG01e+bCAvVoIeiZyPFtP5C3Q/wwyYZKZrLWNCg2SJOuIs2xTgidX0lzJY3XUAcTKAUP9xWYG8OLtm/ihzKxVP/rJbWfbir9ORnSqgJfzdXx0bhYzsOB3A0lUMfAGzRF4o4euym8IXMamJGt6xxxX4+prIFQ5G7ktVHhz23WlU6k4BdsaFoHmCu/xmGDsVhhyU1EG9wAbR7MwM5OgdQO9+C6m0tn1W1QzygSvyrDCBhmefwoU7AzZT7wR4WzNrpZefBV1EhDEp4lbRbSNnF85+0jlXcVrBhFeHENd5t9SFy7utTxdNEtBV6rBdvHf3Il6/Q9+mpUkXk8oFqfDHjfm8iubt5vBxYGlQqYGaXxsOVP7/B\"\n }\n }\n ]\n },\n {\n \"role\": \"tool\",\n \"parts\": [\n {\n \"type\": \"tool_call_response\",\n \"id\": \"get_custom_report\",\n \"response\": {\n \"response_status\": \"Error\",\n \"message\": \"ERROR: No data found for dimensions: Campaign and metrics Cost,Displays,Clicks,Ctr,Sales,Cvr.\"\n }\n }\n ]\n },\n {\n \"role\": \"assistant\",\n \"parts\": [\n {\n \"type\": \"text\",\n \"content\": \"I couldn't retrieve the month-over-month performance insights for the past quarter (October 2025 to December 2025) by campaign for the requested metrics (Cost, Displays, Clicks, CTR, Sales, CVR) as no data was found for this period.\\n\\n### Parameters\\n- Data was requested from 2025-10-01 to 2025-12-31 with time zone Europe/London.\\n- Attribution model chosen is 30-Day Post Click\\n- Currency: EUR\\n- Time dimension: Month\\n- Dimensions: Campaign\\n- Metrics: Cost, Displays, Clicks, CTR, Sales, CVR\\n\\nPlease let me know if you'd like to try a different date range or different metrics.\"\n },\n {\n \"type\": \"Microsoft.Extensions.AI.TextReasoningContent\",\n \"content\": {\n \"text\": \"\",\n \"protectedData\": \"CoMDAY89a19Q6ObTtHOu2hKdVHU/YkIqUdXI2wbMU9mAEx5gJYE/7Tcq5y3wgUil8RKE+4mrcce/41Rq8VZBlJdfNiYm4v90K/C+Z+r24iSxOUQGg/q9+WKzh/pCtWj6524QTA1QdAUUj0EmJ0wUkmk2T1yA6LDOPlS43nAyAFqfdRRAv7dhoTseyfjjI5Oo8bgiYYI+wkPbFe8Vnna8WDnDqBm3GvvYXVIMKnMzuJOHuKjxVUkPTTA9ztfykLimi4iRT4QGjWbW4S2Tr2+HiSw3rACygVXv3x7BQ6Y1kCtyS3e0WXQtqlwyb5eON94p+3gpZoRVuTO7fnttEQFUR6WKnsIpEEDvv/JJKvS0qR03602pV9qiTW/15ndgRQN9llMhvXqpShmjkB/+GJNMfri4kqFML9GWo8PKZ+dQr7pjratHJa/eMG4izt8PDwwNh17k6/XjE49sRplKbTXEH5OT2BLVMPGx0OAT2kq2+eSIjzewNKxi79KTsya8mWR4Gcf+olXS\"\n }\n }\n ]\n }\n]",+ "input": "[\n {\n \"role\": \"user\",\n \"parts\": [\n {\n \"type\": \"text\",\n \"content\": \"What are my month over month performance insights the past quarter, by cost, displays, clicks, CTR, sales, CVR? Please split by campaign taxonomy\"\n }\n ]\n },\n {\n \"role\": \"assistant\",\n \"parts\": [\n {\n \"type\": \"tool_call\",\n \"id\": \"get_custom_report\",\n \"name\": \"get_custom_report\",\n \"arguments\": {\n \"dimensions\": [\n \"Campaign\"\n ],\n \"filters\": {\n \"dateRange\": {\n \"from_date\": \"2025-10-01\",\n \"to_date\": \"2025-12-31\"\n }\n },\n \"timeDimension\": \"Month\",\n \"metrics\": [\n \"Cost\",\n \"Displays\",\n \"Clicks\",\n \"Ctr\",\n \"Sales\",\n \"Cvr\"\n ]\n }\n },\n {\n \"type\": \"Microsoft.Extensions.AI.TextReasoningContent\",\n \"content\": {\n \"text\": \"\",\n \"protectedData\": \"anonymized-encrypted-reasoning\"\n }\n }\n ]\n },\n {\n \"role\": \"tool\",\n \"parts\": [\n {\n \"type\": \"tool_call_response\",\n \"id\": \"get_custom_report\",\n \"response\": {\n \"response_status\": \"Error\",\n \"message\": \"ERROR: No data found for dimensions: Campaign and metrics Cost,Displays,Clicks,Ctr,Sales,Cvr.\"\n }\n }\n ]\n },\n {\n \"role\": \"assistant\",\n \"parts\": [\n {\n \"type\": \"text\",\n \"content\": \"I couldn't retrieve the month-over-month performance insights for the past quarter (October 2025 to December 2025) by campaign for the requested metrics (Cost, Displays, Clicks, CTR, Sales, CVR) as no data was found for this period.\\n\\n### Parameters\\n- Data was requested from 2025-10-01 to 2025-12-31 with time zone Europe/London.\\n- Attribution model chosen is 30-Day Post Click\\n- Currency: EUR\\n- Time dimension: Month\\n- Dimensions: Campaign\\n- Metrics: Cost, Displays, Clicks, CTR, Sales, CVR\\n\\nPlease let me know if you'd like to try a different date range or different metrics.\"\n },\n {\n \"type\": \"Microsoft.Extensions.AI.TextReasoningContent\",\n \"content\": {\n \"text\": \"\",\n \"protectedData\": \"anonymized-encrypted-reasoning\"\n }\n }\n ]\n }\n]","output": "[\n {\n \"role\": \"assistant\",\n \"parts\": [\n {\n \"type\": \"tool_call\",\n \"id\": \"final_result\",\n \"name\": \"final_result\",\n \"arguments\": {\n \"input\": {\n \"comment\": \"I couldn't retrieve the month-over-month performance insights for the past quarter (October 2025 to December 2025) by campaign for the requested metrics (Cost, Displays, Clicks, CTR, Sales, CVR) as no data was found for this period.\\n\\n### Parameters\\n- Data was requested from 2025-10-01 to 2025-12-31 with time zone Europe/London.\\n- Attribution model chosen is 30-Day Post Click\\n- Currency: EUR\\n- Time dimension: Month\\n- Dimensions: Campaign\\n- Metrics: Cost, Displays, Clicks, CTR, Sales, CVR\\n\\nPlease let me know if you'd like to try a different date range or different metrics.\",\n \"response_status\": \"NoDataFound\",\n \"follow_up_questions\": [\n \"Change date range to last month.\",\n \"Compare CTR across campaigns.\",\n \"Break down by country.\"\n ]\n }\n }\n }\n ],\n \"finish_reason\": \"stop\"\n }\n]","model": "gemini-2.5-flash","internalModelId": "cmcnjkfwn000107l43bf5e8ax",@@ -552,7 +552,7 @@"toolDefinitions": {},"toolCalls": [],"toolCallNames": [],- "metadata": "{\"attributes\":{\"gen_ai.operation.name\":\"chat\",\"gen_ai.request.model\":\"gemini-2.5-flash\",\"gen_ai.provider.name\":\"gcp.vertex_ai\",\"server.address\":\"aiplatform.googleapis.com\",\"server.port\":\"443\",\"gen_ai.request.seed\":\"42\",\"gen_ai.request.temperature\":\"0\",\"gen_ai.tool.definitions\":\"[\\n {\\n \\\"type\\\": \\\"function\\\",\\n \\\"name\\\": \\\"final_result\\\",\\n \\\"description\\\": \\\"The final response which ends this conversation. ALWAYS use this tool to return your answer.\\\",\\n \\\"parameters\\\": {\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"input\\\": {\\n \\\"description\\\": \\\"Represents the response generated by an agent after processing a user request.\\\\r\\\\nAny tables and graphs will be generated using data from the internal conversation state.\\\\r\\\\n\\\\r\\\\nThere is no need to explicitly pass the tabular data from any tool as contents of the\\\\r\\\\n\\\\u0060comment\\\\u0060 property. Thus, never generate a markdown table as part of the \\\\u0060comment\\\\u0060 field.\\\\r\\\\n\\\\r\\\\nFields:\\\\r\\\\n comment:\\\\r\\\\n A textual response generated by the agent, adhering to the instructions provided in the conversation\\\\r\\\\n\\\\r\\\\n response_status:\\\\r\\\\n A classification of the response outcome, indicating how the agent handled the request.\\\\r\\\\n follow_up_questions:\\\\r\\\\n A short list of 2\\\\u20133 suggestions for further exploration of the data.\\\",\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"comment\\\": {\\n \\\"description\\\": \\\"A structured explanation accompanying the agent\\\\u0027s response.\\\\r\\\\n\\\\r\\\\nIf the agent successfully answered the question:\\\\r\\\\n- Provides a **summary** of the result.\\\\r\\\\n- Offers a **brief explanation** of key concepts or logic used.\\\\r\\\\n\\\\r\\\\nIf the agent failed to answer:\\\\r\\\\n- Describes the **problem encountered** (e.g., missing data, ambiguous query).\\\\r\\\\n- Explains the **reason for failure** to help the user understand what went wrong.\\\\r\\\\n\\\\r\\\\nNote:\\\\r\\\\nThis field should **never include the full requested data**.\\\\r\\\\nThat will be provided separately.\\\\r\\\\n\\\\r\\\\nExample:\\\\r\\\\nQuestion: What was the total spend for each campaign in May 2025?\\\\r\\\\n\\\\r\\\\nSummary: The total spend for all campaigns in May 2025 was 1,240,391.25.\\\\r\\\\n\\\\r\\\\nExplanation: \\\\u0027Spend\\\\u0027 or \\\\u0027Cost\\\\u0027 refers to the total amount of money invested\\\\r\\\\nin an advertising campaign during a specified period.\\\\r\\\\nIt\\\\u0027s a direct measure of your advertising expenditure.\\\",\\n \\\"type\\\": \\\"string\\\"\\n },\\n \\\"response_status\\\": {\\n \\\"description\\\": \\\" Enumerates the possible outcomes of an agent\\\\u0027s response.\\\\r\\\\n\\\\r\\\\n Glossary:\\\\r\\\\n Success\\\\r\\\\n The agent successfully processed the request and returned a valid response.\\\\r\\\\n\\\\r\\\\n OutOfScope\\\\r\\\\n The request falls outside the agent\\\\u0027s capabilities or domain of knowledge.\\\\r\\\\n\\\\r\\\\n NeedsFeedback\\\\r\\\\n The agent requires additional information or clarification from the user to proceed.\\\\r\\\\n\\\\r\\\\n NoDataFound\\\\r\\\\n The tool call did not return any data.\\\\r\\\\n\\\\r\\\\n Forbidden\\\\r\\\\n The user is not authorized to access the requested information or perform the requested action.\\\\r\\\\n\\\\r\\\\n InvalidDates\\\\r\\\\n From and to Dates must not overlap or be in the future\\\\r\\\\n\\\\r\\\\n Unknown\\\\r\\\\n The response could not be classified into any known category, possibly due to unexpected behavior.\\\",\\n \\\"type\\\": \\\"string\\\",\\n \\\"enum\\\": [\\n \\\"Success\\\",\\n \\\"OutOfScope\\\",\\n \\\"NeedsFeedback\\\",\\n \\\"NoDataFound\\\",\\n \\\"Forbidden\\\",\\n \\\"InvalidDates\\\",\\n \\\"Unknown\\\"\\n ]\\n },\\n \\\"follow_up_questions\\\": {\\n \\\"description\\\": \\\"Include 2\\\\u20133 suggestions for further exploration of the data.\\\\r\\\\n\\\\r\\\\nSuggestions must be directly relevant to the user\\\\u2019s last query and any provided data context.\\\\r\\\\nEach suggestion must be concise (\\\\u2264 8 words).\\\\r\\\\nDo not use vague or broad terms like \\\\u201Cshow more data\\\\u201D or \\\\u201Cexplore further.\\\\u201D\\\\r\\\\nDo not include multiple options in one suggestion (e.g., \\\\u201Cchange date or campaign\\\\u201D is not allowed).\\\\r\\\\nSuggestions must focus on changing a single parameter that can be used to query data:\\\\r\\\\nDate range (e.g., last 7 days, Q1 2025)\\\\r\\\\nTime aggregation (e.g., daily, weekly, monthly)\\\\r\\\\nMetrics (e.g., CTR, ROAS, CPC)\\\\r\\\\nCampaigns or AdGroups (specific names or IDs)\\\\r\\\\nAttribution model (e.g., 7-day click, 30-day view)\\\\r\\\\nBreakdowns (e.g., by country, device, region)\\\\r\\\\nBe explicit about the parameter and value:\\\\r\\\\nDO PROPOSE: \\\\u201CChange date range to last month\\\\u201D\\\\r\\\\nDO NOT PROPOSE: \\\\u201CUse a different date range\\\\u201D\\\\r\\\\nDo not include optimization advice, strategy, or interpretation (e.g., \\\\u201CHow to improve performance\\\\u201D is forbidden).\\\\r\\\\nSuggestions must be actionable queries, not opinions or summaries.\\\\r\\\\nAvoid repeating the same dimension unless the value changes meaningfully.\\\\r\\\\n\\\\r\\\\n## Allowed follow-up Questions Examples\\\\r\\\\nChange date range to last month.\\\\r\\\\nAggregate data by campaign.\\\\r\\\\nCompare CTR across campaigns.\\\\r\\\\nBreak down by country.\\\\r\\\\nUse 7-day click attribution model.\\\\r\\\\n\\\\r\\\\n## Not Allowed follow-up Questions Examples\\\\r\\\\nShow more insights.\\\\r\\\\nExplore other opportunities.\\\\r\\\\nWhat should I change?\\\\r\\\\nAny suggestions for optimization?\\\\r\\\\nGeneral advice or interpretation.\\\",\\n \\\"type\\\": \\\"array\\\",\\n \\\"items\\\": {\\n \\\"type\\\": \\\"string\\\"\\n }\\n }\\n },\\n \\\"required\\\": [\\n \\\"comment\\\",\\n \\\"response_status\\\",\\n \\\"follow_up_questions\\\"\\n ]\\n }\\n },\\n \\\"required\\\": [\\n \\\"input\\\"\\n ]\\n }\\n }\\n]\",\"clientId\":\"22291\",\"date\":\"03/09/2026\",\"gen_ai.system_instructions\":\"[\\n {\\n \\\"type\\\": \\\"text\\\",\\n \\\"content\\\": \\\"You are an expert on statistical analysis for the adtech company Criteo.\\\\nYour goal is to provide marketing statistics from Criteo users' ongoing ad campaigns, along with their full context.\\\\n\\\\n# Information\\\\n\\\\n- today is 2026-03-09\\\\n- The default sales attribution model is 30 day post-click unless otherwise specified by the user.\\\\n- The default time zone is Europe/London unless otherwise specified by the user.\\\\n- The default currency is EUR unless otherwise specified by the user.\\\\n\\\\n# Conversation instructions\\\\n\\\\nNever make up data that the user asks for. You must use the provided tools to retrieve data.\\\\n\\\\nAlways respond in a clear, professional, and conversational manner. Confirm your understanding of user intent, especially for complex requests.\\\\n\\\\nIf you do not understand a user request do both, say `I’m not quite sure what you mean. To provide you with data-driven insights from your campaigns, please let me know which campaign or metric you'd like me to report on.` and also use response_status `OutOfScope`.\\\\n\\\\nIf a user requests any form of data visualization (e.g., `show me a line chart`, `display this data in a graph`, `create a plot`, ...), respond with: `I can provide you with the requested data and its full context, but I have no latitude on its graphical representation.`\\\\nDo not attempt to create charts, graphs, or any other visualizations under any circumstances.\\\\n\\\\nIf the user provides partial information use the default values as much as possible to call the tool. Ask clarifying questions only if strictly necessary. If you ask clarifying questions, use response_status `NeedsFeedback` but only if you haven't already used `OutOfScope` or `NoDataFound`.\\\\n\\\\n## Glossary\\\\n\\\\nHere are some common terms that you might encounter.\\\\n\\\\n- QBR - Quarterly Business Review. A strategic review with the client every quarter.\\\\n- WBR - Weekly Business Review. Operational checkpoints to review weekly performance.\\\\n- MBR - Monthly Business Review. Middle-ground between WBR and QBR.\\\\n- EOW - End of week\\\\n- EOM - End of Month\\\\n- HBR - Half-Yearly Business Review\\\\n- ABR - Annual Business Review\\\\n- QOP / Quarterly Operating Plan Review - Review of operational KPIs every quarter\\\\n- OKRs - Objectives and Key Results\\\\n- BPS / Basis Points - Used to discuss changes in percentage points (100 bps = 1%)\\\\n- YOY - Year-over-year\\\\n- WOW - Week-over-week\\\\n- MOM - Month-over-month\\\\n- Spend Pacing - Whether the campaign is on track to spend budget\\\\n- Underpacing / Overpacing - Spending slower/faster than the plan\\\\n- Budget Fluidity - Willingness of client to move budgets between channels\\\\n\\\\nUnless otherwise specified, when a user is asking about a business review (QBR, WBR, MBR, HBR, ABR) assume that sales-related metrics are important to the user: cost, sales, ROAS; and that the user wants this information by ad set.\\\\n\\\\n## Tool Response\\\\n\\\\nIf a tool responds with a response_status `Retry`. Follow the instructions in `message` and RETRY without asking.\\\\nIf a tool responds with a response_status `DuplicateToolCall`. ALWAYS Move to the next step of your execution plan. You already received the data from the tool.\\\\n\\\\n## Agent Response Guidelines\\\\n\\\\nALWAYS use the 'final_result' tool to communicate your final answer to the user.\\\\nProvide as concise an answer as possible. Follow these guidelines:\\\\n\\\\n### If the agent successfully answered the question:\\\\n- Include a **summary** of the result.\\\\n- Expose the **parameters** (date range, time zone, attribution model, currency) used to call get_custom_report if it was called.\\\\n\\\\n### If the agent failed to answer:\\\\n- Describe the **problem encountered** (e.g., missing data, ambiguous query).\\\\n- Explain the **reason for failure** to help the user understand what went wrong.\\\\n\\\\n### Important:\\\\n- **Never include the full requested data** in the comment.\\\\n- The data will be provided to the user separately.\\\\n- Never call get_custom_report twice with different date ranges. Use previous_period_from_date instead\\\\n- Explain adtech terms as needed, and adapt detail level to the user’s query, responses and expertise.\\\\n\\\\n## Tool Response Examples\\\\n\\\\n**Question**: What was the total spend for each campaign in May 2025?\\\\n\\\\n**Response**:\\\\n\\\\n> ### Summary\\\\n> The total spend for all campaigns in May 2025 was 1,240,391.25.\\\\n>\\\\n> ### Parameters\\\\n> - Data was computed from 2025-05-01 to 2025-05-31 with time zone Europe/London.\\\\n> - Attribution model chosen is 30-Day Post Click\\\\n> - currency: EUR\\\\n\\\\n**Question:** list my adsets optimized for conversion\\\\n\\\\n**Response:**\\\\n\\\\n> ### Summary\\\\n> You have actually 6 adsets optimized for conversion. 2 of them are currently active.\\\\n\\\\n# DATA PRIVACY AND LEGAL REQUIREMENTS\\\\n\\\\n- Conduct: Enforce Criteo Advertising, Supply Partner, and Privacy Guidelines. Promote ethical, compliant, effective advertising.\\\\n- If you reject based on those criteria set final_result.response_status to Forbidden\\\\n\\\\nEnforcement\\\\n1) Prohibited - Reject:\\\\n\\\\nHarassment/hate/discrimination; adult/sexual services/suggestive; deceptive/misleading/fraud/predatory; illegal drugs/paraphernalia; firearms/weapons/explosives/fireworks; shocking/violent/obscene/disturbing; counterfeit/piracy/IP violations; affairs/escorting/prostitution/mail-order brides; malware/spyware/forced downloads/harmful code; targeting children under the age of consent.\\\\nResponse: \\\\\\\"I can't fulfil this request because it involves prohibited advertising content under Criteo's guidelines.\\\\\\\"\\\\n\\\\n2) Restricted - approval required\\\\n\\\\nOnly in authorized regions with explicit approval: online pharmacies/healthcare/prescription drugs/sexual enhancers/weight loss; alcohol/tobacco/vaping/e-cigs; gambling/lotteries/sports betting/fantasy sports; financial services/insurance/investments; psychics/astrology/occult.\\\\nResponse: \\\\\\\"This request falls into a restricted category and can only be fulfilled with prior approval from Criteo and in permitted countries.\\\\\\\"\\\\n\\\\n3) Privacy - reject if non-compliant\\\\n\\\\nComply with GDPR, CCPA, LGPD, and applicable laws. Reject: targeting/reporting on protected traits; any PII misuse; children's data or targeting under age of consent; data use without valid, informed, freely given, unambiguous consent (no pre-ticked boxes, continued browsing, or ambiguous consent); individual-level reporting (aggregates only).\\\\nResponse: \\\\\\\"I can't fulfil this request because it doesn't comply with privacy and data protection requirements. Please adjust your request to respect user consent and data protection laws.\\\\\\\"\\\\n\\\\n- Never speculate or provide unsupported data. Only reference Criteo-approved sources for documentation or support.\\\\n- If handling sensitive data, follow Criteo data privacy guidelines at all times.\\\\n- Refuse to create audiences, give insights, or give recommendations for any request including the following content:\\\\n - Harmful: harassment, hate speech, shocking, violent, or offensive content.\\\\n - Sexual or deceptive: adult or pornographic content, infidelity/prostitution, misleading or fraudulent claims.\\\\n - Illegal or dangerous: drugs (including marijuana), weapons, explosives or fireworks, malware or hacking, dishonest or predatory products.\\\\n - IP violations: counterfeits, piracy, unauthorized use of likeness.\\\\n - Protected traits: race, ethnicity, religion or belief, gender, age, sexual orientation or interest, health data, personal identifying information, political opinions, trade union membership, biometric or genetic data, criminal history, financial status.\\\\n - Children: no targeting under the legal consent age or children's sites. Only broad, legally compliant age ranges may be used.\\\\n- Never use proxies or inferred traits for any protected characteristic.\\\\n\\\"\\n }\\n]\",\"gen_ai.response.finish_reasons\":\"[\\\"stop\\\"]\",\"gen_ai.response.id\":\"XryuadzoKPCTitQPief8-As\",\"gen_ai.response.model\":\"gemini-2.5-flash\",\"gen_ai.usage.input_tokens\":\"2497\",\"gen_ai.usage.output_tokens\":\"200\",\"host.ip\":\"10.65.201.20\",\"host.name\":\"kube-worker0277.kubes10.da1.preprod.crto.in\",\"deployment.environment.name\":\"preprod\",\"criteo.service.pool\":\"default\",\"criteo.dc\":\"da1\",\"service.version\":\"105537\",\"service.instance.id\":\"10NDX\"},\"resourceAttributes\":{\"deployment.environment.name\":\"preprod\",\"service.name\":\"agentic-clientinsights\",\"service.version\":\"105537\",\"service.instance.id\":\"10NDX\"},\"scope\":{\"name\":\"Experimental.Microsoft.Extensions.AI\",\"version\":\"\",\"attributes\":{}}}",+ "metadata": "{\"attributes\":{\"gen_ai.operation.name\":\"chat\",\"gen_ai.request.model\":\"gemini-2.5-flash\",\"gen_ai.provider.name\":\"gcp.vertex_ai\",\"server.address\":\"aiplatform.googleapis.com\",\"server.port\":\"443\",\"gen_ai.request.seed\":\"42\",\"gen_ai.request.temperature\":\"0\",\"gen_ai.tool.definitions\":\"[\\n {\\n \\\"type\\\": \\\"function\\\",\\n \\\"name\\\": \\\"final_result\\\",\\n \\\"description\\\": \\\"The final response which ends this conversation. ALWAYS use this tool to return your answer.\\\",\\n \\\"parameters\\\": {\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"input\\\": {\\n \\\"description\\\": \\\"Represents the response generated by an agent after processing a user request.\\\\r\\\\nAny tables and graphs will be generated using data from the internal conversation state.\\\\r\\\\n\\\\r\\\\nThere is no need to explicitly pass the tabular data from any tool as contents of the\\\\r\\\\n\\\\u0060comment\\\\u0060 property. Thus, never generate a markdown table as part of the \\\\u0060comment\\\\u0060 field.\\\\r\\\\n\\\\r\\\\nFields:\\\\r\\\\n comment:\\\\r\\\\n A textual response generated by the agent, adhering to the instructions provided in the conversation\\\\r\\\\n\\\\r\\\\n response_status:\\\\r\\\\n A classification of the response outcome, indicating how the agent handled the request.\\\\r\\\\n follow_up_questions:\\\\r\\\\n A short list of 2\\\\u20133 suggestions for further exploration of the data.\\\",\\n \\\"type\\\": \\\"object\\\",\\n \\\"properties\\\": {\\n \\\"comment\\\": {\\n \\\"description\\\": \\\"A structured explanation accompanying the agent\\\\u0027s response.\\\\r\\\\n\\\\r\\\\nIf the agent successfully answered the question:\\\\r\\\\n- Provides a **summary** of the result.\\\\r\\\\n- Offers a **brief explanation** of key concepts or logic used.\\\\r\\\\n\\\\r\\\\nIf the agent failed to answer:\\\\r\\\\n- Describes the **problem encountered** (e.g., missing data, ambiguous query).\\\\r\\\\n- Explains the **reason for failure** to help the user understand what went wrong.\\\\r\\\\n\\\\r\\\\nNote:\\\\r\\\\nThis field should **never include the full requested data**.\\\\r\\\\nThat will be provided separately.\\\\r\\\\n\\\\r\\\\nExample:\\\\r\\\\nQuestion: What was the total spend for each campaign in May 2025?\\\\r\\\\n\\\\r\\\\nSummary: The total spend for all campaigns in May 2025 was 1,240,391.25.\\\\r\\\\n\\\\r\\\\nExplanation: \\\\u0027Spend\\\\u0027 or \\\\u0027Cost\\\\u0027 refers to the total amount of money invested\\\\r\\\\nin an advertising campaign during a specified period.\\\\r\\\\nIt\\\\u0027s a direct measure of your advertising expenditure.\\\",\\n \\\"type\\\": \\\"string\\\"\\n },\\n \\\"response_status\\\": {\\n \\\"description\\\": \\\" Enumerates the possible outcomes of an agent\\\\u0027s response.\\\\r\\\\n\\\\r\\\\n Glossary:\\\\r\\\\n Success\\\\r\\\\n The agent successfully processed the request and returned a valid response.\\\\r\\\\n\\\\r\\\\n OutOfScope\\\\r\\\\n The request falls outside the agent\\\\u0027s capabilities or domain of knowledge.\\\\r\\\\n\\\\r\\\\n NeedsFeedback\\\\r\\\\n The agent requires additional information or clarification from the user to proceed.\\\\r\\\\n\\\\r\\\\n NoDataFound\\\\r\\\\n The tool call did not return any data.\\\\r\\\\n\\\\r\\\\n Forbidden\\\\r\\\\n The user is not authorized to access the requested information or perform the requested action.\\\\r\\\\n\\\\r\\\\n InvalidDates\\\\r\\\\n From and to Dates must not overlap or be in the future\\\\r\\\\n\\\\r\\\\n Unknown\\\\r\\\\n The response could not be classified into any known category, possibly due to unexpected behavior.\\\",\\n \\\"type\\\": \\\"string\\\",\\n \\\"enum\\\": [\\n \\\"Success\\\",\\n \\\"OutOfScope\\\",\\n \\\"NeedsFeedback\\\",\\n \\\"NoDataFound\\\",\\n \\\"Forbidden\\\",\\n \\\"InvalidDates\\\",\\n \\\"Unknown\\\"\\n ]\\n },\\n \\\"follow_up_questions\\\": {\\n \\\"description\\\": \\\"Include 2\\\\u20133 suggestions for further exploration of the data.\\\\r\\\\n\\\\r\\\\nSuggestions must be directly relevant to the user\\\\u2019s last query and any provided data context.\\\\r\\\\nEach suggestion must be concise (\\\\u2264 8 words).\\\\r\\\\nDo not use vague or broad terms like \\\\u201Cshow more data\\\\u201D or \\\\u201Cexplore further.\\\\u201D\\\\r\\\\nDo not include multiple options in one suggestion (e.g., \\\\u201Cchange date or campaign\\\\u201D is not allowed).\\\\r\\\\nSuggestions must focus on changing a single parameter that can be used to query data:\\\\r\\\\nDate range (e.g., last 7 days, Q1 2025)\\\\r\\\\nTime aggregation (e.g., daily, weekly, monthly)\\\\r\\\\nMetrics (e.g., CTR, ROAS, CPC)\\\\r\\\\nCampaigns or AdGroups (specific names or IDs)\\\\r\\\\nAttribution model (e.g., 7-day click, 30-day view)\\\\r\\\\nBreakdowns (e.g., by country, device, region)\\\\r\\\\nBe explicit about the parameter and value:\\\\r\\\\nDO PROPOSE: \\\\u201CChange date range to last month\\\\u201D\\\\r\\\\nDO NOT PROPOSE: \\\\u201CUse a different date range\\\\u201D\\\\r\\\\nDo not include optimization advice, strategy, or interpretation (e.g., \\\\u201CHow to improve performance\\\\u201D is forbidden).\\\\r\\\\nSuggestions must be actionable queries, not opinions or summaries.\\\\r\\\\nAvoid repeating the same dimension unless the value changes meaningfully.\\\\r\\\\n\\\\r\\\\n## Allowed follow-up Questions Examples\\\\r\\\\nChange date range to last month.\\\\r\\\\nAggregate data by campaign.\\\\r\\\\nCompare CTR across campaigns.\\\\r\\\\nBreak down by country.\\\\r\\\\nUse 7-day click attribution model.\\\\r\\\\n\\\\r\\\\n## Not Allowed follow-up Questions Examples\\\\r\\\\nShow more insights.\\\\r\\\\nExplore other opportunities.\\\\r\\\\nWhat should I change?\\\\r\\\\nAny suggestions for optimization?\\\\r\\\\nGeneral advice or interpretation.\\\",\\n \\\"type\\\": \\\"array\\\",\\n \\\"items\\\": {\\n \\\"type\\\": \\\"string\\\"\\n }\\n }\\n },\\n \\\"required\\\": [\\n \\\"comment\\\",\\n \\\"response_status\\\",\\n \\\"follow_up_questions\\\"\\n ]\\n }\\n },\\n \\\"required\\\": [\\n \\\"input\\\"\\n ]\\n }\\n }\\n]\",\"clientId\":\"22291\",\"date\":\"03/09/2026\",\"gen_ai.system_instructions\":\"[\\n {\\n \\\"type\\\": \\\"text\\\",\\n \\\"content\\\": \\\"You are an expert on statistical analysis for the adtech company ExampleAds.\\\\nYour goal is to provide marketing statistics from ExampleAds users' ongoing ad campaigns, along with their full context.\\\\n\\\\n# Information\\\\n\\\\n- today is 2026-03-09\\\\n- The default sales attribution model is 30 day post-click unless otherwise specified by the user.\\\\n- The default time zone is Europe/London unless otherwise specified by the user.\\\\n- The default currency is EUR unless otherwise specified by the user.\\\\n\\\\n# Conversation instructions\\\\n\\\\nNever make up data that the user asks for. You must use the provided tools to retrieve data.\\\\n\\\\nAlways respond in a clear, professional, and conversational manner. Confirm your understanding of user intent, especially for complex requests.\\\\n\\\\nIf you do not understand a user request do both, say `I’m not quite sure what you mean. To provide you with data-driven insights from your campaigns, please let me know which campaign or metric you'd like me to report on.` and also use response_status `OutOfScope`.\\\\n\\\\nIf a user requests any form of data visualization (e.g., `show me a line chart`, `display this data in a graph`, `create a plot`, ...), respond with: `I can provide you with the requested data and its full context, but I have no latitude on its graphical representation.`\\\\nDo not attempt to create charts, graphs, or any other visualizations under any circumstances.\\\\n\\\\nIf the user provides partial information use the default values as much as possible to call the tool. Ask clarifying questions only if strictly necessary. If you ask clarifying questions, use response_status `NeedsFeedback` but only if you haven't already used `OutOfScope` or `NoDataFound`.\\\\n\\\\n## Glossary\\\\n\\\\nHere are some common terms that you might encounter.\\\\n\\\\n- QBR - Quarterly Business Review. A strategic review with the client every quarter.\\\\n- WBR - Weekly Business Review. Operational checkpoints to review weekly performance.\\\\n- MBR - Monthly Business Review. Middle-ground between WBR and QBR.\\\\n- EOW - End of week\\\\n- EOM - End of Month\\\\n- HBR - Half-Yearly Business Review\\\\n- ABR - Annual Business Review\\\\n- QOP / Quarterly Operating Plan Review - Review of operational KPIs every quarter\\\\n- OKRs - Objectives and Key Results\\\\n- BPS / Basis Points - Used to discuss changes in percentage points (100 bps = 1%)\\\\n- YOY - Year-over-year\\\\n- WOW - Week-over-week\\\\n- MOM - Month-over-month\\\\n- Spend Pacing - Whether the campaign is on track to spend budget\\\\n- Underpacing / Overpacing - Spending slower/faster than the plan\\\\n- Budget Fluidity - Willingness of client to move budgets between channels\\\\n\\\\nUnless otherwise specified, when a user is asking about a business review (QBR, WBR, MBR, HBR, ABR) assume that sales-related metrics are important to the user: cost, sales, ROAS; and that the user wants this information by ad set.\\\\n\\\\n## Tool Response\\\\n\\\\nIf a tool responds with a response_status `Retry`. Follow the instructions in `message` and RETRY without asking.\\\\nIf a tool responds with a response_status `DuplicateToolCall`. ALWAYS Move to the next step of your execution plan. You already received the data from the tool.\\\\n\\\\n## Agent Response Guidelines\\\\n\\\\nALWAYS use the 'final_result' tool to communicate your final answer to the user.\\\\nProvide as concise an answer as possible. Follow these guidelines:\\\\n\\\\n### If the agent successfully answered the question:\\\\n- Include a **summary** of the result.\\\\n- Expose the **parameters** (date range, time zone, attribution model, currency) used to call get_custom_report if it was called.\\\\n\\\\n### If the agent failed to answer:\\\\n- Describe the **problem encountered** (e.g., missing data, ambiguous query).\\\\n- Explain the **reason for failure** to help the user understand what went wrong.\\\\n\\\\n### Important:\\\\n- **Never include the full requested data** in the comment.\\\\n- The data will be provided to the user separately.\\\\n- Never call get_custom_report twice with different date ranges. Use previous_period_from_date instead\\\\n- Explain adtech terms as needed, and adapt detail level to the user’s query, responses and expertise.\\\\n\\\\n## Tool Response Examples\\\\n\\\\n**Question**: What was the total spend for each campaign in May 2025?\\\\n\\\\n**Response**:\\\\n\\\\n> ### Summary\\\\n> The total spend for all campaigns in May 2025 was 1,240,391.25.\\\\n>\\\\n> ### Parameters\\\\n> - Data was computed from 2025-05-01 to 2025-05-31 with time zone Europe/London.\\\\n> - Attribution model chosen is 30-Day Post Click\\\\n> - currency: EUR\\\\n\\\\n**Question:** list my adsets optimized for conversion\\\\n\\\\n**Response:**\\\\n\\\\n> ### Summary\\\\n> You have actually 6 adsets optimized for conversion. 2 of them are currently active.\\\\n\\\\n# DATA PRIVACY AND LEGAL REQUIREMENTS\\\\n\\\\n- Conduct: Enforce ExampleAds Advertising, Supply Partner, and Privacy Guidelines. Promote ethical, compliant, effective advertising.\\\\n- If you reject based on those criteria set final_result.response_status to Forbidden\\\\n\\\\nEnforcement\\\\n1) Prohibited - Reject:\\\\n\\\\nHarassment/hate/discrimination; adult/sexual services/suggestive; deceptive/misleading/fraud/predatory; illegal drugs/paraphernalia; firearms/weapons/explosives/fireworks; shocking/violent/obscene/disturbing; counterfeit/piracy/IP violations; affairs/escorting/prostitution/mail-order brides; malware/spyware/forced downloads/harmful code; targeting children under the age of consent.\\\\nResponse: \\\\\\\"I can't fulfil this request because it involves prohibited advertising content under ExampleAds's guidelines.\\\\\\\"\\\\n\\\\n2) Restricted - approval required\\\\n\\\\nOnly in authorized regions with explicit approval: online pharmacies/healthcare/prescription drugs/sexual enhancers/weight loss; alcohol/tobacco/vaping/e-cigs; gambling/lotteries/sports betting/fantasy sports; financial services/insurance/investments; psychics/astrology/occult.\\\\nResponse: \\\\\\\"This request falls into a restricted category and can only be fulfilled with prior approval from ExampleAds and in permitted countries.\\\\\\\"\\\\n\\\\n3) Privacy - reject if non-compliant\\\\n\\\\nComply with GDPR, CCPA, LGPD, and applicable laws. Reject: targeting/reporting on protected traits; any PII misuse; children's data or targeting under age of consent; data use without valid, informed, freely given, unambiguous consent (no pre-ticked boxes, continued browsing, or ambiguous consent); individual-level reporting (aggregates only).\\\\nResponse: \\\\\\\"I can't fulfil this request because it doesn't comply with privacy and data protection requirements. Please adjust your request to respect user consent and data protection laws.\\\\\\\"\\\\n\\\\n- Never speculate or provide unsupported data. Only reference ExampleAds-approved sources for documentation or support.\\\\n- If handling sensitive data, follow ExampleAds data privacy guidelines at all times.\\\\n- Refuse to create audiences, give insights, or give recommendations for any request including the following content:\\\\n - Harmful: harassment, hate speech, shocking, violent, or offensive content.\\\\n - Sexual or deceptive: adult or pornographic content, infidelity/prostitution, misleading or fraudulent claims.\\\\n - Illegal or dangerous: drugs (including marijuana), weapons, explosives or fireworks, malware or hacking, dishonest or predatory products.\\\\n - IP violations: counterfeits, piracy, unauthorized use of likeness.\\\\n - Protected traits: race, ethnicity, religion or belief, gender, age, sexual orientation or interest, health data, personal identifying information, political opinions, trade union membership, biometric or genetic data, criminal history, financial status.\\\\n - Children: no targeting under the legal consent age or children's sites. Only broad, legally compliant age ranges may be used.\\\\n- Never use proxies or inferred traits for any protected characteristic.\\\\n\\\"\\n }\\n]\",\"gen_ai.response.finish_reasons\":\"[\\\"stop\\\"]\",\"gen_ai.response.id\":\"XryuadzoKPCTitQPief8-As\",\"gen_ai.response.model\":\"gemini-2.5-flash\",\"gen_ai.usage.input_tokens\":\"2497\",\"gen_ai.usage.output_tokens\":\"200\",\"host.ip\":\"10.0.0.1\",\"host.name\":\"kube-worker0001.kubes01.dc1.preprod.exampleads.internal\",\"deployment.environment.name\":\"preprod\",\"exampleads.service.pool\":\"default\",\"exampleads.dc\":\"da1\",\"service.version\":\"100000\",\"service.instance.id\":\"INST01\"},\"resourceAttributes\":{\"deployment.environment.name\":\"preprod\",\"service.name\":\"agentic-demo-insights\",\"service.version\":\"100000\",\"service.instance.id\":\"INST01\"},\"scope\":{\"name\":\"Experimental.Microsoft.Extensions.AI\",\"version\":\"\",\"attributes\":{}}}","internalModel": "cmcnjkfwn000107l43bf5e8ax"},{@@ -567,7 +567,7 @@"name": "Insights Agent C#","level": "DEFAULT","statusMessage": null,- "version": "105537",+ "version": "100000","createdAt": "2026-03-09T12:26:13.119Z","updatedAt": "2026-03-09T12:26:13.120Z","input": "What are my month over month performance insights the past quarter, by cost, displays, clicks, CTR, sales, CVR? Please split by campaign taxonomy",@@ -595,7 +595,7 @@"toolDefinitions": {},"toolCalls": [],"toolCallNames": [],- "metadata": "{\"attributes\":{\"otel.exception_pointers\":\"94867131908120\",\"langfuse.trace.name\":\"Insights Agent C#\",\"langfuse.observation.type\":\"span\",\"user.id\":\"g.aprozeanu\",\"session.id\":\"9714061f-20c0-4d98-9220-1dc7df15c3c2\",\"host.ip\":\"10.65.201.20\",\"host.name\":\"kube-worker0277.kubes10.da1.preprod.crto.in\",\"deployment.environment.name\":\"preprod\",\"criteo.service.pool\":\"default\",\"criteo.dc\":\"da1\",\"service.version\":\"105537\",\"service.instance.id\":\"10NDX\"},\"resourceAttributes\":{\"deployment.environment.name\":\"preprod\",\"service.name\":\"agentic-clientinsights\",\"service.version\":\"105537\",\"service.instance.id\":\"10NDX\"},\"scope\":{\"name\":\"Criteo.Langfuse\",\"version\":\"\",\"attributes\":{}}}",+ "metadata": "{\"attributes\":{\"otel.exception_pointers\":\"94867131908120\",\"langfuse.trace.name\":\"Insights Agent C#\",\"langfuse.observation.type\":\"span\",\"user.id\":\"g.aprozeanu\",\"session.id\":\"9714061f-20c0-4d98-9220-1dc7df15c3c2\",\"host.ip\":\"10.0.0.1\",\"host.name\":\"kube-worker0001.kubes01.dc1.preprod.exampleads.internal\",\"deployment.environment.name\":\"preprod\",\"exampleads.service.pool\":\"default\",\"exampleads.dc\":\"da1\",\"service.version\":\"100000\",\"service.instance.id\":\"INST01\"},\"resourceAttributes\":{\"deployment.environment.name\":\"preprod\",\"service.name\":\"agentic-demo-insights\",\"service.version\":\"100000\",\"service.instance.id\":\"INST01\"},\"scope\":{\"name\":\"ExampleAds.Langfuse\",\"version\":\"\",\"attributes\":{}}}","internalModel": null},{@@ -610,7 +610,7 @@"name": "orchestrate_tools","level": "DEFAULT","statusMessage": null,- "version": "105537",+ "version": "100000","createdAt": "2026-03-09T12:26:13.119Z","updatedAt": "2026-03-09T12:26:13.120Z","input": null,@@ -638,7 +638,7 @@"toolDefinitions": {},"toolCalls": [],"toolCallNames": [],- "metadata": "{\"attributes\":{\"gen_ai.usage.input_tokens\":\"2497\",\"gen_ai.usage.output_tokens\":\"200\",\"host.ip\":\"10.65.201.20\",\"host.name\":\"kube-worker0277.kubes10.da1.preprod.crto.in\",\"deployment.environment.name\":\"preprod\",\"criteo.service.pool\":\"default\",\"criteo.dc\":\"da1\",\"service.version\":\"105537\",\"service.instance.id\":\"10NDX\"},\"resourceAttributes\":{\"deployment.environment.name\":\"preprod\",\"service.name\":\"agentic-clientinsights\",\"service.version\":\"105537\",\"service.instance.id\":\"10NDX\"},\"scope\":{\"name\":\"Experimental.Microsoft.Extensions.AI\",\"version\":\"\",\"attributes\":{}}}",+ "metadata": "{\"attributes\":{\"gen_ai.usage.input_tokens\":\"2497\",\"gen_ai.usage.output_tokens\":\"200\",\"host.ip\":\"10.0.0.1\",\"host.name\":\"kube-worker0001.kubes01.dc1.preprod.exampleads.internal\",\"deployment.environment.name\":\"preprod\",\"exampleads.service.pool\":\"default\",\"exampleads.dc\":\"da1\",\"service.version\":\"100000\",\"service.instance.id\":\"INST01\"},\"resourceAttributes\":{\"deployment.environment.name\":\"preprod\",\"service.name\":\"agentic-demo-insights\",\"service.version\":\"100000\",\"service.instance.id\":\"INST01\"},\"scope\":{\"name\":\"Experimental.Microsoft.Extensions.AI\",\"version\":\"\",\"attributes\":{}}}","internalModel": null},{@@ -653,7 +653,7 @@"name": "orchestrate_tools","level": "DEFAULT","statusMessage": null,- "version": "105537",+ "version": "100000","createdAt": "2026-03-09T12:26:07.964Z","updatedAt": "2026-03-09T12:26:07.965Z","input": null,@@ -681,7 +681,7 @@"toolDefinitions": {},"toolCalls": [],"toolCallNames": [],- "metadata": "{\"attributes\":{\"otel.exception_pointers\":\"94867131908120\",\"gen_ai.usage.input_tokens\":\"5550\",\"gen_ai.usage.output_tokens\":\"214\",\"host.ip\":\"10.65.201.20\",\"host.name\":\"kube-worker0277.kubes10.da1.preprod.crto.in\",\"deployment.environment.name\":\"preprod\",\"criteo.service.pool\":\"default\",\"criteo.dc\":\"da1\",\"service.version\":\"105537\",\"service.instance.id\":\"10NDX\"},\"resourceAttributes\":{\"deployment.environment.name\":\"preprod\",\"service.name\":\"agentic-clientinsights\",\"service.version\":\"105537\",\"service.instance.id\":\"10NDX\"},\"scope\":{\"name\":\"Experimental.Microsoft.Extensions.AI\",\"version\":\"\",\"attributes\":{}}}",+ "metadata": "{\"attributes\":{\"otel.exception_pointers\":\"94867131908120\",\"gen_ai.usage.input_tokens\":\"5550\",\"gen_ai.usage.output_tokens\":\"214\",\"host.ip\":\"10.0.0.1\",\"host.name\":\"kube-worker0001.kubes01.dc1.preprod.exampleads.internal\",\"deployment.environment.name\":\"preprod\",\"exampleads.service.pool\":\"default\",\"exampleads.dc\":\"da1\",\"service.version\":\"100000\",\"service.instance.id\":\"INST01\"},\"resourceAttributes\":{\"deployment.environment.name\":\"preprod\",\"service.name\":\"agentic-demo-insights\",\"service.version\":\"100000\",\"service.instance.id\":\"INST01\"},\"scope\":{\"name\":\"Experimental.Microsoft.Extensions.AI\",\"version\":\"\",\"attributes\":{}}}","internalModel": null},{@@ -696,7 +696,7 @@"name": "final_result","level": "DEFAULT","statusMessage": null,- "version": "105537",+ "version": "100000","createdAt": "2026-03-09T12:26:13.119Z","updatedAt": "2026-03-09T12:26:13.119Z","input": "{\n \"input\": {\n \"comment\": \"I couldn't retrieve the month-over-month performance insights for the past quarter (October 2025 to December 2025) by campaign for the requested metrics (Cost, Displays, Clicks, CTR, Sales, CVR) as no data was found for this period.\\n\\n### Parameters\\n- Data was requested from 2025-10-01 to 2025-12-31 with time zone Europe/London.\\n- Attribution model chosen is 30-Day Post Click\\n- Currency: EUR\\n- Time dimension: Month\\n- Dimensions: Campaign\\n- Metrics: Cost, Displays, Clicks, CTR, Sales, CVR\\n\\nPlease let me know if you'd like to try a different date range or different metrics.\",\n \"response_status\": \"NoDataFound\",\n \"follow_up_questions\": [\n \"Change date range to last month.\",\n \"Compare CTR across campaigns.\",\n \"Break down by country.\"\n ]\n }\n}",@@ -724,7 +724,7 @@"toolDefinitions": {},"toolCalls": [],"toolCallNames": [],- "metadata": "{\"attributes\":{\"gen_ai.operation.name\":\"execute_tool\",\"gen_ai.tool.type\":\"function\",\"gen_ai.tool.call.id\":\"final_result\",\"gen_ai.tool.name\":\"final_result\",\"gen_ai.tool.description\":\"The final response which ends this conversation. ALWAYS use this tool to return your answer.\",\"host.ip\":\"10.65.201.20\",\"host.name\":\"kube-worker0277.kubes10.da1.preprod.crto.in\",\"deployment.environment.name\":\"preprod\",\"criteo.service.pool\":\"default\",\"criteo.dc\":\"da1\",\"service.version\":\"105537\",\"service.instance.id\":\"10NDX\"},\"resourceAttributes\":{\"deployment.environment.name\":\"preprod\",\"service.name\":\"agentic-clientinsights\",\"service.version\":\"105537\",\"service.instance.id\":\"10NDX\"},\"scope\":{\"name\":\"Experimental.Microsoft.Extensions.AI\",\"version\":\"\",\"attributes\":{}}}",+ "metadata": "{\"attributes\":{\"gen_ai.operation.name\":\"execute_tool\",\"gen_ai.tool.type\":\"function\",\"gen_ai.tool.call.id\":\"final_result\",\"gen_ai.tool.name\":\"final_result\",\"gen_ai.tool.description\":\"The final response which ends this conversation. ALWAYS use this tool to return your answer.\",\"host.ip\":\"10.0.0.1\",\"host.name\":\"kube-worker0001.kubes01.dc1.preprod.exampleads.internal\",\"deployment.environment.name\":\"preprod\",\"exampleads.service.pool\":\"default\",\"exampleads.dc\":\"da1\",\"service.version\":\"100000\",\"service.instance.id\":\"INST01\"},\"resourceAttributes\":{\"deployment.environment.name\":\"preprod\",\"service.name\":\"agentic-demo-insights\",\"service.version\":\"100000\",\"service.instance.id\":\"INST01\"},\"scope\":{\"name\":\"Experimental.Microsoft.Extensions.AI\",\"version\":\"\",\"attributes\":{}}}","internalModel": null},{@@ -739,7 +739,7 @@"name": "get_custom_report","level": "DEFAULT","statusMessage": null,- "version": "105537",+ "version": "100000","createdAt": "2026-03-09T12:26:07.964Z","updatedAt": "2026-03-09T12:26:07.964Z","input": "{\n \"dimensions\": [\n \"Campaign\"\n ],\n \"filters\": {\n \"dateRange\": {\n \"from_date\": \"2025-10-01\",\n \"to_date\": \"2025-12-31\"\n }\n },\n \"timeDimension\": \"Month\",\n \"metrics\": [\n \"Cost\",\n \"Displays\",\n \"Clicks\",\n \"Ctr\",\n \"Sales\",\n \"Cvr\"\n ]\n}",@@ -767,7 +767,7 @@"toolDefinitions": {},"toolCalls": [],"toolCallNames": [],- "metadata": "{\"attributes\":{\"gen_ai.operation.name\":\"execute_tool\",\"gen_ai.tool.type\":\"function\",\"gen_ai.tool.call.id\":\"get_custom_report\",\"gen_ai.tool.name\":\"get_custom_report\",\"gen_ai.tool.description\":\"Calls the API to retrieve client data.\\r\\n\\r\\nArgs:\\r\\n filters: An object containing the built-in filters.\\r\\n Default values are provided if needed.\\r\\n timeDimension: Time-based dimension for data projections; specifies the granularity at which data will be grouped.\\r\\n Possible values and examples:\\r\\n - None: Indicates that the user has not provided any clear time dimension.\\r\\n This should be selected when there is no explicit instruction.\\r\\n Do NOT infer or assume a value; use None unless the user specifies otherwise.\\r\\n - Year: Represents a calendar year.\\r\\n Examples: per year, by year, year-over-year comparisons (YoY), yearly trend analysis.\\r\\n - Month: Represents a calendar month.\\r\\n Examples: per month, by month, month-over-month comparisons (MoM), monthly performance reports.\\r\\n - Week: Represents a calendar week.\\r\\n Examples: per week, by week, week-over-week comparisons (WoW), weekly campaign summaries.\\r\\n - Day: Represents a calendar day.\\r\\n Examples: per day, by day, day-over-day comparisons (DoD), daily performance tracking.\\r\\n - Hour: Represents an hour within a day.\\r\\n Examples: per hour, by hour, hourly trend analysis, intraday performance monitoring.\\r\\n dimensions: A list of dimensions that define the granularity of the report.\\r\\n Example: [os, device]\\r\\n metrics: A list of performance indicators to retrieve.\\r\\n Example: [clicks, ctr]\\r\\n attributionModel: Specifies the model used to measure sales.\\r\\n Optional.\\r\\n additionalFilters: Custom filters applied to the data.\\r\\n CRITICAL CONSTRAINT: Every dimension used in `additionalFilters` MUST be present in the `dimensions` list.\\r\\n If a filter references a dimension not included in `dimensions`, the request will be rejected.\\r\\n\\r\\nNotes:\\r\\n - Dimensions determine the level of detail in the report.\\r\\n - Metrics represent the KPIs to monitor campaign performance.\\r\\n - Filters restrict the dataset retrieved from the API.\\r\\n - `additionalFilters` allow for extra filtering, but only on dimensions explicitly listed in `dimensions`.\",\"api_url\":\"https://marketing.preprod.criteo.com/modules/analytics/dashboards/mc-custom/api/datasets/report?clientIds=22291&granularity=WEEK&dateRange=en,Europe/London,1,2025-10-01_2025-12-31&hasTotal=false&version=default¤cy=EUR&dimensions=campaign,month&metrics=cost,displays,clicks,ctr,sales_pcnd,cvr\",\"host.ip\":\"10.65.201.20\",\"host.name\":\"kube-worker0277.kubes10.da1.preprod.crto.in\",\"deployment.environment.name\":\"preprod\",\"criteo.service.pool\":\"default\",\"criteo.dc\":\"da1\",\"service.version\":\"105537\",\"service.instance.id\":\"10NDX\"},\"resourceAttributes\":{\"deployment.environment.name\":\"preprod\",\"service.name\":\"agentic-clientinsights\",\"service.version\":\"105537\",\"service.instance.id\":\"10NDX\"},\"scope\":{\"name\":\"Experimental.Microsoft.Extensions.AI\",\"version\":\"\",\"attributes\":{}}}",+ "metadata": "{\"attributes\":{\"gen_ai.operation.name\":\"execute_tool\",\"gen_ai.tool.type\":\"function\",\"gen_ai.tool.call.id\":\"get_custom_report\",\"gen_ai.tool.name\":\"get_custom_report\",\"gen_ai.tool.description\":\"Calls the API to retrieve client data.\\r\\n\\r\\nArgs:\\r\\n filters: An object containing the built-in filters.\\r\\n Default values are provided if needed.\\r\\n timeDimension: Time-based dimension for data projections; specifies the granularity at which data will be grouped.\\r\\n Possible values and examples:\\r\\n - None: Indicates that the user has not provided any clear time dimension.\\r\\n This should be selected when there is no explicit instruction.\\r\\n Do NOT infer or assume a value; use None unless the user specifies otherwise.\\r\\n - Year: Represents a calendar year.\\r\\n Examples: per year, by year, year-over-year comparisons (YoY), yearly trend analysis.\\r\\n - Month: Represents a calendar month.\\r\\n Examples: per month, by month, month-over-month comparisons (MoM), monthly performance reports.\\r\\n - Week: Represents a calendar week.\\r\\n Examples: per week, by week, week-over-week comparisons (WoW), weekly campaign summaries.\\r\\n - Day: Represents a calendar day.\\r\\n Examples: per day, by day, day-over-day comparisons (DoD), daily performance tracking.\\r\\n - Hour: Represents an hour within a day.\\r\\n Examples: per hour, by hour, hourly trend analysis, intraday performance monitoring.\\r\\n dimensions: A list of dimensions that define the granularity of the report.\\r\\n Example: [os, device]\\r\\n metrics: A list of performance indicators to retrieve.\\r\\n Example: [clicks, ctr]\\r\\n attributionModel: Specifies the model used to measure sales.\\r\\n Optional.\\r\\n additionalFilters: Custom filters applied to the data.\\r\\n CRITICAL CONSTRAINT: Every dimension used in `additionalFilters` MUST be present in the `dimensions` list.\\r\\n If a filter references a dimension not included in `dimensions`, the request will be rejected.\\r\\n\\r\\nNotes:\\r\\n - Dimensions determine the level of detail in the report.\\r\\n - Metrics represent the KPIs to monitor campaign performance.\\r\\n - Filters restrict the dataset retrieved from the API.\\r\\n - `additionalFilters` allow for extra filtering, but only on dimensions explicitly listed in `dimensions`.\",\"api_url\":\"https://marketing.preprod.exampleads.example/modules/analytics/dashboards/mc-custom/api/datasets/report?clientIds=22291&granularity=WEEK&dateRange=en,Europe/London,1,2025-10-01_2025-12-31&hasTotal=false&version=default¤cy=EUR&dimensions=campaign,month&metrics=cost,displays,clicks,ctr,sales_pcnd,cvr\",\"host.ip\":\"10.0.0.1\",\"host.name\":\"kube-worker0001.kubes01.dc1.preprod.exampleads.internal\",\"deployment.environment.name\":\"preprod\",\"exampleads.service.pool\":\"default\",\"exampleads.dc\":\"da1\",\"service.version\":\"100000\",\"service.instance.id\":\"INST01\"},\"resourceAttributes\":{\"deployment.environment.name\":\"preprod\",\"service.name\":\"agentic-demo-insights\",\"service.version\":\"100000\",\"service.instance.id\":\"INST01\"},\"scope\":{\"name\":\"Experimental.Microsoft.Extensions.AI\",\"version\":\"\",\"attributes\":{}}}","internalModel": null}]diff --git a/worker/src/__tests__/chatml/framework-traces/llamaindex-2025-06-05.trace.json b/worker/src/__tests__/chatml/framework-traces/llamaindex-2025-06-05.trace.jsonindex 26cbed7a86..a154cceff2 100644--- a/worker/src/__tests__/chatml/framework-traces/llamaindex-2025-06-05.trace.json+++ b/worker/src/__tests__/chatml/framework-traces/llamaindex-2025-06-05.trace.json@@ -5,10 +5,7 @@"name": "llama-index-trace","timestamp": "2025-06-05T15:45:52.971Z","environment": "default",- "tags": [- "llama-index",- "rag"- ],+ "tags": ["llama-index", "rag"],"bookmarked": false,"release": null,"version": "1.0.0",@@ -19,7 +16,7 @@"output": "\"Langfuse is a tool designed to help developers monitor and debug applications that utilize large language models (LLMs). It provides features for tracking and analyzing the performance of LLMs, enabling developers to gain insights into how these models are functioning within their applications. Langfuse can be particularly useful for identifying issues, optimizing performance, and ensuring that the integration of language models into applications is smooth and effective.\"","createdAt": "2025-06-05T15:45:56.000Z","updatedAt": "2025-06-05T15:45:56.029Z",- "metadata": "{\"email\":\"[email protected]\",\"resourceAttributes\":{\"telemetry.sdk.language\":\"python\",\"telemetry.sdk.name\":\"opentelemetry\",\"telemetry.sdk.version\":\"1.33.1\",\"service.name\":\"unknown_service\"},\"scope\":{\"name\":\"langfuse-sdk\",\"version\":\"3.0.0\",\"attributes\":{\"public_key\":\"pk-lf-5855d85e-3943-497e-bd10-f50ad414bcba\"}}}",+ "metadata": "{\"email\":\"[email protected]\",\"resourceAttributes\":{\"telemetry.sdk.language\":\"python\",\"telemetry.sdk.name\":\"opentelemetry\",\"telemetry.sdk.version\":\"1.33.1\",\"service.name\":\"unknown_service\"},\"scope\":{\"name\":\"langfuse-sdk\",\"version\":\"3.0.0\",\"attributes\":{\"public_key\":\"pk-lf-5855d85e-3943-497e-bd10-f50ad414bccc\"}}}","scores": [],"corrections": [],"latency": 2.779,@@ -170,7 +167,7 @@"toolDefinitions": {},"toolCalls": [],"toolCallNames": [],- "metadata": "{\"resourceAttributes\":{\"telemetry.sdk.language\":\"python\",\"telemetry.sdk.name\":\"opentelemetry\",\"telemetry.sdk.version\":\"1.33.1\",\"service.name\":\"unknown_service\"},\"scope\":{\"name\":\"langfuse-sdk\",\"version\":\"3.0.0\",\"attributes\":{\"public_key\":\"pk-lf-5855d85e-3943-497e-bd10-f50ad414bcba\"}}}",+ "metadata": "{\"resourceAttributes\":{\"telemetry.sdk.language\":\"python\",\"telemetry.sdk.name\":\"opentelemetry\",\"telemetry.sdk.version\":\"1.33.1\",\"service.name\":\"unknown_service\"},\"scope\":{\"name\":\"langfuse-sdk\",\"version\":\"3.0.0\",\"attributes\":{\"public_key\":\"pk-lf-5855d85e-3943-497e-bd10-f50ad414bccc\"}}}","internalModel": null},{diff --git a/worker/src/__tests__/chatml/framework-traces/pydantic-ai-2025-06-06.trace.json b/worker/src/__tests__/chatml/framework-traces/pydantic-ai-2025-06-06.trace.jsonindex bd805a2007..6ad6d8920d 100644--- a/worker/src/__tests__/chatml/framework-traces/pydantic-ai-2025-06-06.trace.json+++ b/worker/src/__tests__/chatml/framework-traces/pydantic-ai-2025-06-06.trace.json@@ -5,10 +5,7 @@"name": "pydantic-ai-qa-trace","timestamp": "2025-06-06T14:40:28.562Z","environment": "default",- "tags": [- "dev",- "pydantic-ai"- ],+ "tags": ["dev", "pydantic-ai"],"bookmarked": false,"release": null,"version": "1.0.0",@@ -19,7 +16,7 @@"output": "\"Langfuse is a tool designed for observability and monitoring of applications that utilize large language models (LLMs). It provides features to trace, log, and visualize requests, helping developers understand the behavior of their LLM-powered applications more effectively. This can be particularly useful for debugging, performance optimization, and ensuring reliable operation of systems that depend on LLMs. Langfuse is designed to integrate easily with existing infrastructure, supporting both self-hosted implementations and cloud-based solutions.\"","createdAt": "2025-06-06T14:40:34.000Z","updatedAt": "2025-06-06T14:40:33.635Z",- "metadata": "{\"email\":\"[email protected]\",\"resourceAttributes\":{\"telemetry.sdk.language\":\"python\",\"telemetry.sdk.name\":\"opentelemetry\",\"telemetry.sdk.version\":\"1.33.1\",\"service.name\":\"unknown_service\"},\"scope\":{\"name\":\"langfuse-sdk\",\"version\":\"3.0.0\",\"attributes\":{\"public_key\":\"pk-lf-5855d85e-3943-497e-bd10-f50ad414bcba\"}}}",+ "metadata": "{\"email\":\"[email protected]\",\"resourceAttributes\":{\"telemetry.sdk.language\":\"python\",\"telemetry.sdk.name\":\"opentelemetry\",\"telemetry.sdk.version\":\"1.33.1\",\"service.name\":\"unknown_service\"},\"scope\":{\"name\":\"langfuse-sdk\",\"version\":\"3.0.0\",\"attributes\":{\"public_key\":\"pk-lf-5855d85e-3943-497e-bd10-f50ad414bccc\"}}}","scores": [],"corrections": [{@@ -320,8 +317,8 @@"toolDefinitions": {},"toolCalls": [],"toolCallNames": [],- "metadata": "{\"resourceAttributes\":{\"telemetry.sdk.language\":\"python\",\"telemetry.sdk.name\":\"opentelemetry\",\"telemetry.sdk.version\":\"1.33.1\",\"service.name\":\"unknown_service\"},\"scope\":{\"name\":\"langfuse-sdk\",\"version\":\"3.0.0\",\"attributes\":{\"public_key\":\"pk-lf-5855d85e-3943-497e-bd10-f50ad414bcba\"}}}",+ "metadata": "{\"resourceAttributes\":{\"telemetry.sdk.language\":\"python\",\"telemetry.sdk.name\":\"opentelemetry\",\"telemetry.sdk.version\":\"1.33.1\",\"service.name\":\"unknown_service\"},\"scope\":{\"name\":\"langfuse-sdk\",\"version\":\"3.0.0\",\"attributes\":{\"public_key\":\"pk-lf-5855d85e-3943-497e-bd10-f50ad414bccc\"}}}","internalModel": null}]-}\ No newline at end of file+}diff --git a/worker/src/__tests__/chatml/framework-traces/pydantic-ai-tools-2025-06-06.trace.json b/worker/src/__tests__/chatml/framework-traces/pydantic-ai-tools-2025-06-06.trace.jsonindex bc44846d9a..ebc65a6a84 100644--- a/worker/src/__tests__/chatml/framework-traces/pydantic-ai-tools-2025-06-06.trace.json+++ b/worker/src/__tests__/chatml/framework-traces/pydantic-ai-tools-2025-06-06.trace.json@@ -5,10 +5,7 @@"name": "pydantic-ai-qa-trace","timestamp": "2025-06-06T14:40:28.562Z","environment": "default",- "tags": [- "dev",- "pydantic-ai"- ],+ "tags": ["dev", "pydantic-ai"],"bookmarked": false,"release": null,"version": "1.0.0",@@ -19,7 +16,7 @@"output": "\"Langfuse is a tool designed for observability and monitoring of applications that utilize large language models (LLMs). It provides features to trace, log, and visualize requests, helping developers understand the behavior of their LLM-powered applications more effectively. This can be particularly useful for debugging, performance optimization, and ensuring reliable operation of systems that depend on LLMs. Langfuse is designed to integrate easily with existing infrastructure, supporting both self-hosted implementations and cloud-based solutions.\"","createdAt": "2025-06-06T14:40:34.000Z","updatedAt": "2025-06-06T14:40:33.635Z",- "metadata": "{\"email\":\"[email protected]\",\"resourceAttributes\":{\"telemetry.sdk.language\":\"python\",\"telemetry.sdk.name\":\"opentelemetry\",\"telemetry.sdk.version\":\"1.33.1\",\"service.name\":\"unknown_service\"},\"scope\":{\"name\":\"langfuse-sdk\",\"version\":\"3.0.0\",\"attributes\":{\"public_key\":\"pk-lf-5855d85e-3943-497e-bd10-f50ad414bcba\"}}}",+ "metadata": "{\"email\":\"[email protected]\",\"resourceAttributes\":{\"telemetry.sdk.language\":\"python\",\"telemetry.sdk.name\":\"opentelemetry\",\"telemetry.sdk.version\":\"1.33.1\",\"service.name\":\"unknown_service\"},\"scope\":{\"name\":\"langfuse-sdk\",\"version\":\"3.0.0\",\"attributes\":{\"public_key\":\"pk-lf-5855d85e-3943-497e-bd10-f50ad414bccc\"}}}","scores": [],"corrections": [{@@ -269,7 +266,7 @@"toolDefinitions": {},"toolCalls": [],"toolCallNames": [],- "metadata": "{\"resourceAttributes\":{\"telemetry.sdk.language\":\"python\",\"telemetry.sdk.name\":\"opentelemetry\",\"telemetry.sdk.version\":\"1.33.1\",\"service.name\":\"unknown_service\"},\"scope\":{\"name\":\"langfuse-sdk\",\"version\":\"3.0.0\",\"attributes\":{\"public_key\":\"pk-lf-5855d85e-3943-497e-bd10-f50ad414bcba\"}}}",+ "metadata": "{\"resourceAttributes\":{\"telemetry.sdk.language\":\"python\",\"telemetry.sdk.name\":\"opentelemetry\",\"telemetry.sdk.version\":\"1.33.1\",\"service.name\":\"unknown_service\"},\"scope\":{\"name\":\"langfuse-sdk\",\"version\":\"3.0.0\",\"attributes\":{\"public_key\":\"pk-lf-5855d85e-3943-497e-bd10-f50ad414bccc\"}}}","internalModel": null},{