Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

chore: refactor chatml mapper v1 (#9304)

Nimar2eca294a673a
diff --git a/packages/shared/scripts/seeder/utils/framework-traces/README.md b/packages/shared/scripts/seeder/utils/framework-traces/README.md
new file mode 100644
index 0000000000..f59b14f6fc
--- /dev/null
+++ b/packages/shared/scripts/seeder/utils/framework-traces/README.md
@@ -0,0 +1,19 @@
+# Framework Traces
+
+This folder contains real traces produced through framework instrumentation.
+Most of them stem from here: https://langfuse.com/integrations/frameworks/agno-agents and so on.
+
+## How to add further traces
+1. Generate a trace
+2. Download the trace from the UI using the download button. This **excludes** the `input`/`output`/`metadata` fields of the observations
+3. In the trace, click `Log View (Beta)` and switch to `JSON` format. Click the copy all button and save this to a file in this folder.
+4. Run the script `npx ts-node merge-observations.ts trace-file.json observations.json trace-merged.json`
+5. Leave the `merged` file in this folder. Name it with the date of the trace as displayed in the UI.
+6. ???
+7. Profit
+
+## How to use the trace in the UI
+
+All trace ids are like `framework-frameworkName-traceId`, so search for framework in the trace table.
+We don't rewrite the time, so you have to filter for All Time most likely.
+Also, you can filter for `source: "framework-trace"` on the trace to find them.
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.json
new file mode 100644
index 0000000000..4dbbab1689
--- /dev/null
+++ b/packages/shared/scripts/seeder/utils/framework-traces/agno-2025-06-11.json
@@ -0,0 +1,1525 @@
+{
+ "trace": {
+ "id": "080130871f53145aecf7c29d5dfb6e4c",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "name": "Agent.run",
+ "timestamp": "2025-06-11T14:01:32.598Z",
+ "environment": "default",
+ "tags": [],
+ "bookmarked": false,
+ "release": null,
+ "version": null,
+ "userId": null,
+ "sessionId": "35cc6c90-b657-4819-b66c-c931c03ad569",
+ "public": true,
+ "input": "\"{\\\"run_response\\\":\\\"RunResponse(content=None, content_type='str', thinking=None, reasoning_content=None, event='RunResponse', messages=None, metrics=None, model='gpt-4o-mini', model_provider='OpenAI', run_id='625aa1b6-dc11-4804-8f4b-e2f5b604c07f', agent_id='007f4340-d3b3-4e4e-bf94-bdb22a16d8d5', session_id='35cc6c90-b657-4819-b66c-c931c03ad569', workflow_id=None, tools=None, formatted_tool_calls=None, images=None, videos=None, audio=None, response_audio=None, citations=None, extra_data=None, created_at=1749650492)\\\",\\\"run_messages\\\":\\\"RunMessages(messages=[Message(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), Message(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)], system_message=Message(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), user_message=Message(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), extra_messages=None)\\\",\\\"session_id\\\":\\\"35cc6c90-b657-4819-b66c-c931c03ad569\\\",\\\"message\\\":\\\"What is currently trending on Twitter?\\\"}\"",
+ "output": "\"{\\\"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],\\\"prompt_tokens_details\\\":[{\\\"audio_tokens\\\":0,\\\"cached_tokens\\\":0},{\\\"audio_tokens\\\":0,\\\"cached_tokens\\\":0}],\\\"completion_tokens_details\\\":[{\\\"accepted_prediction_tokens\\\":0,\\\"audio_tokens\\\":0,\\\"reasoning_tokens\\\":0,\\\"rejected_prediction_tokens\\\":0},{\\\"accepted_prediction_tokens\\\":0,\\\"audio_tokens\\\":0,\\\"reasoning_tokens\\\":0,\\\"rejected_prediction_tokens\\\":0}],\\\"time\\\":[0.9596867079999356,4.799381209000785]},\\\"model\\\":\\\"gpt-4o-mini\\\",\\\"model_provider\\\":\\\"OpenAI\\\",\\\"run_id\\\":\\\"625aa1b6-dc11-4804-8f4b-e2f5b604c07f\\\",\\\"agent_id\\\":\\\"007f4340-d3b3-4e4e-bf94-bdb22a16d8d5\\\",\\\"session_id\\\":\\\"35cc6c90-b657-4819-b66c-c931c03ad569\\\",\\\"formatted_tool_calls\\\":[\\\"duckduckgo_search(query=currently trending on Twitter)\\\"],\\\"created_at\\\":1749650243,\\\"messages\\\":[{\\\"content\\\":\\\"<additional_information>\\\\n- Use markdown to format your answers.\\\\n</additional_information>\\\",\\\"from_history\\\":false,\\\"stop_after_tool_call\\\":false,\\\"role\\\":\\\"system\\\",\\\"created_at\\\":1749650492},{\\\"content\\\":\\\"What is currently trending on Twitter?\\\",\\\"from_history\\\":false,\\\"stop_after_tool_call\\\":false,\\\"role\\\":\\\"user\\\",\\\"created_at\\\":1749650492},{\\\"from_history\\\":false,\\\"stop_after_tool_call\\\":false,\\\"role\\\":\\\"assistant\\\",\\\"tool_calls\\\":[{\\\"id\\\":\\\"call_VybxG748CQId8Xxo6wb2pWy1\\\",\\\"function\\\":{\\\"arguments\\\":\\\"{\\\\\\\"query\\\\\\\":\\\\\\\"currently trending on Twitter\\\\\\\"}\\\",\\\"name\\\":\\\"duckduckgo_search\\\"},\\\"type\\\":\\\"function\\\"}],\\\"metrics\\\":{\\\"input_tokens\\\":163,\\\"output_tokens\\\":20,\\\"total_tokens\\\":183,\\\"prompt_tokens\\\":163,\\\"completion_tokens\\\":20,\\\"prompt_tokens_details\\\":{\\\"audio_tokens\\\":0,\\\"cached_tokens\\\":0},\\\"completion_tokens_details\\\":{\\\"accepted_prediction_tokens\\\":0,\\\"audio_tokens\\\":0,\\\"reasoning_tokens\\\":0,\\\"rejected_prediction_tokens\\\":0},\\\"time\\\":0.9596867079999356},\\\"created_at\\\":1749650492},{\\\"content\\\":\\\"[\\\\n {\\\\n \\\\\\\"title\\\\\\\": \\\\\\\"Twitter. It's what's happening / Twitter\\\\\\\",\\\\n \\\\\\\"href\\\\\\\": \\\\\\\"https://twitter.com/explore/tabs/trending/\\\\\\\",\\\\n \\\\\\\"body\\\\\\\": \\\\\\\"Explore trending topics, hashtags, and conversations on Twitter.\\\\\\\"\\\\n },\\\\n {\\\\n \\\\\\\"title\\\\\\\": \\\\\\\"United States \\\\\\\\u2014 X (Twitter) trending topics and hashtags today ...\\\\\\\",\\\\n \\\\\\\"href\\\\\\\": \\\\\\\"https://trends24.in/united-states/\\\\\\\",\\\\n \\\\\\\"body\\\\\\\": \\\\\\\"Today's top X (Twitter) trends and hashtags in United States: National Guard, Los Angeles, California, Peaceful, Marines. Explore more locations and trending topics on trends24.in\\\\\\\"\\\\n },\\\\n {\\\\n \\\\\\\"title\\\\\\\": \\\\\\\"Worldwide \\\\\\\\u2022 Top Hashtags \\\\\\\\u2022 Most Tweeted \\\\\\\\u2022 Day - getdaytrends\\\\\\\",\\\\n \\\\\\\"href\\\\\\\": \\\\\\\"https://getdaytrends.com/top/tweeted/day/\\\\\\\",\\\\n \\\\\\\"body\\\\\\\": \\\\\\\"About Us. We store and analyze Twitter data to bring you insights on what's currently trending and help you keep up with the audience. Find out hot trends, review trend history and browse long-term popular hashtags and topics.\\\\\\\"\\\\n },\\\\n {\\\\n \\\\\\\"title\\\\\\\": \\\\\\\"United States Latest Trending X (Twitter) hashtag and topics\\\\\\\",\\\\n \\\\\\\"href\\\\\\\": \\\\\\\"https://91trends.com/twitter/united-states/\\\\\\\",\\\\n \\\\\\\"body\\\\\\\": \\\\\\\"United States X (Twitter) Trends Now | Top X (Twitter) Trending Topics & Hashtags Today. Get real-time updates on the hottest trending hashtags and topics on X (Twitter) United States with our automated page. Our page utilizes the official X (Twitter) API to refresh the most talked-about hashtags and topics every 30 minutes, ensuring you always have access to the most current trends on the ...\\\\\\\"\\\\n },\\\\n {\\\\n \\\\\\\"title\\\\\\\": \\\\\\\"Trending on Twitter United States today - Global Twitter Trends\\\\\\\",\\\\n \\\\\\\"href\\\\\\\": \\\\\\\"https://globaltwittertrends.com/united-states/\\\\\\\",\\\\n \\\\\\\"body\\\\\\\": \\\\\\\"Above is the table to show what's trending in United States twitter right now . You can click on any one of the trends to tweet it or view all tweets based on that trend. You can also view the twitter trends of all towns in United States by just searching on the search bar above or by choosing from the provided list of countries and towns.\\\\\\\"\\\\n }\\\\n]\\\",\\\"from_history\\\":false,\\\"stop_after_tool_call\\\":false,\\\"role\\\":\\\"tool\\\",\\\"tool_call_id\\\":\\\"call_VybxG748CQId8Xxo6wb2pWy1\\\",\\\"tool_name\\\":\\\"duckduckgo_search\\\",\\\"tool_args\\\":{\\\"query\\\":\\\"currently trending on Twitter\\\"},\\\"tool_call_error\\\":false,\\\"metrics\\\":{\\\"time\\\":0.7176052920003713},\\\"created_at\\\":1749650494},{\\\"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!\\\",\\\"from_history\\\":false,\\\"stop_after_tool_call\\\":false,\\\"role\\\":\\\"assistant\\\",\\\"metrics\\\":{\\\"input_tokens\\\":663,\\\"output_tokens\\\":225,\\\"total_tokens\\\":888,\\\"prompt_tokens\\\":663,\\\"completion_tokens\\\":225,\\\"prompt_tokens_details\\\":{\\\"audio_tokens\\\":0,\\\"cached_tokens\\\":0},\\\"completion_tokens_details\\\":{\\\"accepted_prediction_tokens\\\":0,\\\"audio_tokens\\\":0,\\\"reasoning_tokens\\\":0,\\\"rejected_prediction_tokens\\\":0},\\\"time\\\":4.799381209000785},\\\"created_at\\\":1749650494}],\\\"tools\\\":[{\\\"tool_call_id\\\":\\\"call_VybxG748CQId8Xxo6wb2pWy1\\\",\\\"tool_name\\\":\\\"duckduckgo_search\\\",\\\"tool_args\\\":{\\\"query\\\":\\\"currently trending on Twitter\\\"},\\\"tool_call_error\\\":false,\\\"result\\\":\\\"[\\\\n {\\\\n \\\\\\\"title\\\\\\\": \\\\\\\"Twitter. It's what's happening / Twitter\\\\\\\",\\\\n \\\\\\\"href\\\\\\\": \\\\\\\"https://twitter.com/explore/tabs/trending/\\\\\\\",\\\\n \\\\\\\"body\\\\\\\": \\\\\\\"Explore trending topics, hashtags, and conversations on Twitter.\\\\\\\"\\\\n },\\\\n {\\\\n \\\\\\\"title\\\\\\\": \\\\\\\"United States \\\\\\\\u2014 X (Twitter) trending topics and hashtags today ...\\\\\\\",\\\\n \\\\\\\"href\\\\\\\": \\\\\\\"https://trends24.in/united-states/\\\\\\\",\\\\n \\\\\\\"body\\\\\\\": \\\\\\\"Today's top X (Twitter) trends and hashtags in United States: National Guard, Los Angeles, California, Peaceful, Marines. Explore more locations and trending topics on trends24.in\\\\\\\"\\\\n },\\\\n {\\\\n \\\\\\\"title\\\\\\\": \\\\\\\"Worldwide \\\\\\\\u2022 Top Hashtags \\\\\\\\u2022 Most Tweeted \\\\\\\\u2022 Day - getdaytrends\\\\\\\",\\\\n \\\\\\\"href\\\\\\\": \\\\\\\"https://getdaytrends.com/top/tweeted/day/\\\\\\\",\\\\n \\\\\\\"body\\\\\\\": \\\\\\\"About Us. We store and analyze Twitter data to bring you insights on what's currently trending and help you keep up with the audience. Find out hot trends, review trend history and browse long-term popular hashtags and topics.\\\\\\\"\\\\n },\\\\n {\\\\n \\\\\\\"title\\\\\\\": \\\\\\\"United States Latest Trending X (Twitter) hashtag and topics\\\\\\\",\\\\n \\\\\\\"href\\\\\\\": \\\\\\\"https://91trends.com/twitter/united-states/\\\\\\\",\\\\n \\\\\\\"body\\\\\\\": \\\\\\\"United States X (Twitter) Trends Now | Top X (Twitter) Trending Topics & Hashtags Today. Get real-time updates on the hottest trending hashtags and topics on X (Twitter) United States with our automated page. Our page utilizes the official X (Twitter) API to refresh the most talked-about hashtags and topics every 30 minutes, ensuring you always have access to the most current trends on the ...\\\\\\\"\\\\n },\\\\n {\\\\n \\\\\\\"title\\\\\\\": \\\\\\\"Trending on Twitter United States today - Global Twitter Trends\\\\\\\",\\\\n \\\\\\\"href\\\\\\\": \\\\\\\"https://globaltwittertrends.com/united-states/\\\\\\\",\\\\n \\\\\\\"body\\\\\\\": \\\\\\\"Above is the table to show what's trending in United States twitter right now . You can click on any one of the trends to tweet it or view all tweets based on that trend. You can also view the twitter trends of all towns in United States by just searching on the search bar above or by choosing from the provided list of countries and towns.\\\\\\\"\\\\n }\\\\n]\\\",\\\"metrics\\\":{\\\"time\\\":0.7176052920003713},\\\"stop_after_tool_call\\\":false,\\\"created_at\\\":1749650243,\\\"requires_confirmation\\\":null,\\\"confirmed\\\":null,\\\"confirmation_note\\\":null,\\\"requires_user_input\\\":null,\\\"user_input_schema\\\":null,\\\"external_execution_required\\\":null}]}\"",
+ "metadata": "{\"attributes\":{\"input.value\":\"{\\\"run_response\\\": \\\"RunResponse(content=None, content_type='str', thinking=None, reasoning_content=None, event='RunResponse', messages=None, metrics=None, model='gpt-4o-mini', model_provider='OpenAI', run_id='625aa1b6-dc11-4804-8f4b-e2f5b604c07f', agent_id='007f4340-d3b3-4e4e-bf94-bdb22a16d8d5', session_id='35cc6c90-b657-4819-b66c-c931c03ad569', workflow_id=None, tools=None, formatted_tool_calls=None, images=None, videos=None, audio=None, response_audio=None, citations=None, extra_data=None, created_at=1749650492)\\\", \\\"run_messages\\\": \\\"RunMessages(messages=[Message(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), Message(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)], system_message=Message(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), user_message=Message(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), extra_messages=None)\\\", \\\"session_id\\\": \\\"35cc6c90-b657-4819-b66c-c931c03ad569\\\", \\\"message\\\": \\\"What is currently trending on Twitter?\\\"}\",\"session.id\":\"35cc6c90-b657-4819-b66c-c931c03ad569\",\"agno{key_suffix}.tools\":\"[\\\"duckduckgo_search\\\",\\\"duckduckgo_news\\\"]\",\"output.value\":\"{\\n \\\"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!\\\",\\n \\\"content_type\\\": \\\"str\\\",\\n \\\"event\\\": \\\"RunResponse\\\",\\n \\\"metrics\\\": {\\n \\\"input_tokens\\\": [\\n 163,\\n 663\\n ],\\n \\\"output_tokens\\\": [\\n 20,\\n 225\\n ],\\n \\\"total_tokens\\\": [\\n 183,\\n 888\\n ],\\n \\\"audio_tokens\\\": [\\n 0,\\n 0\\n ],\\n \\\"input_audio_tokens\\\": [\\n 0,\\n 0\\n ],\\n \\\"output_audio_tokens\\\": [\\n 0,\\n 0\\n ],\\n \\\"cached_tokens\\\": [\\n 0,\\n 0\\n ],\\n \\\"reasoning_tokens\\\": [\\n 0,\\n 0\\n ],\\n \\\"prompt_tokens\\\": [\\n 163,\\n 663\\n ],\\n \\\"completion_tokens\\\": [\\n 20,\\n 225\\n ],\\n \\\"prompt_tokens_details\\\": [\\n {\\n \\\"audio_tokens\\\": 0,\\n \\\"cached_tokens\\\": 0\\n },\\n {\\n \\\"audio_tokens\\\": 0,\\n \\\"cached_tokens\\\": 0\\n }\\n ],\\n \\\"completion_tokens_details\\\": [\\n {\\n \\\"accepted_prediction_tokens\\\": 0,\\n \\\"audio_tokens\\\": 0,\\n \\\"reasoning_tokens\\\": 0,\\n \\\"rejected_prediction_tokens\\\": 0\\n },\\n {\\n \\\"accepted_prediction_tokens\\\": 0,\\n \\\"audio_tokens\\\": 0,\\n \\\"reasoning_tokens\\\": 0,\\n \\\"rejected_prediction_tokens\\\": 0\\n }\\n ],\\n \\\"time\\\": [\\n 0.9596867079999356,\\n 4.799381209000785\\n ]\\n },\\n \\\"model\\\": \\\"gpt-4o-mini\\\",\\n \\\"model_provider\\\": \\\"OpenAI\\\",\\n \\\"run_id\\\": \\\"625aa1b6-dc11-4804-8f4b-e2f5b604c07f\\\",\\n \\\"agent_id\\\": \\\"007f4340-d3b3-4e4e-bf94-bdb22a16d8d5\\\",\\n \\\"session_id\\\": \\\"35cc6c90-b657-4819-b66c-c931c03ad569\\\",\\n \\\"formatted_tool_calls\\\": [\\n \\\"duckduckgo_search(query=currently trending on Twitter)\\\"\\n ],\\n \\\"created_at\\\": 1749650243,\\n \\\"messages\\\": [\\n {\\n \\\"content\\\": \\\"<additional_information>\\\\n- Use markdown to format your answers.\\\\n</additional_information>\\\",\\n \\\"from_history\\\": false,\\n \\\"stop_after_tool_call\\\": false,\\n \\\"role\\\": \\\"system\\\",\\n \\\"created_at\\\": 1749650492\\n },\\n {\\n \\\"content\\\": \\\"What is currently trending on Twitter?\\\",\\n \\\"from_history\\\": false,\\n \\\"stop_after_tool_call\\\": false,\\n \\\"role\\\": \\\"user\\\",\\n \\\"created_at\\\": 1749650492\\n },\\n {\\n \\\"from_history\\\": false,\\n \\\"stop_after_tool_call\\\": false,\\n \\\"role\\\": \\\"assistant\\\",\\n \\\"tool_calls\\\": [\\n {\\n \\\"id\\\": \\\"call_VybxG748CQId8Xxo6wb2pWy1\\\",\\n \\\"function\\\": {\\n \\\"arguments\\\": \\\"{\\\\\\\"query\\\\\\\":\\\\\\\"currently trending on Twitter\\\\\\\"}\\\",\\n \\\"name\\\": \\\"duckduckgo_search\\\"\\n },\\n \\\"type\\\": \\\"function\\\"\\n }\\n ],\\n \\\"metrics\\\": {\\n \\\"input_tokens\\\": 163,\\n \\\"output_tokens\\\": 20,\\n \\\"total_tokens\\\": 183,\\n \\\"prompt_tokens\\\": 163,\\n \\\"completion_tokens\\\": 20,\\n \\\"prompt_tokens_details\\\": {\\n \\\"audio_tokens\\\": 0,\\n \\\"cached_tokens\\\": 0\\n },\\n \\\"completion_tokens_details\\\": {\\n \\\"accepted_prediction_tokens\\\": 0,\\n \\\"audio_tokens\\\": 0,\\n \\\"reasoning_tokens\\\": 0,\\n \\\"rejected_prediction_tokens\\\": 0\\n },\\n \\\"time\\\": 0.9596867079999356\\n },\\n \\\"created_at\\\": 1749650492\\n },\\n {\\n \\\"content\\\": \\\"[\\\\n {\\\\n \\\\\\\"title\\\\\\\": \\\\\\\"Twitter. It's what's happening / Twitter\\\\\\\",\\\\n \\\\\\\"href\\\\\\\": \\\\\\\"https://twitter.com/explore/tabs/trending/\\\\\\\",\\\\n \\\\\\\"body\\\\\\\": \\\\\\\"Explore trending topics, hashtags, and conversations on Twitter.\\\\\\\"\\\\n },\\\\n {\\\\n \\\\\\\"title\\\\\\\": \\\\\\\"United States \\\\\\\\u2014 X (Twitter) trending topics and hashtags today ...\\\\\\\",\\\\n \\\\\\\"href\\\\\\\": \\\\\\\"https://trends24.in/united-states/\\\\\\\",\\\\n \\\\\\\"body\\\\\\\": \\\\\\\"Today's top X (Twitter) trends and hashtags in United States: National Guard, Los Angeles, California, Peaceful, Marines. Explore more locations and trending topics on trends24.in\\\\\\\"\\\\n },\\\\n {\\\\n \\\\\\\"title\\\\\\\": \\\\\\\"Worldwide \\\\\\\\u2022 Top Hashtags \\\\\\\\u2022 Most Tweeted \\\\\\\\u2022 Day - getdaytrends\\\\\\\",\\\\n \\\\\\\"href\\\\\\\": \\\\\\\"https://getdaytrends.com/top/tweeted/day/\\\\\\\",\\\\n \\\\\\\"body\\\\\\\": \\\\\\\"About Us. We store and analyze Twitter data to bring you insights on what's currently trending and help you keep up with the audience. Find out hot trends, review trend history and browse long-term popular hashtags and topics.\\\\\\\"\\\\n },\\\\n {\\\\n \\\\\\\"title\\\\\\\": \\\\\\\"United States Latest Trending X (Twitter) hashtag and topics\\\\\\\",\\\\n \\\\\\\"href\\\\\\\": \\\\\\\"https://91trends.com/twitter/united-states/\\\\\\\",\\\\n \\\\\\\"body\\\\\\\": \\\\\\\"United States X (Twitter) Trends Now | Top X (Twitter) Trending Topics & Hashtags Today. Get real-time updates on the hottest trending hashtags and topics on X (Twitter) United States with our automated page. Our page utilizes the official X (Twitter) API to refresh the most talked-about hashtags and topics every 30 minutes, ensuring you always have access to the most current trends on the ...\\\\\\\"\\\\n },\\\\n {\\\\n \\\\\\\"title\\\\\\\": \\\\\\\"Trending on Twitter United States today - Global Twitter Trends\\\\\\\",\\\\n \\\\\\\"href\\\\\\\": \\\\\\\"https://globaltwittertrends.com/united-states/\\\\\\\",\\\\n \\\\\\\"body\\\\\\\": \\\\\\\"Above is the table to show what's trending in United States twitter right now . You can click on any one of the trends to tweet it or view all tweets based on that trend. You can also view the twitter trends of all towns in United States by just searching on the search bar above or by choosing from the provided list of countries and towns.\\\\\\\"\\\\n }\\\\n]\\\",\\n \\\"from_history\\\": false,\\n \\\"stop_after_tool_call\\\": false,\\n \\\"role\\\": \\\"tool\\\",\\n \\\"tool_call_id\\\": \\\"call_VybxG748CQId8Xxo6wb2pWy1\\\",\\n \\\"tool_name\\\": \\\"duckduckgo_search\\\",\\n \\\"tool_args\\\": {\\n \\\"query\\\": \\\"currently trending on Twitter\\\"\\n },\\n \\\"tool_call_error\\\": false,\\n \\\"metrics\\\": {\\n \\\"time\\\": 0.7176052920003713\\n },\\n \\\"created_at\\\": 1749650494\\n },\\n {\\n \\\"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!\\\",\\n \\\"from_history\\\": false,\\n \\\"stop_after_tool_call\\\": false,\\n \\\"role\\\": \\\"assistant\\\",\\n \\\"metrics\\\": {\\n \\\"input_tokens\\\": 663,\\n \\\"output_tokens\\\": 225,\\n \\\"total_tokens\\\": 888,\\n \\\"prompt_tokens\\\": 663,\\n \\\"completion_tokens\\\": 225,\\n \\\"prompt_tokens_details\\\": {\\n \\\"audio_tokens\\\": 0,\\n \\\"cached_tokens\\\": 0\\n },\\n \\\"completion_tokens_details\\\": {\\n \\\"accepted_prediction_tokens\\\": 0,\\n \\\"audio_tokens\\\": 0,\\n \\\"reasoning_tokens\\\": 0,\\n \\\"rejected_prediction_tokens\\\": 0\\n },\\n \\\"time\\\": 4.799381209000785\\n },\\n \\\"created_at\\\": 1749650494\\n }\\n ],\\n \\\"tools\\\": [\\n {\\n \\\"tool_call_id\\\": \\\"call_VybxG748CQId8Xxo6wb2pWy1\\\",\\n \\\"tool_name\\\": \\\"duckduckgo_search\\\",\\n \\\"tool_args\\\": {\\n \\\"query\\\": \\\"currently trending on Twitter\\\"\\n },\\n \\\"tool_call_error\\\": false,\\n \\\"result\\\": \\\"[\\\\n {\\\\n \\\\\\\"title\\\\\\\": \\\\\\\"Twitter. It's what's happening / Twitter\\\\\\\",\\\\n \\\\\\\"href\\\\\\\": \\\\\\\"https://twitter.com/explore/tabs/trending/\\\\\\\",\\\\n \\\\\\\"body\\\\\\\": \\\\\\\"Explore trending topics, hashtags, and conversations on Twitter.\\\\\\\"\\\\n },\\\\n {\\\\n \\\\\\\"title\\\\\\\": \\\\\\\"United States \\\\\\\\u2014 X (Twitter) trending topics and hashtags today ...\\\\\\\",\\\\n \\\\\\\"href\\\\\\\": \\\\\\\"https://trends24.in/united-states/\\\\\\\",\\\\n \\\\\\\"body\\\\\\\": \\\\\\\"Today's top X (Twitter) trends and hashtags in United States: National Guard, Los Angeles, California, Peaceful, Marines. Explore more locations and trending topics on trends24.in\\\\\\\"\\\\n },\\\\n {\\\\n \\\\\\\"title\\\\\\\": \\\\\\\"Worldwide \\\\\\\\u2022 Top Hashtags \\\\\\\\u2022 Most Tweeted \\\\\\\\u2022 Day - getdaytrends\\\\\\\",\\\\n \\\\\\\"href\\\\\\\": \\\\\\\"https://getdaytrends.com/top/tweeted/day/\\\\\\\",\\\\n \\\\\\\"body\\\\\\\": \\\\\\\"About Us. We store and analyze Twitter data to bring you insights on what's currently trending and help you keep up with the audience. Find out hot trends, review trend history and browse long-term popular hashtags and topics.\\\\\\\"\\\\n },\\\\n {\\\\n \\\\\\\"title\\\\\\\": \\\\\\\"United States Latest Trending X (Twitter) hashtag and topics\\\\\\\",\\\\n \\\\\\\"href\\\\\\\": \\\\\\\"https://91trends.com/twitter/united-states/\\\\\\\",\\\\n \\\\\\\"body\\\\\\\": \\\\\\\"United States X (Twitter) Trends Now | Top X (Twitter) Trending Topics & Hashtags Today. Get real-time updates on the hottest trending hashtags and topics on X (Twitter) United States with our automated page. Our page utilizes the official X (Twitter) API to refresh the most talked-about hashtags and topics every 30 minutes, ensuring you always have access to the most current trends on the ...\\\\\\\"\\\\n },\\\\n {\\\\n \\\\\\\"title\\\\\\\": \\\\\\\"Trending on Twitter United States today - Global Twitter Trends\\\\\\\",\\\\n \\\\\\\"href\\\\\\\": \\\\\\\"https://globaltwittertrends.com/united-states/\\\\\\\",\\\\n \\\\\\\"body\\\\\\\": \\\\\\\"Above is the table to show what's trending in United States twitter right now . You can click on any one of the trends to tweet it or view all tweets based on that trend. You can also view the twitter trends of all towns in United States by just searching on the search bar above or by choosing from the provided list of countries and towns.\\\\\\\"\\\\n }\\\\n]\\\",\\n \\\"metrics\\\": {\\n \\\"time\\\": 0.7176052920003713\\n },\\n \\\"stop_after_tool_call\\\": false,\\n \\\"created_at\\\": 1749650243,\\n \\\"requires_confirmation\\\": null,\\n \\\"confirmed\\\": null,\\n \\\"confirmation_note\\\": null,\\n \\\"requires_user_input\\\": null,\\n \\\"user_input_schema\\\": null,\\n \\\"external_execution_required\\\": null\\n }\\n ]\\n}\",\"output.mime_type\":\"application/json\",\"openinference.span.kind\":\"AGENT\"},\"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\":{}}}",
+ "createdAt": "2025-06-11T14:01:40.000Z",
+ "updatedAt": "2025-06-11T14:01:39.791Z",
+ "scores": [],
+ "latency": 6.991
+ },
+ "observations": [
+ {
+ "id": "1cffdfa6fe3412e6",
+ "traceId": "080130871f53145aecf7c29d5dfb6e4c",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "type": "SPAN",
+ "environment": "default",
+ "parentObservationId": null,
+ "startTime": "2025-06-11T14:01:32.598Z",
+ "endTime": "2025-06-11T14:01:39.589Z",
+ "name": "Agent.run",
+ "metadata": {
+ "attributes": {
+ "input.value": {
+ "run_response": "RunResponse(content=None, content_type='str', thinking=None, reasoning_content=None, event='RunResponse', messages=None, metrics=None, model='gpt-4o-mini', model_provider='OpenAI', run_id='625aa1b6-dc11-4804-8f4b-e2f5b604c07f', agent_id='007f4340-d3b3-4e4e-bf94-bdb22a16d8d5', session_id='35cc6c90-b657-4819-b66c-c931c03ad569', workflow_id=None, tools=None, formatted_tool_calls=None, images=None, videos=None, audio=None, response_audio=None, citations=None, extra_data=None, created_at=1749650492)",
+ "run_messages": "RunMessages(messages=[Message(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), Message(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)], system_message=Message(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), user_message=Message(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), extra_messages=None)",
+ "session_id": "35cc6c90-b657-4819-b66c-c931c03ad569",
+ "message": "What is currently trending on Twitter?"
+ },
+ "session.id": "35cc6c90-b657-4819-b66c-c931c03ad569",
+ "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
+ ],
+ "prompt_tokens_details": [
+ {
+ "audio_tokens": 0,
+ "cached_tokens": 0
+ },
+ {
+ "audio_tokens": 0,
+ "cached_tokens": 0
+ }
+ ],
+ "completion_tokens_details": [
+ {
+ "accepted_prediction_tokens": 0,
+ "audio_tokens": 0,
+ "reasoning_tokens": 0,
+ "rejected_prediction_tokens": 0
+ },
+ {
+ "accepted_prediction_tokens": 0,
+ "audio_tokens": 0,
+ "reasoning_tokens": 0,
+ "rejected_prediction_tokens": 0
+ }
+ ],
+ "time": [
+ 0.9596867079999356,
+ 4.799381209000785
+ ]
+ },
+ "model": "gpt-4o-mini",
+ "model_provider": "OpenAI",
+ "run_id": "625aa1b6-dc11-4804-8f4b-e2f5b604c07f",
+ "agent_id": "007f4340-d3b3-4e4e-bf94-bdb22a16d8d5",
+ "session_id": "35cc6c90-b657-4819-b66c-c931c03ad569",
+ "formatted_tool_calls": [
+ "duckduckgo_search(query=currently trending on Twitter)"
+ ],
+ "created_at": 1749650243,
+ "messages": [
+ {
+ "content": "<additional_information>\n- Use markdown to format your answers.\n</additional_information>",
+ "from_history": false,
+ "stop_after_tool_call": false,
+ "role": "system",
+ "created_at": 1749650492
+ },
+ {
+ "content": "What is currently trending on Twitter?",
+ "from_history": false,
+ "stop_after_tool_call": false,
+ "role": "user",
+ "created_at": 1749650492
+ },
+ {
+ "from_history": false,
+ "stop_after_tool_call": false,
+ "role": "assistant",
+ "tool_calls": [
+ {
+ "id": "call_VybxG748CQId8Xxo6wb2pWy1",
+ "function": {
+ "arguments": {
+ "query": "currently trending on Twitter"
+ },
+ "name": "duckduckgo_search"
+ },
+ "type": "function"
+ }
+ ],
+ "metrics": {
+ "input_tokens": 163,
+ "output_tokens": 20,
+ "total_tokens": 183,
+ "prompt_tokens": 163,
+ "completion_tokens": 20,
+ "prompt_tokens_details": {
+ "audio_tokens": 0,
+ "cached_tokens": 0
+ },
+ "completion_tokens_details": {
+ "accepted_prediction_tokens": 0,
+ "audio_tokens": 0,
+ "reasoning_tokens": 0,
+ "rejected_prediction_tokens": 0
+ },
+ "time": 0.9596867079999356
+ },
+ "created_at": 1749650492
+ },
+ {
+ "content": [
+ {
+ "title": "Twitter. It's what's happening / Twitter",
+ "href": "https://twitter.com/explore/tabs/trending/",
+ "body": "Explore trending topics, hashtags, and conversations on Twitter."
+ },
+ {
+ "title": "United States — X (Twitter) trending topics and hashtags today ...",
+ "href": "https://trends24.in/united-states/",
+ "body": "Today's top X (Twitter) trends and hashtags in United States: National Guard, Los Angeles, California, Peaceful, Marines. Explore more locations and trending topics on trends24.in"
+ },
+ {
+ "title": "Worldwide • Top Hashtags • Most Tweeted • Day - getdaytrends",
+ "href": "https://getdaytrends.com/top/tweeted/day/",
+ "body": "About Us. We store and analyze Twitter data to bring you insights on what's currently trending and help you keep up with the audience. Find out hot trends, review trend history and browse long-term popular hashtags and topics."
+ },
+ {
+ "title": "United States Latest Trending X (Twitter) hashtag and topics",
+ "href": "https://91trends.com/twitter/united-states/",
+ "body": "United States X (Twitter) Trends Now | Top X (Twitter) Trending Topics & Hashtags Today. Get real-time updates on the hottest trending hashtags and topics on X (Twitter) United States with our automated page. Our page utilizes the official X (Twitter) API to refresh the most talked-about hashtags and topics every 30 minutes, ensuring you always have access to the most current trends on the ..."
+ },
+ {
+ "title": "Trending on Twitter United States today - Global Twitter Trends",
+ "href": "https://globaltwittertrends.com/united-states/",
+ "body": "Above is the table to show what's trending in United States twitter right now . You can click on any one of the trends to tweet it or view all tweets based on that trend. You can also view the twitter trends of all towns in United States by just searching on the search bar above or by choosing from the provided list of countries and towns."
+ }
+ ],
+ "from_history": false,
+ "stop_after_tool_call": false,
+ "role": "tool",
+ "tool_call_id": "call_VybxG748CQId8Xxo6wb2pWy1",
+ "tool_name": "duckduckgo_search",
+ "tool_args": {
+ "query": "currently trending on Twitter"
+ },
+ "tool_call_error": false,
+ "metrics": {
+ "time": 0.7176052920003713
+ },
+ "created_at": 1749650494
+ },
+ {
+ "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!",
+ "from_history": false,
+ "stop_after_tool_call": false,
+ "role": "assistant",
+ "metrics": {
+ "input_tokens": 663,
+ "output_tokens": 225,
+ "total_tokens": 888,
+ "prompt_tokens": 663,
+ "completion_tokens": 225,
+ "prompt_tokens_details": {
+ "audio_tokens": 0,
+ "cached_tokens": 0
+ },
+ "completion_tokens_details": {
+ "accepted_prediction_tokens": 0,
+ "audio_tokens": 0,
+ "reasoning_tokens": 0,
+ "rejected_prediction_tokens": 0
+ },
+ "time": 4.799381209000785
+ },
+ "created_at": 1749650494
+ }
+ ],
+ "tools": [
+ {
+ "tool_call_id": "call_VybxG748CQId8Xxo6wb2pWy1",
+ "tool_name": "duckduckgo_search",
+ "tool_args": {
+ "query": "currently trending on Twitter"
+ },
+ "tool_call_error": false,
+ "result": [
+ {
+ "title": "Twitter. It's what's happening / Twitter",
+ "href": "https://twitter.com/explore/tabs/trending/",
+ "body": "Explore trending topics, hashtags, and conversations on Twitter."
+ },
+ {
+ "title": "United States — X (Twitter) trending topics and hashtags today ...",
+ "href": "https://trends24.in/united-states/",
+ "body": "Today's top X (Twitter) trends and hashtags in United States: National Guard, Los Angeles, California, Peaceful, Marines. Explore more locations and trending topics on trends24.in"
+ },
+ {
+ "title": "Worldwide • Top Hashtags • Most Tweeted • Day - getdaytrends",
+ "href": "https://getdaytrends.com/top/tweeted/day/",
+ "body": "About Us. We store and analyze Twitter data to bring you insights on what's currently trending and help you keep up with the audience. Find out hot trends, review trend history and browse long-term popular hashtags and topics."
+ },
+ {
+ "title": "United States Latest Trending X (Twitter) hashtag and topics",
+ "href": "https://91trends.com/twitter/united-states/",
+ "body": "United States X (Twitter) Trends Now | Top X (Twitter) Trending Topics & Hashtags Today. Get real-time updates on the hottest trending hashtags and topics on X (Twitter) United States with our automated page. Our page utilizes the official X (Twitter) API to refresh the most talked-about hashtags and topics every 30 minutes, ensuring you always have access to the most current trends on the ..."
+ },
+ {
+ "title": "Trending on Twitter United States today - Global Twitter Trends",
+ "href": "https://globaltwittertrends.com/united-states/",
+ "body": "Above is the table to show what's trending in United States twitter right now . You can click on any one of the trends to tweet it or view all tweets based on that trend. You can also view the twitter trends of all towns in United States by just searching on the search bar above or by choosing from the provided list of countries and towns."
+ }
+ ],
+ "metrics": {
+ "time": 0.7176052920003713
+ },
+ "stop_after_tool_call": false,
+ "created_at": 1749650243,
+ "requires_confirmation": null,
+ "confirmed": null,
+ "confirmation_note": null,
+ "requires_user_input": null,
+ "user_input_schema": null,
+ "external_execution_required": null
+ }
+ ]
+ },
+ "output.mime_type": "application/json",
+ "openinference.span.kind": "AGENT"
+ },
+ "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": {}
+ }
+ },
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": null,
+ "modelParameters": null,
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-06-11T14:01:39.781Z",
+ "updatedAt": "2025-06-11T14:01:39.875Z",
+ "usageDetails": {},
+ "costDetails": {},
+ "providedCostDetails": {},
+ "model": null,
+ "internalModelId": null,
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 6991,
+ "timeToFirstToken": null,
+ "inputCost": null,
+ "outputCost": null,
+ "totalCost": 0,
+ "inputUsage": 0,
+ "outputUsage": 0,
+ "totalUsage": 0,
+ "input": {
+ "run_response": "RunResponse(content=None, content_type='str', thinking=None, reasoning_content=None, event='RunResponse', messages=None, metrics=None, model='gpt-4o-mini', model_provider='OpenAI', run_id='625aa1b6-dc11-4804-8f4b-e2f5b604c07f', agent_id='007f4340-d3b3-4e4e-bf94-bdb22a16d8d5', session_id='35cc6c90-b657-4819-b66c-c931c03ad569', workflow_id=None, tools=None, formatted_tool_calls=None, images=None, videos=None, audio=None, response_audio=None, citations=None, extra_data=None, created_at=1749650492)",
+ "run_messages": "RunMessages(messages=[Message(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), Message(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)], system_message=Message(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), user_message=Message(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), extra_messages=None)",
+ "session_id": "35cc6c90-b657-4819-b66c-c931c03ad569",
+ "message": "What is currently trending on Twitter?"
+ },
+ "output": {
+ "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
+ ],
+ "prompt_tokens_details": [
+ {
+ "audio_tokens": 0,
+ "cached_tokens": 0
+ },
+ {
+ "audio_tokens": 0,
+ "cached_tokens": 0
+ }
+ ],
+ "completion_tokens_details": [
+ {
+ "accepted_prediction_tokens": 0,
+ "audio_tokens": 0,
+ "reasoning_tokens": 0,
+ "rejected_prediction_tokens": 0
+ },
+ {
+ "accepted_prediction_tokens": 0,
+ "audio_tokens": 0,
+ "reasoning_tokens": 0,
+ "rejected_prediction_tokens": 0
+ }
+ ],
+ "time": [
+ 0.9596867079999356,
+ 4.799381209000785
+ ]
+ },
+ "model": "gpt-4o-mini",
+ "model_provider": "OpenAI",
+ "run_id": "625aa1b6-dc11-4804-8f4b-e2f5b604c07f",
+ "agent_id": "007f4340-d3b3-4e4e-bf94-bdb22a16d8d5",
+ "session_id": "35cc6c90-b657-4819-b66c-c931c03ad569",
+ "formatted_tool_calls": [
+ "duckduckgo_search(query=currently trending on Twitter)"
+ ],
+ "created_at": 1749650243,
+ "messages": [
+ {
+ "content": "<additional_information>\n- Use markdown to format your answers.\n</additional_information>",
+ "from_history": false,
+ "stop_after_tool_call": false,
+ "role": "system",
+ "created_at": 1749650492
+ },
+ {
+ "content": "What is currently trending on Twitter?",
+ "from_history": false,
+ "stop_after_tool_call": false,
+ "role": "user",
+ "created_at": 1749650492
+ },
+ {
+ "from_history": false,
+ "stop_after_tool_call": false,
+ "role": "assistant",
+ "tool_calls": [
+ {
+ "id": "call_VybxG748CQId8Xxo6wb2pWy1",
+ "function": {
+ "arguments": {
+ "query": "currently trending on Twitter"
+ },
+ "name": "duckduckgo_search"
+ },
+ "type": "function"
+ }
+ ],
+ "metrics": {
+ "input_tokens": 163,
+ "output_tokens": 20,
+ "total_tokens": 183,
+ "prompt_tokens": 163,
+ "completion_tokens": 20,
+ "prompt_tokens_details": {
+ "audio_tokens": 0,
+ "cached_tokens": 0
+ },
+ "completion_tokens_details": {
+ "accepted_prediction_tokens": 0,
+ "audio_tokens": 0,
+ "reasoning_tokens": 0,
+ "rejected_prediction_tokens": 0
+ },
+ "time": 0.9596867079999356
+ },
+ "created_at": 1749650492
+ },
+ {
+ "content": [
+ {
+ "title": "Twitter. It's what's happening / Twitter",
+ "href": "https://twitter.com/explore/tabs/trending/",
+ "body": "Explore trending topics, hashtags, and conversations on Twitter."
+ },
+ {
+ "title": "United States — X (Twitter) trending topics and hashtags today ...",
+ "href": "https://trends24.in/united-states/",
+ "body": "Today's top X (Twitter) trends and hashtags in United States: National Guard, Los Angeles, California, Peaceful, Marines. Explore more locations and trending topics on trends24.in"
+ },
+ {
+ "title": "Worldwide • Top Hashtags • Most Tweeted • Day - getdaytrends",
+ "href": "https://getdaytrends.com/top/tweeted/day/",
+ "body": "About Us. We store and analyze Twitter data to bring you insights on what's currently trending and help you keep up with the audience. Find out hot trends, review trend history and browse long-term popular hashtags and topics."
+ },
+ {
+ "title": "United States Latest Trending X (Twitter) hashtag and topics",
+ "href": "https://91trends.com/twitter/united-states/",
+ "body": "United States X (Twitter) Trends Now | Top X (Twitter) Trending Topics & Hashtags Today. Get real-time updates on the hottest trending hashtags and topics on X (Twitter) United States with our automated page. Our page utilizes the official X (Twitter) API to refresh the most talked-about hashtags and topics every 30 minutes, ensuring you always have access to the most current trends on the ..."
+ },
+ {
+ "title": "Trending on Twitter United States today - Global Twitter Trends",
+ "href": "https://globaltwittertrends.com/united-states/",
+ "body": "Above is the table to show what's trending in United States twitter right now . You can click on any one of the trends to tweet it or view all tweets based on that trend. You can also view the twitter trends of all towns in United States by just searching on the search bar above or by choosing from the provided list of countries and towns."
+ }
+ ],
+ "from_history": false,
+ "stop_after_tool_call": false,
+ "role": "tool",
+ "tool_call_id": "call_VybxG748CQId8Xxo6wb2pWy1",
+ "tool_name": "duckduckgo_search",
+ "tool_args": {
+ "query": "currently trending on Twitter"
+ },
+ "tool_call_error": false,
+ "metrics": {
+ "time": 0.7176052920003713
+ },
+ "created_at": 1749650494
+ },
+ {
+ "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!",
+ "from_history": false,
+ "stop_after_tool_call": false,
+ "role": "assistant",
+ "metrics": {
+ "input_tokens": 663,
+ "output_tokens": 225,
+ "total_tokens": 888,
+ "prompt_tokens": 663,
+ "completion_tokens": 225,
+ "prompt_tokens_details": {
+ "audio_tokens": 0,
+ "cached_tokens": 0
+ },
+ "completion_tokens_details": {
+ "accepted_prediction_tokens": 0,
+ "audio_tokens": 0,
+ "reasoning_tokens": 0,
+ "rejected_prediction_tokens": 0
+ },
+ "time": 4.799381209000785
+ },
+ "created_at": 1749650494
+ }
+ ],
+ "tools": [
+ {
+ "tool_call_id": "call_VybxG748CQId8Xxo6wb2pWy1",
+ "tool_name": "duckduckgo_search",
+ "tool_args": {
+ "query": "currently trending on Twitter"
+ },
+ "tool_call_error": false,
+ "result": [
+ {
+ "title": "Twitter. It's what's happening / Twitter",
+ "href": "https://twitter.com/explore/tabs/trending/",
+ "body": "Explore trending topics, hashtags, and conversations on Twitter."
+ },
+ {
+ "title": "United States — X (Twitter) trending topics and hashtags today ...",
+ "href": "https://trends24.in/united-states/",
+ "body": "Today's top X (Twitter) trends and hashtags in United States: National Guard, Los Angeles, California, Peaceful, Marines. Explore more locations and trending topics on trends24.in"
+ },
+ {
+ "title": "Worldwide • Top Hashtags • Most Tweeted • Day - getdaytrends",
+ "href": "https://getdaytrends.com/top/tweeted/day/",
+ "body": "About Us. We store and analyze Twitter data to bring you insights on what's currently trending and help you keep up with the audience. Find out hot trends, review trend history and browse long-term popular hashtags and topics."
+ },
+ {
+ "title": "United States Latest Trending X (Twitter) hashtag and topics",
+ "href": "https://91trends.com/twitter/united-states/",
+ "body": "United States X (Twitter) Trends Now | Top X (Twitter) Trending Topics & Hashtags Today. Get real-time updates on the hottest trending hashtags and topics on X (Twitter) United States with our automated page. Our page utilizes the official X (Twitter) API to refresh the most talked-about hashtags and topics every 30 minutes, ensuring you always have access to the most current trends on the ..."
+ },
+ {
+ "title": "Trending on Twitter United States today - Global Twitter Trends",
+ "href": "https://globaltwittertrends.com/united-states/",
+ "body": "Above is the table to show what's trending in United States twitter right now . You can click on any one of the trends to tweet it or view all tweets based on that trend. You can also view the twitter trends of all towns in United States by just searching on the search bar above or by choosing from the provided list of countries and towns."
+ }
+ ],
+ "metrics": {
+ "time": 0.7176052920003713
+ },
+ "stop_after_tool_call": false,
+ "created_at": 1749650243,
+ "requires_confirmation": null,
+ "confirmed": null,
+ "confirmation_note": null,
+ "requires_user_input": null,
+ "user_input_schema": null,
+ "external_execution_required": null
+ }
+ ]
+ }
+ },
+ {
+ "id": "b38a82eaa62b551e",
+ "traceId": "080130871f53145aecf7c29d5dfb6e4c",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "type": "GENERATION",
+ "environment": "default",
+ "parentObservationId": "1cffdfa6fe3412e6",
+ "startTime": "2025-06-11T14:01:34.290Z",
+ "endTime": "2025-06-11T14:01:39.089Z",
+ "name": "OpenAIChat.invoke",
+ "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",
+ "role='assistant' content=None name=None tool_call_id=None tool_calls=[{'id': 'call_VybxG748CQId8Xxo6wb2pWy1', 'function': {'arguments': '{\"query\":\"currently trending on Twitter\"}', 'name': 'duckduckgo_search'}, 'type': 'function'}] 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=163, output_tokens=20, total_tokens=183, audio_tokens=0, input_audio_tokens=0, output_audio_tokens=0, cached_tokens=0, reasoning_tokens=0, prompt_tokens=163, completion_tokens=20, prompt_tokens_details={'audio_tokens': 0, 'cached_tokens': 0}, completion_tokens_details={'accepted_prediction_tokens': 0, 'audio_tokens': 0, 'reasoning_tokens': 0, 'rejected_prediction_tokens': 0}, additional_metrics=None, time=0.9596867079999356, time_to_first_token=None, timer=<agno.utils.timer.Timer object at 0x309c55a90>) references=None created_at=1749650492",
+ "role='tool' content='[\\n {\\n \"title\": \"Twitter. It\\'s what\\'s happening / Twitter\",\\n \"href\": \"https://twitter.com/explore/tabs/trending/\",\\n \"body\": \"Explore trending topics, hashtags, and conversations on Twitter.\"\\n },\\n {\\n \"title\": \"United States \\\\u2014 X (Twitter) trending topics and hashtags today ...\",\\n \"href\": \"https://trends24.in/united-states/\",\\n \"body\": \"Today\\'s top X (Twitter) trends and hashtags in United States: National Guard, Los Angeles, California, Peaceful, Marines. Explore more locations and trending topics on trends24.in\"\\n },\\n {\\n \"title\": \"Worldwide \\\\u2022 Top Hashtags \\\\u2022 Most Tweeted \\\\u2022 Day - getdaytrends\",\\n \"href\": \"https://getdaytrends.com/top/tweeted/day/\",\\n \"body\": \"About Us. We store and analyze Twitter data to bring you insights on what\\'s currently trending and help you keep up with the audience. Find out hot trends, review trend history and browse long-term popular hashtags and topics.\"\\n },\\n {\\n \"title\": \"United States Latest Trending X (Twitter) hashtag and topics\",\\n \"href\": \"https://91trends.com/twitter/united-states/\",\\n \"body\": \"United States X (Twitter) Trends Now | Top X (Twitter) Trending Topics & Hashtags Today. Get real-time updates on the hottest trending hashtags and topics on X (Twitter) United States with our automated page. Our page utilizes the official X (Twitter) API to refresh the most talked-about hashtags and topics every 30 minutes, ensuring you always have access to the most current trends on the ...\"\\n },\\n {\\n \"title\": \"Trending on Twitter United States today - Global Twitter Trends\",\\n \"href\": \"https://globaltwittertrends.com/united-states/\",\\n \"body\": \"Above is the table to show what\\'s trending in United States twitter right now . You can click on any one of the trends to tweet it or view all tweets based on that trend. You can also view the twitter trends of all towns in United States by just searching on the search bar above or by choosing from the provided list of countries and towns.\"\\n }\\n]' name=None tool_call_id='call_VybxG748CQId8Xxo6wb2pWy1' 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='duckduckgo_search' tool_args={'query': 'currently trending on Twitter'} tool_call_error=False 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=0.7176052920003713, time_to_first_token=None, timer=None) references=None created_at=1749650494"
+ ],
+ "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.input_messages.3.message.role": "tool",
+ "llm.input_messages.3.message.content": [
+ {
+ "title": "Twitter. It's what's happening / Twitter",
+ "href": "https://twitter.com/explore/tabs/trending/",
+ "body": "Explore trending topics, hashtags, and conversations on Twitter."
+ },
+ {
+ "title": "United States — X (Twitter) trending topics and hashtags today ...",
+ "href": "https://trends24.in/united-states/",
+ "body": "Today's top X (Twitter) trends and hashtags in United States: National Guard, Los Angeles, California, Peaceful, Marines. Explore more locations and trending topics on trends24.in"
+ },
+ {
+ "title": "Worldwide • Top Hashtags • Most Tweeted • Day - getdaytrends",
+ "href": "https://getdaytrends.com/top/tweeted/day/",
+ "body": "About Us. We store and analyze Twitter data to bring you insights on what's currently trending and help you keep up with the audience. Find out hot trends, review trend history and browse long-term popular hashtags and topics."
+ },
+ {
+ "title": "United States Latest Trending X (Twitter) hashtag and topics",
+ "href": "https://91trends.com/twitter/united-states/",
+ "body": "United States X (Twitter) Trends Now | Top X (Twitter) Trending Topics & Hashtags Today. Get real-time updates on the hottest trending hashtags and topics on X (Twitter) United States with our automated page. Our page utilizes the official X (Twitter) API to refresh the most talked-about hashtags and topics every 30 minutes, ensuring you always have access to the most current trends on the ..."
+ },
+ {
+ "title": "Trending on Twitter United States today - Global Twitter Trends",
+ "href": "https://globaltwittertrends.com/united-states/",
+ "body": "Above is the table to show what's trending in United States twitter right now . You can click on any one of the trends to tweet it or view all tweets based on that trend. You can also view the twitter trends of all towns in United States by just searching on the search bar above or by choosing from the provided list of countries and towns."
+ }
+ ],
+ "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-BhGJDsZlpk55owZCjMyJl8TOGqk0H",
+ "choices": [
+ {
+ "finish_reason": "stop",
+ "index": 0,
+ "logprobs": null,
+ "message": {
+ "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!",
+ "refusal": null,
+ "role": "assistant",
+ "annotations": [],
+ "audio": null,
+ "function_call": null,
+ "tool_calls": null
+ }
+ }
+ ],
+ "created": 1749650495,
+ "model": "gpt-4o-mini-2024-07-18",
+ "object": "chat.completion",
+ "service_tier": "default",
+ "system_fingerprint": "fp_34a54ae93c",
+ "usage": {
+ "completion_tokens": 225,
+ "prompt_tokens": 663,
+ "total_tokens": 888,
+ "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": {}
+ }
+ },
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": null,
+ "modelParameters": {},
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-06-11T14:01:39.249Z",
+ "updatedAt": "2025-06-11T14:01:39.331Z",
+ "usageDetails": {
+ "input": 1568,
+ "output": 423,
+ "total": 1991
+ },
+ "costDetails": {
+ "input": 0.0002352,
+ "output": 0.0002538,
+ "total": 0.000489
+ },
+ "providedCostDetails": {},
+ "model": "gpt-4o-mini",
+ "internalModelId": "clyrjp56f0000t0mzapoocd7u",
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 4799,
+ "timeToFirstToken": null,
+ "inputCost": 0.0002352,
+ "outputCost": 0.0002538,
+ "totalCost": 0.000489,
+ "inputUsage": 1568,
+ "outputUsage": 423,
+ "totalUsage": 1991,
+ "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",
+ "role='assistant' content=None name=None tool_call_id=None tool_calls=[{'id': 'call_VybxG748CQId8Xxo6wb2pWy1', 'function': {'arguments': '{\"query\":\"currently trending on Twitter\"}', 'name': 'duckduckgo_search'}, 'type': 'function'}] 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=163, output_tokens=20, total_tokens=183, audio_tokens=0, input_audio_tokens=0, output_audio_tokens=0, cached_tokens=0, reasoning_tokens=0, prompt_tokens=163, completion_tokens=20, prompt_tokens_details={'audio_tokens': 0, 'cached_tokens': 0}, completion_tokens_details={'accepted_prediction_tokens': 0, 'audio_tokens': 0, 'reasoning_tokens': 0, 'rejected_prediction_tokens': 0}, additional_metrics=None, time=0.9596867079999356, time_to_first_token=None, timer=<agno.utils.timer.Timer object at 0x309c55a90>) references=None created_at=1749650492",
+ "role='tool' content='[\\n {\\n \"title\": \"Twitter. It\\'s what\\'s happening / Twitter\",\\n \"href\": \"https://twitter.com/explore/tabs/trending/\",\\n \"body\": \"Explore trending topics, hashtags, and conversations on Twitter.\"\\n },\\n {\\n \"title\": \"United States \\\\u2014 X (Twitter) trending topics and hashtags today ...\",\\n \"href\": \"https://trends24.in/united-states/\",\\n \"body\": \"Today\\'s top X (Twitter) trends and hashtags in United States: National Guard, Los Angeles, California, Peaceful, Marines. Explore more locations and trending topics on trends24.in\"\\n },\\n {\\n \"title\": \"Worldwide \\\\u2022 Top Hashtags \\\\u2022 Most Tweeted \\\\u2022 Day - getdaytrends\",\\n \"href\": \"https://getdaytrends.com/top/tweeted/day/\",\\n \"body\": \"About Us. We store and analyze Twitter data to bring you insights on what\\'s currently trending and help you keep up with the audience. Find out hot trends, review trend history and browse long-term popular hashtags and topics.\"\\n },\\n {\\n \"title\": \"United States Latest Trending X (Twitter) hashtag and topics\",\\n \"href\": \"https://91trends.com/twitter/united-states/\",\\n \"body\": \"United States X (Twitter) Trends Now | Top X (Twitter) Trending Topics & Hashtags Today. Get real-time updates on the hottest trending hashtags and topics on X (Twitter) United States with our automated page. Our page utilizes the official X (Twitter) API to refresh the most talked-about hashtags and topics every 30 minutes, ensuring you always have access to the most current trends on the ...\"\\n },\\n {\\n \"title\": \"Trending on Twitter United States today - Global Twitter Trends\",\\n \"href\": \"https://globaltwittertrends.com/united-states/\",\\n \"body\": \"Above is the table to show what\\'s trending in United States twitter right now . You can click on any one of the trends to tweet it or view all tweets based on that trend. You can also view the twitter trends of all towns in United States by just searching on the search bar above or by choosing from the provided list of countries and towns.\"\\n }\\n]' name=None tool_call_id='call_VybxG748CQId8Xxo6wb2pWy1' 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='duckduckgo_search' tool_args={'query': 'currently trending on Twitter'} tool_call_error=False 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=0.7176052920003713, time_to_first_token=None, timer=None) references=None created_at=1749650494"
+ ],
+ "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-BhGJDsZlpk55owZCjMyJl8TOGqk0H",
+ "choices": [
+ {
+ "finish_reason": "stop",
+ "index": 0,
+ "logprobs": null,
+ "message": {
+ "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!",
+ "refusal": null,
+ "role": "assistant",
+ "annotations": [],
+ "audio": null,
+ "function_call": null,
+ "tool_calls": null
+ }
+ }
+ ],
+ "created": 1749650495,
+ "model": "gpt-4o-mini-2024-07-18",
+ "object": "chat.completion",
+ "service_tier": "default",
+ "system_fingerprint": "fp_34a54ae93c",
+ "usage": {
+ "completion_tokens": 225,
+ "prompt_tokens": 663,
+ "total_tokens": 888,
+ "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
+ }
+ }
+ }
+ },
+ {
+ "id": "fc7f61b57ecebbaf",
+ "traceId": "080130871f53145aecf7c29d5dfb6e4c",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "type": "GENERATION",
+ "environment": "default",
+ "parentObservationId": "b38a82eaa62b551e",
+ "startTime": "2025-06-11T14:01:34.296Z",
+ "endTime": "2025-06-11T14:01:39.089Z",
+ "name": "chat gpt-4o-mini",
+ "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"
+ }
+ }
+ },
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": null,
+ "modelParameters": {
+ "seed": "",
+ "frequency_penalty": 0,
+ "max_tokens": -1,
+ "presence_penalty": 0,
+ "stop_sequences": "{\"arrayValue\":{}}",
+ "temperature": 1,
+ "top_p": 1,
+ "service_tier": "auto",
+ "user": "",
+ "is_stream": false
+ },
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-06-11T14:01:39.245Z",
+ "updatedAt": "2025-06-11T14:01:39.285Z",
+ "usageDetails": {
+ "input": 663,
+ "output": 225,
+ "total": 888
+ },
+ "costDetails": {
+ "total": 0.000234449999
+ },
+ "providedCostDetails": {
+ "total": 0.000234449999
+ },
+ "model": "gpt-4o-mini",
+ "internalModelId": "clyrjp56f0000t0mzapoocd7u",
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 4793,
+ "timeToFirstToken": null,
+ "inputCost": null,
+ "outputCost": null,
+ "totalCost": 0.000234449999,
+ "inputUsage": 663,
+ "outputUsage": 225,
+ "totalUsage": 888,
+ "input": "developer: <additional_information>\n- Use markdown to format your answers.\n</additional_information>\nuser: What is currently trending on Twitter?\nassistant: None\ntool: [\n {\n \"title\": \"Twitter. It's what's happening / Twitter\",\n \"href\": \"https://twitter.com/explore/tabs/trending/\",\n \"body\": \"Explore trending topics, hashtags, and conversations on Twitter.\"\n },\n {\n \"title\": \"United States \\u2014 X (Twitter) trending topics and hashtags today ...\",\n \"href\": \"https://trends24.in/united-states/\",\n \"body\": \"Today's top X (Twitter) trends and hashtags in United States: National Guard, Los Angeles, California, Peaceful, Marines. Explore more locations and trending topics on trends24.in\"\n },\n {\n \"title\": \"Worldwide \\u2022 Top Hashtags \\u2022 Most Tweeted \\u2022 Day - getdaytrends\",\n \"href\": \"https://getdaytrends.com/top/tweeted/day/\",\n \"body\": \"About Us. We store and analyze Twitter data to bring you insights on what's currently trending and help you keep up with the audience. Find out hot trends, review trend history and browse long-term popular hashtags and topics.\"\n },\n {\n \"title\": \"United States Latest Trending X (Twitter) hashtag and topics\",\n \"href\": \"https://91trends.com/twitter/united-states/\",\n \"body\": \"United States X (Twitter) Trends Now | Top X (Twitter) Trending Topics & Hashtags Today. Get real-time updates on the hottest trending hashtags and topics on X (Twitter) United States with our automated page. Our page utilizes the official X (Twitter) API to refresh the most talked-about hashtags and topics every 30 minutes, ensuring you always have access to the most current trends on the ...\"\n },\n {\n \"title\": \"Trending on Twitter United States today - Global Twitter Trends\",\n \"href\": \"https://globaltwittertrends.com/united-states/\",\n \"body\": \"Above is the table to show what's trending in United States twitter right now . You can click on any one of the trends to tweet it or view all tweets based on that trend. You can also view the twitter trends of all towns in United States by just searching on the search bar above or by choosing from the provided list of countries and towns.\"\n }\n]",
+ "output": "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!"
+ },
+ {
+ "id": "6581e147aec6793a",
+ "traceId": "080130871f53145aecf7c29d5dfb6e4c",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "type": "SPAN",
+ "environment": "default",
+ "parentObservationId": "1cffdfa6fe3412e6",
+ "startTime": "2025-06-11T14:01:33.564Z",
+ "endTime": "2025-06-11T14:01:34.281Z",
+ "name": "duckduckgo_search",
+ "metadata": {
+ "attributes": {
+ "input.value": {
+ "query": "currently trending on Twitter"
+ },
+ "tool.name": "duckduckgo_search",
+ "tool.description": "Use this function to search DuckDuckGo for a query.",
+ "tool.parameters": {
+ "query": "currently trending on Twitter"
+ },
+ "output.value": [
+ {
+ "title": "Twitter. It's what's happening / Twitter",
+ "href": "https://twitter.com/explore/tabs/trending/",
+ "body": "Explore trending topics, hashtags, and conversations on Twitter."
+ },
+ {
+ "title": "United States — X (Twitter) trending topics and hashtags today ...",
+ "href": "https://trends24.in/united-states/",
+ "body": "Today's top X (Twitter) trends and hashtags in United States: National Guard, Los Angeles, California, Peaceful, Marines. Explore more locations and trending topics on trends24.in"
+ },
+ {
+ "title": "Worldwide • Top Hashtags • Most Tweeted • Day - getdaytrends",
+ "href": "https://getdaytrends.com/top/tweeted/day/",
+ "body": "About Us. We store and analyze Twitter data to bring you insights on what's currently trending and help you keep up with the audience. Find out hot trends, review trend history and browse long-term popular hashtags and topics."
+ },
+ {
+ "title": "United States Latest Trending X (Twitter) hashtag and topics",
+ "href": "https://91trends.com/twitter/united-states/",
+ "body": "United States X (Twitter) Trends Now | Top X (Twitter) Trending Topics & Hashtags Today. Get real-time updates on the hottest trending hashtags and topics on X (Twitter) United States with our automated page. Our page utilizes the official X (Twitter) API to refresh the most talked-about hashtags and topics every 30 minutes, ensuring you always have access to the most current trends on the ..."
+ },
+ {
+ "title": "Trending on Twitter United States today - Global Twitter Trends",
+ "href": "https://globaltwittertrends.com/united-states/",
+ "body": "Above is the table to show what's trending in United States twitter right now . You can click on any one of the trends to tweet it or view all tweets based on that trend. You can also view the twitter trends of all towns in United States by just searching on the search bar above or by choosing from the provided list of countries and towns."
+ }
+ ],
+ "output.mime_type": "text/plain",
+ "openinference.span.kind": "TOOL"
+ },
+ "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": {}
+ }
+ },
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": null,
+ "modelParameters": null,
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-06-11T14:01:34.476Z",
+ "updatedAt": "2025-06-11T14:01:34.529Z",
+ "usageDetails": {},
+ "costDetails": {},
+ "providedCostDetails": {},
+ "model": null,
+ "internalModelId": null,
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 717,
+ "timeToFirstToken": null,
+ "inputCost": null,
+ "outputCost": null,
+ "totalCost": 0,
+ "inputUsage": 0,
+ "outputUsage": 0,
+ "totalUsage": 0,
+ "input": {
+ "query": "currently trending on Twitter"
+ },
+ "output": [
+ {
+ "title": "Twitter. It's what's happening / Twitter",
+ "href": "https://twitter.com/explore/tabs/trending/",
+ "body": "Explore trending topics, hashtags, and conversations on Twitter."
+ },
+ {
+ "title": "United States — X (Twitter) trending topics and hashtags today ...",
+ "href": "https://trends24.in/united-states/",
+ "body": "Today's top X (Twitter) trends and hashtags in United States: National Guard, Los Angeles, California, Peaceful, Marines. Explore more locations and trending topics on trends24.in"
+ },
+ {
+ "title": "Worldwide • Top Hashtags • Most Tweeted • Day - getdaytrends",
+ "href": "https://getdaytrends.com/top/tweeted/day/",
+ "body": "About Us. We store and analyze Twitter data to bring you insights on what's currently trending and help you keep up with the audience. Find out hot trends, review trend history and browse long-term popular hashtags and topics."
+ },
+ {
+ "title": "United States Latest Trending X (Twitter) hashtag and topics",
+ "href": "https://91trends.com/twitter/united-states/",
+ "body": "United States X (Twitter) Trends Now | Top X (Twitter) Trending Topics & Hashtags Today. Get real-time updates on the hottest trending hashtags and topics on X (Twitter) United States with our automated page. Our page utilizes the official X (Twitter) API to refresh the most talked-about hashtags and topics every 30 minutes, ensuring you always have access to the most current trends on the ..."
+ },
+ {
+ "title": "Trending on Twitter United States today - Global Twitter Trends",
+ "href": "https://globaltwittertrends.com/united-states/",
+ "body": "Above is the table to show what's trending in United States twitter right now . You can click on any one of the trends to tweet it or view all tweets based on that trend. You can also view the twitter trends of all towns in United States by just searching on the search bar above or by choosing from the provided list of countries and towns."
+ }
+ ]
+ },
+ {
+ "id": "1f883bb9668167c0",
+ "traceId": "080130871f53145aecf7c29d5dfb6e4c",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "type": "GENERATION",
+ "environment": "default",
+ "parentObservationId": "ca136de468e156c9",
+ "startTime": "2025-06-11T14:01:32.606Z",
+ "endTime": "2025-06-11T14:01:33.559Z",
+ "name": "chat gpt-4o-mini",
+ "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"
+ }
+ }
+ },
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": null,
+ "modelParameters": {
+ "seed": "",
+ "frequency_penalty": 0,
+ "max_tokens": -1,
+ "presence_penalty": 0,
+ "stop_sequences": "{\"arrayValue\":{}}",
+ "temperature": 1,
+ "top_p": 1,
+ "service_tier": "auto",
+ "user": "",
+ "is_stream": false
+ },
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-06-11T14:01:33.719Z",
+ "updatedAt": "2025-06-11T14:01:33.768Z",
+ "usageDetails": {
+ "input": 163,
+ "output": 20,
+ "total": 183
+ },
+ "costDetails": {
+ "total": 0.00003645
+ },
+ "providedCostDetails": {
+ "total": 0.00003645
+ },
+ "model": "gpt-4o-mini",
+ "internalModelId": "clyrjp56f0000t0mzapoocd7u",
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 953,
+ "timeToFirstToken": null,
+ "inputCost": null,
+ "outputCost": null,
+ "totalCost": 0.00003645,
+ "inputUsage": 163,
+ "outputUsage": 20,
+ "totalUsage": 183,
+ "input": "developer: <additional_information>\n- Use markdown to format your answers.\n</additional_information>\nuser: What is currently trending on Twitter?",
+ "output": "None"
+ },
+ {
+ "id": "ca136de468e156c9",
+ "traceId": "080130871f53145aecf7c29d5dfb6e4c",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "type": "GENERATION",
+ "environment": "default",
+ "parentObservationId": "1cffdfa6fe3412e6",
+ "startTime": "2025-06-11T14:01:32.600Z",
+ "endTime": "2025-06-11T14:01:33.560Z",
+ "name": "OpenAIChat.invoke",
+ "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": {}
+ }
+ },
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": null,
+ "modelParameters": {},
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-06-11T14:01:33.719Z",
+ "updatedAt": "2025-06-11T14:01:33.752Z",
+ "usageDetails": {
+ "input": 542,
+ "output": 235,
+ "total": 777
+ },
+ "costDetails": {
+ "input": 0.0000813,
+ "output": 0.000141,
+ "total": 0.0002223
+ },
+ "providedCostDetails": {},
+ "model": "gpt-4o-mini",
+ "internalModelId": "clyrjp56f0000t0mzapoocd7u",
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 960,
+ "timeToFirstToken": null,
+ "inputCost": 0.0000813,
+ "outputCost": 0.000141,
+ "totalCost": 0.0002223,
+ "inputUsage": 542,
+ "outputUsage": 235,
+ "totalUsage": 777,
+ "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
+ }
+ }
+ }
+ }
+ ]
+}
\ 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.json
new file mode 100644
index 0000000000..1d0bd6c76e
--- /dev/null
+++ b/packages/shared/scripts/seeder/utils/framework-traces/autogen-2025-06-06.json
@@ -0,0 +1,149 @@
+{
+ "trace": {
+ "id": "1b72c51fabed12ae7df83bfd4a09f545",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "name": "autogen-chat-trace",
+ "timestamp": "2025-06-06T11:31:33.965Z",
+ "environment": "default",
+ "tags": [
+ "autogen",
+ "dev"
+ ],
+ "bookmarked": false,
+ "release": null,
+ "version": "1.0.0",
+ "userId": "user_123",
+ "sessionId": "session_abc",
+ "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\"}}}",
+ "createdAt": "2025-06-06T11:31:35.000Z",
+ "updatedAt": "2025-06-06T11:31:35.337Z",
+ "scores": [],
+ "latency": 0.645
+ },
+ "observations": [
+ {
+ "id": "95f4f51edeb603d9",
+ "traceId": "1b72c51fabed12ae7df83bfd4a09f545",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "type": "SPAN",
+ "environment": "default",
+ "parentObservationId": null,
+ "startTime": "2025-06-06T11:31:33.965Z",
+ "endTime": "2025-06-06T11:31:34.610Z",
+ "name": "autogen-chat-trace",
+ "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"
+ }
+ }
+ },
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": "1.0.0",
+ "modelParameters": null,
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-06-06T11:31:35.295Z",
+ "updatedAt": "2025-06-06T11:31:35.337Z",
+ "usageDetails": {},
+ "costDetails": {},
+ "providedCostDetails": {},
+ "model": null,
+ "internalModelId": null,
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 645,
+ "timeToFirstToken": null,
+ "inputCost": null,
+ "outputCost": null,
+ "totalCost": 0,
+ "inputUsage": 0,
+ "outputUsage": 0,
+ "totalUsage": 0,
+ "input": null,
+ "output": null
+ },
+ {
+ "id": "83517f9062f5ada4",
+ "traceId": "1b72c51fabed12ae7df83bfd4a09f545",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "type": "GENERATION",
+ "environment": "default",
+ "parentObservationId": "95f4f51edeb603d9",
+ "startTime": "2025-06-06T11:31:33.978Z",
+ "endTime": "2025-06-06T11:31:34.606Z",
+ "name": "chat gpt-4o",
+ "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"
+ }
+ }
+ },
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": null,
+ "modelParameters": {
+ "seed": "",
+ "frequency_penalty": 0,
+ "max_tokens": -1,
+ "presence_penalty": 0,
+ "stop_sequences": "{\"arrayValue\":{}}",
+ "temperature": 1,
+ "top_p": 1,
+ "service_tier": "auto",
+ "user": "",
+ "is_stream": false
+ },
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-06-06T11:31:35.090Z",
+ "updatedAt": "2025-06-06T11:31:35.153Z",
+ "usageDetails": {
+ "input": 41,
+ "output": 3,
+ "total": 44
+ },
+ "costDetails": {
+ "total": 0.000025
+ },
+ "providedCostDetails": {
+ "total": 0.000025
+ },
+ "model": "gpt-4o",
+ "internalModelId": "b9854a5c92dc496b997d99d20",
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 628,
+ "timeToFirstToken": null,
+ "inputCost": null,
+ "outputCost": null,
+ "totalCost": 0.000025,
+ "inputUsage": 41,
+ "outputUsage": 3,
+ "totalUsage": 44,
+ "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!"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/packages/shared/scripts/seeder/utils/framework-traces/beeai-2025-08-01.json b/packages/shared/scripts/seeder/utils/framework-traces/beeai-2025-08-01.json
new file mode 100644
index 0000000000..a552e86080
--- /dev/null
+++ b/packages/shared/scripts/seeder/utils/framework-traces/beeai-2025-08-01.json
@@ -0,0 +1,2568 @@
+{
+ "trace": {
+ "id": "096fc09a30ab90d2431778f9ee2b3936",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "name": "beeai-framework-main",
+ "timestamp": "2025-08-01T13:56:54.163Z",
+ "environment": "default",
+ "tags": [],
+ "bookmarked": false,
+ "release": null,
+ "version": null,
+ "userId": null,
+ "sessionId": null,
+ "public": true,
+ "input": "\"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?\"",
+ "output": "\"{'role': 'assistant', 'text': \\\"Barcelona is a vibrant city known for its rich cultural heritage and stunning architecture, particularly the works of Antoni Gaudí. Here are some key attractions and landmarks you should consider visiting:\\\\n\\\\n1. **Sagrada Família** - An iconic basilica designed by Gaudí, still under construction.\\\\n2. **Park Güell** - A colorful park also designed by Gaudí, filled with artistic structures and beautiful gardens.\\\\n3. **La Rambla** - A famous street in the heart of the city ideal for walking, dining, and shopping.\\\\n4. **Gothic Quarter (Barri Gòtic)** - The historic center of Barcelona with medieval architecture and narrow streets.\\\\n5. **Casa Batlló** - Another masterpiece by Gaudí, known for its unique design and vibrant colors.\\\\n6. **Casa Milà (La Pedrera)** - A modernist building with a wavy stone facade, also designed by Gaudí.\\\\n7. **Montjuïc** - A hill offering stunning views of the city, home to several attractions including the Montjuïc Castle and the Magic Fountain.\\\\n\\\\nRegarding the current weather, it is 29°C with no rain, and the humidity is at 48%. It's a great time to explore the city!\\\"}\"",
+ "metadata": "{\"attributes\":{\"source\":\"ReActAgent\",\"traceId\":\"0cff2691-3a45-4988-a243-8cb8c508aa25\",\"beeai.version\":\"0.1.33\",\"input.value\":\"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?\",\"output.value\":\"{'role': 'assistant', 'text': \\\"Barcelona is a vibrant city known for its rich cultural heritage and stunning architecture, particularly the works of Antoni Gaudí. Here are some key attractions and landmarks you should consider visiting:\\\\n\\\\n1. **Sagrada Família** - An iconic basilica designed by Gaudí, still under construction.\\\\n2. **Park Güell** - A colorful park also designed by Gaudí, filled with artistic structures and beautiful gardens.\\\\n3. **La Rambla** - A famous street in the heart of the city ideal for walking, dining, and shopping.\\\\n4. **Gothic Quarter (Barri Gòtic)** - The historic center of Barcelona with medieval architecture and narrow streets.\\\\n5. **Casa Batlló** - Another masterpiece by Gaudí, known for its unique design and vibrant colors.\\\\n6. **Casa Milà (La Pedrera)** - A modernist building with a wavy stone facade, also designed by Gaudí.\\\\n7. **Montjuïc** - A hill offering stunning views of the city, home to several attractions including the Montjuïc Castle and the Magic Fountain.\\\\n\\\\nRegarding the current weather, it is 29°C with no rain, and the humidity is at 48%. It's a great time to explore the city!\\\"}\",\"history\":\"[{'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', 'role': 'system'}, {'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': 'user'}, {'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', 'role': 'assistant'}, {'text': 'Thought: I found information about Barcelona, including its rich cultural heritage and key attractions like the architectural works of Antoni Gaudí. Now, I will check the current weather conditions in Barcelona. \\\\nFunction Name: OpenMeteoTool\\\\nFunction Input: {\\\"country\\\": \\\"Spain\\\", \\\"location_name\\\": \\\"Barcelona\\\"}\\\\nFunction Output: {\\\"latitude\\\": 41.4375, \\\"longitude\\\": 2.1875, \\\"generationtime_ms\\\": 0.0553131103515625, \\\"utc_offset_seconds\\\": 0, \\\"timezone\\\": \\\"GMT\\\", \\\"timezone_abbreviation\\\": \\\"GMT\\\", \\\"elevation\\\": 44.0, \\\"current_units\\\": {\\\"time\\\": \\\"iso8601\\\", \\\"interval\\\": \\\"seconds\\\", \\\"temperature_2m\\\": \\\"°C\\\", \\\"rain\\\": \\\"mm\\\", \\\"relative_humidity_2m\\\": \\\"%\\\", \\\"wind_speed_10m\\\": \\\"km/h\\\"}, \\\"current\\\": {\\\"time\\\": \\\"2025-08-01T13:45\\\", \\\"interval\\\": 900, \\\"temperature_2m\\\": 29.0, \\\"rain\\\": 0.0, \\\"relative_humidity_2m\\\": 48, \\\"wind_speed_10m\\\": 18.8}, \\\"daily_units\\\": {\\\"time\\\": \\\"iso8601\\\", \\\"temperature_2m_max\\\": \\\"°C\\\", \\\"temperature_2m_min\\\": \\\"°C\\\", \\\"rain_sum\\\": \\\"mm\\\"}, \\\"daily\\\": {\\\"time\\\": [\\\"2025-08-01\\\"], \\\"temperature_2m_max\\\": [29.0], \\\"temperature_2m_min\\\": [20.6], \\\"rain_sum\\\": [0.0]}}\\\\n', 'role': 'assistant'}, {'text': \\\"Barcelona is a vibrant city known for its rich cultural heritage and stunning architecture, particularly the works of Antoni Gaudí. Here are some key attractions and landmarks you should consider visiting:\\\\n\\\\n1. **Sagrada Família** - An iconic basilica designed by Gaudí, still under construction.\\\\n2. **Park Güell** - A colorful park also designed by Gaudí, filled with artistic structures and beautiful gardens.\\\\n3. **La Rambla** - A famous street in the heart of the city ideal for walking, dining, and shopping.\\\\n4. **Gothic Quarter (Barri Gòtic)** - The historic center of Barcelona with medieval architecture and narrow streets.\\\\n5. **Casa Batlló** - Another masterpiece by Gaudí, known for its unique design and vibrant colors.\\\\n6. **Casa Milà (La Pedrera)** - A modernist building with a wavy stone facade, also designed by Gaudí.\\\\n7. **Montjuïc** - A hill offering stunning views of the city, home to several attractions including the Montjuïc Castle and the Magic Fountain.\\\\n\\\\nRegarding the current weather, it is 29°C with no rain, and the humidity is at 48%. It's a great time to explore the city!\\\", 'role': 'assistant'}]\",\"openinference.span.kind\":\"AGENT\"},\"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\":{}}}",
+ "createdAt": "2025-08-01T13:57:15.000Z",
+ "updatedAt": "2025-08-01T13:57:14.194Z",
+ "scores": [
+ {
+ "id": "a9a518d9-9b3f-4c21-86d3-ead5e5bf23de",
+ "timestamp": "2025-08-01T13:57:41.654Z",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "environment": "default",
+ "name": "hallucination",
+ "source": "EVAL",
+ "authorUserId": null,
+ "comment": "The generation accurately lists well-known attractions in Barcelona, aligning with established knowledge. However, the current weather conditions are speculative and unverifiable without real-time data access, introducing a degree of hallucination.",
+ "metadata": "{}",
+ "configId": null,
+ "createdAt": "2025-08-01T13:57:42.000Z",
+ "updatedAt": "2025-08-01T13:57:41.767Z",
+ "queueId": null,
+ "traceId": "096fc09a30ab90d2431778f9ee2b3936",
+ "observationId": null,
+ "sessionId": null,
+ "datasetRunId": null,
+ "value": 0.2,
+ "stringValue": null,
+ "dataType": "NUMERIC"
+ },
+ {
+ "id": "96d236ec-d089-49cb-9e77-7c507b112649",
+ "timestamp": "2025-08-01T13:57:40.818Z",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "environment": "default",
+ "name": "toxicity",
+ "source": "EVAL",
+ "authorUserId": null,
+ "comment": "The generation provides informative and respectful content about Barcelona's attractions and current weather without any harmful or negative language, making it non-toxic.",
+ "metadata": "{}",
+ "configId": null,
+ "createdAt": "2025-08-01T13:57:41.000Z",
+ "updatedAt": "2025-08-01T13:57:40.909Z",
+ "queueId": null,
+ "traceId": "096fc09a30ab90d2431778f9ee2b3936",
+ "observationId": null,
+ "sessionId": null,
+ "datasetRunId": null,
+ "value": 0,
+ "stringValue": null,
+ "dataType": "NUMERIC"
+ }
+ ],
+ "latency": 17.173
+ },
+ "observations": [
+ {
+ "id": "ff8b04dfe1f3e047",
+ "traceId": "096fc09a30ab90d2431778f9ee2b3936",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "type": "SPAN",
+ "environment": "default",
+ "parentObservationId": "c48e7d031a4cb886",
+ "startTime": "2025-08-01T13:56:55.682Z",
+ "endTime": "2025-08-01T13:57:11.334Z",
+ "name": "agent.react.update-13",
+ "metadata": {
+ "attributes": {
+ "target": "agent.react.update",
+ "name": "update",
+ "traceId": "0cff2691-3a45-4988-a243-8cb8c508aa25",
+ "output.mime_type": "application/json",
+ "thought": "I will first research key attractions and landmarks in Barcelona and then check the current weather conditions there. ",
+ "tool.name": "Wikipedia",
+ "tool.parameters": {
+ "query": "Tourism in Barcelona"
+ },
+ "openinference.span.kind": "AGENT"
+ },
+ "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": {}
+ }
+ },
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": null,
+ "modelParameters": null,
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-08-01T13:57:14.161Z",
+ "updatedAt": "2025-08-01T13:57:14.259Z",
+ "usageDetails": {},
+ "costDetails": {},
+ "providedCostDetails": {},
+ "model": null,
+ "internalModelId": null,
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 15652,
+ "timeToFirstToken": null,
+ "inputCost": null,
+ "outputCost": null,
+ "totalCost": 0,
+ "inputUsage": 0,
+ "outputUsage": 0,
+ "totalUsage": 0,
+ "input": null,
+ "output": null
+ },
+ {
+ "id": "fce7074c89470876",
+ "traceId": "096fc09a30ab90d2431778f9ee2b3936",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "type": "SPAN",
+ "environment": "default",
+ "parentObservationId": "c48e7d031a4cb886",
+ "startTime": "2025-08-01T13:56:57.470Z",
+ "endTime": "2025-08-01T13:57:11.334Z",
+ "name": "agent.react.partial_update-263",
+ "metadata": {
+ "attributes": {
+ "target": "agent.react.partial_update",
+ "name": "partial_update",
+ "traceId": "0cff2691-3a45-4988-a243-8cb8c508aa25",
+ "output.value": [
+ {
+ "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"
+ }
+ ],
+ "output.mime_type": "application/json",
+ "thought": "I will first research key attractions and landmarks in Barcelona and then check the current weather conditions there. ",
+ "tool.name": "Wikipedia",
+ "tool.parameters": {
+ "query": "Tourism in Barcelona"
+ },
+ "openinference.span.kind": "AGENT"
+ },
+ "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": {}
+ }
+ },
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": null,
+ "modelParameters": null,
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-08-01T13:57:14.161Z",
+ "updatedAt": "2025-08-01T13:57:14.256Z",
+ "usageDetails": {},
+ "costDetails": {},
+ "providedCostDetails": {},
+ "model": null,
+ "internalModelId": null,
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 13864,
+ "timeToFirstToken": null,
+ "inputCost": null,
+ "outputCost": null,
+ "totalCost": 0,
+ "inputUsage": 0,
+ "outputUsage": 0,
+ "totalUsage": 0,
+ "input": null,
+ "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"
+ }
+ ]
+ },
+ {
+ "id": "8d28081d2ea0b09a",
+ "traceId": "096fc09a30ab90d2431778f9ee2b3936",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "type": "SPAN",
+ "environment": "default",
+ "parentObservationId": "c48e7d031a4cb886",
+ "startTime": "2025-08-01T13:56:55.399Z",
+ "endTime": "2025-08-01T13:57:11.333Z",
+ "name": "agent.react.update-11",
+ "metadata": {
+ "attributes": {
+ "target": "agent.react.update",
+ "name": "update",
+ "traceId": "0cff2691-3a45-4988-a243-8cb8c508aa25",
+ "output.mime_type": "application/json",
+ "thought": "I will first research key attractions and landmarks in Barcelona and then check the current weather conditions there. ",
+ "tool.parameters": null,
+ "openinference.span.kind": "AGENT"
+ },
+ "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": {}
+ }
+ },
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": null,
+ "modelParameters": null,
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-08-01T13:57:14.162Z",
+ "updatedAt": "2025-08-01T13:57:14.256Z",
+ "usageDetails": {},
+ "costDetails": {},
+ "providedCostDetails": {},
+ "model": null,
+ "internalModelId": null,
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 15934,
+ "timeToFirstToken": null,
+ "inputCost": null,
+ "outputCost": null,
+ "totalCost": 0,
+ "inputUsage": 0,
+ "outputUsage": 0,
+ "totalUsage": 0,
+ "input": null,
+ "output": null
+ },
+ {
+ "id": "6c9cab010e21d9ef",
+ "traceId": "096fc09a30ab90d2431778f9ee2b3936",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "type": "SPAN",
+ "environment": "default",
+ "parentObservationId": "0eb76c10a47e9086",
+ "startTime": "2025-08-01T13:57:03.579Z",
+ "endTime": "2025-08-01T13:57:11.334Z",
+ "name": "agent.react.update-17",
+ "metadata": {
+ "attributes": {
+ "target": "agent.react.update",
+ "name": "update",
+ "traceId": "0cff2691-3a45-4988-a243-8cb8c508aa25",
+ "output.mime_type": "application/json",
+ "thought": "I found information about Barcelona, including its rich cultural heritage and key attractions like the architectural works of Antoni Gaudí. Now, I will check the current weather conditions in Barcelona. ",
+ "tool.name": "OpenMeteoTool",
+ "tool.parameters": {
+ "location_name": "Barcelona",
+ "country": "Spain"
+ },
+ "openinference.span.kind": "AGENT"
+ },
+ "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": {}
+ }
+ },
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": null,
+ "modelParameters": null,
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-08-01T13:57:14.162Z",
+ "updatedAt": "2025-08-01T13:57:14.256Z",
+ "usageDetails": {},
+ "costDetails": {},
+ "providedCostDetails": {},
+ "model": null,
+ "internalModelId": null,
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 7755,
+ "timeToFirstToken": null,
+ "inputCost": null,
+ "outputCost": null,
+ "totalCost": 0,
+ "inputUsage": 0,
+ "outputUsage": 0,
+ "totalUsage": 0,
+ "input": null,
+ "output": null
+ },
+ {
+ "id": "322299e937be4455",
+ "traceId": "096fc09a30ab90d2431778f9ee2b3936",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "type": "SPAN",
+ "environment": "default",
+ "parentObservationId": "39d661bf29b4dbbd",
+ "startTime": "2025-08-01T13:57:11.332Z",
+ "endTime": "2025-08-01T13:57:11.336Z",
+ "name": "agent.react.success-2",
+ "metadata": {
+ "attributes": {
+ "target": "agent.react.success",
+ "name": "success",
+ "traceId": "0cff2691-3a45-4988-a243-8cb8c508aa25",
+ "iteration": "3",
+ "input.mime_type": "application/json",
+ "input.value": [
+ {
+ "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",
+ "role": "system"
+ },
+ {
+ "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": "user"
+ },
+ {
+ "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",
+ "role": "assistant"
+ },
+ {
+ "text": "Thought: I found information about Barcelona, including its rich cultural heritage and key attractions like the architectural works of Antoni Gaudí. Now, I will check the current weather conditions in Barcelona. \nFunction Name: OpenMeteoTool\nFunction Input: {\"country\": \"Spain\", \"location_name\": \"Barcelona\"}\nFunction Output: {\"latitude\": 41.4375, \"longitude\": 2.1875, \"generationtime_ms\": 0.0553131103515625, \"utc_offset_seconds\": 0, \"timezone\": \"GMT\", \"timezone_abbreviation\": \"GMT\", \"elevation\": 44.0, \"current_units\": {\"time\": \"iso8601\", \"interval\": \"seconds\", \"temperature_2m\": \"°C\", \"rain\": \"mm\", \"relative_humidity_2m\": \"%\", \"wind_speed_10m\": \"km/h\"}, \"current\": {\"time\": \"2025-08-01T13:45\", \"interval\": 900, \"temperature_2m\": 29.0, \"rain\": 0.0, \"relative_humidity_2m\": 48, \"wind_speed_10m\": 18.8}, \"daily_units\": {\"time\": \"iso8601\", \"temperature_2m_max\": \"°C\", \"temperature_2m_min\": \"°C\", \"rain_sum\": \"mm\"}, \"daily\": {\"time\": [\"2025-08-01\"], \"temperature_2m_max\": [29.0], \"temperature_2m_min\": [20.6], \"rain_sum\": [0.0]}}\n",
+ "role": "assistant"
+ },
+ {
+ "text": "Barcelona is a vibrant city known for its rich cultural heritage and stunning architecture, particularly the works of Antoni Gaudí. Here are some key attractions and landmarks you should consider visiting:\n\n1. **Sagrada Família** - An iconic basilica designed by Gaudí, still under construction.\n2. **Park Güell** - A colorful park also designed by Gaudí, filled with artistic structures and beautiful gardens.\n3. **La Rambla** - A famous street in the heart of the city ideal for walking, dining, and shopping.\n4. **Gothic Quarter (Barri Gòtic)** - The historic center of Barcelona with medieval architecture and narrow streets.\n5. **Casa Batlló** - Another masterpiece by Gaudí, known for its unique design and vibrant colors.\n6. **Casa Milà (La Pedrera)** - A modernist building with a wavy stone facade, also designed by Gaudí.\n7. **Montjuïc** - A hill offering stunning views of the city, home to several attractions including the Montjuïc Castle and the Magic Fountain.\n\nRegarding the current weather, it is 29°C with no rain, and the humidity is at 48%. It's a great time to explore the city!",
+ "role": "assistant"
+ }
+ ],
+ "output.mime_type": "application/json",
+ "output.value": {
+ "role": "assistant",
+ "content": [
+ {
+ "type": "text",
+ "text": "Barcelona is a vibrant city known for its rich cultural heritage and stunning architecture, particularly the works of Antoni Gaudí. Here are some key attractions and landmarks you should consider visiting:\n\n1. **Sagrada Família** - An iconic basilica designed by Gaudí, still under construction.\n2. **Park Güell** - A colorful park also designed by Gaudí, filled with artistic structures and beautiful gardens.\n3. **La Rambla** - A famous street in the heart of the city ideal for walking, dining, and shopping.\n4. **Gothic Quarter (Barri Gòtic)** - The historic center of Barcelona with medieval architecture and narrow streets.\n5. **Casa Batlló** - Another masterpiece by Gaudí, known for its unique design and vibrant colors.\n6. **Casa Milà (La Pedrera)** - A modernist building with a wavy stone facade, also designed by Gaudí.\n7. **Montjuïc** - A hill offering stunning views of the city, home to several attractions including the Montjuïc Castle and the Magic Fountain.\n\nRegarding the current weather, it is 29°C with no rain, and the humidity is at 48%. It's a great time to explore the city!"
+ }
+ ]
+ },
+ "openinference.span.kind": "AGENT"
+ },
+ "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": {}
+ }
+ },
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": null,
+ "modelParameters": null,
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-08-01T13:57:14.169Z",
+ "updatedAt": "2025-08-01T13:57:14.252Z",
+ "usageDetails": {},
+ "costDetails": {},
+ "providedCostDetails": {},
+ "model": null,
+ "internalModelId": null,
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 4,
+ "timeToFirstToken": null,
+ "inputCost": null,
+ "outputCost": null,
+ "totalCost": 0,
+ "inputUsage": 0,
+ "outputUsage": 0,
+ "totalUsage": 0,
+ "input": [
+ {
+ "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",
+ "role": "system"
+ },
+ {
+ "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": "user"
+ },
+ {
+ "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",
+ "role": "assistant"
+ },
+ {
+ "text": "Thought: I found information about Barcelona, including its rich cultural heritage and key attractions like the architectural works of Antoni Gaudí. Now, I will check the current weather conditions in Barcelona. \nFunction Name: OpenMeteoTool\nFunction Input: {\"country\": \"Spain\", \"location_name\": \"Barcelona\"}\nFunction Output: {\"latitude\": 41.4375, \"longitude\": 2.1875, \"generationtime_ms\": 0.0553131103515625, \"utc_offset_seconds\": 0, \"timezone\": \"GMT\", \"timezone_abbreviation\": \"GMT\", \"elevation\": 44.0, \"current_units\": {\"time\": \"iso8601\", \"interval\": \"seconds\", \"temperature_2m\": \"°C\", \"rain\": \"mm\", \"relative_humidity_2m\": \"%\", \"wind_speed_10m\": \"km/h\"}, \"current\": {\"time\": \"2025-08-01T13:45\", \"interval\": 900, \"temperature_2m\": 29.0, \"rain\": 0.0, \"relative_humidity_2m\": 48, \"wind_speed_10m\": 18.8}, \"daily_units\": {\"time\": \"iso8601\", \"temperature_2m_max\": \"°C\", \"temperature_2m_min\": \"°C\", \"rain_sum\": \"mm\"}, \"daily\": {\"time\": [\"2025-08-01\"], \"temperature_2m_max\": [29.0], \"temperature_2m_min\": [20.6], \"rain_sum\": [0.0]}}\n",
+ "role": "assistant"
+ },
+ {
+ "text": "Barcelona is a vibrant city known for its rich cultural heritage and stunning architecture, particularly the works of Antoni Gaudí. Here are some key attractions and landmarks you should consider visiting:\n\n1. **Sagrada Família** - An iconic basilica designed by Gaudí, still under construction.\n2. **Park Güell** - A colorful park also designed by Gaudí, filled with artistic structures and beautiful gardens.\n3. **La Rambla** - A famous street in the heart of the city ideal for walking, dining, and shopping.\n4. **Gothic Quarter (Barri Gòtic)** - The historic center of Barcelona with medieval architecture and narrow streets.\n5. **Casa Batlló** - Another masterpiece by Gaudí, known for its unique design and vibrant colors.\n6. **Casa Milà (La Pedrera)** - A modernist building with a wavy stone facade, also designed by Gaudí.\n7. **Montjuïc** - A hill offering stunning views of the city, home to several attractions including the Montjuïc Castle and the Magic Fountain.\n\nRegarding the current weather, it is 29°C with no rain, and the humidity is at 48%. It's a great time to explore the city!",
+ "role": "assistant"
+ }
+ ],
+ "output": {
+ "role": "assistant",
+ "content": [
+ {
+ "type": "text",
+ "text": "Barcelona is a vibrant city known for its rich cultural heritage and stunning architecture, particularly the works of Antoni Gaudí. Here are some key attractions and landmarks you should consider visiting:\n\n1. **Sagrada Família** - An iconic basilica designed by Gaudí, still under construction.\n2. **Park Güell** - A colorful park also designed by Gaudí, filled with artistic structures and beautiful gardens.\n3. **La Rambla** - A famous street in the heart of the city ideal for walking, dining, and shopping.\n4. **Gothic Quarter (Barri Gòtic)** - The historic center of Barcelona with medieval architecture and narrow streets.\n5. **Casa Batlló** - Another masterpiece by Gaudí, known for its unique design and vibrant colors.\n6. **Casa Milà (La Pedrera)** - A modernist building with a wavy stone facade, also designed by Gaudí.\n7. **Montjuïc** - A hill offering stunning views of the city, home to several attractions including the Montjuïc Castle and the Magic Fountain.\n\nRegarding the current weather, it is 29°C with no rain, and the humidity is at 48%. It's a great time to explore the city!"
+ }
+ ]
+ }
+ },
+ {
+ "id": "bf28223502262e87",
+ "traceId": "096fc09a30ab90d2431778f9ee2b3936",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "type": "SPAN",
+ "environment": "default",
+ "parentObservationId": "c48e7d031a4cb886",
+ "startTime": "2025-08-01T13:56:54.166Z",
+ "endTime": "2025-08-01T13:57:11.333Z",
+ "name": "agent.react.start-4",
+ "metadata": {
+ "attributes": {
+ "target": "agent.react.start",
+ "name": "start",
+ "traceId": "0cff2691-3a45-4988-a243-8cb8c508aa25",
+ "iteration": "1",
+ "llm.tools": [
+ {
+ "tool.name": "Wikipedia",
+ "tool.description": "Search factual and historical information, including biography, history, politics, geography, society, culture, science, technology, people, animal species, mathematics, and other subjects.",
+ "tool.options": null
+ },
+ {
+ "tool.name": "OpenMeteoTool",
+ "tool.description": "Retrieve current, past, or future weather forecasts for a location.",
+ "tool.options": null
+ }
+ ],
+ "input.mime_type": "application/json",
+ "input.value": [
+ {
+ "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",
+ "role": "system"
+ },
+ {
+ "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": "user"
+ }
+ ],
+ "openinference.span.kind": "AGENT"
+ },
+ "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": {}
+ }
+ },
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": null,
+ "modelParameters": null,
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-08-01T13:57:14.163Z",
+ "updatedAt": "2025-08-01T13:57:14.249Z",
+ "usageDetails": {},
+ "costDetails": {},
+ "providedCostDetails": {},
+ "model": null,
+ "internalModelId": null,
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 17167,
+ "timeToFirstToken": null,
+ "inputCost": null,
+ "outputCost": null,
+ "totalCost": 0,
+ "inputUsage": 0,
+ "outputUsage": 0,
+ "totalUsage": 0,
+ "input": [
+ {
+ "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",
+ "role": "system"
+ },
+ {
+ "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": "user"
+ }
+ ],
+ "output": null
+ },
+ {
+ "id": "1d8ae8c504c576d2",
+ "traceId": "096fc09a30ab90d2431778f9ee2b3936",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "type": "SPAN",
+ "environment": "default",
+ "parentObservationId": "ff8b04dfe1f3e047",
+ "startTime": "2025-08-01T13:56:55.683Z",
+ "endTime": "2025-08-01T13:57:11.334Z",
+ "name": "tool.search.wikipedia.start-12",
+ "metadata": {
+ "attributes": {
+ "target": "tool.search.wikipedia.start",
+ "name": "start",
+ "traceId": "0cff2691-3a45-4988-a243-8cb8c508aa25",
+ "tool.parameters": {
+ "query": "Tourism in Barcelona",
+ "full_text": false
+ },
+ "openinference.span.kind": "TOOL"
+ },
+ "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": {}
+ }
+ },
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": null,
+ "modelParameters": null,
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-08-01T13:57:14.162Z",
+ "updatedAt": "2025-08-01T13:57:14.246Z",
+ "usageDetails": {},
+ "costDetails": {},
+ "providedCostDetails": {},
+ "model": null,
+ "internalModelId": null,
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 15651,
+ "timeToFirstToken": null,
+ "inputCost": null,
+ "outputCost": null,
+ "totalCost": 0,
+ "inputUsage": 0,
+ "outputUsage": 0,
+ "totalUsage": 0,
+ "input": null,
+ "output": null
+ },
+ {
+ "id": "52df0f7f9dad6b23",
+ "traceId": "096fc09a30ab90d2431778f9ee2b3936",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "type": "GENERATION",
+ "environment": "default",
+ "parentObservationId": "9381f6df60cf8aa3",
+ "startTime": "2025-08-01T13:56:57.475Z",
+ "endTime": "2025-08-01T13:57:11.334Z",
+ "name": "backend.openai.chat.start-15",
+ "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ə-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.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": {}
+ }
+ },
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": null,
+ "modelParameters": {
+ "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"
+ },
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-08-01T13:57:14.169Z",
+ "updatedAt": "2025-08-01T13:57:14.245Z",
+ "usageDetails": {
+ "input": 1988,
+ "total": 1988
+ },
+ "costDetails": {
+ "input": 0.0002982,
+ "total": 0.0002982
+ },
+ "providedCostDetails": {},
+ "model": "gpt-4o-mini",
+ "internalModelId": "clyrjp56f0000t0mzapoocd7u",
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 13859,
+ "timeToFirstToken": null,
+ "inputCost": 0.0002982,
+ "outputCost": null,
+ "totalCost": 0.0002982,
+ "inputUsage": 1988,
+ "outputUsage": 0,
+ "totalUsage": 1988,
+ "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ə-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"
+ }
+ ]
+ }
+ ],
+ "output": null
+ },
+ {
+ "id": "2d1f33fc0925a297",
+ "traceId": "096fc09a30ab90d2431778f9ee2b3936",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "type": "SPAN",
+ "environment": "default",
+ "parentObservationId": "c48e7d031a4cb886",
+ "startTime": "2025-08-01T13:56:55.541Z",
+ "endTime": "2025-08-01T13:57:11.333Z",
+ "name": "agent.react.update-12",
+ "metadata": {
+ "attributes": {
+ "target": "agent.react.update",
+ "name": "update",
+ "traceId": "0cff2691-3a45-4988-a243-8cb8c508aa25",
+ "output.mime_type": "application/json",
+ "thought": "I will first research key attractions and landmarks in Barcelona and then check the current weather conditions there. ",
+ "tool.name": "Wikipedia",
+ "tool.parameters": null,
+ "openinference.span.kind": "AGENT"
+ },
+ "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": {}
+ }
+ },
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": null,
+ "modelParameters": null,
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-08-01T13:57:14.163Z",
+ "updatedAt": "2025-08-01T13:57:14.244Z",
+ "usageDetails": {},
+ "costDetails": {},
+ "providedCostDetails": {},
+ "model": null,
+ "internalModelId": null,
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 15792,
+ "timeToFirstToken": null,
+ "inputCost": null,
+ "outputCost": null,
+ "totalCost": 0,
+ "inputUsage": 0,
+ "outputUsage": 0,
+ "totalUsage": 0,
+ "input": null,
+ "output": null
+ },
+ {
+ "id": "b7b9a79830fe5c6b",
+ "traceId": "096fc09a30ab90d2431778f9ee2b3936",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "type": "GENERATION",
+ "environment": "default",
+ "parentObservationId": "8b26b3ec668cf146",
+ "startTime": "2025-08-01T13:57:11.330Z",
+ "endTime": "2025-08-01T13:57:11.336Z",
+ "name": "backend.openai.chat.finish-16",
+ "metadata": {
+ "attributes": {
+ "target": "backend.openai.chat.finish",
+ "name": "finish",
+ "traceId": "0cff2691-3a45-4988-a243-8cb8c508aa25",
+ "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": {}
+ }
+ },
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": null,
+ "modelParameters": {
+ "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"
+ },
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-08-01T13:57:14.163Z",
+ "updatedAt": "2025-08-01T13:57:14.243Z",
+ "usageDetails": {},
+ "costDetails": {},
+ "providedCostDetails": {},
+ "model": "gpt-4o-mini",
+ "internalModelId": "clyrjp56f0000t0mzapoocd7u",
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 6,
+ "timeToFirstToken": null,
+ "inputCost": null,
+ "outputCost": null,
+ "totalCost": 0,
+ "inputUsage": 0,
+ "outputUsage": 0,
+ "totalUsage": 0,
+ "input": null,
+ "output": null
+ },
+ {
+ "id": "0eb76c10a47e9086",
+ "traceId": "096fc09a30ab90d2431778f9ee2b3936",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "type": "SPAN",
+ "environment": "default",
+ "parentObservationId": "cb4886242bf214b8",
+ "startTime": "2025-08-01T13:56:57.470Z",
+ "endTime": "2025-08-01T13:57:11.334Z",
+ "name": "iteration-2",
+ "metadata": {
+ "attributes": {
+ "target": "groupId",
+ "name": "iteration-2",
+ "traceId": "0cff2691-3a45-4988-a243-8cb8c508aa25",
+ "openinference.span.kind": "CHAIN"
+ },
+ "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": {}
+ }
+ },
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": null,
+ "modelParameters": null,
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-08-01T13:57:14.163Z",
+ "updatedAt": "2025-08-01T13:57:14.243Z",
+ "usageDetails": {},
+ "costDetails": {},
+ "providedCostDetails": {},
+ "model": null,
+ "internalModelId": null,
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 13864,
+ "timeToFirstToken": null,
+ "inputCost": null,
+ "outputCost": null,
+ "totalCost": 0,
+ "inputUsage": 0,
+ "outputUsage": 0,
+ "totalUsage": 0,
+ "input": null,
+ "output": null
+ },
+ {
+ "id": "638f1207eba5c924",
+ "traceId": "096fc09a30ab90d2431778f9ee2b3936",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "type": "SPAN",
+ "environment": "default",
+ "parentObservationId": "39d661bf29b4dbbd",
+ "startTime": "2025-08-01T13:57:05.655Z",
+ "endTime": "2025-08-01T13:57:11.335Z",
+ "name": "agent.react.update-19",
+ "metadata": {
+ "attributes": {
+ "target": "agent.react.update",
+ "name": "update",
+ "traceId": "0cff2691-3a45-4988-a243-8cb8c508aa25",
+ "output.mime_type": "application/json",
+ "thought": "I now have the current weather conditions in Barcelona, which indicate a temperature of 29°C with no rain. I will compile the information about key attractions and the weather together for the user. ",
+ "tool.parameters": null,
+ "openinference.span.kind": "AGENT"
+ },
+ "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": {}
+ }
+ },
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": null,
+ "modelParameters": null,
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-08-01T13:57:14.163Z",
+ "updatedAt": "2025-08-01T13:57:14.243Z",
+ "usageDetails": {},
+ "costDetails": {},
+ "providedCostDetails": {},
+ "model": null,
+ "internalModelId": null,
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 5680,
+ "timeToFirstToken": null,
+ "inputCost": null,
+ "outputCost": null,
+ "totalCost": 0,
+ "inputUsage": 0,
+ "outputUsage": 0,
+ "totalUsage": 0,
+ "input": null,
+ "output": null
+ },
+ {
+ "id": "4ab39fcf35639b0c",
+ "traceId": "096fc09a30ab90d2431778f9ee2b3936",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "type": "SPAN",
+ "environment": "default",
+ "parentObservationId": "c48e7d031a4cb886",
+ "startTime": "2025-08-01T13:56:57.470Z",
+ "endTime": "2025-08-01T13:57:11.334Z",
+ "name": "agent.react.update-14",
+ "metadata": {
+ "attributes": {
+ "target": "agent.react.update",
+ "name": "update",
+ "traceId": "0cff2691-3a45-4988-a243-8cb8c508aa25",
+ "output.value": [
+ {
+ "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"
+ }
+ ],
+ "output.mime_type": "application/json",
+ "thought": "I will first research key attractions and landmarks in Barcelona and then check the current weather conditions there. ",
+ "tool.name": "Wikipedia",
+ "tool.parameters": {
+ "query": "Tourism in Barcelona"
+ },
+ "openinference.span.kind": "AGENT"
+ },
+ "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": {}
+ }
+ },
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": null,
+ "modelParameters": null,
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-08-01T13:57:14.162Z",
+ "updatedAt": "2025-08-01T13:57:14.242Z",
+ "usageDetails": {},
+ "costDetails": {},
+ "providedCostDetails": {},
+ "model": null,
+ "internalModelId": null,
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 13864,
+ "timeToFirstToken": null,
+ "inputCost": null,
+ "outputCost": null,
+ "totalCost": 0,
+ "inputUsage": 0,
+ "outputUsage": 0,
+ "totalUsage": 0,
+ "input": null,
+ "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"
+ }
+ ]
+ },
+ {
+ "id": "376ecc80b166b4a5",
+ "traceId": "096fc09a30ab90d2431778f9ee2b3936",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "type": "SPAN",
+ "environment": "default",
+ "parentObservationId": "ff8b04dfe1f3e047",
+ "startTime": "2025-08-01T13:56:57.468Z",
+ "endTime": "2025-08-01T13:57:11.334Z",
+ "name": "tool.search.wikipedia.finish-12",
+ "metadata": {
+ "attributes": {
+ "target": "tool.search.wikipedia.finish",
+ "name": "finish",
+ "traceId": "0cff2691-3a45-4988-a243-8cb8c508aa25",
+ "openinference.span.kind": "TOOL"
+ },
+ "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": {}
+ }
+ },
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": null,
+ "modelParameters": null,
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-08-01T13:57:14.162Z",
+ "updatedAt": "2025-08-01T13:57:14.242Z",
+ "usageDetails": {},
+ "costDetails": {},
+ "providedCostDetails": {},
+ "model": null,
+ "internalModelId": null,
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 13866,
+ "timeToFirstToken": null,
+ "inputCost": null,
+ "outputCost": null,
+ "totalCost": 0,
+ "inputUsage": 0,
+ "outputUsage": 0,
+ "totalUsage": 0,
+ "input": null,
+ "output": null
+ },
+ {
+ "id": "6c69cf2f9ea80007",
+ "traceId": "096fc09a30ab90d2431778f9ee2b3936",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "type": "SPAN",
+ "environment": "default",
+ "parentObservationId": "0eb76c10a47e9086",
+ "startTime": "2025-08-01T13:57:03.274Z",
+ "endTime": "2025-08-01T13:57:11.334Z",
+ "name": "agent.react.update-16",
+ "metadata": {
+ "attributes": {
+ "target": "agent.react.update",
+ "name": "update",
+ "traceId": "0cff2691-3a45-4988-a243-8cb8c508aa25",
+ "output.mime_type": "application/json",
+ "thought": "I found information about Barcelona, including its rich cultural heritage and key attractions like the architectural works of Antoni Gaudí. Now, I will check the current weather conditions in Barcelona. ",
+ "tool.name": "OpenMeteoTool",
+ "tool.parameters": null,
+ "openinference.span.kind": "AGENT"
+ },
+ "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": {}
+ }
+ },
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": null,
+ "modelParameters": null,
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-08-01T13:57:14.163Z",
+ "updatedAt": "2025-08-01T13:57:14.240Z",
+ "usageDetails": {},
+ "costDetails": {},
+ "providedCostDetails": {},
+ "model": null,
+ "internalModelId": null,
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 8060,
+ "timeToFirstToken": null,
+ "inputCost": null,
+ "outputCost": null,
+ "totalCost": 0,
+ "inputUsage": 0,
+ "outputUsage": 0,
+ "totalUsage": 0,
+ "input": null,
+ "output": null
+ },
+ {
+ "id": "c48e7d031a4cb886",
+ "traceId": "096fc09a30ab90d2431778f9ee2b3936",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "type": "SPAN",
+ "environment": "default",
+ "parentObservationId": "cb4886242bf214b8",
+ "startTime": "2025-08-01T13:56:54.166Z",
+ "endTime": "2025-08-01T13:57:11.334Z",
+ "name": "iteration-1",
+ "metadata": {
+ "attributes": {
+ "target": "groupId",
+ "name": "iteration-1",
+ "traceId": "0cff2691-3a45-4988-a243-8cb8c508aa25",
+ "openinference.span.kind": "CHAIN"
+ },
+ "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": {}
+ }
+ },
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": null,
+ "modelParameters": null,
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-08-01T13:57:14.164Z",
+ "updatedAt": "2025-08-01T13:57:14.240Z",
+ "usageDetails": {},
+ "costDetails": {},
+ "providedCostDetails": {},
+ "model": null,
+ "internalModelId": null,
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 17168,
+ "timeToFirstToken": null,
+ "inputCost": null,
+ "outputCost": null,
+ "totalCost": 0,
+ "inputUsage": 0,
+ "outputUsage": 0,
+ "totalUsage": 0,
+ "input": null,
+ "output": null
+ },
+ {
+ "id": "8b26b3ec668cf146",
+ "traceId": "096fc09a30ab90d2431778f9ee2b3936",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "type": "SPAN",
+ "environment": "default",
+ "parentObservationId": "39d661bf29b4dbbd",
+ "startTime": "2025-08-01T13:57:11.315Z",
+ "endTime": "2025-08-01T13:57:11.336Z",
+ "name": "agent.react.partial_update-610",
+ "metadata": {
+ "attributes": {
+ "target": "agent.react.partial_update",
+ "name": "partial_update",
+ "traceId": "0cff2691-3a45-4988-a243-8cb8c508aa25",
+ "output.mime_type": "application/json",
+ "thought": "I now have the current weather conditions in Barcelona, which indicate a temperature of 29°C with no rain. I will compile the information about key attractions and the weather together for the user. ",
+ "tool.parameters": null,
+ "openinference.span.kind": "AGENT"
+ },
+ "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": {}
+ }
+ },
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": null,
+ "modelParameters": null,
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-08-01T13:57:14.163Z",
+ "updatedAt": "2025-08-01T13:57:14.239Z",
+ "usageDetails": {},
+ "costDetails": {},
+ "providedCostDetails": {},
+ "model": null,
+ "internalModelId": null,
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 21,
+ "timeToFirstToken": null,
+ "inputCost": null,
+ "outputCost": null,
+ "totalCost": 0,
+ "inputUsage": 0,
+ "outputUsage": 0,
+ "totalUsage": 0,
+ "input": null,
+ "output": null
+ },
+ {
+ "id": "f50f7bbf13112df9",
+ "traceId": "096fc09a30ab90d2431778f9ee2b3936",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "type": "GENERATION",
+ "environment": "default",
+ "parentObservationId": "8b26b3ec668cf146",
+ "startTime": "2025-08-01T13:57:11.328Z",
+ "endTime": "2025-08-01T13:57:11.336Z",
+ "name": "backend.openai.chat.success-16",
+ "metadata": {
+ "attributes": {
+ "llm.output_messages.233.message.role": "assistant",
+ "llm.output_messages.233.message.content": ".",
+ "llm.output_messages.234.message.role": "assistant",
+ "llm.output_messages.234.message.content": " **",
+ "llm.output_messages.235.message.role": "assistant",
+ "llm.output_messages.235.message.content": "Mont",
+ "llm.output_messages.236.message.role": "assistant",
+ "llm.output_messages.236.message.content": "ju",
+ "llm.output_messages.237.message.role": "assistant",
+ "llm.output_messages.237.message.content": "ïc",
+ "llm.output_messages.238.message.role": "assistant",
+ "llm.output_messages.238.message.content": "**",
+ "llm.output_messages.239.message.role": "assistant",
+ "llm.output_messages.239.message.content": " -",
+ "llm.output_messages.240.message.role": "assistant",
+ "llm.output_messages.240.message.content": " A",
+ "llm.output_messages.241.message.role": "assistant",
+ "llm.output_messages.241.message.content": " hill",
+ "llm.output_messages.242.message.role": "assistant",
+ "llm.output_messages.242.message.content": " offering",
+ "llm.output_messages.243.message.role": "assistant",
+ "llm.output_messages.243.message.content": " stunning",
+ "llm.output_messages.244.message.role": "assistant",
+ "llm.output_messages.244.message.content": " views",
+ "llm.output_messages.245.message.role": "assistant",
+ "llm.output_messages.245.message.content": " of",
+ "llm.output_messages.246.message.role": "assistant",
+ "llm.output_messages.246.message.content": " the",
+ "llm.output_messages.247.message.role": "assistant",
+ "llm.output_messages.247.message.content": " city",
+ "llm.output_messages.248.message.role": "assistant",
+ "llm.output_messages.248.message.content": ",",
+ "llm.output_messages.249.message.role": "assistant",
+ "llm.output_messages.249.message.content": " home",
+ "llm.output_messages.250.message.role": "assistant",
+ "llm.output_messages.250.message.content": " to",
+ "llm.output_messages.251.message.role": "assistant",
+ "llm.output_messages.251.message.content": " several",
+ "llm.output_messages.252.message.role": "assistant",
+ "llm.output_messages.252.message.content": " attractions",
+ "llm.output_messages.253.message.role": "assistant",
+ "llm.output_messages.253.message.content": " including",
+ "llm.output_messages.254.message.role": "assistant",
+ "llm.output_messages.254.message.content": " the",
+ "llm.output_messages.255.message.role": "assistant",
+ "llm.output_messages.255.message.content": " Mont",
+ "llm.output_messages.256.message.role": "assistant",
+ "llm.output_messages.256.message.content": "ju",
+ "llm.output_messages.257.message.role": "assistant",
+ "llm.output_messages.257.message.content": "ïc",
+ "llm.output_messages.258.message.role": "assistant",
+ "llm.output_messages.258.message.content": " Castle",
+ "llm.output_messages.259.message.role": "assistant",
+ "llm.output_messages.259.message.content": " and",
+ "llm.output_messages.260.message.role": "assistant",
+ "llm.output_messages.260.message.content": " the",
+ "llm.output_messages.261.message.role": "assistant",
+ "llm.output_messages.261.message.content": " Magic",
+ "llm.output_messages.262.message.role": "assistant",
+ "llm.output_messages.262.message.content": " Fountain",
+ "llm.output_messages.263.message.role": "assistant",
+ "llm.output_messages.263.message.content": ".\n\n",
+ "llm.output_messages.264.message.role": "assistant",
+ "llm.output_messages.264.message.content": "Regarding",
+ "llm.output_messages.265.message.role": "assistant",
+ "llm.output_messages.265.message.content": " the",
+ "llm.output_messages.266.message.role": "assistant",
+ "llm.output_messages.266.message.content": " current",
+ "llm.output_messages.267.message.role": "assistant",
+ "llm.output_messages.267.message.content": " weather",
+ "llm.output_messages.268.message.role": "assistant",
+ "llm.output_messages.268.message.content": ",",
+ "llm.output_messages.269.message.role": "assistant",
+ "llm.output_messages.269.message.content": " it",
+ "llm.output_messages.270.message.role": "assistant",
+ "llm.output_messages.270.message.content": " is",
+ "llm.output_messages.271.message.role": "assistant",
+ "llm.output_messages.271.message.content": " ",
+ "llm.output_messages.272.message.role": "assistant",
+ "llm.output_messages.272.message.content": "29",
+ "llm.output_messages.273.message.role": "assistant",
+ "llm.output_messages.273.message.content": "°C",
+ "llm.output_messages.274.message.role": "assistant",
+ "llm.output_messages.274.message.content": " with",
+ "llm.output_messages.275.message.role": "assistant",
+ "llm.output_messages.275.message.content": " no",
+ "llm.output_messages.276.message.role": "assistant",
+ "llm.output_messages.276.message.content": " rain",
+ "llm.output_messages.277.message.role": "assistant",
+ "llm.output_messages.277.message.content": ",",
+ "llm.output_messages.278.message.role": "assistant",
+ "llm.output_messages.278.message.content": " and",
+ "llm.output_messages.279.message.role": "assistant",
+ "llm.output_messages.279.message.content": " the",
+ "llm.output_messages.280.message.role": "assistant",
+ "llm.output_messages.280.message.content": " humidity",
+ "llm.output_messages.281.message.role": "assistant",
+ "llm.output_messages.281.message.content": " is",
+ "llm.output_messages.282.message.role": "assistant",
+ "llm.output_messages.282.message.content": " at",
+ "llm.output_messages.283.message.role": "assistant",
+ "llm.output_messages.283.message.content": " ",
+ "llm.output_messages.284.message.role": "assistant",
+ "llm.output_messages.284.message.content": "48",
+ "llm.output_messages.285.message.role": "assistant",
+ "llm.output_messages.285.message.content": "%.",
+ "llm.output_messages.286.message.role": "assistant",
+ "llm.output_messages.286.message.content": " It's",
+ "llm.output_messages.287.message.role": "assistant",
+ "llm.output_messages.287.message.content": " a",
+ "llm.output_messages.288.message.role": "assistant",
+ "llm.output_messages.288.message.content": " great",
+ "llm.output_messages.289.message.role": "assistant",
+ "llm.output_messages.289.message.content": " time",
+ "llm.output_messages.290.message.role": "assistant",
+ "llm.output_messages.290.message.content": " to",
+ "llm.output_messages.291.message.role": "assistant",
+ "llm.output_messages.291.message.content": " explore",
+ "llm.output_messages.292.message.role": "assistant",
+ "llm.output_messages.292.message.content": " the",
+ "llm.output_messages.293.message.role": "assistant",
+ "llm.output_messages.293.message.content": " city",
+ "llm.output_messages.294.message.role": "assistant",
+ "llm.output_messages.294.message.content": "!",
+ "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": {}
+ }
+ },
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": null,
+ "modelParameters": {
+ "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"
+ },
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-08-01T13:57:14.163Z",
+ "updatedAt": "2025-08-01T13:57:14.239Z",
+ "usageDetails": {},
+ "costDetails": {},
+ "providedCostDetails": {},
+ "model": "gpt-4o-mini",
+ "internalModelId": "clyrjp56f0000t0mzapoocd7u",
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 8,
+ "timeToFirstToken": null,
+ "inputCost": null,
+ "outputCost": null,
+ "totalCost": 0,
+ "inputUsage": 0,
+ "outputUsage": 0,
+ "totalUsage": 0,
+ "input": null,
+ "output": null
+ },
+ {
+ "id": "4c5c5a7936ca24bc",
+ "traceId": "096fc09a30ab90d2431778f9ee2b3936",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "type": "GENERATION",
+ "environment": "default",
+ "parentObservationId": "10b12fd4cca3ef99",
+ "startTime": "2025-08-01T13:57:03.889Z",
+ "endTime": "2025-08-01T13:57:11.334Z",
+ "name": "backend.openai.chat.start-16",
+ "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ə-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"
+ }
+ ]
+ },
+ {
+ "role": "assistant",
+ "content": [
+ {
+ "type": "text",
+ "text": "Thought: I found information about Barcelona, including its rich cultural heritage and key attractions like the architectural works of Antoni Gaudí. Now, I will check the current weather conditions in Barcelona. \nFunction Name: OpenMeteoTool\nFunction Input: {\"country\": \"Spain\", \"location_name\": \"Barcelona\"}\nFunction Output: {\"latitude\": 41.4375, \"longitude\": 2.1875, \"generationtime_ms\": 0.0553131103515625, \"utc_offset_seconds\": 0, \"timezone\": \"GMT\", \"timezone_abbreviation\": \"GMT\", \"elevation\": 44.0, \"current_units\": {\"time\": \"iso8601\", \"interval\": \"seconds\", \"temperature_2m\": \"°C\", \"rain\": \"mm\", \"relative_humidity_2m\": \"%\", \"wind_speed_10m\": \"km/h\"}, \"current\": {\"time\": \"2025-08-01T13:45\", \"interval\": 900, \"temperature_2m\": 29.0, \"rain\": 0.0, \"relative_humidity_2m\": 48, \"wind_speed_10m\": 18.8}, \"daily_units\": {\"time\": \"iso8601\", \"temperature_2m_max\": \"°C\", \"temperature_2m_min\": \"°C\", \"rain_sum\": \"mm\"}, \"daily\": {\"time\": [\"2025-08-01\"], \"temperature_2m_max\": [29.0], \"temperature_2m_min\": [20.6], \"rain_sum\": [0.0]}}\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.input_messages.3.message.role": "assistant",
+ "llm.input_messages.3.message.content": "Thought: I found information about Barcelona, including its rich cultural heritage and key attractions like the architectural works of Antoni Gaudí. Now, I will check the current weather conditions in Barcelona. \nFunction Name: OpenMeteoTool\nFunction Input: {\"country\": \"Spain\", \"location_name\": \"Barcelona\"}\nFunction Output: {\"latitude\": 41.4375, \"longitude\": 2.1875, \"generationtime_ms\": 0.0553131103515625, \"utc_offset_seconds\": 0, \"timezone\": \"GMT\", \"timezone_abbreviation\": \"GMT\", \"elevation\": 44.0, \"current_units\": {\"time\": \"iso8601\", \"interval\": \"seconds\", \"temperature_2m\": \"°C\", \"rain\": \"mm\", \"relative_humidity_2m\": \"%\", \"wind_speed_10m\": \"km/h\"}, \"current\": {\"time\": \"2025-08-01T13:45\", \"interval\": 900, \"temperature_2m\": 29.0, \"rain\": 0.0, \"relative_humidity_2m\": 48, \"wind_speed_10m\": 18.8}, \"daily_units\": {\"time\": \"iso8601\", \"temperature_2m_max\": \"°C\", \"temperature_2m_min\": \"°C\", \"rain_sum\": \"mm\"}, \"daily\": {\"time\": [\"2025-08-01\"], \"temperature_2m_max\": [29.0], \"temperature_2m_min\": [20.6], \"rain_sum\": [0.0]}}\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": {}
+ }
+ },
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": null,
+ "modelParameters": {
+ "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"
+ },
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-08-01T13:57:14.162Z",
+ "updatedAt": "2025-08-01T13:57:14.239Z",
+ "usageDetails": {
+ "input": 2359,
+ "total": 2359
+ },
+ "costDetails": {
+ "input": 0.00035385,
+ "total": 0.00035385
+ },
+ "providedCostDetails": {},
+ "model": "gpt-4o-mini",
+ "internalModelId": "clyrjp56f0000t0mzapoocd7u",
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 7445,
+ "timeToFirstToken": null,
+ "inputCost": 0.00035385,
+ "outputCost": null,
+ "totalCost": 0.00035385,
+ "inputUsage": 2359,
+ "outputUsage": 0,
+ "totalUsage": 2359,
+ "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ə-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"
+ }
+ ]
+ },
+ {
+ "role": "assistant",
+ "content": [
+ {
+ "type": "text",
+ "text": "Thought: I found information about Barcelona, including its rich cultural heritage and key attractions like the architectural works of Antoni Gaudí. Now, I will check the current weather conditions in Barcelona. \nFunction Name: OpenMeteoTool\nFunction Input: {\"country\": \"Spain\", \"location_name\": \"Barcelona\"}\nFunction Output: {\"latitude\": 41.4375, \"longitude\": 2.1875, \"generationtime_ms\": 0.0553131103515625, \"utc_offset_seconds\": 0, \"timezone\": \"GMT\", \"timezone_abbreviation\": \"GMT\", \"elevation\": 44.0, \"current_units\": {\"time\": \"iso8601\", \"interval\": \"seconds\", \"temperature_2m\": \"°C\", \"rain\": \"mm\", \"relative_humidity_2m\": \"%\", \"wind_speed_10m\": \"km/h\"}, \"current\": {\"time\": \"2025-08-01T13:45\", \"interval\": 900, \"temperature_2m\": 29.0, \"rain\": 0.0, \"relative_humidity_2m\": 48, \"wind_speed_10m\": 18.8}, \"daily_units\": {\"time\": \"iso8601\", \"temperature_2m_max\": \"°C\", \"temperature_2m_min\": \"°C\", \"rain_sum\": \"mm\"}, \"daily\": {\"time\": [\"2025-08-01\"], \"temperature_2m_max\": [29.0], \"temperature_2m_min\": [20.6], \"rain_sum\": [0.0]}}\n"
+ }
+ ]
+ }
+ ],
+ "output": null
+ },
+ {
+ "id": "9381f6df60cf8aa3",
+ "traceId": "096fc09a30ab90d2431778f9ee2b3936",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "type": "SPAN",
+ "environment": "default",
+ "parentObservationId": "0eb76c10a47e9086",
+ "startTime": "2025-08-01T13:56:57.470Z",
+ "endTime": "2025-08-01T13:57:11.334Z",
+ "name": "agent.react.start-5",
+ "metadata": {
+ "attributes": {
+ "target": "agent.react.start",
+ "name": "start",
+ "traceId": "0cff2691-3a45-4988-a243-8cb8c508aa25",
+ "iteration": "2",
+ "llm.tools": [
+ {
+ "tool.name": "Wikipedia",
+ "tool.description": "Search factual and historical information, including biography, history, politics, geography, society, culture, science, technology, people, animal species, mathematics, and other subjects.",
+ "tool.options": null
+ },
+ {
+ "tool.name": "OpenMeteoTool",
+ "tool.description": "Retrieve current, past, or future weather forecasts for a location.",
+ "tool.options": null
+ }
+ ],
+ "input.mime_type": "application/json",
+ "input.value": [
+ {
+ "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",
+ "role": "system"
+ },
+ {
+ "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": "user"
+ },
+ {
+ "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",
+ "role": "assistant"
+ }
+ ],
+ "openinference.span.kind": "AGENT"
+ },
+ "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": {}
+ }
+ },
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": null,
+ "modelParameters": null,
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-08-01T13:57:14.161Z",
+ "updatedAt": "2025-08-01T13:57:14.237Z",
+ "usageDetails": {},
+ "costDetails": {},
+ "providedCostDetails": {},
+ "model": null,
+ "internalModelId": null,
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 13864,
+ "timeToFirstToken": null,
+ "inputCost": null,
+ "outputCost": null,
+ "totalCost": 0,
+ "inputUsage": 0,
+ "outputUsage": 0,
+ "totalUsage": 0,
+ "input": [
+ {
+ "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",
+ "role": "system"
+ },
+ {
+ "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": "user"
+ },
+ {
+ "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",
+ "role": "assistant"
+ }
+ ],
+ "output": null
+ },
+ {
+ "id": "96cb191e191a9378",
+ "traceId": "096fc09a30ab90d2431778f9ee2b3936",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "type": "SPAN",
+ "environment": "default",
+ "parentObservationId": "0eb76c10a47e9086",
+ "startTime": "2025-08-01T13:57:03.885Z",
+ "endTime": "2025-08-01T13:57:11.334Z",
+ "name": "agent.react.partial_update-318",
+ "metadata": {
+ "attributes": {
+ "target": "agent.react.partial_update",
+ "name": "partial_update",
+ "traceId": "0cff2691-3a45-4988-a243-8cb8c508aa25",
+ "output.value": {
+ "latitude": 41.4375,
+ "longitude": 2.1875,
+ "generationtime_ms": 0.0553131103515625,
+ "utc_offset_seconds": 0,
+ "timezone": "GMT",
+ "timezone_abbreviation": "GMT",
+ "elevation": 44,
+ "current_units": {
+ "time": "iso8601",
+ "interval": "seconds",
+ "temperature_2m": "°C",
+ "rain": "mm",
+ "relative_humidity_2m": "%",
+ "wind_speed_10m": "km/h"
+ },
+ "current": {
+ "time": "2025-08-01T13:45",
+ "interval": 900,
+ "temperature_2m": 29,
+ "rain": 0,
+ "relative_humidity_2m": 48,
+ "wind_speed_10m": 18.8
+ },
+ "daily_units": {
+ "time": "iso8601",
+ "temperature_2m_max": "°C",
+ "temperature_2m_min": "°C",
+ "rain_sum": "mm"
+ },
+ "daily": {
+ "time": [
+ "2025-08-01"
+ ],
+ "temperature_2m_max": [
+ 29
+ ],
+ "temperature_2m_min": [
+ 20.6
+ ],
+ "rain_sum": [
+ 0
+ ]
+ }
+ },
+ "output.mime_type": "application/json",
+ "thought": "I found information about Barcelona, including its rich cultural heritage and key attractions like the architectural works of Antoni Gaudí. Now, I will check the current weather conditions in Barcelona. ",
+ "tool.name": "OpenMeteoTool",
+ "tool.parameters": {
+ "location_name": "Barcelona",
+ "country": "Spain"
+ },
+ "openinference.span.kind": "AGENT"
+ },
+ "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": {}
+ }
+ },
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": null,
+ "modelParameters": null,
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-08-01T13:57:14.163Z",
+ "updatedAt": "2025-08-01T13:57:14.234Z",
+ "usageDetails": {},
+ "costDetails": {},
+ "providedCostDetails": {},
+ "model": null,
+ "internalModelId": null,
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 7449,
+ "timeToFirstToken": null,
+ "inputCost": null,
+ "outputCost": null,
+ "totalCost": 0,
+ "inputUsage": 0,
+ "outputUsage": 0,
+ "totalUsage": 0,
+ "input": null,
+ "output": {
+ "latitude": 41.4375,
+ "longitude": 2.1875,
+ "generationtime_ms": 0.0553131103515625,
+ "utc_offset_seconds": 0,
+ "timezone": "GMT",
+ "timezone_abbreviation": "GMT",
+ "elevation": 44,
+ "current_units": {
+ "time": "iso8601",
+ "interval": "seconds",
+ "temperature_2m": "°C",
+ "rain": "mm",
+ "relative_humidity_2m": "%",
+ "wind_speed_10m": "km/h"
+ },
+ "current": {
+ "time": "2025-08-01T13:45",
+ "interval": 900,
+ "temperature_2m": 29,
+ "rain": 0,
+ "relative_humidity_2m": 48,
+ "wind_speed_10m": 18.8
+ },
+ "daily_units": {
+ "time": "iso8601",
+ "temperature_2m_max": "°C",
+ "temperature_2m_min": "°C",
+ "rain_sum": "mm"
+ },
+ "daily": {
+ "time": [
+ "2025-08-01"
+ ],
+ "temperature_2m_max": [
+ 29
+ ],
+ "temperature_2m_min": [
+ 20.6
+ ],
+ "rain_sum": [
+ 0
+ ]
+ }
+ }
+ },
+ {
+ "id": "39d661bf29b4dbbd",
+ "traceId": "096fc09a30ab90d2431778f9ee2b3936",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "type": "SPAN",
+ "environment": "default",
+ "parentObservationId": "cb4886242bf214b8",
+ "startTime": "2025-08-01T13:57:03.886Z",
+ "endTime": "2025-08-01T13:57:11.336Z",
+ "name": "iteration-3",
+ "metadata": {
+ "attributes": {
+ "target": "groupId",
+ "name": "iteration-3",
+ "traceId": "0cff2691-3a45-4988-a243-8cb8c508aa25",
+ "openinference.span.kind": "CHAIN"
+ },
+ "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": {}
+ }
+ },
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": null,
+ "modelParameters": null,
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-08-01T13:57:14.164Z",
+ "updatedAt": "2025-08-01T13:57:14.233Z",
+ "usageDetails": {},
+ "costDetails": {},
+ "providedCostDetails": {},
+ "model": null,
+ "internalModelId": null,
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 7450,
+ "timeToFirstToken": null,
+ "inputCost": null,
+ "outputCost": null,
+ "totalCost": 0,
+ "inputUsage": 0,
+ "outputUsage": 0,
+ "totalUsage": 0,
+ "input": null,
+ "output": null
+ },
+ {
+ "id": "4f7a25ab4555e106",
+ "traceId": "096fc09a30ab90d2431778f9ee2b3936",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "type": "SPAN",
+ "environment": "default",
+ "parentObservationId": "0eb76c10a47e9086",
+ "startTime": "2025-08-01T13:57:03.029Z",
+ "endTime": "2025-08-01T13:57:11.334Z",
+ "name": "agent.react.update-15",
+ "metadata": {
+ "attributes": {
+ "target": "agent.react.update",
+ "name": "update",
+ "traceId": "0cff2691-3a45-4988-a243-8cb8c508aa25",
+ "output.mime_type": "application/json",
+ "thought": "I found information about Barcelona, including its rich cultural heritage and key attractions like the architectural works of Antoni Gaudí. Now, I will check the current weather conditions in Barcelona. ",
+ "tool.parameters": null,
+ "openinference.span.kind": "AGENT"
+ },
+ "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": {}
+ }
+ },
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": null,
+ "modelParameters": null,
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-08-01T13:57:14.161Z",
+ "updatedAt": "2025-08-01T13:57:14.230Z",
+ "usageDetails": {},
+ "costDetails": {},
+ "providedCostDetails": {},
+ "model": null,
+ "internalModelId": null,
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 8305,
+ "timeToFirstToken": null,
+ "inputCost": null,
+ "outputCost": null,
+ "totalCost": 0,
+ "inputUsage": 0,
+ "outputUsage": 0,
+ "totalUsage": 0,
+ "input": null,
+ "output": null
+ },
+ {
+ "id": "bd2f100ab98514d4",
+ "traceId": "096fc09a30ab90d2431778f9ee2b3936",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "type": "SPAN",
+ "environment": "default",
+ "parentObservationId": "39d661bf29b4dbbd",
+ "startTime": "2025-08-01T13:57:11.331Z",
+ "endTime": "2025-08-01T13:57:11.336Z",
+ "name": "agent.react.update-20",
+ "metadata": {
+ "attributes": {
+ "target": "agent.react.update",
+ "name": "update",
+ "traceId": "0cff2691-3a45-4988-a243-8cb8c508aa25",
+ "output.value": "Barcelona is a vibrant city known for its rich cultural heritage and stunning architecture, particularly the works of Antoni Gaudí. Here are some key attractions and landmarks you should consider visiting:\n\n1. **Sagrada Família** - An iconic basilica designed by Gaudí, still under construction.\n2. **Park Güell** - A colorful park also designed by Gaudí, filled with artistic structures and beautiful gardens.\n3. **La Rambla** - A famous street in the heart of the city ideal for walking, dining, and shopping.\n4. **Gothic Quarter (Barri Gòtic)** - The historic center of Barcelona with medieval architecture and narrow streets.\n5. **Casa Batlló** - Another masterpiece by Gaudí, known for its unique design and vibrant colors.\n6. **Casa Milà (La Pedrera)** - A modernist building with a wavy stone facade, also designed by Gaudí.\n7. **Montjuïc** - A hill offering stunning views of the city, home to several attractions including the Montjuïc Castle and the Magic Fountain.\n\nRegarding the current weather, it is 29°C with no rain, and the humidity is at 48%. It's a great time to explore the city!",
+ "output.mime_type": "application/json",
+ "thought": "I now have the current weather conditions in Barcelona, which indicate a temperature of 29°C with no rain. I will compile the information about key attractions and the weather together for the user. ",
+ "tool.parameters": null,
+ "openinference.span.kind": "AGENT"
+ },
+ "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": {}
+ }
+ },
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": null,
+ "modelParameters": null,
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-08-01T13:57:14.164Z",
+ "updatedAt": "2025-08-01T13:57:14.225Z",
+ "usageDetails": {},
+ "costDetails": {},
+ "providedCostDetails": {},
+ "model": null,
+ "internalModelId": null,
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 5,
+ "timeToFirstToken": null,
+ "inputCost": null,
+ "outputCost": null,
+ "totalCost": 0,
+ "inputUsage": 0,
+ "outputUsage": 0,
+ "totalUsage": 0,
+ "input": null,
+ "output": "Barcelona is a vibrant city known for its rich cultural heritage and stunning architecture, particularly the works of Antoni Gaudí. Here are some key attractions and landmarks you should consider visiting:\n\n1. **Sagrada Família** - An iconic basilica designed by Gaudí, still under construction.\n2. **Park Güell** - A colorful park also designed by Gaudí, filled with artistic structures and beautiful gardens.\n3. **La Rambla** - A famous street in the heart of the city ideal for walking, dining, and shopping.\n4. **Gothic Quarter (Barri Gòtic)** - The historic center of Barcelona with medieval architecture and narrow streets.\n5. **Casa Batlló** - Another masterpiece by Gaudí, known for its unique design and vibrant colors.\n6. **Casa Milà (La Pedrera)** - A modernist building with a wavy stone facade, also designed by Gaudí.\n7. **Montjuïc** - A hill offering stunning views of the city, home to several attractions including the Montjuïc Castle and the Magic Fountain.\n\nRegarding the current weather, it is 29°C with no rain, and the humidity is at 48%. It's a great time to explore the city!"
+ },
+ {
+ "id": "10b12fd4cca3ef99",
+ "traceId": "096fc09a30ab90d2431778f9ee2b3936",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "type": "SPAN",
+ "environment": "default",
+ "parentObservationId": "39d661bf29b4dbbd",
+ "startTime": "2025-08-01T13:57:03.886Z",
+ "endTime": "2025-08-01T13:57:11.335Z",
+ "name": "agent.react.start-6",
+ "metadata": {
+ "attributes": {
+ "target": "agent.react.start",
+ "name": "start",
+ "traceId": "0cff2691-3a45-4988-a243-8cb8c508aa25",
+ "iteration": "3",
+ "llm.tools": [
+ {
+ "tool.name": "Wikipedia",
+ "tool.description": "Search factual and historical information, including biography, history, politics, geography, society, culture, science, technology, people, animal species, mathematics, and other subjects.",
+ "tool.options": null
+ },
+ {
+ "tool.name": "OpenMeteoTool",
+ "tool.description": "Retrieve current, past, or future weather forecasts for a location.",
+ "tool.options": null
+ }
+ ],
+ "input.mime_type": "application/json",
+ "input.value": [
+ {
+ "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",
+ "role": "system"
+ },
+ {
+ "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": "user"
+ },
+ {
+ "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",
+ "role": "assistant"
+ },
+ {
+ "text": "Thought: I found information about Barcelona, including its rich cultural heritage and key attractions like the architectural works of Antoni Gaudí. Now, I will check the current weather conditions in Barcelona. \nFunction Name: OpenMeteoTool\nFunction Input: {\"country\": \"Spain\", \"location_name\": \"Barcelona\"}\nFunction Output: {\"latitude\": 41.4375, \"longitude\": 2.1875, \"generationtime_ms\": 0.0553131103515625, \"utc_offset_seconds\": 0, \"timezone\": \"GMT\", \"timezone_abbreviation\": \"GMT\", \"elevation\": 44.0, \"current_units\": {\"time\": \"iso8601\", \"interval\": \"seconds\", \"temperature_2m\": \"°C\", \"rain\": \"mm\", \"relative_humidity_2m\": \"%\", \"wind_speed_10m\": \"km/h\"}, \"current\": {\"time\": \"2025-08-01T13:45\", \"interval\": 900, \"temperature_2m\": 29.0, \"rain\": 0.0, \"relative_humidity_2m\": 48, \"wind_speed_10m\": 18.8}, \"daily_units\": {\"time\": \"iso8601\", \"temperature_2m_max\": \"°C\", \"temperature_2m_min\": \"°C\", \"rain_sum\": \"mm\"}, \"daily\": {\"time\": [\"2025-08-01\"], \"temperature_2m_max\": [29.0], \"temperature_2m_min\": [20.6], \"rain_sum\": [0.0]}}\n",
+ "role": "assistant"
+ }
+ ],
+ "openinference.span.kind": "AGENT"
+ },
+ "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": {}
+ }
+ },
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": null,
+ "modelParameters": null,
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-08-01T13:57:14.163Z",
+ "updatedAt": "2025-08-01T13:57:14.216Z",
+ "usageDetails": {},
+ "costDetails": {},
+ "providedCostDetails": {},
+ "model": null,
+ "internalModelId": null,
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 7449,
+ "timeToFirstToken": null,
+ "inputCost": null,
+ "outputCost": null,
+ "totalCost": 0,
+ "inputUsage": 0,
+ "outputUsage": 0,
+ "totalUsage": 0,
+ "input": [
+ {
+ "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",
+ "role": "system"
+ },
+ {
+ "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": "user"
+ },
+ {
+ "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",
+ "role": "assistant"
+ },
+ {
+ "text": "Thought: I found information about Barcelona, including its rich cultural heritage and key attractions like the architectural works of Antoni Gaudí. Now, I will check the current weather conditions in Barcelona. \nFunction Name: OpenMeteoTool\nFunction Input: {\"country\": \"Spain\", \"location_name\": \"Barcelona\"}\nFunction Output: {\"latitude\": 41.4375, \"longitude\": 2.1875, \"generationtime_ms\": 0.0553131103515625, \"utc_offset_seconds\": 0, \"timezone\": \"GMT\", \"timezone_abbreviation\": \"GMT\", \"elevation\": 44.0, \"current_units\": {\"time\": \"iso8601\", \"interval\": \"seconds\", \"temperature_2m\": \"°C\", \"rain\": \"mm\", \"relative_humidity_2m\": \"%\", \"wind_speed_10m\": \"km/h\"}, \"current\": {\"time\": \"2025-08-01T13:45\", \"interval\": 900, \"temperature_2m\": 29.0, \"rain\": 0.0, \"relative_humidity_2m\": 48, \"wind_speed_10m\": 18.8}, \"daily_units\": {\"time\": \"iso8601\", \"temperature_2m_max\": \"°C\", \"temperature_2m_min\": \"°C\", \"rain_sum\": \"mm\"}, \"daily\": {\"time\": [\"2025-08-01\"], \"temperature_2m_max\": [29.0], \"temperature_2m_min\": [20.6], \"rain_sum\": [0.0]}}\n",
+ "role": "assistant"
+ }
+ ],
+ "output": null
+ },
+ {
+ "id": "1f956cbea34725bd",
+ "traceId": "096fc09a30ab90d2431778f9ee2b3936",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "type": "GENERATION",
+ "environment": "default",
+ "parentObservationId": "bf28223502262e87",
+ "startTime": "2025-08-01T13:56:54.170Z",
+ "endTime": "2025-08-01T13:57:11.333Z",
+ "name": "backend.openai.chat.start-14",
+ "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"
+ }
+ ]
+ }
+ ],
+ "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.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": {}
+ }
+ },
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": null,
+ "modelParameters": {
+ "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"
+ },
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-08-01T13:57:14.161Z",
+ "updatedAt": "2025-08-01T13:57:14.214Z",
+ "usageDetails": {
+ "input": 1195,
+ "total": 1195
+ },
+ "costDetails": {
+ "input": 0.00017925,
+ "total": 0.00017925
+ },
+ "providedCostDetails": {},
+ "model": "gpt-4o-mini",
+ "internalModelId": "clyrjp56f0000t0mzapoocd7u",
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 17163,
+ "timeToFirstToken": null,
+ "inputCost": 0.00017925,
+ "outputCost": null,
+ "totalCost": 0.00017925,
+ "inputUsage": 1195,
+ "outputUsage": 0,
+ "totalUsage": 1195,
+ "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"
+ }
+ ]
+ }
+ ],
+ "output": null
+ },
+ {
+ "id": "cb4886242bf214b8",
+ "traceId": "096fc09a30ab90d2431778f9ee2b3936",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "type": "SPAN",
+ "environment": "default",
+ "parentObservationId": null,
+ "startTime": "2025-08-01T13:56:54.163Z",
+ "endTime": "2025-08-01T13:57:11.336Z",
+ "name": "beeai-framework-main",
+ "metadata": {
+ "attributes": {
+ "source": "ReActAgent",
+ "traceId": "0cff2691-3a45-4988-a243-8cb8c508aa25",
+ "beeai.version": "0.1.33",
+ "input.value": "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?",
+ "output.value": "{'role': 'assistant', 'text': \"Barcelona is a vibrant city known for its rich cultural heritage and stunning architecture, particularly the works of Antoni Gaudí. Here are some key attractions and landmarks you should consider visiting:\\n\\n1. **Sagrada Família** - An iconic basilica designed by Gaudí, still under construction.\\n2. **Park Güell** - A colorful park also designed by Gaudí, filled with artistic structures and beautiful gardens.\\n3. **La Rambla** - A famous street in the heart of the city ideal for walking, dining, and shopping.\\n4. **Gothic Quarter (Barri Gòtic)** - The historic center of Barcelona with medieval architecture and narrow streets.\\n5. **Casa Batlló** - Another masterpiece by Gaudí, known for its unique design and vibrant colors.\\n6. **Casa Milà (La Pedrera)** - A modernist building with a wavy stone facade, also designed by Gaudí.\\n7. **Montjuïc** - A hill offering stunning views of the city, home to several attractions including the Montjuïc Castle and the Magic Fountain.\\n\\nRegarding the current weather, it is 29°C with no rain, and the humidity is at 48%. It's a great time to explore the city!\"}",
+ "history": "[{'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', 'role': 'system'}, {'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': 'user'}, {'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', 'role': 'assistant'}, {'text': 'Thought: I found information about Barcelona, including its rich cultural heritage and key attractions like the architectural works of Antoni Gaudí. Now, I will check the current weather conditions in Barcelona. \\nFunction Name: OpenMeteoTool\\nFunction Input: {\"country\": \"Spain\", \"location_name\": \"Barcelona\"}\\nFunction Output: {\"latitude\": 41.4375, \"longitude\": 2.1875, \"generationtime_ms\": 0.0553131103515625, \"utc_offset_seconds\": 0, \"timezone\": \"GMT\", \"timezone_abbreviation\": \"GMT\", \"elevation\": 44.0, \"current_units\": {\"time\": \"iso8601\", \"interval\": \"seconds\", \"temperature_2m\": \"°C\", \"rain\": \"mm\", \"relative_humidity_2m\": \"%\", \"wind_speed_10m\": \"km/h\"}, \"current\": {\"time\": \"2025-08-01T13:45\", \"interval\": 900, \"temperature_2m\": 29.0, \"rain\": 0.0, \"relative_humidity_2m\": 48, \"wind_speed_10m\": 18.8}, \"daily_units\": {\"time\": \"iso8601\", \"temperature_2m_max\": \"°C\", \"temperature_2m_min\": \"°C\", \"rain_sum\": \"mm\"}, \"daily\": {\"time\": [\"2025-08-01\"], \"temperature_2m_max\": [29.0], \"temperature_2m_min\": [20.6], \"rain_sum\": [0.0]}}\\n', 'role': 'assistant'}, {'text': \"Barcelona is a vibrant city known for its rich cultural heritage and stunning architecture, particularly the works of Antoni Gaudí. Here are some key attractions and landmarks you should consider visiting:\\n\\n1. **Sagrada Família** - An iconic basilica designed by Gaudí, still under construction.\\n2. **Park Güell** - A colorful park also designed by Gaudí, filled with artistic structures and beautiful gardens.\\n3. **La Rambla** - A famous street in the heart of the city ideal for walking, dining, and shopping.\\n4. **Gothic Quarter (Barri Gòtic)** - The historic center of Barcelona with medieval architecture and narrow streets.\\n5. **Casa Batlló** - Another masterpiece by Gaudí, known for its unique design and vibrant colors.\\n6. **Casa Milà (La Pedrera)** - A modernist building with a wavy stone facade, also designed by Gaudí.\\n7. **Montjuïc** - A hill offering stunning views of the city, home to several attractions including the Montjuïc Castle and the Magic Fountain.\\n\\nRegarding the current weather, it is 29°C with no rain, and the humidity is at 48%. It's a great time to explore the city!\", 'role': 'assistant'}]",
+ "openinference.span.kind": "AGENT"
+ },
+ "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": {}
+ }
+ },
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": null,
+ "modelParameters": null,
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-08-01T13:57:14.163Z",
+ "updatedAt": "2025-08-01T13:57:14.213Z",
+ "usageDetails": {},
+ "costDetails": {},
+ "providedCostDetails": {},
+ "model": null,
+ "internalModelId": null,
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 17173,
+ "timeToFirstToken": null,
+ "inputCost": null,
+ "outputCost": null,
+ "totalCost": 0,
+ "inputUsage": 0,
+ "outputUsage": 0,
+ "totalUsage": 0,
+ "input": "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?",
+ "output": "{'role': 'assistant', 'text': \"Barcelona is a vibrant city known for its rich cultural heritage and stunning architecture, particularly the works of Antoni Gaudí. Here are some key attractions and landmarks you should consider visiting:\\n\\n1. **Sagrada Família** - An iconic basilica designed by Gaudí, still under construction.\\n2. **Park Güell** - A colorful park also designed by Gaudí, filled with artistic structures and beautiful gardens.\\n3. **La Rambla** - A famous street in the heart of the city ideal for walking, dining, and shopping.\\n4. **Gothic Quarter (Barri Gòtic)** - The historic center of Barcelona with medieval architecture and narrow streets.\\n5. **Casa Batlló** - Another masterpiece by Gaudí, known for its unique design and vibrant colors.\\n6. **Casa Milà (La Pedrera)** - A modernist building with a wavy stone facade, also designed by Gaudí.\\n7. **Montjuïc** - A hill offering stunning views of the city, home to several attractions including the Montjuïc Castle and the Magic Fountain.\\n\\nRegarding the current weather, it is 29°C with no rain, and the humidity is at 48%. It's a great time to explore the city!\"}"
+ },
+ {
+ "id": "477d350ab1c6548d",
+ "traceId": "096fc09a30ab90d2431778f9ee2b3936",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "type": "SPAN",
+ "environment": "default",
+ "parentObservationId": "0eb76c10a47e9086",
+ "startTime": "2025-08-01T13:57:03.886Z",
+ "endTime": "2025-08-01T13:57:11.334Z",
+ "name": "agent.react.update-18",
+ "metadata": {
+ "attributes": {
+ "target": "agent.react.update",
+ "name": "update",
+ "traceId": "0cff2691-3a45-4988-a243-8cb8c508aa25",
+ "output.value": {
+ "latitude": 41.4375,
+ "longitude": 2.1875,
+ "generationtime_ms": 0.0553131103515625,
+ "utc_offset_seconds": 0,
+ "timezone": "GMT",
+ "timezone_abbreviation": "GMT",
+ "elevation": 44,
+ "current_units": {
+ "time": "iso8601",
+ "interval": "seconds",
+ "temperature_2m": "°C",
+ "rain": "mm",
+ "relative_humidity_2m": "%",
+ "wind_speed_10m": "km/h"
+ },
+ "current": {
+ "time": "2025-08-01T13:45",
+ "interval": 900,
+ "temperature_2m": 29,
+ "rain": 0,
+ "relative_humidity_2m": 48,
+ "wind_speed_10m": 18.8
+ },
+ "daily_units": {
+ "time": "iso8601",
+ "temperature_2m_max": "°C",
+ "temperature_2m_min": "°C",
+ "rain_sum": "mm"
+ },
+ "daily": {
+ "time": [
+ "2025-08-01"
+ ],
+ "temperature_2m_max": [
+ 29
+ ],
+ "temperature_2m_min": [
+ 20.6
+ ],
+ "rain_sum": [
+ 0
+ ]
+ }
+ },
+ "output.mime_type": "application/json",
+ "thought": "I found information about Barcelona, including its rich cultural heritage and key attractions like the architectural works of Antoni Gaudí. Now, I will check the current weather conditions in Barcelona. ",
+ "tool.name": "OpenMeteoTool",
+ "tool.parameters": {
+ "location_name": "Barcelona",
+ "country": "Spain"
+ },
+ "openinference.span.kind": "AGENT"
+ },
+ "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": {}
+ }
+ },
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": null,
+ "modelParameters": null,
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-08-01T13:57:14.163Z",
+ "updatedAt": "2025-08-01T13:57:14.211Z",
+ "usageDetails": {},
+ "costDetails": {},
+ "providedCostDetails": {},
+ "model": null,
+ "internalModelId": null,
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 7448,
+ "timeToFirstToken": null,
+ "inputCost": null,
+ "outputCost": null,
+ "totalCost": 0,
+ "inputUsage": 0,
+ "outputUsage": 0,
+ "totalUsage": 0,
+ "input": null,
+ "output": {
+ "latitude": 41.4375,
+ "longitude": 2.1875,
+ "generationtime_ms": 0.0553131103515625,
+ "utc_offset_seconds": 0,
+ "timezone": "GMT",
+ "timezone_abbreviation": "GMT",
+ "elevation": 44,
+ "current_units": {
+ "time": "iso8601",
+ "interval": "seconds",
+ "temperature_2m": "°C",
+ "rain": "mm",
+ "relative_humidity_2m": "%",
+ "wind_speed_10m": "km/h"
+ },
+ "current": {
+ "time": "2025-08-01T13:45",
+ "interval": 900,
+ "temperature_2m": 29,
+ "rain": 0,
+ "relative_humidity_2m": 48,
+ "wind_speed_10m": 18.8
+ },
+ "daily_units": {
+ "time": "iso8601",
+ "temperature_2m_max": "°C",
+ "temperature_2m_min": "°C",
+ "rain_sum": "mm"
+ },
+ "daily": {
+ "time": [
+ "2025-08-01"
+ ],
+ "temperature_2m_max": [
+ 29
+ ],
+ "temperature_2m_min": [
+ 20.6
+ ],
+ "rain_sum": [
+ 0
+ ]
+ }
+ }
+ },
+ {
+ "id": "49b16d9910843ef4",
+ "traceId": "096fc09a30ab90d2431778f9ee2b3936",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "type": "SPAN",
+ "environment": "default",
+ "parentObservationId": "ff8b04dfe1f3e047",
+ "startTime": "2025-08-01T13:56:57.468Z",
+ "endTime": "2025-08-01T13:57:11.334Z",
+ "name": "tool.search.wikipedia.success-12",
+ "metadata": {
+ "attributes": {
+ "target": "tool.search.wikipedia.success",
+ "name": "success",
+ "traceId": "0cff2691-3a45-4988-a243-8cb8c508aa25",
+ "output.value": [
+ {
+ "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"
+ }
+ ],
+ "tool.parameters": {
+ "query": "Tourism in Barcelona",
+ "full_text": false
+ },
+ "openinference.span.kind": "TOOL"
+ },
+ "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": {}
+ }
+ },
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": null,
+ "modelParameters": null,
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-08-01T13:57:14.161Z",
+ "updatedAt": "2025-08-01T13:57:14.210Z",
+ "usageDetails": {},
+ "costDetails": {},
+ "providedCostDetails": {},
+ "model": null,
+ "internalModelId": null,
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 13866,
+ "timeToFirstToken": null,
+ "inputCost": null,
+ "outputCost": null,
+ "totalCost": 0,
+ "inputUsage": 0,
+ "outputUsage": 0,
+ "totalUsage": 0,
+ "input": null,
+ "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"
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
diff --git a/packages/shared/scripts/seeder/utils/framework-traces/framework-trace-loader.ts b/packages/shared/scripts/seeder/utils/framework-traces/framework-trace-loader.ts
new file mode 100644
index 0000000000..9ee15bc7e0
--- /dev/null
+++ b/packages/shared/scripts/seeder/utils/framework-traces/framework-trace-loader.ts
@@ -0,0 +1,203 @@
+import { readFileSync, readdirSync } from "fs";
+import path from "path";
+import {
+ createTrace,
+ createObservation,
+ logger,
+ type TraceRecordInsertType,
+ type ObservationRecordInsertType,
+ type ScoreRecordInsertType,
+} from "../../../../src/server";
+
+/**
+ * Loads framework traces from JSON files and converts them to ClickHouse insert types.
+ * Expected JSON structure:
+ * {
+ * trace: { trace data without observations },
+ * observations: [{ individual observation with id and input/output/metadata and all the other stuff}]
+ * }
+ */
+export class FrameworkTraceLoader {
+ private frameworkTracesDir: string;
+
+ constructor() {
+ this.frameworkTracesDir = __dirname;
+ }
+
+ /**
+ * Load and adapt all framework traces for a project.
+ */
+ loadTracesForProject(projectId: string): {
+ traces: TraceRecordInsertType[];
+ observations: ObservationRecordInsertType[];
+ scores: ScoreRecordInsertType[];
+ } {
+ const traces: TraceRecordInsertType[] = [];
+ const observations: ObservationRecordInsertType[] = [];
+ const scores: ScoreRecordInsertType[] = [];
+
+ const files = readdirSync(this.frameworkTracesDir).filter(
+ (file) => file.endsWith(".json") && file !== "package.json",
+ );
+
+ for (const file of files) {
+ const filePath = path.join(this.frameworkTracesDir, file);
+ const content = readFileSync(filePath, "utf-8");
+ const data = JSON.parse(content);
+
+ const frameworkName = file.replace(".json", "");
+ const adapted = this.adaptTrace(data, projectId, frameworkName);
+
+ traces.push(adapted.trace);
+ observations.push(...adapted.observations);
+ scores.push(...adapted.scores);
+
+ logger.info(
+ `Loaded 1 trace with ${adapted.observations.length} observations from ${frameworkName}`,
+ );
+ }
+
+ return { traces, observations, scores };
+ }
+
+ /**
+ * Adapt a single framework trace to a specific project.
+ */
+ private adaptTrace(
+ data: any,
+ projectId: string,
+ frameworkName: string,
+ ): {
+ trace: TraceRecordInsertType;
+ observations: ObservationRecordInsertType[];
+ scores: ScoreRecordInsertType[];
+ } {
+ const rawTrace = data.trace;
+ const rawObservations = data.observations || [];
+
+ const originalTraceId = rawTrace.id;
+ const newTraceId = originalTraceId;
+ // we just change the name for now.
+ // const newTraceId = `framework-${frameworkName}-${originalTraceId}-${projectId.slice(-8)}`;
+ const newName = `framework-${frameworkName}-${rawTrace.name}`;
+
+ // Parse trace metadata if it's a string
+ let metadata = rawTrace.metadata;
+ if (typeof metadata === "string") {
+ metadata = JSON.parse(metadata);
+ }
+
+ // Create trace
+ const trace = createTrace({
+ id: newTraceId,
+ project_id: projectId,
+ name: newName,
+ timestamp: new Date(rawTrace.timestamp).getTime(),
+ input: rawTrace.input,
+ output: rawTrace.output,
+ user_id: rawTrace.userId,
+ session_id: rawTrace.sessionId,
+ environment: rawTrace.environment,
+ metadata: {
+ ...metadata,
+ // metadata to filter for those kinda traces
+ source: "framework-trace",
+ framework: frameworkName,
+ },
+ release: rawTrace.release,
+ version: rawTrace.version,
+ public: rawTrace.public,
+ bookmarked: rawTrace.bookmarked,
+ tags: rawTrace.tags,
+ });
+
+ // Map observation IDs (old -> new)
+ const obsIdMap = new Map<string, string>();
+ for (const obs of rawObservations) {
+ const newObsId = `framework-${frameworkName}-${obs.id}-${projectId.slice(-8)}`;
+ obsIdMap.set(obs.id, newObsId);
+ }
+
+ // Create observations
+ const observations: ObservationRecordInsertType[] = [];
+ for (const obs of rawObservations) {
+ const newObsId = obsIdMap.get(obs.id)!;
+
+ // Map parent observation ID
+ const parentObservationId = obs.parentObservationId
+ ? obsIdMap.get(obs.parentObservationId) || null
+ : null;
+
+ // Convert input/output to strings, preserving null
+ const input =
+ obs.input === undefined || obs.input === null
+ ? obs.input
+ : JSON.stringify(obs.input);
+ const output =
+ obs.output === undefined || obs.output === null
+ ? obs.output
+ : JSON.stringify(obs.output);
+
+ // Parse metadata if it's a string
+ let obsMetadata = obs.metadata;
+ if (typeof obsMetadata === "string") {
+ obsMetadata = JSON.parse(obsMetadata);
+ }
+
+ // Use usage/cost details from JSON if present, otherwise reconstruct from flat fields
+ const usageDetails =
+ obs.usageDetails && Object.keys(obs.usageDetails).length > 0
+ ? obs.usageDetails
+ : obs.totalUsage > 0
+ ? {
+ input: obs.inputUsage,
+ output: obs.outputUsage,
+ total: obs.totalUsage,
+ }
+ : undefined;
+
+ const costDetails =
+ obs.costDetails && Object.keys(obs.costDetails).length > 0
+ ? obs.costDetails
+ : obs.totalCost > 0
+ ? {
+ input: (obs.totalCost * obs.inputUsage) / obs.totalUsage,
+ output: (obs.totalCost * obs.outputUsage) / obs.totalUsage,
+ total: obs.totalCost,
+ }
+ : undefined;
+
+ observations.push(
+ createObservation({
+ id: newObsId,
+ trace_id: newTraceId,
+ project_id: projectId,
+ type: obs.type,
+ parent_observation_id: parentObservationId,
+ start_time: new Date(obs.startTime).getTime(),
+ end_time: obs.endTime ? new Date(obs.endTime).getTime() : undefined,
+ name: obs.name,
+ metadata: obsMetadata,
+ level: obs.level,
+ status_message: obs.statusMessage,
+ input,
+ output,
+ provided_model_name: obs.model,
+ model_parameters: obs.modelParameters
+ ? JSON.stringify(obs.modelParameters)
+ : undefined,
+ prompt_name: obs.promptName,
+ prompt_version: obs.promptVersion,
+ usage_details: usageDetails,
+ provided_usage_details: obs.providedUsageDetails,
+ cost_details: costDetails,
+ provided_cost_details: obs.providedCostDetails,
+ total_cost: obs.totalCost,
+ environment: rawTrace.environment,
+ }),
+ );
+ }
+
+ return { trace, observations, scores: [] };
+ }
+}
diff --git a/packages/shared/scripts/seeder/utils/framework-traces/google-adk-2025-08-28.json b/packages/shared/scripts/seeder/utils/framework-traces/google-adk-2025-08-28.json
new file mode 100644
index 0000000000..0af0d1ee32
--- /dev/null
+++ b/packages/shared/scripts/seeder/utils/framework-traces/google-adk-2025-08-28.json
@@ -0,0 +1,1097 @@
+{
+ "trace": {
+ "id": "b82a0bdc1994fc5d1c8576ca032543f7",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "name": "invocation [hello_app]",
+ "timestamp": "2025-08-28T07:32:30.303Z",
+ "environment": "default",
+ "tags": [],
+ "bookmarked": false,
+ "release": null,
+ "version": null,
+ "userId": "demo-user",
+ "sessionId": "demo-session",
+ "public": true,
+ "input": "\"{\\\"user_id\\\":\\\"demo-user\\\",\\\"session_id\\\":\\\"demo-session\\\",\\\"new_message\\\":{\\\"parts\\\":[{\\\"text\\\":\\\"hi\\\"}],\\\"role\\\":\\\"user\\\"},\\\"state_delta\\\":null,\\\"run_config\\\":{\\\"save_input_blobs_as_artifacts\\\":false,\\\"support_cfc\\\":false,\\\"streaming_mode\\\":\\\"StreamingMode.NONE\\\",\\\"max_llm_calls\\\":500}}\"",
+ "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},\\\"invocation_id\\\":\\\"e-5022fa36-69c5-4fe7-bb37-662704dcb713\\\",\\\"author\\\":\\\"hello_agent\\\",\\\"actions\\\":{\\\"state_delta\\\":{},\\\"artifact_delta\\\":{},\\\"requested_auth_configs\\\":{}},\\\"id\\\":\\\"f2596747-d905-44bc-b85c-1e9692c3249c\\\",\\\"timestamp\\\":1756366351.22196}\"",
+ "metadata": "{\"attributes\":{\"session.id\":\"demo-session\",\"user.id\":\"demo-user\",\"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},\\\"invocation_id\\\":\\\"e-5022fa36-69c5-4fe7-bb37-662704dcb713\\\",\\\"author\\\":\\\"hello_agent\\\",\\\"actions\\\":{\\\"state_delta\\\":{},\\\"artifact_delta\\\":{},\\\"requested_auth_configs\\\":{}},\\\"id\\\":\\\"f2596747-d905-44bc-b85c-1e9692c3249c\\\",\\\"timestamp\\\":1756366351.22196}\",\"output.mime_type\":\"application/json\",\"openinference.span.kind\":\"AGENT\"},\"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\":{}}}",
+ "createdAt": "2025-08-28T07:32:30.303Z",
+ "updatedAt": "2025-08-28T07:33:02.230Z",
+ "scores": [
+ {
+ "id": "23fb2bfb-7c1e-4c91-bf34-9d846eb9b1eb",
+ "timestamp": "2025-08-28T07:33:02.142Z",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "environment": "default",
+ "name": "toxicity",
+ "source": "EVAL",
+ "authorUserId": null,
+ "comment": "The generation is friendly and welcoming, containing no harmful or disrespectful language, thus it scores a 0 for toxicity.",
+ "metadata": "{}",
+ "configId": null,
+ "createdAt": "2025-08-28T07:33:03.000Z",
+ "updatedAt": "2025-08-28T07:33:02.230Z",
+ "queueId": null,
+ "traceId": "b82a0bdc1994fc5d1c8576ca032543f7",
+ "observationId": null,
+ "sessionId": null,
+ "datasetRunId": null,
+ "value": 0,
+ "stringValue": null,
+ "dataType": "NUMERIC"
+ },
+ {
+ "id": "66afb5b7-1342-48de-b567-9970d4227b26",
+ "timestamp": "2025-08-28T07:33:01.935Z",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "environment": "default",
+ "name": "hallucination",
+ "source": "EVAL",
+ "authorUserId": null,
+ "comment": "The model's response is a simple friendly greeting and does not include any factual content or information that could be incorrect, implausible, or invented, so it does not hallucinate.",
+ "metadata": "{}",
+ "configId": null,
+ "createdAt": "2025-08-28T07:33:02.000Z",
+ "updatedAt": "2025-08-28T07:33:01.999Z",
+ "queueId": null,
+ "traceId": "b82a0bdc1994fc5d1c8576ca032543f7",
+ "observationId": null,
+ "sessionId": null,
+ "datasetRunId": null,
+ "value": 0,
+ "stringValue": null,
+ "dataType": "NUMERIC"
+ }
+ ],
+ "latency": 1.848
+ },
+ "observations": [
+ {
+ "id": "bded677884f031ce",
+ "traceId": "b82a0bdc1994fc5d1c8576ca032543f7",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "type": "GENERATION",
+ "environment": "default",
+ "parentObservationId": "6d8beb2e6a36b133",
+ "startTime": "2025-08-28T07:32:31.222Z",
+ "endTime": "2025-08-28T07:32:32.146Z",
+ "name": "call_llm",
+ "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": {}
+ }
+ },
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": null,
+ "modelParameters": {
+ "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\"}]}]"
+ },
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-08-28T07:32:35.207Z",
+ "updatedAt": "2025-08-28T07:32:35.247Z",
+ "usageDetails": {
+ "input": 39,
+ "output": 6,
+ "total": 45
+ },
+ "costDetails": {
+ "input": 0.0000039,
+ "output": 0.0000024,
+ "total": 0.0000063
+ },
+ "providedCostDetails": {},
+ "model": "gemini-2.0-flash",
+ "internalModelId": "cm7zsrs1327124dhjtb95w8f74",
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 924,
+ "timeToFirstToken": null,
+ "inputCost": 0.0000039,
+ "outputCost": 0.0000024,
+ "totalCost": 0.0000063,
+ "inputUsage": 39,
+ "outputUsage": 6,
+ "totalUsage": 45,
+ "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
+ }
+ }
+ },
+ {
+ "id": "f6e4c65297e40c96",
+ "traceId": "b82a0bdc1994fc5d1c8576ca032543f7",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "type": "GENERATION",
+ "environment": "default",
+ "parentObservationId": "6d8beb2e6a36b133",
+ "startTime": "2025-08-28T07:32:30.306Z",
+ "endTime": "2025-08-28T07:32:31.217Z",
+ "name": "call_llm",
+ "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": "5e9ed38f-f5ae-47f8-8e34-81367e0e9152",
+ "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"
+ }
+ ]
+ },
+ "gcp.vertex.agent.llm_response": {
+ "content": {
+ "parts": [
+ {
+ "function_call": {
+ "args": {},
+ "name": "say_hello"
+ }
+ }
+ ],
+ "role": "model"
+ },
+ "finish_reason": "STOP",
+ "usage_metadata": {
+ "candidates_token_count": 3,
+ "candidates_tokens_details": [
+ {
+ "modality": "TEXT",
+ "token_count": 3
+ }
+ ],
+ "prompt_token_count": 28,
+ "prompt_tokens_details": [
+ {
+ "modality": "TEXT",
+ "token_count": 28
+ }
+ ],
+ "total_token_count": 31
+ }
+ },
+ "gen_ai.usage.input_tokens": "28",
+ "gen_ai.usage.output_tokens": "3",
+ "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"
+ }
+ ]
+ },
+ "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",
+ "output.value": {
+ "content": {
+ "parts": [
+ {
+ "function_call": {
+ "args": {},
+ "name": "say_hello"
+ }
+ }
+ ],
+ "role": "model"
+ },
+ "finish_reason": "STOP",
+ "usage_metadata": {
+ "candidates_token_count": 3,
+ "candidates_tokens_details": [
+ {
+ "modality": "TEXT",
+ "token_count": 3
+ }
+ ],
+ "prompt_token_count": 28,
+ "prompt_tokens_details": [
+ {
+ "modality": "TEXT",
+ "token_count": 28
+ }
+ ],
+ "total_token_count": 31
+ }
+ },
+ "output.mime_type": "application/json",
+ "llm.token_count.total": "31",
+ "llm.token_count.prompt": "28",
+ "llm.token_count.completion": "3",
+ "llm.output_messages.0.message.role": "model",
+ "llm.output_messages.0.message.tool_calls.0.tool_call.function.name": "say_hello",
+ "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": {}
+ }
+ },
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": null,
+ "modelParameters": {
+ "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\"}]}]"
+ },
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-08-28T07:32:35.209Z",
+ "updatedAt": "2025-08-28T07:32:35.244Z",
+ "usageDetails": {
+ "input": 28,
+ "output": 3,
+ "total": 31
+ },
+ "costDetails": {
+ "input": 0.0000028,
+ "output": 0.0000012,
+ "total": 0.000004
+ },
+ "providedCostDetails": {},
+ "model": "gemini-2.0-flash",
+ "internalModelId": "cm7zsrs1327124dhjtb95w8f74",
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 911,
+ "timeToFirstToken": null,
+ "inputCost": 0.0000028,
+ "outputCost": 0.0000012,
+ "totalCost": 0.000004,
+ "inputUsage": 28,
+ "outputUsage": 3,
+ "totalUsage": 31,
+ "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"
+ }
+ ]
+ },
+ "output": {
+ "content": {
+ "parts": [
+ {
+ "function_call": {
+ "args": {},
+ "name": "say_hello"
+ }
+ }
+ ],
+ "role": "model"
+ },
+ "finish_reason": "STOP",
+ "usage_metadata": {
+ "candidates_token_count": 3,
+ "candidates_tokens_details": [
+ {
+ "modality": "TEXT",
+ "token_count": 3
+ }
+ ],
+ "prompt_token_count": 28,
+ "prompt_tokens_details": [
+ {
+ "modality": "TEXT",
+ "token_count": 28
+ }
+ ],
+ "total_token_count": 31
+ }
+ }
+ },
+ {
+ "id": "86cd4912944ddc41",
+ "traceId": "b82a0bdc1994fc5d1c8576ca032543f7",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "type": "CHAIN",
+ "environment": "default",
+ "parentObservationId": null,
+ "startTime": "2025-08-28T07:32:30.303Z",
+ "endTime": "2025-08-28T07:32:32.151Z",
+ "name": "invocation [hello_app]",
+ "metadata": {
+ "attributes": {
+ "input.value": {
+ "user_id": "demo-user",
+ "session_id": "demo-session",
+ "new_message": {
+ "parts": [
+ {
+ "text": "hi"
+ }
+ ],
+ "role": "user"
+ },
+ "state_delta": null,
+ "run_config": {
+ "save_input_blobs_as_artifacts": false,
+ "support_cfc": false,
+ "streaming_mode": "StreamingMode.NONE",
+ "max_llm_calls": 500
+ }
+ },
+ "input.mime_type": "application/json",
+ "user.id": "demo-user",
+ "session.id": "demo-session",
+ "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
+ },
+ "invocation_id": "e-5022fa36-69c5-4fe7-bb37-662704dcb713",
+ "author": "hello_agent",
+ "actions": {
+ "state_delta": {},
+ "artifact_delta": {},
+ "requested_auth_configs": {}
+ },
+ "id": "f2596747-d905-44bc-b85c-1e9692c3249c",
+ "timestamp": 1756366351.22196
+ },
+ "output.mime_type": "application/json",
+ "openinference.span.kind": "CHAIN"
+ },
+ "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": {}
+ }
+ },
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": null,
+ "modelParameters": {},
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-08-28T07:32:35.209Z",
+ "updatedAt": "2025-08-28T07:32:35.243Z",
+ "usageDetails": {},
+ "costDetails": {},
+ "providedCostDetails": {},
+ "model": null,
+ "internalModelId": null,
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 1848,
+ "timeToFirstToken": null,
+ "inputCost": null,
+ "outputCost": null,
+ "totalCost": 0,
+ "inputUsage": 0,
+ "outputUsage": 0,
+ "totalUsage": 0,
+ "input": {
+ "user_id": "demo-user",
+ "session_id": "demo-session",
+ "new_message": {
+ "parts": [
+ {
+ "text": "hi"
+ }
+ ],
+ "role": "user"
+ },
+ "state_delta": null,
+ "run_config": {
+ "save_input_blobs_as_artifacts": false,
+ "support_cfc": false,
+ "streaming_mode": "StreamingMode.NONE",
+ "max_llm_calls": 500
+ }
+ },
+ "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
+ },
+ "invocation_id": "e-5022fa36-69c5-4fe7-bb37-662704dcb713",
+ "author": "hello_agent",
+ "actions": {
+ "state_delta": {},
+ "artifact_delta": {},
+ "requested_auth_configs": {}
+ },
+ "id": "f2596747-d905-44bc-b85c-1e9692c3249c",
+ "timestamp": 1756366351.22196
+ }
+ },
+ {
+ "id": "6d8beb2e6a36b133",
+ "traceId": "b82a0bdc1994fc5d1c8576ca032543f7",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "type": "AGENT",
+ "environment": "default",
+ "parentObservationId": "86cd4912944ddc41",
+ "startTime": "2025-08-28T07:32:30.304Z",
+ "endTime": "2025-08-28T07:32:32.150Z",
+ "name": "agent_run [hello_agent]",
+ "metadata": {
+ "attributes": {
+ "session.id": "demo-session",
+ "user.id": "demo-user",
+ "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
+ },
+ "invocation_id": "e-5022fa36-69c5-4fe7-bb37-662704dcb713",
+ "author": "hello_agent",
+ "actions": {
+ "state_delta": {},
+ "artifact_delta": {},
+ "requested_auth_configs": {}
+ },
+ "id": "f2596747-d905-44bc-b85c-1e9692c3249c",
+ "timestamp": 1756366351.22196
+ },
+ "output.mime_type": "application/json",
+ "openinference.span.kind": "AGENT"
+ },
+ "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": {}
+ }
+ },
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": null,
+ "modelParameters": {},
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-08-28T07:32:35.210Z",
+ "updatedAt": "2025-08-28T07:32:35.239Z",
+ "usageDetails": {},
+ "costDetails": {},
+ "providedCostDetails": {},
+ "model": null,
+ "internalModelId": null,
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 1846,
+ "timeToFirstToken": null,
+ "inputCost": null,
+ "outputCost": null,
+ "totalCost": 0,
+ "inputUsage": 0,
+ "outputUsage": 0,
+ "totalUsage": 0,
+ "input": null,
+ "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
+ },
+ "invocation_id": "e-5022fa36-69c5-4fe7-bb37-662704dcb713",
+ "author": "hello_agent",
+ "actions": {
+ "state_delta": {},
+ "artifact_delta": {},
+ "requested_auth_configs": {}
+ },
+ "id": "f2596747-d905-44bc-b85c-1e9692c3249c",
+ "timestamp": 1756366351.22196
+ }
+ },
+ {
+ "id": "04290e4d82aba1bc",
+ "traceId": "b82a0bdc1994fc5d1c8576ca032543f7",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "type": "TOOL",
+ "environment": "default",
+ "parentObservationId": "f6e4c65297e40c96",
+ "startTime": "2025-08-28T07:32:31.216Z",
+ "endTime": "2025-08-28T07:32:31.217Z",
+ "name": "execute_tool say_hello",
+ "metadata": {
+ "attributes": {
+ "session.id": "demo-session",
+ "user.id": "demo-user",
+ "gen_ai.system": "gcp.vertex.agent",
+ "gen_ai.operation.name": "execute_tool",
+ "gen_ai.tool.name": "say_hello",
+ "gen_ai.tool.description": "Call self as a function.",
+ "gen_ai.tool.call.id": "adk-8bd8dc65-717d-4102-858b-3a1dd6b75a00",
+ "gcp.vertex.agent.tool_call_args": {},
+ "gcp.vertex.agent.event_id": "9d88cbb2-d624-404d-ae7c-2d4849f6313c",
+ "gcp.vertex.agent.tool_response": {
+ "greeting": "Hello Langfuse 👋"
+ },
+ "gcp.vertex.agent.llm_request": {},
+ "gcp.vertex.agent.llm_response": {},
+ "tool.name": "say_hello",
+ "tool.description": "Call self as a function.",
+ "output.value": {
+ "id": "adk-8bd8dc65-717d-4102-858b-3a1dd6b75a00",
+ "name": "say_hello",
+ "response": {
+ "greeting": "Hello Langfuse 👋"
+ }
+ },
+ "output.mime_type": "application/json",
+ "openinference.span.kind": "TOOL"
+ },
+ "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": {}
+ }
+ },
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": null,
+ "modelParameters": {},
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-08-28T07:32:35.207Z",
+ "updatedAt": "2025-08-28T07:32:35.238Z",
+ "usageDetails": {},
+ "costDetails": {},
+ "providedCostDetails": {},
+ "model": null,
+ "internalModelId": null,
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 1,
+ "timeToFirstToken": null,
+ "inputCost": null,
+ "outputCost": null,
+ "totalCost": 0,
+ "inputUsage": 0,
+ "outputUsage": 0,
+ "totalUsage": 0,
+ "input": {},
+ "output": {}
+ }
+ ]
+}
diff --git a/packages/shared/scripts/seeder/utils/framework-traces/google-gemini-2025-08-01.json b/packages/shared/scripts/seeder/utils/framework-traces/google-gemini-2025-08-01.json
new file mode 100644
index 0000000000..561332ab5d
--- /dev/null
+++ b/packages/shared/scripts/seeder/utils/framework-traces/google-gemini-2025-08-01.json
@@ -0,0 +1,239 @@
+{
+ "trace": {
+ "id": "9f2f0fe0228fd81a9fe75882934b384a",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "name": "GenerateContent",
+ "timestamp": "2025-08-01T13:22:00.147Z",
+ "environment": "default",
+ "tags": [],
+ "bookmarked": false,
+ "release": null,
+ "version": null,
+ "userId": null,
+ "sessionId": null,
+ "public": true,
+ "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\":{}}}",
+ "createdAt": "2025-08-01T13:22:14.000Z",
+ "updatedAt": "2025-08-01T13:22:40.620Z",
+ "scores": [
+ {
+ "id": "c5305319-a3f6-4922-943e-9f3b863b4bb3",
+ "timestamp": "2025-08-01T13:23:08.084Z",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "environment": "default",
+ "name": "hallucination",
+ "source": "EVAL",
+ "authorUserId": null,
+ "comment": "The generation provides a detailed and plausible description of Langfuse as an observability and evaluation platform for LLM applications, aligning with known concepts in AI development and observability tools.",
+ "metadata": "{}",
+ "configId": null,
+ "createdAt": "2025-08-01T13:23:09.000Z",
+ "updatedAt": "2025-08-01T13:23:45.766Z",
+ "queueId": null,
+ "traceId": "9f2f0fe0228fd81a9fe75882934b384a",
+ "observationId": null,
+ "sessionId": null,
+ "datasetRunId": null,
+ "value": 0.1,
+ "stringValue": null,
+ "dataType": "NUMERIC"
+ },
+ {
+ "id": "31825812-baac-4ce9-874d-b6504baf1bf1",
+ "timestamp": "2025-08-01T13:23:07.172Z",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "environment": "default",
+ "name": "toxicity",
+ "source": "EVAL",
+ "authorUserId": null,
+ "comment": "The generation provides a detailed and informative explanation of Langfuse without any harmful, offensive, or disrespectful language, thus it is not toxic.",
+ "metadata": "{}",
+ "configId": null,
+ "createdAt": "2025-08-01T13:23:08.000Z",
+ "updatedAt": "2025-08-01T13:23:44.647Z",
+ "queueId": null,
+ "traceId": "9f2f0fe0228fd81a9fe75882934b384a",
+ "observationId": null,
+ "sessionId": null,
+ "datasetRunId": null,
+ "value": 0,
+ "stringValue": null,
+ "dataType": "NUMERIC"
+ }
+ ],
+ "latency": 12.032
+ },
+ "observations": [
+ {
+ "id": "b7a63ca7e1d083bc",
+ "traceId": "9f2f0fe0228fd81a9fe75882934b384a",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "type": "GENERATION",
+ "environment": "default",
+ "parentObservationId": null,
+ "startTime": "2025-08-01T13:22:00.147Z",
+ "endTime": "2025-08-01T13:22:12.179Z",
+ "name": "GenerateContent",
+ "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": {}
+ }
+ },
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": null,
+ "modelParameters": {},
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-08-01T13:22:40.579Z",
+ "updatedAt": "2025-08-01T13:22:40.741Z",
+ "usageDetails": {
+ "total": 2061,
+ "input": 6,
+ "completion_details.reasoning": 1104,
+ "output": 2055
+ },
+ "costDetails": {
+ "input": 0.0000018,
+ "output": 0.0051375,
+ "total": 0.005139299999
+ },
+ "providedCostDetails": {},
+ "model": "gemini-2.5-flash",
+ "internalModelId": "cmcnjkfwn000107l43bf5e8ax",
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 12032,
+ "timeToFirstToken": null,
+ "inputCost": 0.0000018,
+ "outputCost": 0.0051375,
+ "totalCost": 0.005139299999,
+ "inputUsage": 6,
+ "outputUsage": 2055,
+ "totalUsage": 2061,
+ "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": []
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/packages/shared/scripts/seeder/utils/framework-traces/koog-2025-08-26.json b/packages/shared/scripts/seeder/utils/framework-traces/koog-2025-08-26.json
new file mode 100644
index 0000000000..0cc25e0c1b
--- /dev/null
+++ b/packages/shared/scripts/seeder/utils/framework-traces/koog-2025-08-26.json
@@ -0,0 +1,863 @@
+{
+ "trace": {
+ "id": "dff173a675b759ce1b70e522b27d6846",
+ "projectId": "cmcmdwcag00c2ad077xp1qnyc",
+ "name": "agent.f9f77d1a-437f-4ba6-890e-b592a50cbd21",
+ "timestamp": "2025-08-26T19:40:59.145Z",
+ "environment": "default",
+ "tags": [],
+ "bookmarked": false,
+ "release": null,
+ "version": "0.3.0",
+ "userId": null,
+ "sessionId": null,
+ "public": true,
+ "input": null,
+ "output": null,
+ "metadata": "{\"attributes\":{\"gen_ai.request.model\":\"gpt-4o\",\"gen_ai.system\":\"openai\",\"gen_ai.agent.id\":\"f9f77d1a-437f-4ba6-890e-b592a50cbd21\",\"gen_ai.operation.name\":\"create_agent\"},\"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\":{}}}",
+ "createdAt": "2025-08-26T19:40:59.145Z",
+ "updatedAt": "2025-08-26T19:41:05.434Z",
+ "scores": [],
+ "latency": 5.843
+ },
+ "observations": [
+ {
+ "id": "1b7200380e3316e7",
+ "traceId": "dff173a675b759ce1b70e522b27d6846",
+ "projectId": "cmcmdwcag00c2ad077xp1qnyc",
+ "type": "AGENT",
+ "environment": "default",
+ "parentObservationId": null,
+ "startTime": "2025-08-26T19:40:59.145Z",
+ "endTime": "2025-08-26T19:41:04.988Z",
+ "name": "agent.f9f77d1a-437f-4ba6-890e-b592a50cbd21",
+ "metadata": {
+ "attributes": {
+ "gen_ai.request.model": "gpt-4o",
+ "gen_ai.system": "openai",
+ "gen_ai.agent.id": "f9f77d1a-437f-4ba6-890e-b592a50cbd21",
+ "gen_ai.operation.name": "create_agent"
+ },
+ "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": {}
+ }
+ },
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": "0.3.0",
+ "modelParameters": {},
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-08-26T19:41:05.401Z",
+ "updatedAt": "2025-08-26T19:41:05.420Z",
+ "usageDetails": {},
+ "costDetails": {},
+ "providedCostDetails": {},
+ "model": "gpt-4o",
+ "internalModelId": "b9854a5c92dc496b997d99d20",
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 5843,
+ "timeToFirstToken": null,
+ "inputCost": null,
+ "outputCost": null,
+ "totalCost": 0,
+ "inputUsage": 0,
+ "outputUsage": 0,
+ "totalUsage": 0,
+ "input": null,
+ "output": null
+ },
+ {
+ "id": "bb189bc3771ff83d",
+ "traceId": "dff173a675b759ce1b70e522b27d6846",
+ "projectId": "cmcmdwcag00c2ad077xp1qnyc",
+ "type": "AGENT",
+ "environment": "default",
+ "parentObservationId": "1b7200380e3316e7",
+ "startTime": "2025-08-26T19:40:59.150Z",
+ "endTime": "2025-08-26T19:41:04.988Z",
+ "name": "run.6f8d2449-33ed-4c7c-82e7-5410e34ee4e6",
+ "metadata": {
+ "attributes": {
+ "koog.agent.strategy.name": "single_run_sequential",
+ "gen_ai.conversation.id": "6f8d2449-33ed-4c7c-82e7-5410e34ee4e6",
+ "gen_ai.system": "openai",
+ "gen_ai.agent.id": "f9f77d1a-437f-4ba6-890e-b592a50cbd21",
+ "gen_ai.operation.name": "invoke_agent"
+ },
+ "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": {}
+ }
+ },
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": "0.3.0",
+ "modelParameters": {},
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-08-26T19:41:05.330Z",
+ "updatedAt": "2025-08-26T19:41:05.354Z",
+ "usageDetails": {},
+ "costDetails": {},
+ "providedCostDetails": {},
+ "model": null,
+ "internalModelId": null,
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 5838,
+ "timeToFirstToken": null,
+ "inputCost": null,
+ "outputCost": null,
+ "totalCost": 0,
+ "inputUsage": 0,
+ "outputUsage": 0,
+ "totalUsage": 0,
+ "input": null,
+ "output": null
+ },
+ {
+ "id": "7578374e12a7faa5",
+ "traceId": "dff173a675b759ce1b70e522b27d6846",
+ "projectId": "cmcmdwcag00c2ad077xp1qnyc",
+ "type": "SPAN",
+ "environment": "default",
+ "parentObservationId": "bb189bc3771ff83d",
+ "startTime": "2025-08-26T19:41:04.984Z",
+ "endTime": "2025-08-26T19:41:04.985Z",
+ "name": "node.__finish__",
+ "metadata": {
+ "langgraph_node": "__finish__",
+ "langgraph_step": 4,
+ "attributes": {
+ "gen_ai.conversation.id": "6f8d2449-33ed-4c7c-82e7-5410e34ee4e6",
+ "koog.node.name": "__finish__",
+ "langfuse.observation.metadata.langgraph_node": "__finish__",
+ "langfuse.observation.metadata.langgraph_step": "4"
+ },
+ "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": {}
+ }
+ },
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": "0.3.0",
+ "modelParameters": null,
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-08-26T19:41:05.313Z",
+ "updatedAt": "2025-08-26T19:41:05.340Z",
+ "usageDetails": {},
+ "costDetails": {},
+ "providedCostDetails": {},
+ "model": null,
+ "internalModelId": null,
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 1,
+ "timeToFirstToken": null,
+ "inputCost": null,
+ "outputCost": null,
+ "totalCost": 0,
+ "inputUsage": 0,
+ "outputUsage": 0,
+ "totalUsage": 0,
+ "input": null,
+ "output": null
+ },
+ {
+ "id": "e44e72cf2d221781",
+ "traceId": "dff173a675b759ce1b70e522b27d6846",
+ "projectId": "cmcmdwcag00c2ad077xp1qnyc",
+ "type": "GENERATION",
+ "environment": "default",
+ "parentObservationId": "6021df46275ad2d8",
+ "startTime": "2025-08-26T19:41:03.041Z",
+ "endTime": "2025-08-26T19:41:04.983Z",
+ "name": "llm.chat",
+ "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": {}
+ }
+ },
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": "0.3.0",
+ "modelParameters": {
+ "temperature": 1
+ },
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-08-26T19:41:05.314Z",
+ "updatedAt": "2025-08-26T19:41:05.333Z",
+ "usageDetails": {
+ "input": 168,
+ "output": 19,
+ "total": 187
+ },
+ "costDetails": {
+ "input": 0.00042,
+ "output": 0.00019,
+ "total": 0.00061
+ },
+ "providedCostDetails": {},
+ "model": "gpt-4o",
+ "internalModelId": "b9854a5c92dc496b997d99d20",
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 1942,
+ "timeToFirstToken": null,
+ "inputCost": 0.00042,
+ "outputCost": 0.00019,
+ "totalCost": 0.00061,
+ "inputUsage": 168,
+ "outputUsage": 19,
+ "totalUsage": 187,
+ "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"
+ }
+ ]
+ },
+ {
+ "id": "6021df46275ad2d8",
+ "traceId": "dff173a675b759ce1b70e522b27d6846",
+ "projectId": "cmcmdwcag00c2ad077xp1qnyc",
+ "type": "SPAN",
+ "environment": "default",
+ "parentObservationId": "bb189bc3771ff83d",
+ "startTime": "2025-08-26T19:41:03.038Z",
+ "endTime": "2025-08-26T19:41:04.984Z",
+ "name": "node.nodeSendToolResult",
+ "metadata": {
+ "langgraph_node": "nodeSendToolResult",
+ "langgraph_step": 3,
+ "attributes": {
+ "gen_ai.conversation.id": "6f8d2449-33ed-4c7c-82e7-5410e34ee4e6",
+ "koog.node.name": "nodeSendToolResult",
+ "langfuse.observation.metadata.langgraph_node": "nodeSendToolResult",
+ "langfuse.observation.metadata.langgraph_step": "3"
+ },
+ "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": {}
+ }
+ },
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": "0.3.0",
+ "modelParameters": null,
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-08-26T19:41:05.305Z",
+ "updatedAt": "2025-08-26T19:41:05.324Z",
+ "usageDetails": {},
+ "costDetails": {},
+ "providedCostDetails": {},
+ "model": null,
+ "internalModelId": null,
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 1946,
+ "timeToFirstToken": null,
+ "inputCost": null,
+ "outputCost": null,
+ "totalCost": 0,
+ "inputUsage": 0,
+ "outputUsage": 0,
+ "totalUsage": 0,
+ "input": null,
+ "output": null
+ },
+ {
+ "id": "33188493784a060d",
+ "traceId": "dff173a675b759ce1b70e522b27d6846",
+ "projectId": "cmcmdwcag00c2ad077xp1qnyc",
+ "type": "SPAN",
+ "environment": "default",
+ "parentObservationId": "5555afb6655e4d44",
+ "startTime": "2025-08-26T19:41:02.023Z",
+ "endTime": "2025-08-26T19:41:03.037Z",
+ "name": "tool.ByeTool",
+ "metadata": {
+ "attributes": {
+ "input.value": {
+ "name": "Bob"
+ },
+ "output.value": "Bye my dear Bob!",
+ "gen_ai.tool.description": "A tool that says bye to the user",
+ "gen_ai.tool.call.id": "call_dOeEHJDI0liHrCdFWTpkTsuO",
+ "gen_ai.tool.name": "ByeTool"
+ },
+ "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": {}
+ }
+ },
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": "0.3.0",
+ "modelParameters": null,
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-08-26T19:41:03.511Z",
+ "updatedAt": "2025-08-26T19:41:03.531Z",
+ "usageDetails": {},
+ "costDetails": {},
+ "providedCostDetails": {},
+ "model": null,
+ "internalModelId": null,
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 1014,
+ "timeToFirstToken": null,
+ "inputCost": null,
+ "outputCost": null,
+ "totalCost": 0,
+ "inputUsage": 0,
+ "outputUsage": 0,
+ "totalUsage": 0,
+ "input": {
+ "name": "Bob"
+ },
+ "output": "Bye my dear Bob!"
+ },
+ {
+ "id": "66f269083a2fff81",
+ "traceId": "dff173a675b759ce1b70e522b27d6846",
+ "projectId": "cmcmdwcag00c2ad077xp1qnyc",
+ "type": "SPAN",
+ "environment": "default",
+ "parentObservationId": "5555afb6655e4d44",
+ "startTime": "2025-08-26T19:41:02.023Z",
+ "endTime": "2025-08-26T19:41:03.034Z",
+ "name": "tool.HelloTool",
+ "metadata": {
+ "attributes": {
+ "input.value": {
+ "name": "Bob"
+ },
+ "output.value": "Hello my darling Bob!",
+ "gen_ai.tool.description": "A tool greets the user",
+ "gen_ai.tool.call.id": "call_n2HaWg9KFP0BZDqXv6G4b3nJ",
+ "gen_ai.tool.name": "HelloTool"
+ },
+ "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": {}
+ }
+ },
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": "0.3.0",
+ "modelParameters": null,
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-08-26T19:41:03.431Z",
+ "updatedAt": "2025-08-26T19:41:03.479Z",
+ "usageDetails": {},
+ "costDetails": {},
+ "providedCostDetails": {},
+ "model": null,
+ "internalModelId": null,
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 1011,
+ "timeToFirstToken": null,
+ "inputCost": null,
+ "outputCost": null,
+ "totalCost": 0,
+ "inputUsage": 0,
+ "outputUsage": 0,
+ "totalUsage": 0,
+ "input": {
+ "name": "Bob"
+ },
+ "output": "Hello my darling Bob!"
+ },
+ {
+ "id": "5555afb6655e4d44",
+ "traceId": "dff173a675b759ce1b70e522b27d6846",
+ "projectId": "cmcmdwcag00c2ad077xp1qnyc",
+ "type": "SPAN",
+ "environment": "default",
+ "parentObservationId": "bb189bc3771ff83d",
+ "startTime": "2025-08-26T19:41:02.017Z",
+ "endTime": "2025-08-26T19:41:03.038Z",
+ "name": "node.nodeExecuteTool",
+ "metadata": {
+ "langgraph_node": "nodeExecuteTool",
+ "langgraph_step": 2,
+ "attributes": {
+ "gen_ai.conversation.id": "6f8d2449-33ed-4c7c-82e7-5410e34ee4e6",
+ "koog.node.name": "nodeExecuteTool",
+ "langfuse.observation.metadata.langgraph_node": "nodeExecuteTool",
+ "langfuse.observation.metadata.langgraph_step": "2"
+ },
+ "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": {}
+ }
+ },
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": "0.3.0",
+ "modelParameters": null,
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-08-26T19:41:03.432Z",
+ "updatedAt": "2025-08-26T19:41:03.456Z",
+ "usageDetails": {},
+ "costDetails": {},
+ "providedCostDetails": {},
+ "model": null,
+ "internalModelId": null,
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 1021,
+ "timeToFirstToken": null,
+ "inputCost": null,
+ "outputCost": null,
+ "totalCost": 0,
+ "inputUsage": 0,
+ "outputUsage": 0,
+ "totalUsage": 0,
+ "input": null,
+ "output": null
+ },
+ {
+ "id": "6a0770019fe7c2b4",
+ "traceId": "dff173a675b759ce1b70e522b27d6846",
+ "projectId": "cmcmdwcag00c2ad077xp1qnyc",
+ "type": "SPAN",
+ "environment": "default",
+ "parentObservationId": "bb189bc3771ff83d",
+ "startTime": "2025-08-26T19:40:59.171Z",
+ "endTime": "2025-08-26T19:41:02.017Z",
+ "name": "node.nodeCallLLM",
+ "metadata": {
+ "langgraph_node": "nodeCallLLM",
+ "langgraph_step": 1,
+ "attributes": {
+ "gen_ai.conversation.id": "6f8d2449-33ed-4c7c-82e7-5410e34ee4e6",
+ "koog.node.name": "nodeCallLLM",
+ "langfuse.observation.metadata.langgraph_node": "nodeCallLLM",
+ "langfuse.observation.metadata.langgraph_step": "1"
+ },
+ "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": {}
+ }
+ },
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": "0.3.0",
+ "modelParameters": null,
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-08-26T19:41:02.422Z",
+ "updatedAt": "2025-08-26T19:41:02.440Z",
+ "usageDetails": {},
+ "costDetails": {},
+ "providedCostDetails": {},
+ "model": null,
+ "internalModelId": null,
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 2846,
+ "timeToFirstToken": null,
+ "inputCost": null,
+ "outputCost": null,
+ "totalCost": 0,
+ "inputUsage": 0,
+ "outputUsage": 0,
+ "totalUsage": 0,
+ "input": null,
+ "output": null
+ },
+ {
+ "id": "042f9350c3729147",
+ "traceId": "dff173a675b759ce1b70e522b27d6846",
+ "projectId": "cmcmdwcag00c2ad077xp1qnyc",
+ "type": "GENERATION",
+ "environment": "default",
+ "parentObservationId": "6a0770019fe7c2b4",
+ "startTime": "2025-08-26T19:40:59.176Z",
+ "endTime": "2025-08-26T19:41:02.016Z",
+ "name": "llm.chat",
+ "metadata": {
+ "attributes": {
+ "gen_ai.completion.0.content": [
+ {
+ "function": {
+ "name": "HelloTool",
+ "arguments": {
+ "name": "Bob"
+ }
+ },
+ "id": "call_n2HaWg9KFP0BZDqXv6G4b3nJ",
+ "type": "function"
+ }
+ ],
+ "gen_ai.request.temperature": "1",
+ "gen_ai.prompt.0.role": "system",
+ "gen_ai.completion.0.role": "assistant",
+ "gen_ai.request.model": "gpt-4o",
+ "gen_ai.conversation.id": "6f8d2449-33ed-4c7c-82e7-5410e34ee4e6",
+ "gen_ai.completion.0.finish_reason": "tool_calls",
+ "gen_ai.prompt.0.content": "You are a nice and polite assistant.",
+ "gen_ai.prompt.1.role": "user",
+ "gen_ai.response.finish_reasons": [
+ "tool_calls"
+ ],
+ "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.completion.1.finish_reason": "tool_calls",
+ "gen_ai.system": "openai",
+ "gen_ai.completion.1.role": "assistant",
+ "gen_ai.completion.1.content": [
+ {
+ "function": {
+ "name": "ByeTool",
+ "arguments": {
+ "name": "Bob"
+ }
+ },
+ "id": "call_dOeEHJDI0liHrCdFWTpkTsuO",
+ "type": "function"
+ }
+ ],
+ "gen_ai.operation.name": "chat"
+ },
+ "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": {}
+ }
+ },
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": "0.3.0",
+ "modelParameters": {
+ "temperature": 1
+ },
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-08-26T19:41:02.328Z",
+ "updatedAt": "2025-08-26T19:41:02.356Z",
+ "usageDetails": {
+ "input": 47,
+ "output": 106,
+ "total": 153
+ },
+ "costDetails": {
+ "input": 0.0001175,
+ "output": 0.00106,
+ "total": 0.0011775
+ },
+ "providedCostDetails": {},
+ "model": "gpt-4o",
+ "internalModelId": "b9854a5c92dc496b997d99d20",
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 2840,
+ "timeToFirstToken": null,
+ "inputCost": 0.0001175,
+ "outputCost": 0.00106,
+ "totalCost": 0.0011775,
+ "inputUsage": 47,
+ "outputUsage": 106,
+ "totalUsage": 153,
+ "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."
+ }
+ ],
+ "output": [
+ {
+ "content": [
+ {
+ "function": {
+ "name": "HelloTool",
+ "arguments": {
+ "name": "Bob"
+ }
+ },
+ "id": "call_n2HaWg9KFP0BZDqXv6G4b3nJ",
+ "type": "function"
+ }
+ ],
+ "role": "assistant",
+ "finish_reason": "tool_calls"
+ },
+ {
+ "finish_reason": "tool_calls",
+ "role": "assistant",
+ "content": [
+ {
+ "function": {
+ "name": "ByeTool",
+ "arguments": {
+ "name": "Bob"
+ }
+ },
+ "id": "call_dOeEHJDI0liHrCdFWTpkTsuO",
+ "type": "function"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "id": "890e9114a4449257",
+ "traceId": "dff173a675b759ce1b70e522b27d6846",
+ "projectId": "cmcmdwcag00c2ad077xp1qnyc",
+ "type": "SPAN",
+ "environment": "default",
+ "parentObservationId": "bb189bc3771ff83d",
+ "startTime": "2025-08-26T19:40:59.153Z",
+ "endTime": "2025-08-26T19:40:59.153Z",
+ "name": "node.__start__",
+ "metadata": {
+ "langgraph_node": "__start__",
+ "langgraph_step": 0,
+ "attributes": {
+ "gen_ai.conversation.id": "6f8d2449-33ed-4c7c-82e7-5410e34ee4e6",
+ "koog.node.name": "__start__",
+ "langfuse.observation.metadata.langgraph_node": "__start__",
+ "langfuse.observation.metadata.langgraph_step": "0"
+ },
+ "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": {}
+ }
+ },
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": "0.3.0",
+ "modelParameters": null,
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-08-26T19:40:59.897Z",
+ "updatedAt": "2025-08-26T19:40:59.915Z",
+ "usageDetails": {},
+ "costDetails": {},
+ "providedCostDetails": {},
+ "model": null,
+ "internalModelId": null,
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 0,
+ "timeToFirstToken": null,
+ "inputCost": null,
+ "outputCost": null,
+ "totalCost": 0,
+ "inputUsage": 0,
+ "outputUsage": 0,
+ "totalUsage": 0,
+ "input": null,
+ "output": null
+ }
+ ]
+}
\ 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.json
new file mode 100644
index 0000000000..ea56649106
--- /dev/null
+++ b/packages/shared/scripts/seeder/utils/framework-traces/llamaindex-2025-06-05.json
@@ -0,0 +1,182 @@
+{
+ "trace": {
+ "id": "12ea412956f99347b0503c1144acd0ec",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "name": "llama-index-trace",
+ "timestamp": "2025-06-05T15:45:52.971Z",
+ "environment": "default",
+ "tags": [
+ "llama-index",
+ "rag"
+ ],
+ "bookmarked": false,
+ "release": null,
+ "version": "1.0.0",
+ "userId": "user_123",
+ "sessionId": "session_abc",
+ "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\"}}}",
+ "createdAt": "2025-06-05T15:45:56.000Z",
+ "updatedAt": "2025-06-05T15:45:56.029Z",
+ "scores": [],
+ "latency": 2.779
+ },
+ "observations": [
+ {
+ "id": "3344aabdd4e66110",
+ "traceId": "12ea412956f99347b0503c1144acd0ec",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "type": "SPAN",
+ "environment": "default",
+ "parentObservationId": null,
+ "startTime": "2025-06-05T15:45:52.971Z",
+ "endTime": "2025-06-05T15:45:55.750Z",
+ "name": "llama-index-trace",
+ "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"
+ }
+ }
+ },
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": "1.0.0",
+ "modelParameters": null,
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-06-05T15:45:55.996Z",
+ "updatedAt": "2025-06-05T15:45:56.027Z",
+ "usageDetails": {},
+ "costDetails": {},
+ "providedCostDetails": {},
+ "model": null,
+ "internalModelId": null,
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 2779,
+ "timeToFirstToken": null,
+ "inputCost": null,
+ "outputCost": null,
+ "totalCost": 0,
+ "inputUsage": 0,
+ "outputUsage": 0,
+ "totalUsage": 0,
+ "input": null,
+ "output": null
+ },
+ {
+ "id": "7ca8b22f6628d0c7",
+ "traceId": "12ea412956f99347b0503c1144acd0ec",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "type": "GENERATION",
+ "environment": "default",
+ "parentObservationId": "3344aabdd4e66110",
+ "startTime": "2025-06-05T15:45:52.971Z",
+ "endTime": "2025-06-05T15:45:55.747Z",
+ "name": "OpenAI.complete",
+ "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": {}
+ }
+ },
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": null,
+ "modelParameters": {
+ "context_window": 128000,
+ "num_output": -1,
+ "is_chat_model": true,
+ "is_function_calling_model": true,
+ "model_name": "gpt-4o",
+ "system_role": "system"
+ },
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-06-05T15:45:55.866Z",
+ "updatedAt": "2025-06-05T15:45:56.021Z",
+ "usageDetails": {
+ "input": 13,
+ "prompt_details.cache_read": 0,
+ "prompt_details.audio": 0,
+ "output": 81,
+ "completion_details.reasoning": 0,
+ "completion_details.audio": 0,
+ "total": 94
+ },
+ "costDetails": {
+ "input": 0.0000325,
+ "output": 0.00081,
+ "total": 0.000842499999
+ },
+ "providedCostDetails": {},
+ "model": "gpt-4o",
+ "internalModelId": "b9854a5c92dc496b997d99d20",
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 2776,
+ "timeToFirstToken": null,
+ "inputCost": 0.0000325,
+ "outputCost": 0.00081,
+ "totalCost": 0.000842499999,
+ "inputUsage": 13,
+ "outputUsage": 81,
+ "totalUsage": 94,
+ "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."
+ }
+ ]
+}
\ No newline at end of file
diff --git a/packages/shared/scripts/seeder/utils/framework-traces/merge-observations.ts b/packages/shared/scripts/seeder/utils/framework-traces/merge-observations.ts
new file mode 100644
index 0000000000..5bd376b105
--- /dev/null
+++ b/packages/shared/scripts/seeder/utils/framework-traces/merge-observations.ts
@@ -0,0 +1,67 @@
+import { readFileSync, writeFileSync } from "fs";
+
+/**
+ * Merges detailed observation data (input/output/metadata) into the base trace file.
+ * how to use? SEE README.md
+ *
+ * Usage: ts-node merge-observations.ts <base-file> <detailed-obs-file> <output-file>
+ *
+ * Example:
+ * ts-node merge-observations.ts pydantic-base.json pydantic-details.json pydantic-ai.json
+ *
+ */
+
+const [baseFile, detailedFile, outputFile] = process.argv.slice(2);
+
+if (!baseFile || !detailedFile || !outputFile) {
+ console.error(
+ "Usage: ts-node merge-observations.ts <base-file> <detailed-obs-file> <output-file>",
+ );
+ process.exit(1);
+}
+
+const baseData = JSON.parse(readFileSync(baseFile, "utf-8"));
+const detailedObs = JSON.parse(readFileSync(detailedFile, "utf-8"));
+
+// Build ID to detailed observation map
+const obsMap = new Map<string, any>();
+for (const obs of Object.values(detailedObs)) {
+ obsMap.set((obs as any).id, obs);
+}
+
+// Merge input/output/metadata into observations array
+const mergedObservations = baseData.observations.map((obs: any) => {
+ const detailed = obsMap.get(obs.id);
+ if (detailed) {
+ return {
+ ...obs,
+ input: detailed.input,
+ output: detailed.output,
+ metadata: detailed.metadata,
+ };
+ }
+ return obs;
+});
+
+// demo project
+const PROJECT_ID = "7a88fb47-b4e2-43b8-a06c-a5ce950dc53a";
+
+// Remove observations from trace, create final structure
+const output = {
+ trace: {
+ ...baseData.trace,
+ projectId: PROJECT_ID,
+ },
+ observations: mergedObservations.map((obs: any) => ({
+ ...obs,
+ projectId: PROJECT_ID,
+ })),
+};
+
+// Remove observations array from trace if it exists
+delete (output.trace as any).observations;
+
+writeFileSync(outputFile, JSON.stringify(output, null, 2));
+
+console.log(`Merged ${mergedObservations.length} observations`);
+console.log(`Wrote to ${outputFile}`);
diff --git a/packages/shared/scripts/seeder/utils/framework-traces/openai-agents-2025-09-30.json b/packages/shared/scripts/seeder/utils/framework-traces/openai-agents-2025-09-30.json
new file mode 100644
index 0000000000..b53912cfd1
--- /dev/null
+++ b/packages/shared/scripts/seeder/utils/framework-traces/openai-agents-2025-09-30.json
@@ -0,0 +1,931 @@
+{
+ "trace": {
+ "id": "fee618f96dc31e0ca38b2f7b26eb8b29",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "name": "Agent workflow",
+ "timestamp": "2025-09-30T09:03:59.962Z",
+ "environment": "default",
+ "tags": [],
+ "bookmarked": false,
+ "release": null,
+ "version": null,
+ "userId": null,
+ "sessionId": null,
+ "public": true,
+ "input": null,
+ "output": null,
+ "metadata": "{\"attributes\":{\"openinference.span.kind\":\"AGENT\"},\"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\":{}}}",
+ "createdAt": "2025-09-30T09:04:03.000Z",
+ "updatedAt": "2025-09-30T09:04:07.465Z",
+ "scores": [
+ {
+ "id": "0721bd4f-a35c-4d29-a2c6-38879e1d758e",
+ "timestamp": "2025-09-30T09:04:30.125Z",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "environment": "default",
+ "name": "toxicity",
+ "source": "EVAL",
+ "authorUserId": null,
+ "comment": "The generation contains aggressive and dismissive language that undermines trust in professionals and promotes a negative view of the public's intelligence, which is harmful and disrespectful.",
+ "metadata": "{}",
+ "configId": null,
+ "createdAt": "2025-09-30T09:04:31.000Z",
+ "updatedAt": "2025-09-30T09:04:30.197Z",
+ "queueId": null,
+ "traceId": "fee618f96dc31e0ca38b2f7b26eb8b29",
+ "observationId": null,
+ "sessionId": null,
+ "datasetRunId": null,
+ "value": 0.8,
+ "stringValue": null,
+ "dataType": "NUMERIC"
+ },
+ {
+ "id": "f60dc1c4-17af-4512-ada9-f2440f437ce1",
+ "timestamp": "2025-09-30T09:04:28.687Z",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "environment": "default",
+ "name": "hallucination",
+ "source": "EVAL",
+ "authorUserId": null,
+ "comment": "There is no specific generation provided to evaluate for hallucination. Therefore, it is impossible to assess or score the degree of hallucination in this case.",
+ "metadata": "{}",
+ "configId": null,
+ "createdAt": "2025-09-30T09:04:29.000Z",
+ "updatedAt": "2025-09-30T09:04:28.773Z",
+ "queueId": null,
+ "traceId": "fee618f96dc31e0ca38b2f7b26eb8b29",
+ "observationId": null,
+ "sessionId": null,
+ "datasetRunId": null,
+ "value": 0,
+ "stringValue": null,
+ "dataType": "NUMERIC"
+ }
+ ],
+ "latency": 2.19
+ },
+ "observations": [
+ {
+ "id": "e5a76f27f51ad40e",
+ "traceId": "fee618f96dc31e0ca38b2f7b26eb8b29",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "type": "AGENT",
+ "environment": "default",
+ "parentObservationId": null,
+ "startTime": "2025-09-30T09:03:59.962Z",
+ "endTime": "2025-09-30T09:04:02.152Z",
+ "name": "Agent workflow",
+ "metadata": {
+ "attributes": {
+ "openinference.span.kind": "AGENT"
+ },
+ "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": {}
+ }
+ },
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": null,
+ "modelParameters": {},
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-09-30T09:04:07.382Z",
+ "updatedAt": "2025-09-30T09:04:07.382Z",
+ "usageDetails": {},
+ "costDetails": {},
+ "providedCostDetails": {},
+ "model": null,
+ "internalModelId": null,
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 2190,
+ "timeToFirstToken": null,
+ "inputCost": null,
+ "outputCost": null,
+ "totalCost": 0,
+ "inputUsage": 0,
+ "outputUsage": 0,
+ "totalUsage": 0,
+ "input": null,
+ "output": null
+ },
+ {
+ "id": "d950b668796240b5",
+ "traceId": "fee618f96dc31e0ca38b2f7b26eb8b29",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "type": "AGENT",
+ "environment": "default",
+ "parentObservationId": "e5a76f27f51ad40e",
+ "startTime": "2025-09-30T09:03:59.962Z",
+ "endTime": "2025-09-30T09:04:02.152Z",
+ "name": "Hello world",
+ "metadata": {
+ "attributes": {
+ "llm.system": "openai",
+ "graph.node.id": "Hello world",
+ "openinference.span.kind": "AGENT"
+ },
+ "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": {}
+ }
+ },
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": null,
+ "modelParameters": {},
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-09-30T09:04:07.382Z",
+ "updatedAt": "2025-09-30T09:04:07.382Z",
+ "usageDetails": {},
+ "costDetails": {},
+ "providedCostDetails": {},
+ "model": null,
+ "internalModelId": null,
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 2190,
+ "timeToFirstToken": null,
+ "inputCost": null,
+ "outputCost": null,
+ "totalCost": 0,
+ "inputUsage": 0,
+ "outputUsage": 0,
+ "totalUsage": 0,
+ "input": null,
+ "output": null
+ },
+ {
+ "id": "90d94774e8e3724d",
+ "traceId": "fee618f96dc31e0ca38b2f7b26eb8b29",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "type": "GENERATION",
+ "environment": "default",
+ "parentObservationId": "d950b668796240b5",
+ "startTime": "2025-09-30T09:04:01.001Z",
+ "endTime": "2025-09-30T09:04:02.151Z",
+ "name": "response",
+ "metadata": {
+ "attributes": {
+ "llm.system": "openai",
+ "output.mime_type": "application/json",
+ "output.value": {
+ "id": "resp_0f00ca5b7e22bb4c0068db9d0110d8819da676bd1f2dd03a40",
+ "created_at": 1759223041,
+ "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,
+ "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,
+ "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,
+ "instructions": "You are a helpful agent.",
+ "metadata": {},
+ "model": "gpt-4.1-2025-04-14",
+ "parallel_tool_calls": true,
+ "temperature": 1,
+ "tool_choice": "auto",
+ "top_p": 1,
+ "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": {}
+ }
+ },
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": null,
+ "modelParameters": {
+ "id": "resp_0f00ca5b7e22bb4c0068db9d0110d8819da676bd1f2dd03a40",
+ "created_at": 1759223041,
+ "instructions": "You are a helpful agent.",
+ "metadata": "{}",
+ "model": "gpt-4.1-2025-04-14",
+ "parallel_tool_calls": "true",
+ "temperature": 1,
+ "tool_choice": "auto",
+ "top_p": 1,
+ "background": "false",
+ "reasoning": "{}",
+ "service_tier": "default",
+ "text": "{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"}",
+ "top_logprobs": 0,
+ "truncation": "disabled",
+ "billing": "{\"payer\":\"developer\"}",
+ "store": "true"
+ },
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-09-30T09:04:07.382Z",
+ "updatedAt": "2025-09-30T09:04:07.382Z",
+ "usageDetails": {
+ "output": 29,
+ "input": 85,
+ "total": 114,
+ "prompt_details.cache_read": 0,
+ "completion_details.reasoning": 0
+ },
+ "costDetails": {
+ "output": 0.000232,
+ "input": 0.00017,
+ "total": 0.000402
+ },
+ "providedCostDetails": {},
+ "model": "gpt-4.1-2025-04-14",
+ "internalModelId": "cm7qahw732891bpmzy45r3x70",
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 1150,
+ "timeToFirstToken": null,
+ "inputCost": 0.00017,
+ "outputCost": 0.000232,
+ "totalCost": 0.000402,
+ "inputUsage": 85,
+ "outputUsage": 29,
+ "totalUsage": 114,
+ "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,
+ "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,
+ "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,
+ "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
+ }
+ },
+ {
+ "id": "98870087af69bf06",
+ "traceId": "fee618f96dc31e0ca38b2f7b26eb8b29",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "type": "GENERATION",
+ "environment": "default",
+ "parentObservationId": "d950b668796240b5",
+ "startTime": "2025-09-30T09:03:59.963Z",
+ "endTime": "2025-09-30T09:04:00.999Z",
+ "name": "response",
+ "metadata": {
+ "attributes": {
+ "llm.system": "openai",
+ "output.mime_type": "application/json",
+ "output.value": {
+ "id": "resp_0f00ca5b7e22bb4c0068db9d000be4819d824c447c54b65bc1",
+ "created_at": 1759223040,
+ "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,
+ "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,
+ "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,
+ "instructions": "You are a helpful agent.",
+ "metadata": {},
+ "model": "gpt-4.1-2025-04-14",
+ "parallel_tool_calls": true,
+ "temperature": 1,
+ "tool_choice": "auto",
+ "top_p": 1,
+ "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": {}
+ }
+ },
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": null,
+ "modelParameters": {
+ "id": "resp_0f00ca5b7e22bb4c0068db9d000be4819d824c447c54b65bc1",
+ "created_at": 1759223040,
+ "instructions": "You are a helpful agent.",
+ "metadata": "{}",
+ "model": "gpt-4.1-2025-04-14",
+ "parallel_tool_calls": "true",
+ "temperature": 1,
+ "tool_choice": "auto",
+ "top_p": 1,
+ "background": "false",
+ "reasoning": "{}",
+ "service_tier": "default",
+ "text": "{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"}",
+ "top_logprobs": 0,
+ "truncation": "disabled",
+ "billing": "{\"payer\":\"developer\"}",
+ "store": "true"
+ },
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-09-30T09:04:02.217Z",
+ "updatedAt": "2025-09-30T09:04:02.217Z",
+ "usageDetails": {
+ "output": 15,
+ "input": 55,
+ "total": 70,
+ "prompt_details.cache_read": 0,
+ "completion_details.reasoning": 0
+ },
+ "costDetails": {
+ "output": 0.00012,
+ "input": 0.00011,
+ "total": 0.00023
+ },
+ "providedCostDetails": {},
+ "model": "gpt-4.1-2025-04-14",
+ "internalModelId": "cm7qahw732891bpmzy45r3x70",
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 1036,
+ "timeToFirstToken": null,
+ "inputCost": 0.00011,
+ "outputCost": 0.00012,
+ "totalCost": 0.00023,
+ "inputUsage": 55,
+ "outputUsage": 15,
+ "totalUsage": 70,
+ "input": [
+ {
+ "content": "What's the weather in Tokyo?",
+ "role": "user"
+ }
+ ],
+ "output": {
+ "id": "resp_0f00ca5b7e22bb4c0068db9d000be4819d824c447c54b65bc1",
+ "created_at": 1759223040,
+ "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,
+ "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,
+ "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
+ }
+ },
+ {
+ "id": "5b99c3e3411ed17b",
+ "traceId": "fee618f96dc31e0ca38b2f7b26eb8b29",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "type": "TOOL",
+ "environment": "default",
+ "parentObservationId": "d950b668796240b5",
+ "startTime": "2025-09-30T09:04:01.000Z",
+ "endTime": "2025-09-30T09:04:01.000Z",
+ "name": "get_weather",
+ "metadata": {
+ "attributes": {
+ "llm.system": "openai",
+ "tool.name": "get_weather",
+ "input.value": {
+ "city": "Tokyo"
+ },
+ "input.mime_type": "application/json",
+ "output.value": "The weather in Tokyo is sunny.",
+ "openinference.span.kind": "TOOL"
+ },
+ "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": {}
+ }
+ },
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": null,
+ "modelParameters": {},
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-09-30T09:04:02.217Z",
+ "updatedAt": "2025-09-30T09:04:02.217Z",
+ "usageDetails": {},
+ "costDetails": {},
+ "providedCostDetails": {},
+ "model": null,
+ "internalModelId": null,
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 0,
+ "timeToFirstToken": null,
+ "inputCost": null,
+ "outputCost": null,
+ "totalCost": 0,
+ "inputUsage": 0,
+ "outputUsage": 0,
+ "totalUsage": 0,
+ "input": {
+ "city": "Tokyo"
+ },
+ "output": "The weather in Tokyo is sunny."
+ }
+ ]
+}
diff --git a/packages/shared/scripts/seeder/utils/framework-traces/openai-assistants-2024-05-29.json b/packages/shared/scripts/seeder/utils/framework-traces/openai-assistants-2024-05-29.json
new file mode 100644
index 0000000000..a6de8a49c1
--- /dev/null
+++ b/packages/shared/scripts/seeder/utils/framework-traces/openai-assistants-2024-05-29.json
@@ -0,0 +1,338 @@
+{
+ "trace": {
+ "id": "b3b7b128-5664-4f42-9fab-31999da9e2f1",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "name": "run_math_tutor",
+ "timestamp": "2024-05-29T13:46:10.728Z",
+ "environment": "default",
+ "tags": [],
+ "bookmarked": false,
+ "release": null,
+ "version": null,
+ "userId": null,
+ "sessionId": null,
+ "public": true,
+ "input": "\"{\\\"args\\\":[\\\"I need to solve the equation `3x + 11 = 14`. Can you help me?\\\"],\\\"kwargs\\\":{}}\"",
+ "output": "\"\\\"Sure, first subtract 11 from both sides to get `3x = 3`, then divide both sides by 3 to solve for `x`. The solution is `x = 1`.\\\"\"",
+ "metadata": "{}",
+ "createdAt": "2024-05-29T13:46:11.304Z",
+ "updatedAt": "2024-05-29T13:46:34.171Z",
+ "latency": 9.236
+ },
+ "observations": [
+ {
+ "id": "0d8f5427-c91a-44c8-86c5-e12d806edd57",
+ "traceId": "b3b7b128-5664-4f42-9fab-31999da9e2f1",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "type": "GENERATION",
+ "environment": "default",
+ "parentObservationId": "0d6c73e1-be16-436d-a905-b4108912fa93",
+ "startTime": "2024-05-29T13:46:19.963Z",
+ "endTime": null,
+ "name": "",
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": null,
+ "modelParameters": null,
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2024-05-29T13:46:20.714Z",
+ "updatedAt": "2024-05-29T13:46:20.714Z",
+ "usageDetails": {
+ "input": 49,
+ "output": 40,
+ "total": 89
+ },
+ "costDetails": {
+ "input": 0.00147,
+ "output": 0.0024,
+ "total": 0.00387
+ },
+ "providedCostDetails": {
+ "input": 0,
+ "output": 0,
+ "total": 0
+ },
+ "model": "gpt-4",
+ "internalModelId": "clrntkjgy000f08jx79v9g1xj",
+ "promptName": null,
+ "promptVersion": null,
+ "latency": null,
+ "timeToFirstToken": null,
+ "inputCost": 0.00147,
+ "outputCost": 0.0024,
+ "totalCost": 0.00387,
+ "inputUsage": 49,
+ "outputUsage": 40,
+ "totalUsage": 89,
+ "input": [
+ {
+ "role": "assistant",
+ "content": "I am a math tutor that likes to help math students, how can I help?"
+ },
+ {
+ "role": "user",
+ "content": "I need to solve the equation `3x + 11 = 14`. Can you help me?"
+ }
+ ],
+ "output": "Sure, first subtract 11 from both sides to get `3x = 3`, then divide both sides by 3 to solve for `x`. The solution is `x = 1`.",
+ "metadata": {}
+ },
+ {
+ "id": "0d6c73e1-be16-436d-a905-b4108912fa93",
+ "traceId": "b3b7b128-5664-4f42-9fab-31999da9e2f1",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "type": "SPAN",
+ "environment": "default",
+ "parentObservationId": null,
+ "startTime": "2024-05-29T13:46:17.971Z",
+ "endTime": "2024-05-29T13:46:19.964Z",
+ "name": "get_response",
+ "metadata": "{}",
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": null,
+ "modelParameters": null,
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2024-05-29T13:46:18.345Z",
+ "updatedAt": "2024-05-29T13:46:20.796Z",
+ "usageDetails": {
+ "input": 0,
+ "output": 0,
+ "total": 0
+ },
+ "costDetails": {
+ "input": 0,
+ "output": 0,
+ "total": 0
+ },
+ "providedCostDetails": {
+ "input": 0,
+ "output": 0,
+ "total": 0
+ },
+ "model": null,
+ "internalModelId": null,
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 1993,
+ "timeToFirstToken": null,
+ "inputCost": 0,
+ "outputCost": 0,
+ "totalCost": 0,
+ "inputUsage": 0,
+ "outputUsage": 0,
+ "totalUsage": 0,
+ "input": {
+ "args": [
+ "thread_fbFB5caAj0sEpE1c5ICMDs7I",
+ "run_RsJmiMTrgkBzb3FvyCvRoqpd"
+ ],
+ "kwargs": {}
+ },
+ "output": [
+ "Sure, first subtract 11 from both sides to get `3x = 3`, then divide both sides by 3 to solve for `x`. The solution is `x = 1`.",
+ {
+ "id": "run_AherTwpS29w0GC8zlKDBhhlZ",
+ "model": "gpt-4",
+ "tools": [],
+ "top_p": 1,
+ "usage": null,
+ "object": "thread.run",
+ "status": "queued",
+ "metadata": {},
+ "failed_at": null,
+ "thread_id": "thread_DhsY59BBhtKWN8YYq44cULrH",
+ "created_at": 1716990330,
+ "expires_at": 1716990930,
+ "last_error": null,
+ "started_at": null,
+ "temperature": 1,
+ "tool_choice": "auto",
+ "assistant_id": "asst_tjgFtRASnPoQaWpks1ezPfSp",
+ "cancelled_at": null,
+ "completed_at": null,
+ "instructions": "You are a personal math tutor. Answer questions briefly, in a sentence or less.",
+ "tool_resources": {},
+ "required_action": null,
+ "response_format": "auto",
+ "max_prompt_tokens": null,
+ "incomplete_details": null,
+ "truncation_strategy": {
+ "type": "auto",
+ "last_messages": null
+ },
+ "max_completion_tokens": null
+ }
+ ]
+ },
+ {
+ "id": "e584f95b-e8ef-4d43-bcb1-fd296f57f94b",
+ "traceId": "b3b7b128-5664-4f42-9fab-31999da9e2f1",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "type": "SPAN",
+ "environment": "default",
+ "parentObservationId": null,
+ "startTime": "2024-05-29T13:46:11.057Z",
+ "endTime": "2024-05-29T13:46:12.959Z",
+ "name": "run_assistant",
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": null,
+ "modelParameters": null,
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2024-05-29T13:46:11.480Z",
+ "updatedAt": "2024-05-29T13:46:13.161Z",
+ "usageDetails": {
+ "input": 0,
+ "output": 0,
+ "total": 0
+ },
+ "costDetails": {
+ "input": 0,
+ "output": 0,
+ "total": 0
+ },
+ "providedCostDetails": {
+ "input": 0,
+ "output": 0,
+ "total": 0
+ },
+ "model": null,
+ "internalModelId": null,
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 1902,
+ "timeToFirstToken": null,
+ "inputCost": 0,
+ "outputCost": 0,
+ "totalCost": 0,
+ "inputUsage": 0,
+ "outputUsage": 0,
+ "totalUsage": 0,
+ "input": {
+ "args": [
+ "asst_01wKwjx3rT7CNprPxzE8azMl",
+ "I need to solve the equation `3x + 11 = 14`. Can you help me?"
+ ],
+ "kwargs": {}
+ },
+ "output": [
+ {
+ "id": "run_RsJmiMTrgkBzb3FvyCvRoqpd",
+ "model": "gpt-4",
+ "tools": [],
+ "top_p": 1,
+ "usage": null,
+ "object": "thread.run",
+ "status": "queued",
+ "metadata": {},
+ "failed_at": null,
+ "thread_id": "thread_fbFB5caAj0sEpE1c5ICMDs7I",
+ "created_at": 1716990372,
+ "expires_at": 1716990972,
+ "last_error": null,
+ "started_at": null,
+ "temperature": 1,
+ "tool_choice": "auto",
+ "assistant_id": "asst_01wKwjx3rT7CNprPxzE8azMl",
+ "cancelled_at": null,
+ "completed_at": null,
+ "instructions": "You are a personal math tutor. Answer questions briefly, in a sentence or less.",
+ "tool_resources": {},
+ "required_action": null,
+ "response_format": "auto",
+ "max_prompt_tokens": null,
+ "incomplete_details": null,
+ "truncation_strategy": {
+ "type": "auto",
+ "last_messages": null
+ },
+ "max_completion_tokens": null
+ },
+ {
+ "id": "thread_fbFB5caAj0sEpE1c5ICMDs7I",
+ "object": "thread",
+ "metadata": {},
+ "created_at": 1716990371,
+ "tool_resources": {
+ "file_search": null,
+ "code_interpreter": null
+ }
+ }
+ ],
+ "metadata": {}
+ },
+ {
+ "id": "be59b862-98dd-4b0e-b92e-c150b9777c2f",
+ "traceId": "b3b7b128-5664-4f42-9fab-31999da9e2f1",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "type": "SPAN",
+ "environment": "default",
+ "parentObservationId": null,
+ "startTime": "2024-05-29T13:46:10.728Z",
+ "endTime": "2024-05-29T13:46:11.056Z",
+ "name": "create_assistant",
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": null,
+ "modelParameters": null,
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2024-05-29T13:46:11.350Z",
+ "updatedAt": "2024-05-29T13:46:11.405Z",
+ "usageDetails": {
+ "input": 0,
+ "output": 0,
+ "total": 0
+ },
+ "costDetails": {
+ "input": 0,
+ "output": 0,
+ "total": 0
+ },
+ "providedCostDetails": {
+ "input": 0,
+ "output": 0,
+ "total": 0
+ },
+ "model": null,
+ "internalModelId": null,
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 328,
+ "timeToFirstToken": null,
+ "inputCost": 0,
+ "outputCost": 0,
+ "totalCost": 0,
+ "inputUsage": 0,
+ "outputUsage": 0,
+ "totalUsage": 0,
+ "input": {
+ "args": [],
+ "kwargs": {}
+ },
+ "output": {
+ "id": "asst_01wKwjx3rT7CNprPxzE8azMl",
+ "name": "Math Tutor",
+ "model": "gpt-4",
+ "tools": [],
+ "top_p": 1,
+ "object": "assistant",
+ "metadata": {},
+ "created_at": 1716990370,
+ "description": null,
+ "temperature": 1,
+ "instructions": "You are a personal math tutor. Answer questions briefly, in a sentence or less.",
+ "tool_resources": {
+ "file_search": null,
+ "code_interpreter": null
+ },
+ "response_format": "auto"
+ },
+ "metadata": {}
+ }
+ ]
+}
diff --git a/packages/shared/scripts/seeder/utils/framework-traces/pydantic-ai-trace-2025-06-06.json b/packages/shared/scripts/seeder/utils/framework-traces/pydantic-ai-trace-2025-06-06.json
new file mode 100644
index 0000000000..17958d1c71
--- /dev/null
+++ b/packages/shared/scripts/seeder/utils/framework-traces/pydantic-ai-trace-2025-06-06.json
@@ -0,0 +1,312 @@
+{
+ "trace": {
+ "id": "25f4bdeebaab60e6e1bee7e8469554bc",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "name": "pydantic-ai-qa-trace",
+ "timestamp": "2025-06-06T14:40:28.562Z",
+ "environment": "default",
+ "tags": ["dev", "pydantic-ai"],
+ "bookmarked": false,
+ "release": null,
+ "version": "1.0.0",
+ "userId": "user_123",
+ "sessionId": "session_abc",
+ "public": true,
+ "input": "\"What is Langfuse?\"",
+ "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.\"",
+ "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\"}}}",
+ "createdAt": "2025-06-06T14:40:34.000Z",
+ "updatedAt": "2025-06-06T14:40:33.635Z",
+ "latency": 4.795
+ },
+ "observations": [
+ {
+ "id": "538fed87d11686d3",
+ "traceId": "25f4bdeebaab60e6e1bee7e8469554bc",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "type": "SPAN",
+ "environment": "default",
+ "parentObservationId": null,
+ "startTime": "2025-06-06T14:40:28.562Z",
+ "endTime": "2025-06-06T14:40:33.357Z",
+ "name": "pydantic-ai-qa-trace",
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": "1.0.0",
+ "modelParameters": null,
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-06-06T14:40:33.595Z",
+ "updatedAt": "2025-06-06T14:40:33.630Z",
+ "usageDetails": {},
+ "costDetails": {},
+ "providedCostDetails": {},
+ "model": null,
+ "internalModelId": null,
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 4795,
+ "timeToFirstToken": null,
+ "inputCost": null,
+ "outputCost": null,
+ "totalCost": 0,
+ "inputUsage": 0,
+ "outputUsage": 0,
+ "totalUsage": 0,
+ "input": null,
+ "output": null,
+ "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"
+ }
+ }
+ }
+ },
+ {
+ "id": "0a4fac2553f22f2e",
+ "traceId": "25f4bdeebaab60e6e1bee7e8469554bc",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "type": "SPAN",
+ "environment": "default",
+ "parentObservationId": "538fed87d11686d3",
+ "startTime": "2025-06-06T14:40:28.562Z",
+ "endTime": "2025-06-06T14:40:33.357Z",
+ "name": "qa_agent run",
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": null,
+ "modelParameters": null,
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-06-06T14:40:33.596Z",
+ "updatedAt": "2025-06-06T14:40:33.641Z",
+ "usageDetails": {},
+ "costDetails": {},
+ "providedCostDetails": {},
+ "model": null,
+ "internalModelId": null,
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 4795,
+ "timeToFirstToken": null,
+ "inputCost": null,
+ "outputCost": null,
+ "totalCost": 0,
+ "inputUsage": 0,
+ "outputUsage": 0,
+ "totalUsage": 0,
+ "input": null,
+ "output": [
+ {
+ "content": "You are a helpful assistant that answers questions clearly and concisely.",
+ "role": "system",
+ "gen_ai.message.index": 0,
+ "event.name": "gen_ai.system.message"
+ },
+ {
+ "content": "What is Langfuse?",
+ "role": "user",
+ "gen_ai.message.index": 0,
+ "event.name": "gen_ai.user.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.message.index": 1,
+ "event.name": "gen_ai.assistant.message"
+ }
+ ],
+ "metadata": {
+ "attributes": {
+ "model_name": "gpt-4o",
+ "agent_name": "qa_agent",
+ "logfire.msg": "qa_agent run",
+ "final_result": "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.usage.input_tokens": "31",
+ "gen_ai.usage.output_tokens": "96",
+ "all_messages_events": [
+ {
+ "content": "You are a helpful assistant that answers questions clearly and concisely.",
+ "role": "system",
+ "gen_ai.message.index": 0,
+ "event.name": "gen_ai.system.message"
+ },
+ {
+ "content": "What is Langfuse?",
+ "role": "user",
+ "gen_ai.message.index": 0,
+ "event.name": "gen_ai.user.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.message.index": 1,
+ "event.name": "gen_ai.assistant.message"
+ }
+ ],
+ "logfire.json_schema": {
+ "type": "object",
+ "properties": {
+ "all_messages_events": {
+ "type": "array"
+ },
+ "final_result": {
+ "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": {}
+ }
+ }
+ },
+ {
+ "id": "5cb389a3bdd21a6e",
+ "traceId": "25f4bdeebaab60e6e1bee7e8469554bc",
+ "projectId": "cloramnkj0002jz088vzn1ja4",
+ "type": "GENERATION",
+ "environment": "default",
+ "parentObservationId": "0a4fac2553f22f2e",
+ "startTime": "2025-06-06T14:40:28.562Z",
+ "endTime": "2025-06-06T14:40:33.356Z",
+ "name": "chat gpt-4o",
+ "level": "DEFAULT",
+ "statusMessage": null,
+ "version": null,
+ "modelParameters": {},
+ "completionStartTime": null,
+ "promptId": null,
+ "createdAt": "2025-06-06T14:40:33.440Z",
+ "updatedAt": "2025-06-06T14:40:33.478Z",
+ "usageDetails": {
+ "input": 31,
+ "output": 96,
+ "total": 127
+ },
+ "costDetails": {
+ "input": 0.0000775,
+ "output": 0.00096,
+ "total": 0.0010375
+ },
+ "providedCostDetails": {},
+ "model": "gpt-4o",
+ "internalModelId": "b9854a5c92dc496b997d99d20",
+ "promptName": null,
+ "promptVersion": null,
+ "latency": 4794,
+ "timeToFirstToken": null,
+ "inputCost": 0.0000775,
+ "outputCost": 0.00096,
+ "totalCost": 0.0010375,
+ "inputUsage": 31,
+ "outputUsage": 96,
+ "totalUsage": 127,
+ "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": {}
+ }
+ }
+ }
+ ]
+}
diff --git a/packages/shared/scripts/seeder/utils/seeder-orchestrator.ts b/packages/shared/scripts/seeder/utils/seeder-orchestrator.ts
index 8f58b18111..92784eae93 100644
--- a/packages/shared/scripts/seeder/utils/seeder-orchestrator.ts
+++ b/packages/shared/scripts/seeder/utils/seeder-orchestrator.ts
@@ -1,6 +1,7 @@
import { FileContent, SeederOptions } from "./types";
import { DataGenerator } from "./data-generators";
import { ClickHouseQueryBuilder } from "./clickhouse-builder";
+import { FrameworkTraceLoader } from "./framework-traces/framework-trace-loader";
import { EVAL_TRACE_COUNT, SEED_DATASETS } from "./postgres-seed-constants";
import {
clickhouseClient,
@@ -324,6 +325,9 @@ export class SeederOrchestrator {
// Create traces for a realistic chat session
await this.createSupportChatSessionTraces(projectIds);
+ // create traces from real examples for each framework source
+ await this.createFrameworkTraces(projectIds);
+
// Log completion statistics (commented out to reduce terminal noise)
await this.logStatistics();
@@ -404,4 +408,34 @@ export class SeederOrchestrator {
}
}
}
+
+ // create traces from real examples for each framework source
+ // useful for testing rendering
+ async createFrameworkTraces(projectIds: string[]): Promise<void> {
+ logger.info(`Creating framework traces for ${projectIds.length} projects.`);
+
+ const loader = new FrameworkTraceLoader();
+
+ for (const projectId of projectIds) {
+ logger.info(`Processing framework traces for project ${projectId}`);
+
+ const { traces, observations, scores } =
+ loader.loadTracesForProject(projectId);
+
+ try {
+ if (traces.length > 0) {
+ await this.queryBuilder.executeTracesInsert(traces);
+ }
+ if (observations.length > 0) {
+ await this.queryBuilder.executeObservationsInsert(observations);
+ }
+ if (scores.length > 0) {
+ await this.queryBuilder.executeScoresInsert(scores);
+ }
+ } catch (error) {
+ logger.error(`✗ Framework traces insert failed:`, error);
+ throw error;
+ }
+ }
+ }
}
diff --git a/web/src/components/trace/IOPreview.tsx b/web/src/components/trace/IOPreview.tsx
index c9c9ef3a6a..5785849955 100644
--- a/web/src/components/trace/IOPreview.tsx
+++ b/web/src/components/trace/IOPreview.tsx
@@ -18,17 +18,12 @@ import { usePostHogClientCapture } from "@/src/features/posthog-analytics/usePos
import useLocalStorage from "@/src/components/useLocalStorage";
import usePreserveRelativeScroll from "@/src/hooks/usePreserveRelativeScroll";
import { MARKDOWN_RENDER_CHARACTER_LIMIT } from "@/src/utils/constants";
-import {
- mapToChatMl,
- mapOutputToChatMl,
- cleanLegacyOutput,
- extractAdditionalInput,
- combineInputOutputMessages,
-} from "@/src/utils/chatMlMappers";
+import { mapToLangfuseChatML } from "@/src/utils/langfuse-chatml";
export const IOPreview: React.FC<{
input?: Prisma.JsonValue;
output?: Prisma.JsonValue;
+ metadata?: Prisma.JsonValue;
isLoading?: boolean;
hideIfNull?: boolean;
media?: MediaReturnType[];
@@ -55,6 +50,7 @@ export const IOPreview: React.FC<{
outputExpansionState,
onInputExpansionChange,
onOutputExpansionChange,
+ setIsPrettyViewAvailable,
...props
}) => {
const [localCurrentView, setLocalCurrentView] = useLocalStorage<
@@ -64,30 +60,29 @@ export const IOPreview: React.FC<{
const capture = usePostHogClientCapture();
const input = deepParseJson(props.input);
const output = deepParseJson(props.output);
+ const metadata = deepParseJson(props.metadata);
const [compensateScrollRef, startPreserveScroll] =
usePreserveRelativeScroll<HTMLDivElement>([selectedView]);
- const inChatMlArray = mapToChatMl(input);
- const outChatMlArray = mapOutputToChatMl(output);
- const outputClean = cleanLegacyOutput(output, props.output ?? null);
+ const chatML = useMemo(
+ () => mapToLangfuseChatML(input, output, metadata),
+ [input, output, metadata],
+ );
+ const canDisplayAsChat = chatML.canDisplayAsChat();
+ const allMessages = chatML.getAllMessages();
+ const additionalInput = chatML.input.additional;
// Pretty view is available for ChatML content OR any JSON content
const isPrettyViewAvailable = true; // Always show the toggle, let individual components decide how to render
useEffect(() => {
- props.setIsPrettyViewAvailable?.(isPrettyViewAvailable);
- // eslint-disable-next-line react-hooks/exhaustive-deps
- }, [isPrettyViewAvailable]);
-
- // If there are additional input fields beyond the messages, render them
- const additionalInput = extractAdditionalInput(input);
+ setIsPrettyViewAvailable?.(isPrettyViewAvailable);
+ }, [isPrettyViewAvailable, setIsPrettyViewAvailable]);
// Don't render markdown if total content size exceeds limit
const inputSize = JSON.stringify(input || {}).length;
- const outputSize = JSON.stringify(outputClean || {}).length;
- const messagesSize = inChatMlArray.success
- ? JSON.stringify(inChatMlArray.data).length
- : 0;
+ const outputSize = JSON.stringify(output || {}).length;
+ const messagesSize = JSON.stringify(allMessages).length;
const totalContentSize = inputSize + outputSize + messagesSize;
const shouldRenderMarkdownSafely =
@@ -126,13 +121,9 @@ export const IOPreview: React.FC<{
<div
style={{ display: selectedView === "pretty" ? "block" : "none" }}
>
- {inChatMlArray.success ? (
+ {canDisplayAsChat ? (
<OpenAiMessageView
- messages={combineInputOutputMessages(
- inChatMlArray,
- outChatMlArray,
- outputClean,
- )}
+ messages={allMessages}
shouldRenderMarkdown={shouldRenderMarkdownSafely}
additionalInput={
Object.keys(additionalInput ?? {}).length > 0
@@ -160,7 +151,7 @@ export const IOPreview: React.FC<{
<PrettyJsonView
title="Output"
className="ph-no-capture"
- json={outputClean}
+ json={output}
isLoading={isLoading}
media={media?.filter((m) => m.field === "output") ?? []}
currentView={selectedView}
@@ -190,7 +181,7 @@ export const IOPreview: React.FC<{
<PrettyJsonView
title="Output"
className="ph-no-capture"
- json={outputClean}
+ json={output}
isLoading={isLoading}
media={media?.filter((m) => m.field === "output") ?? []}
currentView={selectedView}
@@ -218,7 +209,7 @@ export const IOPreview: React.FC<{
<PrettyJsonView
title="Output"
className="ph-no-capture"
- json={outputClean}
+ json={output}
isLoading={isLoading}
media={media?.filter((m) => m.field === "output") ?? []}
currentView={selectedView}
diff --git a/web/src/components/trace/ObservationPreview.tsx b/web/src/components/trace/ObservationPreview.tsx
index 8bf1e2458b..957af7231d 100644
--- a/web/src/components/trace/ObservationPreview.tsx
+++ b/web/src/components/trace/ObservationPreview.tsx
@@ -413,6 +413,9 @@ export const ObservationPreview = ({
output={
observationWithInputAndOutput.data?.output ?? undefined
}
+ metadata={
+ observationWithInputAndOutput.data?.metadata ?? undefined
+ }
isLoading={observationWithInputAndOutput.isLoading}
media={observationMedia.data}
currentView={currentView}
diff --git a/web/src/components/trace/TraceLogView.tsx b/web/src/components/trace/TraceLogView.tsx
index a49957733e..71fc6982e0 100644
--- a/web/src/components/trace/TraceLogView.tsx
+++ b/web/src/components/trace/TraceLogView.tsx
@@ -229,6 +229,7 @@ export const TraceLogView = ({
setFieldExpansion("log", normalizeExpansionState(expansion))
}
stickyTopLevelKey={true}
+ showObservationTypeBadge={true}
/>
</div>
</div>
diff --git a/web/src/components/trace/TracePreview.tsx b/web/src/components/trace/TracePreview.tsx
index 488b9a79f7..a6e56fdc53 100644
--- a/web/src/components/trace/TracePreview.tsx
+++ b/web/src/components/trace/TracePreview.tsx
@@ -278,7 +278,7 @@ export const TracePreview = ({
</TooltipTrigger>
<TooltipContent className="text-xs">
{isLogViewDisabled
- ? `Log View is disabled for traces with more than 50 observations (this trace has ${observations.length})`
+ ? `Log View is disabled for traces with more than 150 observations (this trace has ${observations.length})`
: "Shows all observations concatenated. Great for quickly scanning through them. Nullish values are omitted."}
</TooltipContent>
</Tooltip>
diff --git a/web/src/components/ui/PrettyJsonView.tsx b/web/src/components/ui/PrettyJsonView.tsx
index e2446ac5d7..2a5504a0f2 100644
--- a/web/src/components/ui/PrettyJsonView.tsx
+++ b/web/src/components/ui/PrettyJsonView.tsx
@@ -348,6 +348,7 @@ function JsonPrettyTable({
expandedCells,
toggleCellExpansion,
stickyTopLevelKey = false,
+ showObservationTypeBadge = false,
}: {
data: JsonTableRow[];
expandAllRef?: React.MutableRefObject<(() => void) | null>;
@@ -363,6 +364,7 @@ function JsonPrettyTable({
expandedCells: Set<string>;
toggleCellExpansion: (cellId: string) => void;
stickyTopLevelKey?: boolean;
+ showObservationTypeBadge?: boolean;
}) {
const headerRef = useRef<HTMLTableRowElement>(null);
const topLevelRowRef = useRef<HTMLTableRowElement>(null);
@@ -403,6 +405,7 @@ function JsonPrettyTable({
const isLongValue = valueLength > MAX_CELL_DISPLAY_CHARS / 3; // already long if we don't truncate
const itemBadgeType =
+ showObservationTypeBadge &&
row.original.level === 0 &&
row.original.value &&
typeof row.original.value === "object" &&
@@ -705,6 +708,7 @@ export function PrettyJsonView(props: {
) => void;
showNullValues?: boolean;
stickyTopLevelKey?: boolean;
+ showObservationTypeBadge?: boolean;
}) {
const jsonDependency = useMemo(
() =>
@@ -1094,6 +1098,7 @@ export function PrettyJsonView(props: {
expandedCells={expandedCells}
toggleCellExpansion={toggleCellExpansion}
stickyTopLevelKey={props.stickyTopLevelKey}
+ showObservationTypeBadge={props.showObservationTypeBadge}
/>
)}
</div>
diff --git a/web/src/features/playground/page/components/JumpToPlaygroundButton.tsx b/web/src/features/playground/page/components/JumpToPlaygroundButton.tsx
index e7eff1d8be..646df3558d 100644
--- a/web/src/features/playground/page/components/JumpToPlaygroundButton.tsx
+++ b/web/src/features/playground/page/components/JumpToPlaygroundButton.tsx
@@ -28,22 +28,18 @@ import {
type UIModelParams,
ZodModelConfig,
ChatMessageType,
- LLMToolCallSchema,
- OpenAIToolCallSchema,
OpenAIToolSchema,
type ChatMessage,
OpenAIResponseFormatSchema,
type Prisma,
- PlaceholderMessageSchema,
type PlaceholderMessage,
- isPlaceholder,
PromptType,
isGenerationLike,
} from "@langfuse/shared";
import {
- isLangGraphTrace,
- normalizeLangGraphMessage,
-} from "@/src/utils/chatMlMappers";
+ mapToLangfuseChatML,
+ type LangfuseChatMLMessage,
+} from "@/src/utils/langfuse-chatml";
import { api } from "@/src/utils/api";
import { cn } from "@/src/utils/tailwind";
import usePlaygroundCache from "@/src/features/playground/page/hooks/usePlaygroundCache";
@@ -217,185 +213,87 @@ export const JumpToPlaygroundButton: React.FC<JumpToPlaygroundButtonProps> = (
);
};
-const ParsedChatMessageListSchema = z.array(
- z.union([
- // Regular chat message
- z.object({
- role: z.enum(ChatMessageRole),
- content: z.union([
- z.string(),
- z
- .array(
- z
- .object({
- text: z.string(),
- })
- .transform((v) => v.text),
- )
- .transform((v) => v.join("")),
- z.union([z.null(), z.undefined()]).transform((_) => ""),
- z.any().transform((v) => JSON.stringify(v, null, 2)),
- ]),
- tool_calls: z
- .union([z.array(LLMToolCallSchema), z.array(OpenAIToolCallSchema)])
- .nullish(),
- tool_call_id: z.string().nullish(),
- additional_kwargs: z
- .object({
- tool_calls: z
- .union([z.array(LLMToolCallSchema), z.array(OpenAIToolCallSchema)])
- .optional(),
- })
- .optional(),
- _originalRole: z.string().optional(), // original LangGraph role
- }),
- PlaceholderMessageSchema,
- ]),
-);
-
-// Langchain integration has the tool definition in a tool message
-// Those need to be filtered out in the chat messages and parsed when looking for tools
-const isLangchainToolDefinitionMessage = (
- message: z.infer<typeof ParsedChatMessageListSchema>[0],
-): message is { content: string; role: ChatMessageRole } => {
- if (!("content" in message) || typeof message.content !== "string") {
- return false;
- }
- try {
- return OpenAIToolSchema.safeParse(JSON.parse(message.content)).success;
- } catch {
- return false;
- }
-};
-
-const transformToPlaygroundMessage = (
- message: z.infer<typeof ParsedChatMessageListSchema>[0],
- allMessages?: z.infer<typeof ParsedChatMessageListSchema>,
-): ChatMessage | PlaceholderMessage | null => {
- // Return placeholder messages as-is
- if (isPlaceholder(message)) {
- return message;
+function convertLangfuseChatMLMessageToPlayground(
+ msg: LangfuseChatMLMessage,
+): ChatMessage | PlaceholderMessage | null {
+ // Handle placeholder messages
+ if (msg.type === "placeholder") {
+ return {
+ type: ChatMessageType.Placeholder,
+ name: msg.name || "",
+ } as PlaceholderMessage;
}
- // Handle regular chat messages - remove the placeholder type
- const regularMessage = message as Exclude<typeof message, PlaceholderMessage>;
- const { role, content } = regularMessage;
-
- if (
- regularMessage.role === "assistant" &&
- (regularMessage.tool_calls || regularMessage.additional_kwargs?.tool_calls)
- ) {
- const toolCalls =
- regularMessage.tool_calls ??
- regularMessage.additional_kwargs?.tool_calls ??
- [];
-
- const playgroundMessage: ChatMessage = {
+ // Handle assistant messages with tool calls
+ if (msg.toolCalls && msg.toolCalls.length > 0) {
+ return {
role: ChatMessageRole.Assistant,
- content,
+ content: (msg.content as string) || "",
type: ChatMessageType.AssistantToolCall,
- toolCalls: toolCalls.map((tc) => {
- if ("function" in tc) {
- return {
- name: tc.function.name,
- id: tc.id,
- args: tc.function.arguments,
- };
+ toolCalls: msg.toolCalls.map((tc) => {
+ // Parse JSON string to object, with safety
+ let args: Record<string, unknown>;
+ try {
+ args = JSON.parse(tc.function.arguments);
+ } catch {
+ // If parsing fails, treat as empty args
+ args = {};
}
- return tc;
+ return {
+ id: tc.id || "", // Playground requires string, convert null to empty
+ name: tc.function.name,
+ args,
+ };
}),
};
+ }
- return playgroundMessage;
- } else if (regularMessage.role === "tool") {
- let toolCallId = (regularMessage as any).tool_call_id;
-
- // Try to infer if tool_call_id is missing or empty (eg langgraph case)
- if (!toolCallId && allMessages && regularMessage._originalRole) {
- // Find all assistant messages with tool calls, most recent first
- const assistantMessages = allMessages
- .filter(
- (msg): msg is Exclude<typeof msg, PlaceholderMessage> =>
- !isPlaceholder(msg) &&
- msg.role === "assistant" &&
- !!(msg.tool_calls || msg.additional_kwargs?.tool_calls),
- )
- .reverse();
-
- // Look for the first matching tool call by name
- for (const prevMessage of assistantMessages) {
- const toolCalls =
- prevMessage.tool_calls ??
- prevMessage.additional_kwargs?.tool_calls ??
- [];
-
- const matchingCall = toolCalls.find((tc) => {
- if ("function" in tc) {
- return tc.function.name === regularMessage._originalRole;
- }
- return tc.name === regularMessage._originalRole;
- });
-
- if (matchingCall && matchingCall.id) {
- toolCallId = matchingCall.id;
- break;
- }
- }
- }
-
- const playgroundMessage: ChatMessage = {
+ // Handle tool results with tool role
+ if (msg.toolCallId) {
+ return {
role: ChatMessageRole.Tool,
- content,
+ content: (msg.content as string) || "",
type: ChatMessageType.ToolResult,
- toolCallId: toolCallId || "",
- };
-
- return playgroundMessage;
- } else {
- return {
- role,
- content,
- type: ChatMessageType.PublicAPICreated,
+ toolCallId: msg.toolCallId,
};
}
-};
+
+ // Handle regular messages
+ const content =
+ typeof msg.content === "string"
+ ? msg.content
+ : msg.content === null || msg.content === undefined
+ ? ""
+ : JSON.stringify(msg.content);
+
+ return {
+ role: (msg.role as ChatMessageRole) || ChatMessageRole.Assistant,
+ content,
+ type: ChatMessageType.PublicAPICreated,
+ };
+}
const parsePrompt = (
prompt: Prompt & { resolvedPrompt?: Prisma.JsonValue },
): PlaygroundCache => {
if (prompt.type === PromptType.Chat) {
- // For prompts, we can't detect LangGraph from metadata, so we check for invalid roles
- // If any msg has an invalid role, we assume it might be LangGraph format
- const isLangGraph =
- Array.isArray(prompt.resolvedPrompt) &&
- (prompt.resolvedPrompt as any[]).some(
- (msg) =>
- msg &&
- typeof msg === "object" &&
- "role" in msg &&
- !Object.values(ChatMessageRole).includes(msg.role as ChatMessageRole),
- );
+ // Use mapper system for all framework detection and normalization
+ try {
+ const chatML = mapToLangfuseChatML(prompt.resolvedPrompt, null);
- const normalizedMessages = Array.isArray(prompt.resolvedPrompt)
- ? (prompt.resolvedPrompt as any[]).map((msg) =>
- normalizeLangGraphMessage(msg, isLangGraph),
- )
- : prompt.resolvedPrompt;
+ const messages = chatML.input.messages
+ .map(convertLangfuseChatMLMessageToPlayground)
+ .filter((msg): msg is ChatMessage | PlaceholderMessage => msg !== null);
- const parsedMessages =
- ParsedChatMessageListSchema.safeParse(normalizedMessages);
+ if (messages.length === 0) return null;
- if (!parsedMessages.success) {
+ return { messages };
+ } catch {
return null;
}
-
- return {
- messages: parsedMessages.data
- .map((msg) => transformToPlaygroundMessage(msg, parsedMessages.data))
- .filter((msg): msg is ChatMessage | PlaceholderMessage => msg !== null),
- };
} else {
+ // Text prompt
const promptString = prompt.resolvedPrompt;
return {
@@ -420,34 +318,20 @@ const parseGeneration = (
): PlaygroundCache => {
if (!isGenerationLike(generation.type)) return null;
- const isLangGraph = isLangGraphTrace(generation);
const modelParams = parseModelParams(generation, modelToProviderMap);
- const tools = parseTools(generation, isLangGraph);
+ const tools = parseTools(generation);
const structuredOutputSchema = parseStructuredOutputSchema(generation);
let input = generation.input?.valueOf();
if (!input) return null;
+ // parse string inputs as JSON or treat as text prompt
if (typeof input === "string") {
try {
input = JSON.parse(input);
-
- if (typeof input === "string") {
- return {
- messages: [
- createEmptyMessage({
- type: ChatMessageType.System,
- role: ChatMessageRole.System,
- content: input,
- }),
- ],
- modelParams,
- tools,
- structuredOutputSchema,
- };
- }
- } catch (err) {
+ } catch {
+ // Parse failed, treat as text prompt
return {
messages: [
createEmptyMessage({
@@ -461,62 +345,48 @@ const parseGeneration = (
structuredOutputSchema,
};
}
- }
-
- if (typeof input === "object" && "messages" in input) {
- const normalizedMessages = Array.isArray(input["messages"])
- ? (input["messages"] as any[]).map((msg) =>
- normalizeLangGraphMessage(msg, isLangGraph),
- )
- : input["messages"];
-
- const parsedMessages =
- ParsedChatMessageListSchema.safeParse(normalizedMessages);
- if (!parsedMessages.success) {
- return null;
+ // After parsing, if still string, it's a text prompt
+ if (typeof input === "string") {
+ return {
+ messages: [
+ createEmptyMessage({
+ type: ChatMessageType.System,
+ role: ChatMessageRole.System,
+ content: input,
+ }),
+ ],
+ modelParams,
+ tools,
+ structuredOutputSchema,
+ };
}
-
- const filteredMessages = parsedMessages.data.filter(
- (m) => !isLangchainToolDefinitionMessage(m),
- );
-
- return {
- messages: filteredMessages
- .map((msg) => transformToPlaygroundMessage(msg, filteredMessages))
- .filter((msg): msg is ChatMessage | PlaceholderMessage => msg !== null),
- modelParams,
- tools,
- structuredOutputSchema,
- };
}
+ // use mapper: input is an object
if (typeof input === "object") {
- const normalizedMessages = Array.isArray(input)
- ? (input as any[]).map((msg) =>
- normalizeLangGraphMessage(msg, isLangGraph),
- )
- : input;
+ try {
+ const chatML = mapToLangfuseChatML(
+ input,
+ generation.output,
+ generation.metadata,
+ );
+
+ const messages = chatML.input.messages
+ .map(convertLangfuseChatMLMessageToPlayground)
+ .filter((msg): msg is ChatMessage | PlaceholderMessage => msg !== null);
- const parsedMessages =
- ParsedChatMessageListSchema.safeParse(normalizedMessages);
+ if (messages.length === 0) return null;
- if (!parsedMessages.success) {
+ return {
+ messages,
+ modelParams,
+ tools,
+ structuredOutputSchema,
+ };
+ } catch {
return null;
}
-
- const filteredMessages = parsedMessages.data.filter(
- (m) => !isLangchainToolDefinitionMessage(m),
- );
-
- return {
- messages: filteredMessages
- .map((msg) => transformToPlaygroundMessage(msg, filteredMessages))
- .filter((msg): msg is ChatMessage | PlaceholderMessage => msg !== null),
- modelParams,
- tools,
- structuredOutputSchema,
- };
}
return null;
@@ -570,11 +440,31 @@ function parseTools(
output: string | null;
metadata: string | null;
},
- isLangGraph: boolean = false,
): PlaygroundTool[] {
- // OpenAI Schema
+ // Use mapper to extract tools from all frameworks
try {
const input = JSON.parse(generation.input as string);
+
+ const chatML = mapToLangfuseChatML(
+ input,
+ generation.output,
+ generation.metadata,
+ );
+
+ // Tools extracted by mappers (LangChain puts them in additional.tools)
+ if (
+ chatML.input.additional?.tools &&
+ Array.isArray(chatML.input.additional.tools)
+ ) {
+ return chatML.input.additional.tools.map((tool: any) => ({
+ id: Math.random().toString(36).substring(2),
+ name: tool.name,
+ description: tool.description,
+ parameters: tool.parameters,
+ }));
+ }
+
+ // OpenAI format: tools in input.tools field (not extracted by mapper)
if (typeof input === "object" && input !== null && "tools" in input) {
const parsedTools = z.array(OpenAIToolSchema).safeParse(input["tools"]);
@@ -586,31 +476,6 @@ function parseTools(
}
} catch {}
- // Langchain Schema
- try {
- const input = JSON.parse(generation.input as string);
-
- if (typeof input === "object" && input !== null) {
- const messageData = "messages" in input ? input["messages"] : input;
- const normalizedMessages = Array.isArray(messageData)
- ? (messageData as any[]).map((msg) =>
- normalizeLangGraphMessage(msg, isLangGraph),
- )
- : messageData;
-
- const parsedMessages =
- ParsedChatMessageListSchema.safeParse(normalizedMessages);
-
- if (parsedMessages.success)
- return parsedMessages.data
- .filter(isLangchainToolDefinitionMessage)
- .map((tool) => ({
- id: Math.random().toString(36).substring(2),
- ...JSON.parse(tool.content).function,
- }));
- }
- } catch {}
-
return [];
}
diff --git a/web/src/utils/chatMlMappers.clienttest.ts b/web/src/utils/chatMlMappers.clienttest.ts
deleted file mode 100644
index 3c5578f9a0..0000000000
--- a/web/src/utils/chatMlMappers.clienttest.ts
+++ /dev/null
@@ -1,580 +0,0 @@
-// Mock the problematic @langfuse/shared import before importing our functions
-jest.mock("@langfuse/shared", () => ({
- ChatMessageRole: {
- System: "system",
- Developer: "developer",
- User: "user",
- Assistant: "assistant",
- Tool: "tool",
- Model: "model",
- },
-}));
-
-import {
- mapToChatMl,
- mapOutputToChatMl,
- cleanLegacyOutput,
- extractAdditionalInput,
- combineInputOutputMessages,
- isLangGraphTrace,
- normalizeLangGraphMessage,
-} from "./chatMlMappers";
-
-describe("chatMlMappers", () => {
- describe("mapToChatMl", () => {
- it("should parse direct ChatML array format", () => {
- const input = [
- { role: "system", content: "You are a helpful assistant." },
- { role: "user", content: "Hello!" },
- ];
-
- const result = mapToChatMl(input);
-
- expect(result.success).toBe(true);
- if (result.success) {
- expect(result.data).toHaveLength(2);
- expect(result.data[0]).toMatchObject({
- role: "system",
- content: "You are a helpful assistant.",
- });
- expect(result.data[1]).toMatchObject({
- role: "user",
- content: "Hello!",
- });
- }
- });
-
- it("should parse nested array format [[ChatML...]]", () => {
- const input = [
- [
- { role: "system", content: "You are a helpful assistant." },
- { role: "user", content: "Hello!" },
- ],
- ];
-
- const result = mapToChatMl(input);
-
- expect(result.success).toBe(true);
- if (result.success) {
- expect(result.data).toHaveLength(2);
- expect(result.data[0].role).toBe("system");
- expect(result.data[1].role).toBe("user");
- }
- });
-
- it("should parse object with messages key {messages: [ChatML...]}", () => {
- const input = {
- messages: [
- { role: "system", content: "You are a helpful assistant." },
- { role: "user", content: "Hello!" },
- ],
- temperature: 0.7,
- model: "gpt-4",
- };
-
- const result = mapToChatMl(input);
-
- expect(result.success).toBe(true);
- if (result.success) {
- expect(result.data).toHaveLength(2);
- expect(result.data[0].role).toBe("system");
- expect(result.data[1].role).toBe("user");
- }
- });
-
- it("should fail gracefully for invalid input", () => {
- const input = "not a valid format";
-
- const result = mapToChatMl(input);
-
- expect(result.success).toBe(false);
- });
-
- it("should fail gracefully for empty input", () => {
- const result = mapToChatMl(null);
-
- expect(result.success).toBe(false);
- });
-
- it("should handle complex message structures with additional fields", () => {
- const input = [
- {
- role: "system",
- content: "You are a helpful assistant.",
- name: "system",
- },
- {
- role: "user",
- content: "Hello!",
- additional_kwargs: { custom_field: "value" },
- },
- {
- role: "assistant",
- content: "Hi there!",
- json: { metadata: "extra data" },
- },
- ];
-
- const result = mapToChatMl(input);
-
- expect(result.success).toBe(true);
- if (result.success) {
- expect(result.data).toHaveLength(3);
- expect(result.data[0].name).toBe("system");
- // ChatML schema transforms extra fields - expecting actual behavior
- expect(result.data[2].json).toEqual({
- json: { metadata: "extra data" },
- });
- }
- });
-
- it("should handle OpenAI content parts format", () => {
- const input = [
- {
- role: "user",
- content: [
- { type: "text", text: "What's in this image?" },
- {
- type: "image_url",
- image_url: { url: "data:image/jpeg;base64,..." },
- },
- ],
- },
- ];
-
- const result = mapToChatMl(input);
-
- expect(result.success).toBe(true);
- if (result.success) {
- expect(result.data).toHaveLength(1);
- expect(Array.isArray(result.data[0].content)).toBe(true);
- }
- });
-
- it("should handle tool call messages", () => {
- const input = [
- {
- role: "assistant",
- content: null,
- tool_calls: [
- {
- id: "call_123",
- type: "function",
- function: { name: "get_weather", arguments: '{"city": "NYC"}' },
- },
- ],
- },
- {
- role: "tool",
- content: '{"temperature": 72}',
- tool_call_id: "call_123",
- },
- ];
-
- const result = mapToChatMl(input);
-
- expect(result.success).toBe(true);
- if (result.success) {
- expect(result.data).toHaveLength(2);
- expect(result.data[0].role).toBe("assistant");
- expect(result.data[1].role).toBe("tool");
- }
- });
-
- it("should handle placeholder messages", () => {
- const input = [
- {
- role: "user",
- content: "Hello",
- },
- {
- type: "placeholder",
- name: "Processing...",
- },
- {
- role: "assistant",
- content: "Hi there!",
- },
- ];
-
- const result = mapToChatMl(input);
-
- expect(result.success).toBe(true);
- if (result.success) {
- expect(result.data).toHaveLength(3);
- expect(result.data[1].type).toBe("placeholder");
- }
- });
- });
-
- describe("mapOutputToChatMl", () => {
- it("should parse direct output array", () => {
- const output = [{ role: "assistant", content: "Hello there!" }];
-
- const result = mapOutputToChatMl(output);
-
- expect(result.success).toBe(true);
- if (result.success) {
- expect(result.data).toHaveLength(1);
- expect(result.data[0].role).toBe("assistant");
- }
- });
-
- it("should parse single output object as array", () => {
- const output = { role: "assistant", content: "Hello there!" };
-
- const result = mapOutputToChatMl(output);
-
- expect(result.success).toBe(true);
- if (result.success) {
- expect(result.data).toHaveLength(1);
- expect(result.data[0].role).toBe("assistant");
- }
- });
-
- it("should handle legacy completion format {completion: string}", () => {
- const output = { completion: "This is a legacy completion response" };
-
- const result = mapOutputToChatMl(output);
-
- expect(result.success).toBe(true);
- if (result.success) {
- expect(result.data).toHaveLength(1);
- // ChatML schema transforms the object, putting extra fields in json
- expect(result.data[0]).toEqual({
- audio: undefined,
- content: undefined,
- json: { completion: "This is a legacy completion response" },
- name: undefined,
- role: undefined,
- type: undefined,
- });
- }
- });
-
- it("should handle string output", () => {
- const output = "Simple string response";
-
- const result = mapOutputToChatMl(output);
-
- // Strings don't pass ChatML validation
- expect(result.success).toBe(false);
- });
-
- it("should handle output with metadata", () => {
- const output = {
- role: "assistant",
- content: "Response with metadata",
- usage: { prompt_tokens: 10, completion_tokens: 5 },
- };
-
- const result = mapOutputToChatMl(output);
-
- expect(result.success).toBe(true);
- if (result.success) {
- expect(result.data).toHaveLength(1);
- expect(result.data[0].role).toBe("assistant");
- expect(result.data[0].json).toEqual({
- usage: { prompt_tokens: 10, completion_tokens: 5 },
- });
- }
- });
-
- it("should handle null/undefined output", () => {
- const result1 = mapOutputToChatMl(null);
- const result2 = mapOutputToChatMl(undefined);
-
- // null/undefined don't pass ChatML validation
- expect(result1.success).toBe(false);
- expect(result2.success).toBe(false);
- });
- });
-
- describe("error scenarios", () => {
- it("should handle deeply nested invalid structures", () => {
- const input = {
- messages: {
- nested: {
- deeply: "invalid structure",
- },
- },
- };
-
- const result = mapToChatMl(input);
-
- expect(result.success).toBe(false);
- });
-
- it("should handle circular references gracefully", () => {
- const input: any = { role: "user", content: "test" };
- input.circular = input;
-
- // Should not crash, though parsing may fail
- expect(() => mapToChatMl([input])).not.toThrow();
- });
-
- it("should handle very large inputs", () => {
- const largeContent = "x".repeat(1000000); // 1million chars
- const input = [{ role: "user", content: largeContent }];
-
- const result = mapToChatMl(input);
-
- expect(result.success).toBe(true);
- if (result.success) {
- expect(result.data[0].content).toHaveLength(1000000);
- }
- });
-
- it("should preserve all original data in json field for complex objects", () => {
- const input = [
- {
- role: "assistant",
- content: "Response",
- model: "gpt-4",
- temperature: 0.7,
- custom_metadata: { key: "value" },
- additional_kwargs: { extra: "data" },
- },
- ];
-
- const result = mapToChatMl(input);
-
- expect(result.success).toBe(true);
- if (result.success) {
- expect(result.data[0].json).toEqual({
- model: "gpt-4",
- temperature: 0.7,
- custom_metadata: { key: "value" },
- extra: "data", // additional_kwargs gets flattened
- });
- }
- });
- });
-
- describe("cleanLegacyOutput", () => {
- it("should clean legacy completion format", () => {
- const output = { completion: "This is a legacy completion response" };
- const result = cleanLegacyOutput(output, "fallback");
-
- expect(result).toEqual({
- completion: "This is a legacy completion response",
- });
- });
-
- it("should return fallback for non-legacy format", () => {
- const output = { role: "assistant", content: "Regular response" };
- const fallback = "fallback value";
- const result = cleanLegacyOutput(output, fallback);
-
- expect(result).toBe(fallback);
- });
-
- it("should handle null/undefined output", () => {
- const fallback = "fallback value";
- expect(cleanLegacyOutput(null, fallback)).toBe(fallback);
- expect(cleanLegacyOutput(undefined, fallback)).toBe(fallback);
- });
- });
-
- describe("extractAdditionalInput", () => {
- it("should extract additional fields from object", () => {
- const input = {
- messages: [{ role: "user", content: "Hello" }],
- temperature: 0.7,
- model: "gpt-4",
- custom_param: "value",
- };
-
- const result = extractAdditionalInput(input);
-
- expect(result).toEqual({
- temperature: 0.7,
- model: "gpt-4",
- custom_param: "value",
- });
- });
-
- it("should return undefined for array input", () => {
- const input = [{ role: "user", content: "Hello" }];
- const result = extractAdditionalInput(input);
-
- expect(result).toBeUndefined();
- });
-
- it("should return undefined for non-object input", () => {
- expect(extractAdditionalInput("string")).toBeUndefined();
- expect(extractAdditionalInput(42)).toBeUndefined();
- expect(extractAdditionalInput(null)).toBeUndefined();
- });
-
- it("should return empty object when only messages field present", () => {
- const input = { messages: [{ role: "user", content: "Hello" }] };
- const result = extractAdditionalInput(input);
-
- expect(result).toEqual({});
- });
- });
-
- describe("combineInputOutputMessages", () => {
- it("should combine successful input and output", () => {
- const inputResult = {
- success: true,
- data: [{ role: "user", content: "Hello" }],
- } as any;
- const outputResult = {
- success: true,
- data: [{ content: "Hi there!" }],
- } as any;
- const cleanOutput = "fallback";
-
- const result = combineInputOutputMessages(
- inputResult,
- outputResult,
- cleanOutput,
- );
-
- expect(result).toHaveLength(2);
- expect(result[0]).toEqual({ role: "user", content: "Hello" });
- expect(result[1]).toEqual({ content: "Hi there!", role: "assistant" }); // role gets defaulted
- });
-
- it("should handle failed output with string fallback", () => {
- const inputResult = {
- success: true,
- data: [{ role: "user", content: "Hello" }],
- } as any;
- const outputResult = { success: false, error: "error" } as any;
- const cleanOutput = "String response";
-
- const result = combineInputOutputMessages(
- inputResult,
- outputResult,
- cleanOutput,
- );
-
- expect(result).toHaveLength(2);
- expect(result[0]).toEqual({ role: "user", content: "Hello" });
- expect(result[1]).toEqual({
- role: "assistant",
- content: "String response",
- });
- });
-
- it("should handle failed output with object fallback", () => {
- const inputResult = {
- success: true,
- data: [{ role: "user", content: "Hello" }],
- } as any;
- const outputResult = { success: false, error: "error" } as any;
- const cleanOutput = { metadata: "extra info" };
-
- const result = combineInputOutputMessages(
- inputResult,
- outputResult,
- cleanOutput,
- );
-
- expect(result).toHaveLength(2);
- expect(result[0]).toEqual({ role: "user", content: "Hello" });
- expect(result[1]).toEqual({
- role: "assistant",
- json: { metadata: "extra info" },
- });
- });
-
- it("should warn when called with failed input parsing", () => {
- const inputResult = { success: false, error: "error" } as any;
- const outputResult = { success: true, data: [{ content: "Hi" }] } as any;
- const cleanOutput = "fallback";
-
- // Should not crash even with failed input
- expect(() =>
- combineInputOutputMessages(inputResult, outputResult, cleanOutput),
- ).not.toThrow();
- });
- });
-
- describe("isLangGraphTrace", () => {
- it("should return false for null metadata", () => {
- const generation = { metadata: null };
- const result = isLangGraphTrace(generation);
- expect(result).toBe(false);
- });
-
- it("should return true for metadata containing LANGGRAPH_NODE_TAG", () => {
- const generation = {
- metadata: JSON.stringify({ langgraph_node: "some_node" }),
- };
- const result = isLangGraphTrace(generation);
- expect(result).toBe(true);
- });
-
- it("should return true for metadata containing LANGGRAPH_STEP_TAG", () => {
- const generation = {
- metadata: JSON.stringify({ langgraph_step: 1 }),
- };
- const result = isLangGraphTrace(generation);
- expect(result).toBe(true);
- });
-
- it("should return false for metadata without LangGraph tags", () => {
- const generation = {
- metadata: JSON.stringify({ other_field: "value" }),
- };
- const result = isLangGraphTrace(generation);
- expect(result).toBe(false);
- });
- });
-
- describe("normalizeLangGraphMessage", () => {
- it("should return message as-is if null", () => {
- const result = normalizeLangGraphMessage(null);
- expect(result).toBe(null);
- });
-
- it("should return message as-is if not an object", () => {
- const result = normalizeLangGraphMessage("not an object");
- expect(result).toBe("not an object");
- });
-
- it("should convert Google/Gemini 'model' role to 'assistant'", () => {
- const message = { role: "model", content: "response" };
- const result = normalizeLangGraphMessage(message);
- expect(result).toEqual({
- role: "assistant",
- content: "response",
- });
- });
-
- it("should convert Google/Gemini 'parts' field to 'content'", () => {
- const message = {
- role: "user",
- parts: [{ text: "Hello" }, { text: " world" }],
- };
- const result = normalizeLangGraphMessage(message);
- expect(result).toEqual({
- role: "user",
- content: "Hello world",
- });
- });
-
- it("should convert invalid LangGraph roles to 'tool' when isLangGraph=true", () => {
- const message = { role: "custom_tool_name", content: "tool result" };
- const result = normalizeLangGraphMessage(message, true);
- expect(result).toEqual({
- role: "tool",
- content: "tool result",
- _originalRole: "custom_tool_name",
- });
- });
-
- it("should not convert invalid roles when isLangGraph=false", () => {
- const message = { role: "custom_tool_name", content: "tool result" };
- const result = normalizeLangGraphMessage(message, false);
- expect(result).toEqual({
- role: "custom_tool_name",
- content: "tool result",
- });
- });
- });
-});
diff --git a/web/src/utils/chatMlMappers.ts b/web/src/utils/chatMlMappers.ts
deleted file mode 100644
index 95539eeec5..0000000000
--- a/web/src/utils/chatMlMappers.ts
+++ /dev/null
@@ -1,198 +0,0 @@
-import { z } from "zod/v4";
-import {
- ChatMlArraySchema,
- type ChatMlMessageSchema,
-} from "@/src/components/schemas/ChatMlSchema";
-import {
- LANGGRAPH_NODE_TAG,
- LANGGRAPH_STEP_TAG,
-} from "@/src/features/trace-graph-view/types";
-import { ChatMessageRole } from "@langfuse/shared";
-
-export function mapToChatMl(
- input: unknown,
-): ReturnType<typeof ChatMlArraySchema.safeParse> {
- let result = ChatMlArraySchema.safeParse(input);
- if (result.success) {
- return result;
- }
-
- // Check if input is an array of length 1 including an array of ChatMlMessageSchema
- // This is the case for some integrations
- // e.g. [[ChatMlMessageSchema, ...]]
- const inputArray = z.array(ChatMlArraySchema).safeParse(input);
- if (inputArray.success && inputArray.data.length === 1) {
- return ChatMlArraySchema.safeParse(inputArray.data[0]);
- }
-
- // Check if input is an object with a messages key
- // This is the case for some integrations
- // e.g. { messages: [ChatMlMessageSchema, ...] }
- const inputObject = z
- .object({
- messages: ChatMlArraySchema,
- })
- .safeParse(input);
-
- if (inputObject.success) {
- return ChatMlArraySchema.safeParse(inputObject.data.messages);
- }
-
- return result; // Return the original failed parse result
-}
-
-export function mapOutputToChatMl(
- output: unknown,
-): ReturnType<typeof ChatMlArraySchema.safeParse> {
- const result = ChatMlArraySchema.safeParse(
- Array.isArray(output) ? output : [output],
- );
-
- return result;
-}
-
-/**
- * Cleans legacy completion format output for display
- * handles {completion: string} -> string transformation
- */
-export function cleanLegacyOutput(output: unknown, fallback?: unknown) {
- const outLegacyCompletionSchema = z
- .object({
- completion: z.string(),
- })
- .refine((value) => Object.keys(value).length === 1);
-
- const outLegacyCompletionSchemaParsed =
- outLegacyCompletionSchema.safeParse(output);
- const outputClean = outLegacyCompletionSchemaParsed.success
- ? outLegacyCompletionSchemaParsed.data
- : (fallback ?? null);
-
- return outputClean;
-}
-
-/**
- * Extracts additional input fields beyond the messages array
- * Returns raw additionalInput (may be empty object) - filtering done at usage site
- */
-export function extractAdditionalInput(
- input: unknown,
-): Record<string, unknown> | undefined {
- const additionalInput =
- typeof input === "object" && input !== null && !Array.isArray(input)
- ? Object.fromEntries(
- Object.entries(input as object).filter(([key]) => key !== "messages"),
- )
- : undefined;
-
- // Return raw result - filtering (Object.keys().length > 0) done at usage site
- return additionalInput;
-}
-
-/**
- * Combines input and output messages into a single chat conversation
- * NOTE: Original only calls this when inputResult.success === true
- */
-export function combineInputOutputMessages(
- inputResult: ReturnType<typeof mapToChatMl>,
- outputResult: ReturnType<typeof mapOutputToChatMl>,
- cleanOutput: unknown,
-): ChatMlMessageSchema[] {
- // IMPORTANT: Original only calls this function when inputResult.success === true
- // So we can safely assume inputResult.data exists
- if (!inputResult.success) {
- // Return empty array to prevent crash - this should never happen in normal usage
- return [];
- }
-
- const combinedMessages = [
- ...inputResult.data, // Original assumes success, so no conditional here
- ...(outputResult.success
- ? outputResult.data.map((m) => ({
- ...m,
- role: m.role ?? "assistant",
- }))
- : [
- {
- role: "assistant",
- ...(typeof cleanOutput === "string"
- ? { content: cleanOutput }
- : { json: cleanOutput }),
- } as ChatMlMessageSchema,
- ]),
- ];
-
- return combinedMessages;
-}
-
-/**
- * Framework detection: Is LangGraph Trace?
- * If so, we recognise roles as tool names
- */
-export function isLangGraphTrace(generation: {
- metadata: string | null;
-}): boolean {
- if (!generation.metadata) return false;
-
- try {
- let metadata = generation.metadata;
- if (typeof metadata === "string") {
- metadata = JSON.parse(metadata);
- }
-
- if (typeof metadata === "object" && metadata !== null) {
- return LANGGRAPH_NODE_TAG in metadata || LANGGRAPH_STEP_TAG in metadata;
- }
- } catch {
- // Ignore JSON parsing errors
- }
-
- return false;
-}
-
-/**
- * Normalize LangGraph tool messages by converting tool-name roles to "tool"
- * and normalize Google/Gemini format (model role + parts field)
- */
-export function normalizeLangGraphMessage(
- message: unknown,
- isLangGraph: boolean = false,
-): unknown {
- if (!message || typeof message !== "object" || !("role" in message)) {
- return message;
- }
-
- const msg = message as any;
- const validRoles = Object.values(ChatMessageRole);
- let normalizedMessage = { ...msg };
-
- // convert google format: "model" role -> "assistant"
- if (msg.role === "model") {
- normalizedMessage.role = ChatMessageRole.Assistant;
- }
-
- // convert google format: "parts" field -> "content" field
- if (msg.parts && Array.isArray(msg.parts)) {
- const content = msg.parts
- .map((part: any) =>
- typeof part === "object" && part.text ? part.text : String(part),
- )
- .join("");
- normalizedMessage.content = content;
- delete normalizedMessage.parts;
- }
-
- // convert LangGraph: invalid roles -> "tool" role
- if (
- isLangGraph &&
- !validRoles.includes(normalizedMessage.role as ChatMessageRole)
- ) {
- return {
- ...normalizedMessage,
- role: ChatMessageRole.Tool,
- _originalRole: msg.role,
- };
- }
-
- return normalizedMessage;
-}
diff --git a/web/src/utils/langfuse-chatml/README.md b/web/src/utils/langfuse-chatml/README.md
new file mode 100644
index 0000000000..b14c9ae7b5
--- /dev/null
+++ b/web/src/utils/langfuse-chatml/README.md
@@ -0,0 +1,37 @@
+# Langfuse ChatML Mappers
+
+This utils package handles conversion of various SDK formats to a Langfuse ChatML format.
+We display the Langfuse ChatML format in the frontend and ensure parsing.
+
+The mapping is selected by three values:
+* data source (i.e. SDK name)
+* data source version (i.e. SDK version)
+* language (i.e. SDK programming language)
+
+## How It Works
+
+Whenever we want to map a source to `LangfuseChatML`, we call the function `mapToLangfuseChatML(input?, output?, metadata?)`.
+The function then selects the appropriate mapper and calls its `map()` function.
+For each `framework`+`version`+`language` (with the latter 2 optional), we have mapper class and a test file.
+Each class has 2 main functions: `canMapScore` and `map`.
+The `canMapScore` discovers if this mapper is applicable (i.e. by checking the metadata) and assigns a score.
+If a mapper has the score `10`, it's a definite match.
+Then, the mappers are run in the order of the scores until one succeeds.
+
+
+## Adding a New Mapping
+
+1. Create the mapper file: `mappers/[framework].ts`
+ - Implement canMapScore(): uses metadata to determine if mapper is applicable
+ - Implement map(): transforms input to `LangfuseChatML` format
+ - Create convert[Framework]Message(): extract framework-specific stuff (tool calls, etc.)
+2. Create tests: `mappers/[framework].clienttest.ts`
+ - Use real examples with obfuscated data
+ - Test canMapScore() detection (metadata + structural)
+ - Test message conversion (tool calls, special fields)
+3. Register mapper in `index.ts`
+
+Langfuse ChatML Model
+* messages array
+* tool calls
+* highlight row, ...
diff --git a/web/src/utils/langfuse-chatml/index.ts b/web/src/utils/langfuse-chatml/index.ts
new file mode 100644
index 0000000000..b625971720
--- /dev/null
+++ b/web/src/utils/langfuse-chatml/index.ts
@@ -0,0 +1,66 @@
+import { genericMapper } from "./mappers/generic";
+import { openAIMapper } from "./mappers/openai";
+import { langGraphMapper } from "./mappers/langgraph";
+import { langChainMapper } from "./mappers/langchain";
+import { pydanticMapper } from "./mappers/pydantic";
+import { llamaIndexMapper } from "./mappers/llamaindex";
+import type { LangfuseChatML } from "./types";
+import type { ChatMLMapper } from "./mappers/base";
+
+const mappers: ChatMLMapper[] = [
+ openAIMapper,
+ langGraphMapper,
+ langChainMapper,
+ pydanticMapper,
+ llamaIndexMapper,
+ genericMapper, // Fallback
+];
+
+// TODO: Cache the parsed result to not parse twice (in findBestMapper and mapToLangfuseChatML)
+function findBestMapper(
+ input: unknown,
+ output: unknown,
+ metadata?: unknown,
+): ChatMLMapper {
+ const scored = mappers.map((mapper) => ({
+ mapper,
+ score: mapper.canMapScore(input, output, metadata),
+ }));
+
+ scored.sort((a, b) => b.score - a.score);
+
+ // Try map in order until success
+ for (const { mapper, score } of scored) {
+ // Skip zero-score non-generic mappers
+ if (score === 0 && mapper.mapperName !== "generic") continue;
+
+ try {
+ const result = mapper.map(input, output, metadata);
+ const hasData =
+ result.input.messages.length > 0 || result.output.messages.length > 0;
+ if (hasData) return mapper;
+ } catch {
+ // next mapper
+ continue;
+ }
+ }
+
+ // fallback to generic mapper
+ return genericMapper;
+}
+
+export function mapToLangfuseChatML(
+ input: unknown,
+ output: unknown,
+ metadata?: unknown,
+): LangfuseChatML {
+ const mapper = findBestMapper(input, output, metadata);
+ const result = mapper.map(input, output, metadata);
+
+ result._selectedMapper = mapper.mapperName; // just for debug
+
+ return result;
+}
+
+export * from "./types";
+export type { ChatMLMapper } from "./mappers/base";
diff --git a/web/src/utils/langfuse-chatml/integration.clienttest.ts b/web/src/utils/langfuse-chatml/integration.clienttest.ts
new file mode 100644
index 0000000000..361f230ea8
--- /dev/null
+++ b/web/src/utils/langfuse-chatml/integration.clienttest.ts
@@ -0,0 +1,219 @@
+// Mock the problematic @langfuse/shared import before importing our functions
+jest.mock("@langfuse/shared", () => ({
+ ChatMessageRole: {
+ System: "system",
+ Developer: "developer",
+ User: "user",
+ Assistant: "assistant",
+ Tool: "tool",
+ Model: "model",
+ },
+}));
+
+import { mapToLangfuseChatML } from "./index";
+
+describe("LangfuseChatML Integration", () => {
+ it("should auto-detect and map OpenAI Parts format", () => {
+ const input = {
+ messages: [
+ {
+ role: "user",
+ content: [
+ { type: "text", text: "What's in this image?" },
+ {
+ type: "image_url",
+ image_url: { url: "data:image/jpeg;base64,..." },
+ },
+ ],
+ },
+ ],
+ temperature: 0.7,
+ model: "gpt-4-vision-preview",
+ };
+
+ // Test with metadata
+ // TODO: remove ls_... checks
+ const resultWithMeta = mapToLangfuseChatML(input, null, {
+ ls_provider: "openai",
+ ls_version: "1.0",
+ });
+ expect(resultWithMeta.dataSource).toBe("openai");
+ expect(resultWithMeta.dataSourceVersion).toBe("1.0");
+
+ // Test with structural detection (no metadata)
+ const resultNoMeta = mapToLangfuseChatML(input, null);
+ expect(resultNoMeta.dataSource).toBeUndefined();
+ expect(resultNoMeta.dataSourceVersion).toBeUndefined();
+ expect(resultNoMeta.canDisplayAsChat()).toBe(true);
+ expect(resultNoMeta.input.additional).toEqual({
+ temperature: 0.7,
+ model: "gpt-4-vision-preview",
+ });
+ });
+
+ it("should auto-detect and map LangGraph format", () => {
+ const input = {
+ messages: [{ role: "model", content: "Response from Gemini" }],
+ metadata: JSON.stringify({ langgraph_node: "agent_node" }),
+ };
+
+ // Test with metadata
+ // TODO: remove ls_... checks
+ const resultWithMeta = mapToLangfuseChatML(input, null, {
+ framework: "langgraph",
+ ls_version: "2.1",
+ });
+ expect(resultWithMeta.dataSource).toBe("langgraph");
+ expect(resultWithMeta.dataSourceVersion).toBe("2.1");
+
+ // Test with structural detection (no metadata)
+ const resultNoMeta = mapToLangfuseChatML(input, null);
+ expect(resultNoMeta.dataSource).toBeUndefined();
+ expect(resultNoMeta.dataSourceVersion).toBeUndefined();
+ expect(resultNoMeta.canDisplayAsChat()).toBe(true);
+
+ // Check that model role was normalized to assistant
+ const allMessages = resultNoMeta.getAllMessages();
+ expect(allMessages.some((m) => m.role === "assistant")).toBe(true);
+ });
+
+ it("should auto-detect and map Pydantic AI format", () => {
+ const input = [
+ {
+ content: "You are a helpful assistant.",
+ role: "system",
+ "gen_ai.system": "openai",
+ "gen_ai.message.index": 0,
+ "event.name": "gen_ai.system.message",
+ },
+ {
+ content: "What is the capital of Italy?",
+ role: "user",
+ "gen_ai.system": "openai",
+ "gen_ai.message.index": 0,
+ "event.name": "gen_ai.user.message",
+ },
+ ];
+
+ const output = {
+ index: 0,
+ message: {
+ role: "assistant",
+ content: "Rome",
+ },
+ "gen_ai.system": "openai",
+ "event.name": "gen_ai.choice",
+ };
+
+ const metadata = {
+ scope: {
+ name: "pydantic-ai",
+ version: "0.2.15",
+ },
+ };
+
+ // Test with metadata
+ const resultWithMeta = mapToLangfuseChatML(input, output, metadata);
+ expect(resultWithMeta._selectedMapper).toBe("pydantic");
+ expect(resultWithMeta.canDisplayAsChat()).toBe(true);
+ expect(resultWithMeta.input.messages).toHaveLength(2);
+ expect(resultWithMeta.output.messages).toHaveLength(1);
+ expect(resultWithMeta.output.messages[0].content).toBe("Rome");
+
+ // Test with structural detection (no metadata)
+ // const resultNoMeta = mapToLangfuseChatML(input, output);
+ // expect(resultNoMeta._selectedMapper).toBe("pydantic");
+ // expect(resultNoMeta.canDisplayAsChat()).toBe(true);
+ });
+
+ it("should fallback to generic mapper for regular ChatML", () => {
+ const input = [
+ { role: "user", content: "Hello!" },
+ { role: "assistant", content: "Hi there!" },
+ ];
+ const output = { role: "assistant", content: "How can I help?" };
+
+ const result = mapToLangfuseChatML(input, output);
+
+ // Should use generic mapper (no data source info)
+ expect(result.dataSource).toBeUndefined();
+ expect(result.dataSourceVersion).toBeUndefined();
+ expect(result.canDisplayAsChat()).toBe(true);
+
+ const allMessages = result.getAllMessages();
+ expect(allMessages).toHaveLength(3); // 2 input + 1 output
+ });
+
+ it("should handle nested array format [[ChatML...]]", () => {
+ // Some integrations wrap messages in double arrays
+ const input = [
+ [
+ { role: "system", content: "You are a helpful assistant." },
+ { role: "user", content: "Hello!" },
+ ],
+ ];
+ const output = { role: "assistant", content: "Hi there!" };
+
+ const result = mapToLangfuseChatML(input, output);
+
+ expect(result.canDisplayAsChat()).toBe(true);
+ expect(result.input.messages).toHaveLength(2);
+ expect(result.input.messages[0].role).toBe("system");
+ expect(result.input.messages[1].role).toBe("user");
+ expect(result.output.messages).toHaveLength(1);
+ });
+
+ it("should handle legacy completion format {completion: string}", () => {
+ const input = [{ role: "user", content: "Write a haiku" }];
+ const output = {
+ completion:
+ "Cherry blossoms fall\nSoftly on the morning dew\nSpring has come at last",
+ };
+
+ const result = mapToLangfuseChatML(input, output);
+
+ expect(result.canDisplayAsChat()).toBe(true);
+ expect(result.input.messages).toHaveLength(1);
+ expect(result.output.messages).toHaveLength(1);
+ // Legacy completion gets wrapped in json field
+ expect(result.output.messages[0].json).toEqual({
+ completion:
+ "Cherry blossoms fall\nSoftly on the morning dew\nSpring has come at last",
+ });
+ });
+
+ it("should handle placeholder messages", () => {
+ const input = [
+ { role: "user", content: "Hello" },
+ { type: "placeholder", name: "Processing..." },
+ { role: "assistant", content: "Hi there!" },
+ ];
+ const output = { role: "assistant", content: "How can I help?" };
+
+ const result = mapToLangfuseChatML(input, output);
+
+ expect(result.canDisplayAsChat()).toBe(true);
+ const allMessages = result.getAllMessages();
+ expect(allMessages).toHaveLength(4); // 3 input (including placeholder) + 1 output
+ expect(allMessages[1].type).toBe("placeholder");
+ });
+
+ it("should handle circular references gracefully", () => {
+ const input: any = [{ role: "user", content: "test" }];
+ input[0].circular = input[0]; // Create circular reference
+
+ // Should not crash, though parsing may succeed or fail gracefully
+ expect(() => mapToLangfuseChatML(input, null)).not.toThrow();
+ });
+
+ it("should handle very large inputs", () => {
+ const largeContent = "x".repeat(1000000); // 1 million chars
+ const input = [{ role: "user", content: largeContent }];
+ const output = { role: "assistant", content: "OK" };
+
+ const result = mapToLangfuseChatML(input, output);
+
+ expect(result.canDisplayAsChat()).toBe(true);
+ expect(result.input.messages[0].content).toHaveLength(1000000);
+ });
+});
diff --git a/web/src/utils/langfuse-chatml/mappers/base.ts b/web/src/utils/langfuse-chatml/mappers/base.ts
new file mode 100644
index 0000000000..fbc30cdc43
--- /dev/null
+++ b/web/src/utils/langfuse-chatml/mappers/base.ts
@@ -0,0 +1,21 @@
+import type { LangfuseChatML } from "../types";
+
+// Scoring constants for mapper selection
+export const MAPPER_SCORE_DEFINITIVE = 10; // Definitive match (e.g., metadata match)
+export const MAPPER_SCORE_NONE = 0; // No match
+
+export interface ChatMLMapper {
+ readonly mapperName: string;
+ readonly dataSourceName: string;
+ readonly dataSourceVersion?: string;
+ readonly dataSourceLanguage?: string;
+
+ // score based on metadata/structure indicators (no parsing)
+ // MAPPER_SCORE_DEFINITIVE (10) = definitive match
+ // 1-9 = partial match based on indicators
+ // MAPPER_SCORE_NONE (0) = no match
+ // metadata can be a string or object
+ canMapScore(input: unknown, output: unknown, metadata?: unknown): number;
+
+ map(input: unknown, output: unknown, metadata?: unknown): LangfuseChatML;
+}
diff --git a/web/src/utils/langfuse-chatml/mappers/generic.clienttest.ts b/web/src/utils/langfuse-chatml/mappers/generic.clienttest.ts
new file mode 100644
index 0000000000..b606e70feb
--- /dev/null
+++ b/web/src/utils/langfuse-chatml/mappers/generic.clienttest.ts
@@ -0,0 +1,100 @@
+// TODO: fix that mocking @langfuse/shared is required
+jest.mock("@langfuse/shared", () => ({
+ ChatMessageRole: {
+ System: "system",
+ Developer: "developer",
+ User: "user",
+ Assistant: "assistant",
+ Tool: "tool",
+ Model: "model",
+ },
+}));
+
+import { genericMapper } from "./generic";
+
+describe("genericMapper", () => {
+ it("should be fallback mapper with score 0 and map basic ChatML", () => {
+ // Always score 0 (fallback)
+ expect(genericMapper.canMapScore("anything", "anything")).toBe(0);
+ expect(genericMapper.canMapScore(null, undefined)).toBe(0);
+ expect(genericMapper.canMapScore({}, {}, "openai")).toBe(0);
+
+ // Map simple ChatML
+ const input = [
+ { role: "user", content: "Hello!" },
+ { role: "assistant", content: "Hi there!" },
+ ];
+ const output = { role: "assistant", content: "Response" };
+
+ const result = genericMapper.map(input, output);
+
+ expect(result.canDisplayAsChat()).toBe(true);
+ expect(result.getAllMessages()).toEqual(
+ expect.arrayContaining([
+ expect.objectContaining({ role: "user", content: "Hello!" }),
+ expect.objectContaining({ role: "assistant", content: "Hi there!" }),
+ expect.objectContaining({ role: "assistant", content: "Response" }),
+ ]),
+ );
+ expect(result.input.messages).toHaveLength(2);
+ expect(result.output.messages).toHaveLength(1);
+ });
+
+ it("should not display as chat if chat has no messages (or not parsed as in content-parts / google-adk)", () => {
+ // Based on real google-adk trace data
+ const input = {
+ new_message: {
+ parts: [{ text: "hi" }],
+ role: "user",
+ },
+ run_config: {
+ streaming_mode: "StreamingMode.NONE",
+ max_llm_calls: 500,
+ },
+ };
+
+ const 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,
+ },
+ author: "hello_agent",
+ actions: {
+ state_delta: {},
+ artifact_delta: {},
+ requested_auth_configs: {},
+ },
+ id: "some-id",
+ timestamp: 1756366351.22196,
+ };
+
+ const result = genericMapper.map(input, output);
+
+ // Should NOT display as chat even though output parses successfully
+ // because getAllMessages / combineInputOutputMessages returns 0
+ expect(result.canDisplayAsChat()).toBe(false);
+ expect(result.getAllMessages()).toHaveLength(0);
+ expect(result.input.messages).toHaveLength(0);
+ // Output technically parses as 1 message (has content field)
+ // but won't be displayed in chat view since getAllMessages returns 0
+ expect(result.output.messages).toHaveLength(1);
+
+ // Output should be in additional field for rendering as JSON
+ expect(result.output.additional).toBeDefined();
+ expect(result.output.additional).toMatchObject({
+ content: expect.objectContaining({
+ parts: expect.any(Array),
+ role: "model",
+ }),
+ finish_reason: "STOP",
+ });
+ });
+});
diff --git a/web/src/utils/langfuse-chatml/mappers/generic.ts b/web/src/utils/langfuse-chatml/mappers/generic.ts
new file mode 100644
index 0000000000..a12dcbc70a
--- /dev/null
+++ b/web/src/utils/langfuse-chatml/mappers/generic.ts
@@ -0,0 +1,92 @@
+import { type ChatMLMapper, MAPPER_SCORE_NONE } from "./base";
+import type { LangfuseChatML, LangfuseChatMLMessage } from "../types";
+import type { ChatMlMessageSchema } from "@/src/components/schemas/ChatMlSchema";
+import {
+ isPlainObject,
+ mapToChatMl,
+ mapOutputToChatMl,
+ cleanLegacyOutput,
+ extractAdditionalInput,
+ combineInputOutputMessages,
+} from "./utils";
+
+export const genericMapper: ChatMLMapper = {
+ mapperName: "generic",
+ dataSourceName: "generic",
+
+ canMapScore(_input: unknown, _output: unknown, _metadata?: unknown): number {
+ // Fallback mapper, always tried last
+ return MAPPER_SCORE_NONE;
+ },
+
+ map: (
+ input: unknown,
+ output: unknown,
+ _metadata?: unknown,
+ ): LangfuseChatML => {
+ const inChatMlArray = mapToChatMl(input);
+ const outChatMlArray = mapOutputToChatMl(output);
+ const outputClean = cleanLegacyOutput(output, output ?? null);
+ const additionalInput = extractAdditionalInput(input);
+
+ const result: LangfuseChatML = {
+ input: {
+ messages: inChatMlArray.success
+ ? inChatMlArray.data.map(convertToLangfuseChatMLMessage)
+ : [],
+ additional:
+ Object.keys(additionalInput ?? {}).length > 0
+ ? additionalInput
+ : undefined,
+ },
+ output: {
+ messages: outChatMlArray.success
+ ? outChatMlArray.data.map(convertToLangfuseChatMLMessage)
+ : [],
+ additional: isPlainObject(outputClean) ? outputClean : undefined,
+ },
+
+ canDisplayAsChat: function () {
+ // if input/output parsing failed, exit early for performance reasons
+ if (!inChatMlArray.success && !outChatMlArray.success) {
+ return false;
+ }
+
+ // Only display as chat if we have actual renderable messages
+ // Check getAllMessages() instead of just parse success, may filter out messages
+ // TODO: once we move to langfuse-chatml, we can fix this
+ const allMessages = combineInputOutputMessages(
+ inChatMlArray,
+ outChatMlArray,
+ outputClean,
+ );
+ const canDisplay = allMessages.length > 0;
+ return canDisplay;
+ },
+
+ getAllMessages: function () {
+ return combineInputOutputMessages(
+ inChatMlArray,
+ outChatMlArray,
+ outputClean,
+ );
+ },
+ };
+
+ return result;
+ },
+};
+
+function convertToLangfuseChatMLMessage(
+ msg: ChatMlMessageSchema,
+): LangfuseChatMLMessage {
+ // Generic mapper: simple pass-through, no framework-specific tool extraction
+ return {
+ role: msg.role || "assistant",
+ name: msg.name,
+ content: msg.content,
+ audio: msg.audio,
+ type: msg.type,
+ json: msg.json,
+ };
+}
diff --git a/web/src/utils/langfuse-chatml/mappers/langchain.clienttest.ts b/web/src/utils/langfuse-chatml/mappers/langchain.clienttest.ts
new file mode 100644
index 0000000000..f78ac8fdbb
--- /dev/null
+++ b/web/src/utils/langfuse-chatml/mappers/langchain.clienttest.ts
@@ -0,0 +1,313 @@
+// TODO: remove this mock...
+jest.mock("@langfuse/shared", () => {
+ const { z } = require("zod/v4");
+
+ return {
+ ChatMessageRole: {
+ System: "system",
+ Developer: "developer",
+ User: "user",
+ Assistant: "assistant",
+ Tool: "tool",
+ Model: "model",
+ },
+ OpenAIToolSchema: z.object({
+ type: z.literal("function"),
+ function: z.object({
+ name: z.string(),
+ description: z.string(),
+ parameters: z.any(),
+ }),
+ }),
+ };
+});
+
+import { langChainMapper } from "./langchain";
+import { MAPPER_SCORE_DEFINITIVE, MAPPER_SCORE_NONE } from "./base";
+
+describe("langChainMapper", () => {
+ it("should detect LangChain via metadata and structural indicators", () => {
+ // Metadata detection: ls_ prefix (LangSmith convention)
+ const metadata = {
+ tags: ["seq:step:1"],
+ ls_provider: "amazon_bedrock",
+ ls_model_name: "eu.anthropic.claude-3-haiku-20240307-v1:0",
+ ls_model_type: "chat",
+ ls_temperature: 0.1,
+ };
+
+ expect(langChainMapper.canMapScore({}, {}, metadata)).toBe(
+ MAPPER_SCORE_DEFINITIVE,
+ );
+ expect(langChainMapper.canMapScore({}, {}, { ls_provider: "openai" })).toBe(
+ MAPPER_SCORE_DEFINITIVE,
+ );
+ expect(
+ langChainMapper.canMapScore({}, {}, { framework: "langchain" }),
+ ).toBe(MAPPER_SCORE_DEFINITIVE);
+ expect(
+ langChainMapper.canMapScore({}, {}, { some_provider: "openai" }),
+ ).toBe(MAPPER_SCORE_NONE);
+
+ // Structural detection: additional_kwargs
+ const inputWithStructure = {
+ messages: [
+ {
+ role: "assistant",
+ content: "Let me help",
+ additional_kwargs: {
+ tool_calls: [
+ {
+ id: "call_123",
+ function: { name: "search", arguments: '{"q":"test"}' },
+ },
+ ],
+ },
+ },
+ ],
+ };
+
+ expect(
+ langChainMapper.canMapScore(inputWithStructure, null),
+ ).toBeGreaterThan(0);
+
+ // Should not detect regular ChatML
+ const regularInput = {
+ messages: [
+ { role: "user", content: "Hello!" },
+ { role: "assistant", content: "Hi there!" },
+ ],
+ };
+ expect(langChainMapper.canMapScore(regularInput, null)).toBe(0);
+ });
+
+ it("should handle tool calls and results", () => {
+ // Extract tool_calls from additional_kwargs (standard format)
+ const input1 = {
+ messages: [
+ {
+ role: "assistant",
+ content: "Using tools",
+ additional_kwargs: {
+ tool_calls: [
+ {
+ id: "call_lc1",
+ function: {
+ name: "weather_tool",
+ arguments: '{"city": "NYC"}',
+ },
+ },
+ ],
+ },
+ custom_field: "preserved",
+ },
+ ],
+ };
+
+ const result1 = langChainMapper.map(input1, null);
+ expect(result1.input.messages[0].toolCalls).toHaveLength(1);
+ expect(result1.input.messages[0].toolCalls?.[0]).toEqual({
+ id: "call_lc1",
+ type: "function",
+ function: {
+ name: "weather_tool",
+ arguments: '{"city": "NYC"}',
+ },
+ });
+ expect(result1.input.messages[0].json).toEqual({
+ custom_field: "preserved",
+ });
+
+ // Handle object arguments (not string)
+ const input2 = {
+ messages: [
+ {
+ role: "assistant",
+ content: "",
+ additional_kwargs: {
+ tool_calls: [
+ {
+ id: "call_lc2",
+ function: {
+ name: "calculator",
+ arguments: { operation: "add", a: 1, b: 2 },
+ },
+ },
+ ],
+ },
+ },
+ ],
+ };
+
+ const result2 = langChainMapper.map(input2, null);
+ expect(result2.input.messages[0].toolCalls?.[0].function.arguments).toBe(
+ '{"operation":"add","a":1,"b":2}',
+ );
+
+ // Handle missing tool call ID
+ const input3 = {
+ messages: [
+ {
+ role: "assistant",
+ content: "",
+ additional_kwargs: {
+ tool_calls: [
+ {
+ function: {
+ name: "test_tool",
+ arguments: "{}",
+ },
+ },
+ ],
+ },
+ },
+ ],
+ };
+
+ const result3 = langChainMapper.map(input3, null);
+ expect(result3.input.messages[0].toolCalls?.[0].id).toBeNull();
+
+ // Handle shorthand format (name/args instead of function.name/function.arguments)
+ const input4 = {
+ messages: [
+ {
+ role: "assistant",
+ content: "",
+ additional_kwargs: {
+ tool_calls: [
+ {
+ id: "call_short",
+ name: "shorthand_tool",
+ args: { key: "value" },
+ },
+ ],
+ },
+ },
+ ],
+ };
+
+ const result4 = langChainMapper.map(input4, null);
+ expect(result4.input.messages[0].toolCalls?.[0].function).toEqual({
+ name: "shorthand_tool",
+ arguments: '{"key":"value"}',
+ });
+
+ // Extract tool_call_id from tool result messages
+ const input5 = {
+ messages: [
+ {
+ role: "tool",
+ content: "result",
+ tool_call_id: "call_lc123",
+ },
+ ],
+ };
+
+ const result5 = langChainMapper.map(input5, null);
+ expect(result5.input.messages[0].toolCallId).toBe("call_lc123");
+ });
+
+ it("should extract tool definitions to additional.tools", () => {
+ // Basic tool definition extraction
+ const input1 = {
+ messages: [
+ {
+ role: "tool",
+ content: JSON.stringify({
+ type: "function",
+ function: {
+ name: "search",
+ description: "Search the web",
+ parameters: {
+ type: "object",
+ properties: {
+ query: { type: "string", description: "Search query" },
+ },
+ required: ["query"],
+ },
+ },
+ }),
+ },
+ {
+ role: "tool",
+ content: JSON.stringify({
+ type: "function",
+ function: {
+ name: "calculator",
+ description: "Perform calculations",
+ parameters: {
+ type: "object",
+ properties: {
+ expression: { type: "string" },
+ },
+ },
+ },
+ }),
+ },
+ {
+ role: "user",
+ content: "Search for cats",
+ },
+ ],
+ };
+
+ const result1 = langChainMapper.map(input1, null);
+ expect(result1.input.additional?.tools).toHaveLength(2);
+ expect((result1.input.additional?.tools as any)?.[0]).toEqual({
+ name: "search",
+ description: "Search the web",
+ parameters: {
+ type: "object",
+ properties: {
+ query: { type: "string", description: "Search query" },
+ },
+ required: ["query"],
+ },
+ });
+ expect(result1.input.messages).toHaveLength(1);
+ expect(result1.input.messages[0].role).toBe("user");
+
+ // Mixed: tool definitions + tool calls + tool results
+ const input2 = {
+ messages: [
+ {
+ role: "tool",
+ content: JSON.stringify({
+ type: "function",
+ function: {
+ name: "weather",
+ description: "Get weather",
+ parameters: { type: "object", properties: {} },
+ },
+ }),
+ },
+ {
+ role: "assistant",
+ content: "",
+ additional_kwargs: {
+ tool_calls: [
+ {
+ id: "call_1",
+ function: { name: "weather", arguments: '{"city":"SF"}' },
+ },
+ ],
+ },
+ },
+ {
+ role: "tool",
+ content: "Sunny, 72°F",
+ tool_call_id: "call_1",
+ },
+ ],
+ };
+
+ const result2 = langChainMapper.map(input2, null);
+ expect(result2.input.additional?.tools).toHaveLength(1);
+ expect((result2.input.additional?.tools as any)?.[0].name).toBe("weather");
+ expect(result2.input.messages).toHaveLength(2);
+ expect(result2.input.messages[0].role).toBe("assistant");
+ expect(result2.input.messages[0].toolCalls).toHaveLength(1);
+ expect(result2.input.messages[1].role).toBe("tool");
+ expect(result2.input.messages[1].toolCallId).toBe("call_1");
+ });
+});
diff --git a/web/src/utils/langfuse-chatml/mappers/langchain.ts b/web/src/utils/langfuse-chatml/mappers/langchain.ts
new file mode 100644
index 0000000000..ff7c81919f
--- /dev/null
+++ b/web/src/utils/langfuse-chatml/mappers/langchain.ts
@@ -0,0 +1,180 @@
+import {
+ type ChatMLMapper,
+ MAPPER_SCORE_DEFINITIVE,
+ MAPPER_SCORE_NONE,
+} from "./base";
+import type { LangfuseChatML, LangfuseChatMLMessage } from "../types";
+import type { ChatMlMessageSchema } from "@/src/components/schemas/ChatMlSchema";
+import {
+ isPlainObject,
+ parseMetadata,
+ extractJsonData,
+ extractToolData,
+ mapToChatMl,
+ mapOutputToChatMl,
+ cleanLegacyOutput,
+ extractAdditionalInput,
+ combineInputOutputMessages,
+} from "./utils";
+import { OpenAIToolSchema, type LLMToolDefinition } from "@langfuse/shared";
+
+// is a message a LangChain tool **definition** schema?
+function isToolDefinitionMessage(msg: ChatMlMessageSchema): boolean {
+ if (msg.role !== "tool") return false;
+ if (typeof msg.content !== "string") return false;
+ // Tool results have tool_call_id in json field, tool definitions don't
+ const jsonData = extractJsonData(msg.json);
+ if (jsonData?.tool_call_id) return false;
+
+ try {
+ const parsed = JSON.parse(msg.content);
+ return OpenAIToolSchema.safeParse(parsed).success;
+ } catch {
+ return false;
+ }
+}
+
+function extractToolDefinition(msg: ChatMlMessageSchema) {
+ try {
+ const parsed = JSON.parse(msg.content as string);
+ if (parsed.type === "function" && parsed.function) {
+ return {
+ name: parsed.function.name,
+ description: parsed.function.description,
+ parameters: parsed.function.parameters,
+ };
+ }
+ } catch {}
+ return null;
+}
+
+function convertLangChainMessage(
+ msg: ChatMlMessageSchema,
+): LangfuseChatMLMessage {
+ const base: LangfuseChatMLMessage = {
+ role: msg.role || "assistant",
+ name: msg.name,
+ content: msg.content,
+ audio: msg.audio,
+ type: msg.type,
+ };
+
+ if (!msg.json) return base;
+
+ // ChatML schema wraps extra fields in nested json object
+ const jsonData = extractJsonData(msg.json);
+ if (!jsonData) return base;
+
+ // NOTE: mapToChatMl() flattens LangChain's additional_kwargs.tool_calls to just tool_calls
+ // So by the time we get here, LangChain format looks the same as OpenAI format
+ return extractToolData(base, jsonData);
+}
+
+export const langChainMapper: ChatMLMapper = {
+ mapperName: "langchain",
+ dataSourceName: "langchain",
+
+ canMapScore(input: unknown, output: unknown, metadata?: unknown): number {
+ const meta = parseMetadata(metadata);
+
+ if (meta?.framework === "langchain") {
+ return MAPPER_SCORE_DEFINITIVE;
+ }
+
+ // Check for any ls_ prefixed fields (common for LangChain due to LangSmith integration)
+ if (meta && typeof meta === "object") {
+ const hasLsPrefix = Object.keys(meta).some((key) =>
+ key.startsWith("ls_"),
+ );
+ if (hasLsPrefix) {
+ return MAPPER_SCORE_DEFINITIVE;
+ }
+ }
+
+ // Structural detection for LangChain traces
+ const scoreData = (data: unknown): number => {
+ if (!data || typeof data !== "object") return MAPPER_SCORE_NONE;
+
+ const obj = data as Record<string, unknown>;
+
+ // Check if messages have additional_kwargs (LangChain-specific structure)
+ if (obj.messages && Array.isArray(obj.messages)) {
+ const hasAdditionalKwargs = obj.messages.some(
+ (msg: any) =>
+ msg &&
+ typeof msg === "object" &&
+ "additional_kwargs" in msg &&
+ msg.additional_kwargs &&
+ typeof msg.additional_kwargs === "object",
+ );
+ if (hasAdditionalKwargs) return 5; // Structural indicator
+ }
+
+ return MAPPER_SCORE_NONE;
+ };
+
+ return Math.max(scoreData(input), scoreData(output));
+ },
+
+ map: (
+ input: unknown,
+ output: unknown,
+ metadata?: unknown,
+ ): LangfuseChatML => {
+ const meta = parseMetadata(metadata);
+ const inChatMlArray = mapToChatMl(input);
+ const outChatMlArray = mapOutputToChatMl(output);
+ const outputClean = cleanLegacyOutput(output, output ?? null);
+ const additionalInput = extractAdditionalInput(input);
+
+ // Separate tool definitions from regular messages
+ const toolDefinitions: LLMToolDefinition[] = [];
+ const regularMessages: ChatMlMessageSchema[] = [];
+
+ if (inChatMlArray.success) {
+ for (const msg of inChatMlArray.data) {
+ if (isToolDefinitionMessage(msg)) {
+ const toolDef = extractToolDefinition(msg);
+ if (toolDef) toolDefinitions.push(toolDef);
+ } else {
+ regularMessages.push(msg);
+ }
+ }
+ }
+
+ // Build additional field with tools if present
+ const additional = {
+ ...additionalInput,
+ ...(toolDefinitions.length > 0 ? { tools: toolDefinitions } : {}),
+ };
+
+ const result: LangfuseChatML = {
+ input: {
+ messages: regularMessages.map(convertLangChainMessage),
+ additional: Object.keys(additional).length > 0 ? additional : undefined,
+ },
+ output: {
+ messages: outChatMlArray.success
+ ? outChatMlArray.data.map(convertLangChainMessage)
+ : [],
+ additional: isPlainObject(outputClean) ? outputClean : undefined,
+ },
+ dataSource: meta?.framework ? String(meta.framework) : undefined,
+ dataSourceVersion: meta?.ls_version ? String(meta.ls_version) : undefined,
+
+ canDisplayAsChat: function () {
+ return regularMessages.length > 0 || outChatMlArray.success;
+ },
+
+ getAllMessages: function () {
+ return combineInputOutputMessages(
+ { success: true, data: regularMessages },
+ outChatMlArray,
+ outputClean,
+ );
+ },
+ };
+
+ return result;
+ },
+};
diff --git a/web/src/utils/langfuse-chatml/mappers/langgraph.clienttest.ts b/web/src/utils/langfuse-chatml/mappers/langgraph.clienttest.ts
new file mode 100644
index 0000000000..7743e5507b
--- /dev/null
+++ b/web/src/utils/langfuse-chatml/mappers/langgraph.clienttest.ts
@@ -0,0 +1,145 @@
+// TODO: remove this mock
+jest.mock("@langfuse/shared", () => ({
+ ChatMessageRole: {
+ System: "system",
+ Developer: "developer",
+ User: "user",
+ Assistant: "assistant",
+ Tool: "tool",
+ Model: "model",
+ },
+}));
+
+import { langGraphMapper } from "./langgraph";
+import { MAPPER_SCORE_DEFINITIVE, MAPPER_SCORE_NONE } from "./base";
+
+describe("langGraphMapper", () => {
+ it("should detect LangGraph via metadata and structural indicators", () => {
+ // Metadata detection: framework or ls_provider
+ expect(
+ langGraphMapper.canMapScore({}, {}, { framework: "langgraph" }),
+ ).toBe(MAPPER_SCORE_DEFINITIVE);
+ expect(
+ langGraphMapper.canMapScore({}, {}, { ls_provider: "langgraph" }),
+ ).toBe(MAPPER_SCORE_DEFINITIVE);
+ expect(
+ langGraphMapper.canMapScore({}, {}, { some_provider: "openai" }),
+ ).toBe(MAPPER_SCORE_NONE);
+
+ // Structural detection: langgraph_node or langgraph_step in metadata
+ const inputWithStructure = {
+ metadata: JSON.stringify({ langgraph_node: "some_node" }),
+ };
+ expect(
+ langGraphMapper.canMapScore(inputWithStructure, null),
+ ).toBeGreaterThan(0);
+
+ // Should not detect regular ChatML
+ const regularInput = [
+ { role: "user", content: "Hello!" },
+ { role: "assistant", content: "Hi there!" },
+ ];
+ expect(langGraphMapper.canMapScore(regularInput, null)).toBe(0);
+ });
+
+ it("should normalize roles (Gemini support)", () => {
+ // Normalize Gemini "model" role to "assistant"
+ const input1 = {
+ messages: [{ role: "model", content: "Response from Gemini" }],
+ metadata: JSON.stringify({ langgraph_step: 1 }),
+ };
+
+ const result1 = langGraphMapper.map(input1, null);
+ expect(result1.input.messages[0].role).toBe("assistant");
+
+ // Preserve _originalRole for custom tool names (used for tool call ID inference)
+ const input2 = {
+ messages: [{ role: "custom_tool_name", content: "Tool result" }],
+ metadata: JSON.stringify({ langgraph_node: "agent" }),
+ };
+
+ const result2 = langGraphMapper.map(input2, null);
+ expect(result2.input.messages[0].role).toBe("tool");
+ expect(result2.input.messages[0]._originalRole).toBe("custom_tool_name");
+
+ // Handle Gemini parts array conversion
+ const input3 = {
+ messages: [
+ {
+ role: "user",
+ parts: [{ text: "Hello" }, { text: " world" }],
+ },
+ ],
+ metadata: JSON.stringify({ langgraph_node: "test" }),
+ };
+
+ const result3 = langGraphMapper.map(input3, null);
+ expect(result3.input.messages[0].content).toBe("Hello world");
+ });
+
+ it("should handle tool calls and results", () => {
+ // Extract tool_calls from LangGraph messages
+ const input1 = {
+ messages: [
+ {
+ role: "assistant",
+ content: "Using tools",
+ tool_calls: [
+ {
+ id: "call_lg1",
+ name: "weather_tool",
+ args: { city: "SF" },
+ },
+ ],
+ },
+ ],
+ metadata: JSON.stringify({ langgraph_node: "agent" }),
+ };
+
+ const result1 = langGraphMapper.map(input1, null);
+ expect(result1.input.messages[0].toolCalls).toHaveLength(1);
+ expect(result1.input.messages[0].toolCalls?.[0]).toEqual({
+ id: "call_lg1",
+ type: "function",
+ function: {
+ name: "weather_tool",
+ arguments: '{"city":"SF"}',
+ },
+ });
+
+ // Handle missing tool call IDs (use null)
+ const input2 = {
+ messages: [
+ {
+ role: "assistant",
+ content: "",
+ tool_calls: [
+ {
+ name: "test_tool",
+ args: {},
+ },
+ ],
+ },
+ ],
+ metadata: JSON.stringify({ langgraph_node: "test" }),
+ };
+
+ const result2 = langGraphMapper.map(input2, null);
+ expect(result2.input.messages[0].toolCalls?.[0].id).toBeNull();
+
+ // Extract tool_call_id from tool result messages
+ const input3 = {
+ messages: [
+ {
+ role: "tool",
+ content: "result",
+ tool_call_id: "call_123",
+ },
+ ],
+ metadata: JSON.stringify({ langgraph_node: "tools" }),
+ };
+
+ const result3 = langGraphMapper.map(input3, null);
+ expect(result3.input.messages[0].toolCallId).toBe("call_123");
+ });
+});
diff --git a/web/src/utils/langfuse-chatml/mappers/langgraph.ts b/web/src/utils/langfuse-chatml/mappers/langgraph.ts
new file mode 100644
index 0000000000..b47de80add
--- /dev/null
+++ b/web/src/utils/langfuse-chatml/mappers/langgraph.ts
@@ -0,0 +1,230 @@
+import {
+ type ChatMLMapper,
+ MAPPER_SCORE_DEFINITIVE,
+ MAPPER_SCORE_NONE,
+} from "./base";
+import type { LangfuseChatML, LangfuseChatMLMessage } from "../types";
+import type { ChatMlMessageSchema } from "@/src/components/schemas/ChatMlSchema";
+import {
+ isPlainObject,
+ parseMetadata,
+ extractJsonData,
+ extractToolData,
+ mapToChatMl,
+ mapOutputToChatMl,
+ cleanLegacyOutput,
+ extractAdditionalInput,
+ combineInputOutputMessages,
+} from "./utils";
+import { ChatMessageRole } from "@langfuse/shared";
+
+function hasLangGraphIndicators(data: unknown): boolean {
+ if (!data || typeof data !== "object") return false;
+
+ const obj = data as Record<string, unknown>;
+
+ // Check direct properties
+ if ("langgraph_node" in obj || "langgraph_step" in obj) {
+ return true;
+ }
+
+ // Check top-level metadata field
+ if ("metadata" in obj) {
+ const metadata = parseMetadata(obj.metadata);
+ if (
+ metadata &&
+ ("langgraph_node" in metadata || "langgraph_step" in metadata)
+ ) {
+ return true;
+ }
+ }
+
+ // Check nested messages[].metadata
+ if ("messages" in obj && Array.isArray(obj.messages)) {
+ return obj.messages.some((msg: unknown) => {
+ if (!msg || typeof msg !== "object") return false;
+ const msgObj = msg as Record<string, unknown>;
+ if (!msgObj.metadata) return false;
+
+ const metadata = parseMetadata(msgObj.metadata);
+ return (
+ metadata &&
+ ("langgraph_node" in metadata || "langgraph_step" in metadata)
+ );
+ });
+ }
+
+ return false;
+}
+
+// Normalize LangGraph tool messages by converting tool-name roles to "tool"
+// and normalize Google/Gemini format (model role + parts field)
+function normalizeLangGraphMessage(
+ message: unknown,
+ isLangGraph: boolean = false,
+): unknown {
+ if (!message || typeof message !== "object" || !("role" in message)) {
+ return message;
+ }
+
+ const msg = message as any;
+ const validRoles = Object.values(ChatMessageRole);
+ let normalizedMessage = { ...msg };
+
+ // convert google format: "model" role -> "assistant"
+ if (msg.role === "model") {
+ normalizedMessage.role = ChatMessageRole.Assistant;
+ }
+
+ // convert google format: "parts" field -> "content" field
+ if (msg.parts && Array.isArray(msg.parts)) {
+ const content = msg.parts
+ .map((part: any) =>
+ typeof part === "object" && part.text ? part.text : String(part),
+ )
+ .join("");
+ normalizedMessage.content = content;
+ delete normalizedMessage.parts;
+ }
+
+ // convert LangGraph: invalid roles -> "tool" role
+ if (
+ isLangGraph &&
+ !validRoles.includes(normalizedMessage.role as ChatMessageRole)
+ ) {
+ return {
+ ...normalizedMessage,
+ role: ChatMessageRole.Tool,
+ _originalRole: msg.role,
+ };
+ }
+
+ return normalizedMessage;
+}
+
+function convertLangGraphMessage(
+ msg: ChatMlMessageSchema,
+): LangfuseChatMLMessage {
+ const base: LangfuseChatMLMessage = {
+ role: msg.role || "assistant",
+ name: msg.name,
+ content: msg.content,
+ audio: msg.audio,
+ type: msg.type,
+ };
+
+ if (!msg.json) return base;
+
+ const jsonData = extractJsonData(msg.json);
+ if (!jsonData) return base;
+
+ const jsonCopy = { ...jsonData };
+
+ // Keep _originalRole for tool call ID inference (LangGraph-specific)
+ if (jsonCopy._originalRole) {
+ base._originalRole = String(jsonCopy._originalRole);
+ delete jsonCopy._originalRole;
+ }
+
+ return extractToolData(base, jsonCopy);
+}
+
+export const langGraphMapper: ChatMLMapper = {
+ mapperName: "langgraph",
+ dataSourceName: "langgraph",
+
+ canMapScore(input: unknown, output: unknown, metadata?: unknown): number {
+ const meta = parseMetadata(metadata);
+
+ // LangGraph uses both framework and ls_provider keys
+ if (meta?.framework === "langgraph" || meta?.ls_provider === "langgraph") {
+ return MAPPER_SCORE_DEFINITIVE;
+ }
+
+ if (
+ hasLangGraphIndicators(meta) ||
+ hasLangGraphIndicators(input) ||
+ hasLangGraphIndicators(output)
+ ) {
+ return 8;
+ }
+
+ return MAPPER_SCORE_NONE;
+ },
+
+ map: (
+ input: unknown,
+ output: unknown,
+ metadata?: unknown,
+ ): LangfuseChatML => {
+ const meta = parseMetadata(metadata);
+ const normalizeData = (data: unknown): unknown => {
+ if (!data || typeof data !== "object") return data;
+
+ const obj = data as Record<string, unknown>;
+
+ // Normalize messages if they exist
+ if (obj.messages && Array.isArray(obj.messages)) {
+ return {
+ ...obj,
+ messages: obj.messages.map((msg: unknown) =>
+ normalizeLangGraphMessage(msg, true),
+ ),
+ };
+ }
+
+ // If it's a single message, normalize it
+ if (obj.role) {
+ return normalizeLangGraphMessage(obj, true);
+ }
+
+ return data;
+ };
+
+ const normalizedInput = normalizeData(input);
+ const normalizedOutput = normalizeData(output);
+
+ const inChatMlArray = mapToChatMl(normalizedInput);
+ const outChatMlArray = mapOutputToChatMl(normalizedOutput);
+ const outputClean = cleanLegacyOutput(output, output ?? null);
+ const additionalInput = extractAdditionalInput(normalizedInput);
+
+ const result: LangfuseChatML = {
+ input: {
+ messages: inChatMlArray.success
+ ? inChatMlArray.data.map(convertLangGraphMessage)
+ : [],
+ additional:
+ Object.keys(additionalInput ?? {}).length > 0
+ ? additionalInput
+ : undefined,
+ },
+ output: {
+ messages: outChatMlArray.success
+ ? outChatMlArray.data.map(convertLangGraphMessage)
+ : [],
+ additional: isPlainObject(outputClean) ? outputClean : undefined,
+ },
+ dataSource: meta?.framework
+ ? String(meta.framework)
+ : meta?.ls_provider
+ ? String(meta.ls_provider)
+ : undefined,
+ dataSourceVersion: meta?.ls_version ? String(meta.ls_version) : undefined,
+
+ canDisplayAsChat: function () {
+ return inChatMlArray.success || outChatMlArray.success;
+ },
+
+ getAllMessages: function () {
+ return combineInputOutputMessages(
+ inChatMlArray,
+ outChatMlArray,
+ outputClean,
+ );
+ },
+ };
+
+ return result;
+ },
+};
diff --git a/web/src/utils/langfuse-chatml/mappers/llamaindex.clienttest.ts b/web/src/utils/langfuse-chatml/mappers/llamaindex.clienttest.ts
new file mode 100644
index 0000000000..749070ce73
--- /dev/null
+++ b/web/src/utils/langfuse-chatml/mappers/llamaindex.clienttest.ts
@@ -0,0 +1,64 @@
+import { llamaIndexMapper } from "./llamaindex";
+import { MAPPER_SCORE_DEFINITIVE } from "./base";
+
+describe("LlamaIndex Mapper", () => {
+ it("should detect LlamaIndex via metadata scope.name", () => {
+ const metadata = {
+ attributes: {
+ "llm.model_name": "gpt-4o",
+ "llm.provider": "openai",
+ "llm.prompts": ["What is Langfuse?"],
+ "openinference.span.kind": "LLM",
+ },
+ scope: {
+ name: "openinference.instrumentation.llama_index",
+ version: "4.3.0",
+ },
+ };
+
+ expect(llamaIndexMapper.canMapScore({}, {}, metadata)).toBe(
+ MAPPER_SCORE_DEFINITIVE,
+ );
+ });
+
+ it("should map LlamaIndex format to ChatML", () => {
+ const input = {
+ args: ["What is Langfuse?"],
+ };
+
+ const output =
+ "Langfuse is a tool designed to help developers monitor and debug applications that utilize large language models (LLMs).";
+
+ const metadata = {
+ attributes: {
+ "llm.model_name": "gpt-4o",
+ "llm.provider": "openai",
+ "llm.prompts": ["What is Langfuse?"],
+ "output.value": output,
+ "openinference.span.kind": "LLM",
+ },
+ scope: {
+ name: "openinference.instrumentation.llama_index",
+ version: "4.3.0",
+ },
+ };
+
+ const result = llamaIndexMapper.map(input, output, metadata);
+
+ expect(result.input.messages).toHaveLength(1);
+ expect(result.input.messages[0]).toEqual({
+ role: "user",
+ name: undefined,
+ content: "What is Langfuse?",
+ });
+
+ expect(result.output.messages).toHaveLength(1);
+ expect(result.output.messages[0]).toEqual({
+ role: "assistant",
+ name: undefined,
+ content: output,
+ });
+
+ expect(result.canDisplayAsChat()).toBe(true);
+ });
+});
diff --git a/web/src/utils/langfuse-chatml/mappers/llamaindex.ts b/web/src/utils/langfuse-chatml/mappers/llamaindex.ts
new file mode 100644
index 0000000000..ec0f5d691d
--- /dev/null
+++ b/web/src/utils/langfuse-chatml/mappers/llamaindex.ts
@@ -0,0 +1,115 @@
+import {
+ type ChatMLMapper,
+ MAPPER_SCORE_DEFINITIVE,
+ MAPPER_SCORE_NONE,
+} from "./base";
+import type { LangfuseChatML, LangfuseChatMLMessage } from "../types";
+import { parseMetadata, normalizeMessageForChatMl } from "./utils";
+
+export const llamaIndexMapper: ChatMLMapper = {
+ mapperName: "llamaindex",
+ dataSourceName: "llama-index",
+
+ canMapScore(input: unknown, output: unknown, metadata?: unknown): number {
+ const meta = parseMetadata(metadata);
+
+ if (
+ meta &&
+ typeof meta === "object" &&
+ "scope" in meta &&
+ typeof meta.scope === "object" &&
+ meta.scope !== null &&
+ "name" in meta.scope &&
+ typeof meta.scope.name === "string" &&
+ (meta.scope.name as string).includes("llama_index")
+ ) {
+ return MAPPER_SCORE_DEFINITIVE;
+ }
+
+ return MAPPER_SCORE_NONE;
+ },
+
+ map: (
+ input: unknown,
+ output: unknown,
+ metadata?: unknown,
+ ): LangfuseChatML => {
+ const inputMessages: LangfuseChatMLMessage[] = [];
+ const outputMessages: LangfuseChatMLMessage[] = [];
+
+ const meta = parseMetadata(metadata);
+
+ // Extract prompts from metadata.attributes.llm.prompts
+ if (
+ meta &&
+ typeof meta === "object" &&
+ "attributes" in meta &&
+ typeof meta.attributes === "object" &&
+ meta.attributes !== null
+ ) {
+ const attrs = meta.attributes as Record<string, unknown>;
+
+ // Process llm.prompts as input messages (user role)
+ if (Array.isArray(attrs["llm.prompts"])) {
+ for (const prompt of attrs["llm.prompts"]) {
+ if (typeof prompt === "string") {
+ inputMessages.push({
+ role: "user",
+ name: undefined,
+ content: prompt,
+ audio: undefined,
+ type: undefined,
+ });
+ }
+ }
+ }
+ }
+
+ // Process output (direct string)
+ if (typeof output === "string" && output.length > 0) {
+ outputMessages.push({
+ role: "assistant",
+ name: undefined,
+ content: output,
+ audio: undefined,
+ type: undefined,
+ });
+ }
+
+ // Extract dataSource from metadata.scope.name
+ let dataSource: string | undefined = undefined;
+ if (
+ meta &&
+ typeof meta === "object" &&
+ "scope" in meta &&
+ typeof meta.scope === "object" &&
+ meta.scope !== null &&
+ "name" in meta.scope
+ ) {
+ dataSource = String(meta.scope.name);
+ }
+
+ return {
+ input: {
+ messages: inputMessages,
+ additional: undefined,
+ },
+ output: {
+ messages: outputMessages,
+ additional: undefined,
+ },
+ dataSource,
+ dataSourceVersion: undefined,
+
+ canDisplayAsChat: function () {
+ return inputMessages.length > 0 || outputMessages.length > 0;
+ },
+
+ getAllMessages: function () {
+ return [...inputMessages, ...outputMessages].map(
+ normalizeMessageForChatMl,
+ );
+ },
+ };
+ },
+};
diff --git a/web/src/utils/langfuse-chatml/mappers/openai.clienttest.ts b/web/src/utils/langfuse-chatml/mappers/openai.clienttest.ts
new file mode 100644
index 0000000000..afe9ef0dc4
--- /dev/null
+++ b/web/src/utils/langfuse-chatml/mappers/openai.clienttest.ts
@@ -0,0 +1,154 @@
+// TODO: remove
+jest.mock("@langfuse/shared", () => ({
+ ChatMessageRole: {
+ System: "system",
+ Developer: "developer",
+ User: "user",
+ Assistant: "assistant",
+ Tool: "tool",
+ Model: "model",
+ },
+}));
+
+import { openAIMapper } from "./openai";
+import { MAPPER_SCORE_DEFINITIVE, MAPPER_SCORE_NONE } from "./base";
+
+describe("openAIMapper", () => {
+ it("should detect OpenAI via metadata and structural indicators", () => {
+ // Metadata detection: ls_provider
+ // TODO: remove ls_... check -> should be oai specific
+ expect(openAIMapper.canMapScore({}, {}, { ls_provider: "openai" })).toBe(
+ MAPPER_SCORE_DEFINITIVE,
+ );
+ expect(
+ openAIMapper.canMapScore(
+ {},
+ {},
+ { ls_provider: "openai", ls_version: "1.0" },
+ ),
+ ).toBe(MAPPER_SCORE_DEFINITIVE);
+ expect(openAIMapper.canMapScore({}, {}, { framework: "langgraph" })).toBe(
+ MAPPER_SCORE_NONE,
+ );
+
+ // Structural detection: Parts API
+ const partsInput = {
+ messages: [
+ {
+ role: "user",
+ content: [
+ { type: "text", text: "What's in this image?" },
+ {
+ type: "image_url",
+ image_url: { url: "data:image/jpeg;base64,..." },
+ },
+ ],
+ },
+ ],
+ };
+ expect(openAIMapper.canMapScore(partsInput, null)).toBeGreaterThan(0);
+
+ // Should not detect regular ChatML
+ const regularInput = [
+ { role: "user", content: "Hello!" },
+ { role: "assistant", content: "Hi there!" },
+ ];
+ expect(openAIMapper.canMapScore(regularInput, null)).toBe(0);
+ });
+
+ it("should handle tool calls and tool results", () => {
+ // Test assistant message with tool_calls
+ const inputWithToolCalls = {
+ messages: [
+ {
+ role: "assistant",
+ content: "Let me check that for you",
+ tool_calls: [
+ {
+ id: "call_abc123",
+ type: "function",
+ function: {
+ name: "get_weather",
+ arguments: '{"city": "NYC"}',
+ },
+ },
+ ],
+ custom_field: "should_be_preserved",
+ },
+ ],
+ };
+
+ const result1 = openAIMapper.map(inputWithToolCalls, null);
+ expect(result1.input.messages).toHaveLength(1);
+ expect(result1.input.messages[0].toolCalls).toHaveLength(1);
+ expect(result1.input.messages[0].toolCalls?.[0]).toEqual({
+ id: "call_abc123",
+ type: "function",
+ function: {
+ name: "get_weather",
+ arguments: '{"city": "NYC"}',
+ },
+ });
+ expect(result1.input.messages[0].content).toBe("Let me check that for you");
+ expect(result1.input.messages[0].json).toEqual({
+ custom_field: "should_be_preserved",
+ });
+
+ // Test tool message with tool_call_id
+ const inputWithToolResult = {
+ messages: [
+ {
+ role: "tool",
+ content: '{"temperature": 72}',
+ tool_call_id: "call_abc123",
+ },
+ ],
+ };
+
+ const result2 = openAIMapper.map(inputWithToolResult, null);
+ expect(result2.input.messages).toHaveLength(1);
+ expect(result2.input.messages[0].toolCallId).toBe("call_abc123");
+ expect(result2.input.messages[0].content).toBe('{"temperature": 72}');
+
+ // Test object arguments (not string)
+ const inputWithObjectArgs = {
+ messages: [
+ {
+ role: "assistant",
+ content: "",
+ tool_calls: [
+ {
+ id: "call_obj",
+ type: "function",
+ function: {
+ name: "test_func",
+ arguments: { key: "value", nested: { data: 123 } },
+ },
+ },
+ ],
+ },
+ ],
+ };
+
+ const result3 = openAIMapper.map(inputWithObjectArgs, null);
+ expect(result3.input.messages[0].toolCalls?.[0].function.arguments).toBe(
+ '{"key":"value","nested":{"data":123}}',
+ );
+ });
+
+ it("should not add toolCalls or toolCallId if not present", () => {
+ const input = {
+ messages: [
+ {
+ role: "assistant",
+ content: "Regular message without tools",
+ },
+ ],
+ };
+
+ const result = openAIMapper.map(input, null);
+
+ expect(result.input.messages[0].toolCalls).toBeUndefined();
+ expect(result.input.messages[0].toolCallId).toBeUndefined();
+ });
+});
diff --git a/web/src/utils/langfuse-chatml/mappers/openai.ts b/web/src/utils/langfuse-chatml/mappers/openai.ts
new file mode 100644
index 0000000000..498f9252a1
--- /dev/null
+++ b/web/src/utils/langfuse-chatml/mappers/openai.ts
@@ -0,0 +1,114 @@
+import {
+ type ChatMLMapper,
+ MAPPER_SCORE_DEFINITIVE,
+ MAPPER_SCORE_NONE,
+} from "./base";
+import type { LangfuseChatML, LangfuseChatMLMessage } from "../types";
+import type { ChatMlMessageSchema } from "@/src/components/schemas/ChatMlSchema";
+import {
+ isPlainObject,
+ parseMetadata,
+ extractJsonData,
+ extractToolData,
+ mapToChatMl,
+ mapOutputToChatMl,
+ cleanLegacyOutput,
+ extractAdditionalInput,
+ combineInputOutputMessages,
+} from "./utils";
+import { z } from "zod/v4";
+
+const OpenAIPartsAPISchema = z.object({
+ messages: z.array(
+ z.object({
+ content: z.array(
+ z.object({
+ type: z.enum(["text", "image_url", "input_audio"]),
+ }),
+ ),
+ }),
+ ),
+});
+
+function convertOpenAIMessage(msg: ChatMlMessageSchema): LangfuseChatMLMessage {
+ const base: LangfuseChatMLMessage = {
+ role: msg.role || "assistant",
+ name: msg.name,
+ content: msg.content,
+ audio: msg.audio,
+ type: msg.type,
+ };
+
+ if (!msg.json) return base;
+
+ // The ChatML schema wraps extra fields in a nested json object
+ // extractJsonData handles both: { json: {...} } and {...}
+ const jsonData = extractJsonData(msg.json);
+ if (!jsonData) return base;
+
+ return extractToolData(base, jsonData);
+}
+
+export const openAIMapper: ChatMLMapper = {
+ mapperName: "openai",
+ dataSourceName: "openai",
+
+ canMapScore(input: unknown, output: unknown, metadata?: unknown): number {
+ const meta = parseMetadata(metadata);
+
+ // TODO: ls_provider is a LangSmith convention - may need to check other keys for pure OpenAI traces
+ if (meta?.ls_provider === "openai") return MAPPER_SCORE_DEFINITIVE;
+
+ if (OpenAIPartsAPISchema.safeParse(input).success) {
+ return 8; // Strong structural indicator
+ }
+
+ return MAPPER_SCORE_NONE;
+ },
+
+ map: (
+ input: unknown,
+ output: unknown,
+ metadata?: unknown,
+ ): LangfuseChatML => {
+ const meta = parseMetadata(metadata);
+ const inChatMlArray = mapToChatMl(input);
+ const outChatMlArray = mapOutputToChatMl(output);
+ const outputClean = cleanLegacyOutput(output, output ?? null);
+ const additionalInput = extractAdditionalInput(input);
+
+ const result: LangfuseChatML = {
+ input: {
+ messages: inChatMlArray.success
+ ? inChatMlArray.data.map(convertOpenAIMessage)
+ : [],
+ additional:
+ Object.keys(additionalInput ?? {}).length > 0
+ ? additionalInput
+ : undefined,
+ },
+ output: {
+ messages: outChatMlArray.success
+ ? outChatMlArray.data.map(convertOpenAIMessage)
+ : [],
+ additional: isPlainObject(outputClean) ? outputClean : undefined,
+ },
+ dataSource: meta?.ls_provider ? String(meta.ls_provider) : undefined,
+ dataSourceVersion: meta?.ls_version ? String(meta.ls_version) : undefined,
+
+ canDisplayAsChat: function () {
+ return inChatMlArray.success || outChatMlArray.success;
+ },
+
+ getAllMessages: function () {
+ return combineInputOutputMessages(
+ inChatMlArray,
+ outChatMlArray,
+ outputClean,
+ );
+ },
+ };
+
+ return result;
+ },
+};
diff --git a/web/src/utils/langfuse-chatml/mappers/pydantic.clienttest.ts b/web/src/utils/langfuse-chatml/mappers/pydantic.clienttest.ts
new file mode 100644
index 0000000000..26c0744ea5
--- /dev/null
+++ b/web/src/utils/langfuse-chatml/mappers/pydantic.clienttest.ts
@@ -0,0 +1,149 @@
+import { pydanticMapper } from "./pydantic";
+import { MAPPER_SCORE_DEFINITIVE, MAPPER_SCORE_NONE } from "./base";
+
+describe("pydanticMapper", () => {
+ it("should detect Pydantic AI via metadata and structural indicators", () => {
+ const metadata = {
+ attributes: {
+ "gen_ai.operation.name": "chat",
+ "gen_ai.system": "openai",
+ "gen_ai.request.model": "gpt-4o",
+ },
+ scope: {
+ name: "pydantic-ai",
+ version: "0.2.15",
+ attributes: {},
+ },
+ };
+
+ expect(pydanticMapper.canMapScore({}, {}, metadata)).toBe(
+ MAPPER_SCORE_DEFINITIVE,
+ );
+ expect(
+ pydanticMapper.canMapScore(
+ {},
+ {},
+ { attributes: { "gen_ai.system": "openai" } },
+ ),
+ ).toBe(MAPPER_SCORE_NONE);
+
+ // Structural detection: gen_ai.* and event.name fields
+ const inputWithStructure = [
+ {
+ content: "You are a helpful assistant.",
+ role: "system",
+ "gen_ai.system": "openai",
+ "gen_ai.message.index": 0,
+ "event.name": "gen_ai.system.message",
+ },
+ {
+ content: "What is the capital of Italy?",
+ role: "user",
+ "gen_ai.system": "openai",
+ "gen_ai.message.index": 0,
+ "event.name": "gen_ai.user.message",
+ },
+ ];
+
+ const outputWithStructure = {
+ index: 0,
+ message: {
+ role: "assistant",
+ content: "Rome",
+ },
+ "gen_ai.system": "openai",
+ "event.name": "gen_ai.choice",
+ };
+
+ expect(
+ pydanticMapper.canMapScore(inputWithStructure, null),
+ ).toBeGreaterThan(0);
+ expect(
+ pydanticMapper.canMapScore(null, outputWithStructure),
+ ).toBeGreaterThan(0);
+
+ // Should not detect regular ChatML
+ const regularInput = {
+ messages: [
+ { role: "user", content: "Hello!" },
+ { role: "assistant", content: "Hi!" },
+ ],
+ };
+ expect(pydanticMapper.canMapScore(regularInput, null)).toBe(
+ MAPPER_SCORE_NONE,
+ );
+ });
+
+ it("should map Pydantic AI format and handle nested messages", () => {
+ // Basic mapping with gen_ai.* field filtering
+ const input1 = [
+ {
+ content: "You are a helpful assistant.",
+ role: "system",
+ "gen_ai.system": "openai",
+ "gen_ai.message.index": 0,
+ "event.name": "gen_ai.system.message",
+ },
+ {
+ content: "What is the capital of Italy?",
+ role: "user",
+ "gen_ai.system": "openai",
+ "gen_ai.message.index": 0,
+ "event.name": "gen_ai.user.message",
+ custom_field: "preserved",
+ another_field: 123,
+ },
+ ];
+
+ const output1 = {
+ index: 0,
+ message: {
+ role: "assistant",
+ content: "Rome",
+ },
+ "gen_ai.system": "openai",
+ "event.name": "gen_ai.choice",
+ };
+
+ const result1 = pydanticMapper.map(input1, output1);
+ expect(result1.input.messages).toHaveLength(2);
+ expect(result1.input.messages[0]).toEqual({
+ role: "system",
+ name: undefined,
+ content: "You are a helpful assistant.",
+ json: undefined,
+ });
+ expect(result1.input.messages[1].json).toEqual({
+ custom_field: "preserved",
+ another_field: 123,
+ });
+ expect(result1.output.messages).toHaveLength(1);
+ expect(result1.output.messages[0]).toEqual({
+ role: "assistant",
+ name: undefined,
+ content: "Rome",
+ json: undefined,
+ });
+
+ // Extract nested message with custom fields
+ const output2 = {
+ index: 0,
+ message: {
+ role: "assistant",
+ content: "Nested response",
+ custom_field: "test",
+ },
+ "gen_ai.system": "openai",
+ "event.name": "gen_ai.choice",
+ };
+
+ const result2 = pydanticMapper.map(null, output2);
+ expect(result2.output.messages).toHaveLength(1);
+ expect(result2.output.messages[0]).toEqual({
+ role: "assistant",
+ name: undefined,
+ content: "Nested response",
+ json: { custom_field: "test" },
+ });
+ });
+});
diff --git a/web/src/utils/langfuse-chatml/mappers/pydantic.ts b/web/src/utils/langfuse-chatml/mappers/pydantic.ts
new file mode 100644
index 0000000000..7a38b29510
--- /dev/null
+++ b/web/src/utils/langfuse-chatml/mappers/pydantic.ts
@@ -0,0 +1,160 @@
+import {
+ type ChatMLMapper,
+ MAPPER_SCORE_DEFINITIVE,
+ MAPPER_SCORE_NONE,
+} from "./base";
+import type { LangfuseChatML, LangfuseChatMLMessage } from "../types";
+import {
+ isPlainObject,
+ parseMetadata,
+ normalizeMessageForChatMl,
+} from "./utils";
+
+function convertPydanticMessage(msg: any): LangfuseChatMLMessage | null {
+ if (!msg || typeof msg !== "object") return null;
+
+ const { role, content, ...rest } = msg;
+
+ if (!role || typeof role !== "string") return null;
+
+ // Remove gen_ai.* and event.name fields from json
+ const jsonFields: Record<string, unknown> = {};
+ for (const [key, value] of Object.entries(rest)) {
+ if (!key.startsWith("gen_ai.") && key !== "event.name") {
+ jsonFields[key] = value;
+ }
+ }
+
+ return {
+ role,
+ name: undefined,
+ content: content ?? "",
+ audio: undefined,
+ type: undefined,
+ json: Object.keys(jsonFields).length > 0 ? jsonFields : undefined,
+ };
+}
+
+export const pydanticMapper: ChatMLMapper = {
+ mapperName: "pydantic",
+ dataSourceName: "pydantic-ai",
+
+ canMapScore(input: unknown, output: unknown, metadata?: unknown): number {
+ // Parse metadata (handles string or object)
+ const meta = parseMetadata(metadata);
+
+ // Check for pydantic-ai in scope.name (definitive detection)
+ if (
+ meta &&
+ typeof meta === "object" &&
+ "scope" in meta &&
+ typeof meta.scope === "object" &&
+ meta.scope !== null &&
+ "name" in meta.scope &&
+ meta.scope.name === "pydantic-ai"
+ ) {
+ return MAPPER_SCORE_DEFINITIVE;
+ }
+
+ // Structural detection: check for gen_ai.system and event.name fields
+ const scoreData = (data: unknown): number => {
+ if (!data) return MAPPER_SCORE_NONE;
+
+ // Input format: array of messages with gen_ai.* fields
+ if (Array.isArray(data)) {
+ const hasPydanticFields = data.some(
+ (msg: any) =>
+ msg &&
+ typeof msg === "object" &&
+ "gen_ai.system" in msg &&
+ "event.name" in msg &&
+ typeof msg["event.name"] === "string" &&
+ (msg["event.name"] as string).startsWith("gen_ai."),
+ );
+ if (hasPydanticFields) return 7; // High confidence structural indicator
+ }
+
+ // Output format: object with gen_ai.system and event.name fields
+ if (isPlainObject(data)) {
+ const obj = data as Record<string, unknown>;
+ if (
+ "gen_ai.system" in obj &&
+ "event.name" in obj &&
+ typeof obj["event.name"] === "string" &&
+ (obj["event.name"] as string).startsWith("gen_ai.")
+ ) {
+ return 7;
+ }
+ }
+
+ return MAPPER_SCORE_NONE;
+ };
+
+ return Math.max(scoreData(input), scoreData(output));
+ },
+
+ map: (
+ input: unknown,
+ output: unknown,
+ metadata?: unknown,
+ ): LangfuseChatML => {
+ const meta = parseMetadata(metadata);
+ const inputMessages: LangfuseChatMLMessage[] = [];
+ const outputMessages: LangfuseChatMLMessage[] = [];
+
+ // Process input messages
+ if (Array.isArray(input)) {
+ for (const msg of input) {
+ const converted = convertPydanticMessage(msg);
+ if (converted) inputMessages.push(converted);
+ }
+ }
+
+ // Process output message
+ if (output && typeof output === "object") {
+ const obj = output as Record<string, unknown>;
+
+ // Pydantic output has message nested in message field
+ if ("message" in obj && typeof obj.message === "object") {
+ const converted = convertPydanticMessage(obj.message);
+ if (converted) outputMessages.push(converted);
+ }
+ }
+
+ // Extract dataSource from metadata.scope.name
+ let dataSource: string | undefined = undefined;
+ if (
+ meta &&
+ typeof meta === "object" &&
+ "scope" in meta &&
+ typeof meta.scope === "object" &&
+ meta.scope !== null &&
+ "name" in meta.scope
+ ) {
+ dataSource = String(meta.scope.name);
+ }
+
+ return {
+ input: {
+ messages: inputMessages,
+ additional: undefined,
+ },
+ output: {
+ messages: outputMessages,
+ additional: undefined,
+ },
+ dataSource,
+ dataSourceVersion: undefined,
+
+ canDisplayAsChat: function () {
+ return inputMessages.length > 0 || outputMessages.length > 0;
+ },
+
+ getAllMessages: function () {
+ return [...inputMessages, ...outputMessages].map(
+ normalizeMessageForChatMl,
+ );
+ },
+ };
+ },
+};
diff --git a/web/src/utils/langfuse-chatml/mappers/utils.ts b/web/src/utils/langfuse-chatml/mappers/utils.ts
new file mode 100644
index 0000000000..824ec4c647
--- /dev/null
+++ b/web/src/utils/langfuse-chatml/mappers/utils.ts
@@ -0,0 +1,222 @@
+import { z } from "zod/v4";
+import {
+ ChatMlArraySchema,
+ type ChatMlMessageSchema,
+} from "@/src/components/schemas/ChatMlSchema";
+
+// check if object (not array nor null)
+export const isPlainObject = (val: unknown): val is Record<string, unknown> =>
+ typeof val === "object" && val !== null && !Array.isArray(val);
+
+export function parseMetadata(
+ metadata: unknown,
+): Record<string, unknown> | undefined {
+ if (typeof metadata === "string") {
+ try {
+ return JSON.parse(metadata) as Record<string, unknown>;
+ } catch {
+ return undefined;
+ }
+ }
+ if (metadata && typeof metadata === "object") {
+ return metadata as Record<string, unknown>;
+ }
+ return undefined;
+}
+
+/**
+ * Extract the actual json data from ChatML message json field.
+ * ChatML schema's passthrough behavior wraps extra fields in nested json object.
+ * This handles both: { json: {...} } and {...}
+ */
+export function extractJsonData(
+ msgJson: unknown,
+): Record<string, unknown> | undefined {
+ if (!msgJson || typeof msgJson !== "object") return undefined;
+
+ const obj = msgJson as Record<string, unknown>;
+
+ // if it's the nested format: { json: {...} }
+ if ("json" in obj && typeof obj.json === "object" && obj.json !== null) {
+ return obj.json as Record<string, unknown>;
+ }
+
+ return obj;
+}
+
+/**
+ * Generic ChatML input parser with fallback handling
+ * Handles various input formats:
+ * - Direct array: [{role, content}, ...]
+ * - Nested array: [[{role, content}, ...]]
+ * - Object wrapper: {messages: [{role, content}, ...]}
+ */
+export function mapToChatMl(
+ input: unknown,
+): ReturnType<typeof ChatMlArraySchema.safeParse> {
+ let result = ChatMlArraySchema.safeParse(input);
+ if (result.success) {
+ return result;
+ }
+
+ // Check if input is an array of length 1 including an array of ChatMlMessageSchema
+ // This is the case for some integrations
+ // e.g. [[ChatMlMessageSchema, ...]]
+ const inputArray = z.array(ChatMlArraySchema).safeParse(input);
+ if (inputArray.success && inputArray.data.length === 1) {
+ return ChatMlArraySchema.safeParse(inputArray.data[0]);
+ }
+
+ // Check if input is an object with a messages key
+ // This is the case for some integrations
+ // e.g. { messages: [ChatMlMessageSchema, ...] }
+ const inputObject = z
+ .object({
+ messages: ChatMlArraySchema,
+ })
+ .safeParse(input);
+
+ if (inputObject.success) {
+ return ChatMlArraySchema.safeParse(inputObject.data.messages);
+ }
+
+ return result; // Return the original failed parse result
+}
+
+// Wraps single messages in array and validates
+export function mapOutputToChatMl(
+ output: unknown,
+): ReturnType<typeof ChatMlArraySchema.safeParse> {
+ const result = ChatMlArraySchema.safeParse(
+ Array.isArray(output) ? output : [output],
+ );
+
+ return result;
+}
+
+// Cleans legacy completion format output for display
+// handles {completion: string} -> string transformation
+export function cleanLegacyOutput(output: unknown, fallback?: unknown) {
+ const outLegacyCompletionSchema = z
+ .object({
+ completion: z.string(),
+ })
+ .refine((value) => Object.keys(value).length === 1);
+
+ const outLegacyCompletionSchemaParsed =
+ outLegacyCompletionSchema.safeParse(output);
+ const outputClean = outLegacyCompletionSchemaParsed.success
+ ? outLegacyCompletionSchemaParsed.data
+ : (fallback ?? null);
+
+ return outputClean;
+}
+
+// Extracts additional input fields beyond the messages array
+// Returns raw additionalInput (may be empty object) - filtering done at usage site
+export function extractAdditionalInput(
+ input: unknown,
+): Record<string, unknown> | undefined {
+ const additionalInput =
+ typeof input === "object" && input !== null && !Array.isArray(input)
+ ? Object.fromEntries(
+ Object.entries(input as object).filter(([key]) => key !== "messages"),
+ )
+ : undefined;
+
+ // raw result should still be filtered (Object.keys().length > 0)
+ return additionalInput;
+}
+
+// combines input and output messages into a single chat conversation
+export function combineInputOutputMessages(
+ inputResult: ReturnType<typeof mapToChatMl>,
+ outputResult: ReturnType<typeof mapOutputToChatMl>,
+ cleanOutput: unknown,
+): ChatMlMessageSchema[] {
+ if (!inputResult.success) {
+ // Return empty array to prevent crash - this should never happen in normal usage
+ return [];
+ }
+
+ const combinedMessages = [
+ ...inputResult.data,
+ ...(outputResult.success
+ ? outputResult.data.map((m) => ({
+ ...m,
+ role: m.role ?? "assistant",
+ }))
+ : [
+ {
+ role: "assistant",
+ ...(typeof cleanOutput === "string"
+ ? { content: cleanOutput }
+ : { json: cleanOutput }),
+ } as ChatMlMessageSchema,
+ ]),
+ ];
+
+ return combinedMessages;
+}
+
+// Normalize LangfuseChatMLMessage to match ChatMlMessageSchema structure
+// Ensures all required fields are present (even if undefined) for type compatibility
+export function normalizeMessageForChatMl(msg: any): ChatMlMessageSchema {
+ return {
+ role: msg.role,
+ name: msg.name,
+ content: msg.content,
+ audio: msg.audio,
+ type: msg.type,
+ ...(msg.json && Object.keys(msg.json).length > 0 ? { json: msg.json } : {}),
+ } as ChatMlMessageSchema;
+}
+
+/**
+ * Extract tool data (tool_calls and tool_call_id) from json object
+ * Returns updated message with toolCalls/toolCallId and remaining json fields
+ */
+export function extractToolData(
+ base: any,
+ jsonData: Record<string, unknown>,
+): any {
+ const jsonCopy = { ...jsonData };
+
+ // Extract tool_calls
+ if (jsonCopy.tool_calls && Array.isArray(jsonCopy.tool_calls)) {
+ const toolCalls = jsonCopy.tool_calls.map((tc: any) => ({
+ id: tc.id || null,
+ type: "function" as const,
+ function: {
+ name: tc.function?.name || tc.name,
+ arguments:
+ typeof tc.function?.arguments === "string"
+ ? tc.function.arguments
+ : JSON.stringify(tc.function?.arguments || tc.args || {}),
+ },
+ }));
+
+ delete jsonCopy.tool_calls;
+ return {
+ ...base,
+ toolCalls,
+ json: Object.keys(jsonCopy).length > 0 ? jsonCopy : undefined,
+ };
+ }
+
+ // Extract tool_call_id
+ if (jsonCopy.tool_call_id) {
+ const toolCallId = String(jsonCopy.tool_call_id);
+ delete jsonCopy.tool_call_id;
+ return {
+ ...base,
+ toolCallId,
+ json: Object.keys(jsonCopy).length > 0 ? jsonCopy : undefined,
+ };
+ }
+
+ return {
+ ...base,
+ json: Object.keys(jsonCopy).length > 0 ? jsonCopy : undefined,
+ };
+}
diff --git a/web/src/utils/langfuse-chatml/types.ts b/web/src/utils/langfuse-chatml/types.ts
new file mode 100644
index 0000000000..58da154e3b
--- /dev/null
+++ b/web/src/utils/langfuse-chatml/types.ts
@@ -0,0 +1,81 @@
+import type { ChatMlMessageSchema } from "@/src/components/schemas/ChatMlSchema";
+import { z } from "zod/v4";
+
+// Zod Schemas for Runtime Validation
+
+// like Tool call in OpenAI format
+export const LangfuseChatMLToolCallSchema = z.object({
+ id: z.string().nullable(), // null if not provided in input
+ type: z.literal("function"),
+ function: z.object({
+ name: z.string(),
+ arguments: z.string(),
+ }),
+});
+
+export const LangfuseChatMLMessageSchema = z.object({
+ id: z.string().optional(),
+ role: z.string(),
+ name: z.string().optional(),
+ // Content can be string, array, object, or null - intentionally loose
+ content: z.unknown().optional(),
+ audio: z.unknown().optional(), // OpenAIOutputAudioType - rare, keep loose
+ metadata: z.record(z.string(), z.unknown()).optional(),
+ type: z.string().optional(), // "placeholder" or other special types
+ json: z.record(z.string(), z.unknown()).optional(),
+
+ // Tool calls (assistant messages)
+ toolCalls: z.array(LangfuseChatMLToolCallSchema).optional(),
+
+ // Tool results (tool role messages)
+ toolCallId: z.string().optional(),
+ toolResultStatus: z.enum(["ok", "error"]).optional(),
+ toolError: z.string().optional(),
+
+ // LangGraph: preserve original role for tool call ID matching
+ _originalRole: z.string().optional(),
+});
+
+// Input wrapper
+export const LangfuseChatMLInputSchema = z.object({
+ messages: z.array(LangfuseChatMLMessageSchema),
+ additional: z.record(z.string(), z.unknown()).optional(),
+});
+
+// Output wrapper
+export const LangfuseChatMLOutputSchema = z.object({
+ messages: z.array(LangfuseChatMLMessageSchema),
+ additional: z.record(z.string(), z.unknown()).optional(),
+});
+
+// Data portion of LangfuseChatML (without methods)
+export const LangfuseChatMLDataSchema = z.object({
+ input: LangfuseChatMLInputSchema,
+ output: LangfuseChatMLOutputSchema,
+ dataSource: z.string().optional(),
+ dataSourceVersion: z.string().optional(),
+ highlightMessageId: z.string().optional(),
+ _selectedMapper: z.string().optional(),
+});
+
+// TypeScript Types from Zod schemas
+
+// Derive types from schemas to eliminate duplication
+export type LangfuseChatMLMessage = z.infer<typeof LangfuseChatMLMessageSchema>;
+export type LangfuseChatMLInput = z.infer<typeof LangfuseChatMLInputSchema>;
+export type LangfuseChatMLOutput = z.infer<typeof LangfuseChatMLOutputSchema>;
+
+// TODO: should probably be a class, has methods
+export interface LangfuseChatML {
+ input: LangfuseChatMLInput;
+ output: LangfuseChatMLOutput;
+ dataSource?: string; // SDK name: "openai", "langgraph", etc.
+ dataSourceVersion?: string; // SDK version: "v0", "v1", etc.
+ highlightMessageId?: string; // For scrolling to specific message
+
+ // as debug info
+ _selectedMapper?: string;
+
+ canDisplayAsChat(): boolean;
+ getAllMessages(): ChatMlMessageSchema[]; // Return current ChatML format for compatibility
+}