Files
crewAI/lib/crewai/tests/cassettes/test_save_task_pydantic_output.yaml
Greyson LaLonde e134e5305b Gl/feat/a2a refactor (#3793)
* feat: agent metaclass, refactor a2a to wrappers

* feat: a2a schemas and utils

* chore: move agent class, update imports

* refactor: organize imports to avoid circularity, add a2a to console

* feat: pass response_model through call chain

* feat: add standard openapi spec serialization to tools and structured output

* feat: a2a events

* chore: add a2a to pyproject

* docs: minimal base for learn docs

* fix: adjust a2a conversation flow, allow llm to decide exit until max_retries

* fix: inject agent skills into initial prompt

* fix: format agent card as json in prompt

* refactor: simplify A2A agent prompt formatting and improve skill display

* chore: wide cleanup

* chore: cleanup logic, add auth cache, use json for messages in prompt

* chore: update docs

* fix: doc snippets formatting

* feat: optimize A2A agent card fetching and improve error reporting

* chore: move imports to top of file

* chore: refactor hasattr check

* chore: add httpx-auth, update lockfile

* feat: create base public api

* chore: cleanup modules, add docstrings, types

* fix: exclude extra fields in prompt

* chore: update docs

* tests: update to correct import

* chore: lint for ruff, add missing import

* fix: tweak openai streaming logic for response model

* tests: add reimport for test

* tests: add reimport for test

* fix: don't set a2a attr if not set

* fix: don't set a2a attr if not set

* chore: update cassettes

* tests: fix tests

* fix: use instructor and dont pass response_format for litellm

* chore: consolidate event listeners, add typing

* fix: address race condition in test, update cassettes

* tests: add correct mocks, rerun cassette for json

* tests: update cassette

* chore: regenerate cassette after new run

* fix: make token manager access-safe

* fix: make token manager access-safe

* merge

* chore: update test and cassete for output pydantic

* fix: tweak to disallow deadlock

* chore: linter

* fix: adjust event ordering for threading

* fix: use conditional for batch check

* tests: tweak for emission

* tests: simplify api + event check

* fix: ensure non-function calling llms see json formatted string

* tests: tweak message comparison

* fix: use internal instructor for litellm structure responses

---------

Co-authored-by: Mike Plachta <mike@crewai.com>
2025-10-31 18:42:03 -07:00

765 lines
33 KiB
YAML

interactions:
- request:
body: '{"messages": [{"role": "system", "content": "You are Scorer. You''re an
expert scorer, specialized in scoring titles.\nYour personal goal is: Score
the title\nTo give my best complete final answer to the task use the exact following
format:\n\nThought: I now can give a great answer\nFinal Answer: Your final
answer must be the great and the most complete as possible, it must be outcome
described.\n\nI MUST use these formats, my job depends on it!"}, {"role": "user",
"content": "\nCurrent Task: Give me an integer score between 1-5 for the following
title: ''The impact of AI in the future of work''\n\nThis is the expect criteria
for your final answer: The score of the title.\nyou MUST return the actual complete
content as the final answer, not a summary.\n\nBegin! This is VERY important
to you, use the tools available and give your best Final Answer, your job depends
on it!\n\nThought:"}], "model": "gpt-4o"}'
headers:
accept:
- application/json
accept-encoding:
- gzip, deflate
connection:
- keep-alive
content-length:
- '915'
content-type:
- application/json
cookie:
- __cf_bm=9.8sBYBkvBR8R1K_bVF7xgU..80XKlEIg3N2OBbTSCU-1727214102-1.0.1.1-.qiTLXbPamYUMSuyNsOEB9jhGu.jOifujOrx9E2JZvStbIZ9RTIiE44xKKNfLPxQkOi6qAT3h6htK8lPDGV_5g;
_cfuvid=lbRdAddVWV6W3f5Dm9SaOPWDUOxqtZBSPr_fTW26nEA-1727213194587-0.0.1.1-604800000
host:
- api.openai.com
user-agent:
- OpenAI/Python 1.47.0
x-stainless-arch:
- arm64
x-stainless-async:
- 'false'
x-stainless-lang:
- python
x-stainless-os:
- MacOS
x-stainless-package-version:
- 1.47.0
x-stainless-raw-response:
- 'true'
x-stainless-runtime:
- CPython
x-stainless-runtime-version:
- 3.11.7
method: POST
uri: https://api.openai.com/v1/chat/completions
response:
content: "{\n \"id\": \"chatcmpl-AB7gMdbh6Ncs7ekM3mpk0rfbH9oHy\",\n \"object\":
\"chat.completion\",\n \"created\": 1727214502,\n \"model\": \"gpt-4o-2024-05-13\",\n
\ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\":
\"assistant\",\n \"content\": \"Thought: I now can give a great answer\\nFinal
Answer: 4\",\n \"refusal\": null\n },\n \"logprobs\": null,\n
\ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\":
186,\n \"completion_tokens\": 15,\n \"total_tokens\": 201,\n \"completion_tokens_details\":
{\n \"reasoning_tokens\": 0\n }\n },\n \"system_fingerprint\": \"fp_52a7f40b0b\"\n}\n"
headers:
CF-Cache-Status:
- DYNAMIC
CF-RAY:
- 8c85fa6eecc81cf3-GRU
Connection:
- keep-alive
Content-Encoding:
- gzip
Content-Type:
- application/json
Date:
- Tue, 24 Sep 2024 21:48:22 GMT
Server:
- cloudflare
Transfer-Encoding:
- chunked
X-Content-Type-Options:
- nosniff
access-control-expose-headers:
- X-Request-ID
openai-organization:
- crewai-iuxna1
openai-processing-ms:
- '231'
openai-version:
- '2020-10-01'
strict-transport-security:
- max-age=31536000; includeSubDomains; preload
x-ratelimit-limit-requests:
- '10000'
x-ratelimit-limit-tokens:
- '30000000'
x-ratelimit-remaining-requests:
- '9999'
x-ratelimit-remaining-tokens:
- '29999781'
x-ratelimit-reset-requests:
- 6ms
x-ratelimit-reset-tokens:
- 0s
x-request-id:
- req_04be4057cf9dce611e16f95ffa36a88a
http_version: HTTP/1.1
status_code: 200
- request:
body: '{"messages": [{"role": "user", "content": "4"}, {"role": "system", "content":
"I''m gonna convert this raw text into valid JSON.\n\nThe json should have the
following structure, with the following keys:\n{\n score: int\n}"}], "model":
"gpt-4o", "tool_choice": {"type": "function", "function": {"name": "ScoreOutput"}},
"tools": [{"type": "function", "function": {"name": "ScoreOutput", "description":
"Correctly extracted `ScoreOutput` with all the required parameters with correct
types", "parameters": {"properties": {"score": {"title": "Score", "type": "integer"}},
"required": ["score"], "type": "object"}}}]}'
headers:
accept:
- application/json
accept-encoding:
- gzip, deflate
connection:
- keep-alive
content-length:
- '615'
content-type:
- application/json
cookie:
- __cf_bm=9.8sBYBkvBR8R1K_bVF7xgU..80XKlEIg3N2OBbTSCU-1727214102-1.0.1.1-.qiTLXbPamYUMSuyNsOEB9jhGu.jOifujOrx9E2JZvStbIZ9RTIiE44xKKNfLPxQkOi6qAT3h6htK8lPDGV_5g;
_cfuvid=lbRdAddVWV6W3f5Dm9SaOPWDUOxqtZBSPr_fTW26nEA-1727213194587-0.0.1.1-604800000
host:
- api.openai.com
user-agent:
- OpenAI/Python 1.47.0
x-stainless-arch:
- arm64
x-stainless-async:
- 'false'
x-stainless-lang:
- python
x-stainless-os:
- MacOS
x-stainless-package-version:
- 1.47.0
x-stainless-raw-response:
- 'true'
x-stainless-runtime:
- CPython
x-stainless-runtime-version:
- 3.11.7
method: POST
uri: https://api.openai.com/v1/chat/completions
response:
content: "{\n \"id\": \"chatcmpl-AB7gNjFjFYTE9aEM06OLFECfe74NF\",\n \"object\":
\"chat.completion\",\n \"created\": 1727214503,\n \"model\": \"gpt-4o-2024-05-13\",\n
\ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\":
\"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n
\ \"id\": \"call_BriklYUCRXEHjLYyyPiFo1w7\",\n \"type\":
\"function\",\n \"function\": {\n \"name\": \"ScoreOutput\",\n
\ \"arguments\": \"{\\\"score\\\":4}\"\n }\n }\n
\ ],\n \"refusal\": null\n },\n \"logprobs\": null,\n
\ \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\":
100,\n \"completion_tokens\": 5,\n \"total_tokens\": 105,\n \"completion_tokens_details\":
{\n \"reasoning_tokens\": 0\n }\n },\n \"system_fingerprint\": \"fp_e375328146\"\n}\n"
headers:
CF-Cache-Status:
- DYNAMIC
CF-RAY:
- 8c85fa72fadb1cf3-GRU
Connection:
- keep-alive
Content-Encoding:
- gzip
Content-Type:
- application/json
Date:
- Tue, 24 Sep 2024 21:48:23 GMT
Server:
- cloudflare
Transfer-Encoding:
- chunked
X-Content-Type-Options:
- nosniff
access-control-expose-headers:
- X-Request-ID
openai-organization:
- crewai-iuxna1
openai-processing-ms:
- '221'
openai-version:
- '2020-10-01'
strict-transport-security:
- max-age=31536000; includeSubDomains; preload
x-ratelimit-limit-requests:
- '10000'
x-ratelimit-limit-tokens:
- '30000000'
x-ratelimit-remaining-requests:
- '9999'
x-ratelimit-remaining-tokens:
- '29999947'
x-ratelimit-reset-requests:
- 6ms
x-ratelimit-reset-tokens:
- 0s
x-request-id:
- req_d75a37a0ce046c6a74a19fb24a97be79
http_version: HTTP/1.1
status_code: 200
- request:
body: '{"trace_id": "b4e722b9-c407-4653-ba06-1786963c9c4a", "execution_type":
"crew", "user_identifier": null, "execution_context": {"crew_fingerprint": null,
"crew_name": "crew", "flow_name": null, "crewai_version": "0.201.1", "privacy_level":
"standard"}, "execution_metadata": {"expected_duration_estimate": 300, "agent_count":
0, "task_count": 0, "flow_method_count": 0, "execution_started_at": "2025-10-08T18:15:00.412875+00:00"}}'
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate, zstd
Connection:
- keep-alive
Content-Length:
- '428'
Content-Type:
- application/json
User-Agent:
- CrewAI-CLI/0.201.1
X-Crewai-Organization-Id:
- d3a3d10c-35db-423f-a7a4-c026030ba64d
X-Crewai-Version:
- 0.201.1
method: POST
uri: http://localhost:3000/crewai_plus/api/v1/tracing/batches
response:
body:
string: '{"id":"1a36dd2f-483b-4934-a9b6-f7b95cee2824","trace_id":"b4e722b9-c407-4653-ba06-1786963c9c4a","execution_type":"crew","crew_name":"crew","flow_name":null,"status":"running","duration_ms":null,"crewai_version":"0.201.1","privacy_level":"standard","total_events":0,"execution_context":{"crew_fingerprint":null,"crew_name":"crew","flow_name":null,"crewai_version":"0.201.1","privacy_level":"standard"},"created_at":"2025-10-08T18:15:00.934Z","updated_at":"2025-10-08T18:15:00.934Z"}'
headers:
Content-Length:
- '480'
cache-control:
- no-store
content-security-policy:
- 'default-src ''self'' *.crewai.com crewai.com; script-src ''self'' ''unsafe-inline''
*.crewai.com crewai.com https://cdn.jsdelivr.net/npm/apexcharts https://www.gstatic.com
https://run.pstmn.io https://apis.google.com https://apis.google.com/js/api.js
https://accounts.google.com https://accounts.google.com/gsi/client https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css.map
https://*.google.com https://docs.google.com https://slides.google.com https://js.hs-scripts.com
https://js.sentry-cdn.com https://browser.sentry-cdn.com https://www.googletagmanager.com
https://js-na1.hs-scripts.com https://share.descript.com/; style-src ''self''
''unsafe-inline'' *.crewai.com crewai.com https://cdn.jsdelivr.net/npm/apexcharts;
img-src ''self'' data: *.crewai.com crewai.com https://zeus.tools.crewai.com
https://dashboard.tools.crewai.com https://cdn.jsdelivr.net; font-src ''self''
data: *.crewai.com crewai.com; connect-src ''self'' *.crewai.com crewai.com
https://zeus.tools.crewai.com https://connect.useparagon.com/ https://zeus.useparagon.com/*
https://*.useparagon.com/* https://run.pstmn.io https://connect.tools.crewai.com/
https://*.sentry.io https://www.google-analytics.com ws://localhost:3036 wss://localhost:3036;
frame-src ''self'' *.crewai.com crewai.com https://connect.useparagon.com/
https://zeus.tools.crewai.com https://zeus.useparagon.com/* https://connect.tools.crewai.com/
https://docs.google.com https://drive.google.com https://slides.google.com
https://accounts.google.com https://*.google.com https://www.youtube.com https://share.descript.com'
content-type:
- application/json; charset=utf-8
etag:
- W/"31db72e28a68dfa1c4f3568b388bc2f0"
expires:
- '0'
permissions-policy:
- camera=(), microphone=(self), geolocation=()
pragma:
- no-cache
referrer-policy:
- strict-origin-when-cross-origin
server-timing:
- cache_read.active_support;dur=0.18, sql.active_record;dur=73.01, cache_generate.active_support;dur=16.53,
cache_write.active_support;dur=0.22, cache_read_multi.active_support;dur=0.33,
start_processing.action_controller;dur=0.01, instantiation.active_record;dur=1.29,
feature_operation.flipper;dur=0.50, start_transaction.active_record;dur=0.01,
transaction.active_record;dur=21.52, process_action.action_controller;dur=459.22
vary:
- Accept
x-content-type-options:
- nosniff
x-frame-options:
- SAMEORIGIN
x-permitted-cross-domain-policies:
- none
x-request-id:
- ebc8e3ab-5979-48b7-8816-667a1fd98ce2
x-runtime:
- '0.524429'
x-xss-protection:
- 1; mode=block
status:
code: 201
message: Created
- request:
body: '{"events": [{"event_id": "4a27c1d9-f908-42e4-b4dc-7091db74915b", "timestamp":
"2025-10-08T18:15:00.950855+00:00", "type": "crew_kickoff_started", "event_data":
{"timestamp": "2025-10-08T18:15:00.412055+00:00", "type": "crew_kickoff_started",
"source_fingerprint": null, "source_type": null, "fingerprint_metadata": null,
"crew_name": "crew", "crew": null, "inputs": null}}, {"event_id": "eaa85c90-02d2-444c-bf52-1178d68bae6d",
"timestamp": "2025-10-08T18:15:00.952277+00:00", "type": "task_started", "event_data":
{"task_description": "Give me an integer score between 1-5 for the following
title: ''The impact of AI in the future of work''", "expected_output": "The
score of the title.", "task_name": "Give me an integer score between 1-5 for
the following title: ''The impact of AI in the future of work''", "context":
"", "agent_role": "Scorer", "task_id": "3dca2ae4-e374-42e6-a6de-ecae1e8ac310"}},
{"event_id": "8f1cce5b-7a60-4b53-aac1-05a9d7c3335e", "timestamp": "2025-10-08T18:15:00.952865+00:00",
"type": "agent_execution_started", "event_data": {"agent_role": "Scorer", "agent_goal":
"Score the title", "agent_backstory": "You''re an expert scorer, specialized
in scoring titles."}}, {"event_id": "754a8fb5-bb3a-4204-839e-7b622eb3d6dd",
"timestamp": "2025-10-08T18:15:00.953005+00:00", "type": "llm_call_started",
"event_data": {"timestamp": "2025-10-08T18:15:00.952957+00:00", "type": "llm_call_started",
"source_fingerprint": null, "source_type": null, "fingerprint_metadata": null,
"task_name": "Give me an integer score between 1-5 for the following title:
''The impact of AI in the future of work''", "task_id": "3dca2ae4-e374-42e6-a6de-ecae1e8ac310",
"agent_id": "2ba6f80d-a1da-409f-bd89-13a286b7dfb7", "agent_role": "Scorer",
"from_task": null, "from_agent": null, "model": "gpt-4o-mini", "messages": [{"role":
"system", "content": "You are Scorer. You''re an expert scorer, specialized
in scoring titles.\nYour personal goal is: Score the title\nTo give my best
complete final answer to the task respond using the exact following format:\n\nThought:
I now can give a great answer\nFinal Answer: Your final answer must be the great
and the most complete as possible, it must be outcome described.\n\nI MUST use
these formats, my job depends on it!"}, {"role": "user", "content": "\nCurrent
Task: Give me an integer score between 1-5 for the following title: ''The impact
of AI in the future of work''\n\nThis is the expected criteria for your final
answer: The score of the title.\nyou MUST return the actual complete content
as the final answer, not a summary.\nEnsure your final answer contains only
the content in the following format: {\n \"score\": int\n}\n\nEnsure the final
output does not include any code block markers like ```json or ```python.\n\nBegin!
This is VERY important to you, use the tools available and give your best Final
Answer, your job depends on it!\n\nThought:"}], "tools": null, "callbacks":
["<crewai.utilities.token_counter_callback.TokenCalcHandler object at 0x300f52060>"],
"available_functions": null}}, {"event_id": "1a15dcc3-8827-4803-ac61-ab70d5be90f3",
"timestamp": "2025-10-08T18:15:01.085142+00:00", "type": "llm_call_completed",
"event_data": {"timestamp": "2025-10-08T18:15:01.084844+00:00", "type": "llm_call_completed",
"source_fingerprint": null, "source_type": null, "fingerprint_metadata": null,
"task_name": "Give me an integer score between 1-5 for the following title:
''The impact of AI in the future of work''", "task_id": "3dca2ae4-e374-42e6-a6de-ecae1e8ac310",
"agent_id": "2ba6f80d-a1da-409f-bd89-13a286b7dfb7", "agent_role": "Scorer",
"from_task": null, "from_agent": null, "messages": [{"role": "system", "content":
"You are Scorer. You''re an expert scorer, specialized in scoring titles.\nYour
personal goal is: Score the title\nTo give my best complete final answer to
the task respond using the exact following format:\n\nThought: I now can give
a great answer\nFinal Answer: Your final answer must be the great and the most
complete as possible, it must be outcome described.\n\nI MUST use these formats,
my job depends on it!"}, {"role": "user", "content": "\nCurrent Task: Give me
an integer score between 1-5 for the following title: ''The impact of AI in
the future of work''\n\nThis is the expected criteria for your final answer:
The score of the title.\nyou MUST return the actual complete content as the
final answer, not a summary.\nEnsure your final answer contains only the content
in the following format: {\n \"score\": int\n}\n\nEnsure the final output does
not include any code block markers like ```json or ```python.\n\nBegin! This
is VERY important to you, use the tools available and give your best Final Answer,
your job depends on it!\n\nThought:"}], "response": "Thought: I now can give
a great answer\nFinal Answer: 4", "call_type": "<LLMCallType.LLM_CALL: ''llm_call''>",
"model": "gpt-4o-mini"}}, {"event_id": "c6742bd6-5a92-41e8-94f6-49ba267d785f",
"timestamp": "2025-10-08T18:15:01.085480+00:00", "type": "agent_execution_completed",
"event_data": {"agent_role": "Scorer", "agent_goal": "Score the title", "agent_backstory":
"You''re an expert scorer, specialized in scoring titles."}}, {"event_id": "486c254c-57b6-477b-aadc-d5be745613fb",
"timestamp": "2025-10-08T18:15:01.085639+00:00", "type": "task_failed", "event_data":
{"serialization_error": "Circular reference detected (id repeated)", "object_type":
"TaskFailedEvent"}}, {"event_id": "b2ce4ceb-74f6-4379-b65e-8d6dc371f956", "timestamp":
"2025-10-08T18:15:01.086242+00:00", "type": "crew_kickoff_failed", "event_data":
{"timestamp": "2025-10-08T18:15:01.086226+00:00", "type": "crew_kickoff_failed",
"source_fingerprint": null, "source_type": null, "fingerprint_metadata": null,
"crew_name": "crew", "crew": null, "error": "Failed to convert text into a Pydantic
model due to error: ''NoneType'' object has no attribute ''supports_function_calling''"}}],
"batch_metadata": {"events_count": 8, "batch_sequence": 1, "is_final_batch":
false}}'
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate, zstd
Connection:
- keep-alive
Content-Length:
- '5982'
Content-Type:
- application/json
User-Agent:
- CrewAI-CLI/0.201.1
X-Crewai-Organization-Id:
- d3a3d10c-35db-423f-a7a4-c026030ba64d
X-Crewai-Version:
- 0.201.1
method: POST
uri: http://localhost:3000/crewai_plus/api/v1/tracing/batches/b4e722b9-c407-4653-ba06-1786963c9c4a/events
response:
body:
string: '{"events_created":8,"trace_batch_id":"1a36dd2f-483b-4934-a9b6-f7b95cee2824"}'
headers:
Content-Length:
- '76'
cache-control:
- no-store
content-security-policy:
- 'default-src ''self'' *.crewai.com crewai.com; script-src ''self'' ''unsafe-inline''
*.crewai.com crewai.com https://cdn.jsdelivr.net/npm/apexcharts https://www.gstatic.com
https://run.pstmn.io https://apis.google.com https://apis.google.com/js/api.js
https://accounts.google.com https://accounts.google.com/gsi/client https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css.map
https://*.google.com https://docs.google.com https://slides.google.com https://js.hs-scripts.com
https://js.sentry-cdn.com https://browser.sentry-cdn.com https://www.googletagmanager.com
https://js-na1.hs-scripts.com https://share.descript.com/; style-src ''self''
''unsafe-inline'' *.crewai.com crewai.com https://cdn.jsdelivr.net/npm/apexcharts;
img-src ''self'' data: *.crewai.com crewai.com https://zeus.tools.crewai.com
https://dashboard.tools.crewai.com https://cdn.jsdelivr.net; font-src ''self''
data: *.crewai.com crewai.com; connect-src ''self'' *.crewai.com crewai.com
https://zeus.tools.crewai.com https://connect.useparagon.com/ https://zeus.useparagon.com/*
https://*.useparagon.com/* https://run.pstmn.io https://connect.tools.crewai.com/
https://*.sentry.io https://www.google-analytics.com ws://localhost:3036 wss://localhost:3036;
frame-src ''self'' *.crewai.com crewai.com https://connect.useparagon.com/
https://zeus.tools.crewai.com https://zeus.useparagon.com/* https://connect.tools.crewai.com/
https://docs.google.com https://drive.google.com https://slides.google.com
https://accounts.google.com https://*.google.com https://www.youtube.com https://share.descript.com'
content-type:
- application/json; charset=utf-8
etag:
- W/"ec084df3e365d72581f5734016786212"
expires:
- '0'
permissions-policy:
- camera=(), microphone=(self), geolocation=()
pragma:
- no-cache
referrer-policy:
- strict-origin-when-cross-origin
server-timing:
- cache_read.active_support;dur=0.05, sql.active_record;dur=60.65, cache_generate.active_support;dur=2.12,
cache_write.active_support;dur=0.12, cache_read_multi.active_support;dur=0.09,
start_processing.action_controller;dur=0.00, instantiation.active_record;dur=0.51,
start_transaction.active_record;dur=0.00, transaction.active_record;dur=115.06,
process_action.action_controller;dur=475.82
vary:
- Accept
x-content-type-options:
- nosniff
x-frame-options:
- SAMEORIGIN
x-permitted-cross-domain-policies:
- none
x-request-id:
- 96f38d13-8f41-4b6f-b41a-cc526f821efd
x-runtime:
- '0.520997'
x-xss-protection:
- 1; mode=block
status:
code: 200
message: OK
- request:
body: '{"status": "completed", "duration_ms": 1218, "final_event_count": 8}'
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate, zstd
Connection:
- keep-alive
Content-Length:
- '68'
Content-Type:
- application/json
User-Agent:
- CrewAI-CLI/0.201.1
X-Crewai-Organization-Id:
- d3a3d10c-35db-423f-a7a4-c026030ba64d
X-Crewai-Version:
- 0.201.1
method: PATCH
uri: http://localhost:3000/crewai_plus/api/v1/tracing/batches/b4e722b9-c407-4653-ba06-1786963c9c4a/finalize
response:
body:
string: '{"id":"1a36dd2f-483b-4934-a9b6-f7b95cee2824","trace_id":"b4e722b9-c407-4653-ba06-1786963c9c4a","execution_type":"crew","crew_name":"crew","flow_name":null,"status":"completed","duration_ms":1218,"crewai_version":"0.201.1","privacy_level":"standard","total_events":8,"execution_context":{"crew_name":"crew","flow_name":null,"privacy_level":"standard","crewai_version":"0.201.1","crew_fingerprint":null},"created_at":"2025-10-08T18:15:00.934Z","updated_at":"2025-10-08T18:15:02.539Z"}'
headers:
Content-Length:
- '482'
cache-control:
- no-store
content-security-policy:
- 'default-src ''self'' *.crewai.com crewai.com; script-src ''self'' ''unsafe-inline''
*.crewai.com crewai.com https://cdn.jsdelivr.net/npm/apexcharts https://www.gstatic.com
https://run.pstmn.io https://apis.google.com https://apis.google.com/js/api.js
https://accounts.google.com https://accounts.google.com/gsi/client https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css.map
https://*.google.com https://docs.google.com https://slides.google.com https://js.hs-scripts.com
https://js.sentry-cdn.com https://browser.sentry-cdn.com https://www.googletagmanager.com
https://js-na1.hs-scripts.com https://share.descript.com/; style-src ''self''
''unsafe-inline'' *.crewai.com crewai.com https://cdn.jsdelivr.net/npm/apexcharts;
img-src ''self'' data: *.crewai.com crewai.com https://zeus.tools.crewai.com
https://dashboard.tools.crewai.com https://cdn.jsdelivr.net; font-src ''self''
data: *.crewai.com crewai.com; connect-src ''self'' *.crewai.com crewai.com
https://zeus.tools.crewai.com https://connect.useparagon.com/ https://zeus.useparagon.com/*
https://*.useparagon.com/* https://run.pstmn.io https://connect.tools.crewai.com/
https://*.sentry.io https://www.google-analytics.com ws://localhost:3036 wss://localhost:3036;
frame-src ''self'' *.crewai.com crewai.com https://connect.useparagon.com/
https://zeus.tools.crewai.com https://zeus.useparagon.com/* https://connect.tools.crewai.com/
https://docs.google.com https://drive.google.com https://slides.google.com
https://accounts.google.com https://*.google.com https://www.youtube.com https://share.descript.com'
content-type:
- application/json; charset=utf-8
etag:
- W/"f69bd753b6206f7d8f00bfae64391d7a"
expires:
- '0'
permissions-policy:
- camera=(), microphone=(self), geolocation=()
pragma:
- no-cache
referrer-policy:
- strict-origin-when-cross-origin
server-timing:
- cache_read.active_support;dur=0.13, sql.active_record;dur=20.82, cache_generate.active_support;dur=2.02,
cache_write.active_support;dur=0.18, cache_read_multi.active_support;dur=0.08,
start_processing.action_controller;dur=0.00, instantiation.active_record;dur=1.08,
unpermitted_parameters.action_controller;dur=0.00, start_transaction.active_record;dur=0.00,
transaction.active_record;dur=2.90, process_action.action_controller;dur=844.67
vary:
- Accept
x-content-type-options:
- nosniff
x-frame-options:
- SAMEORIGIN
x-permitted-cross-domain-policies:
- none
x-request-id:
- 80da6a7c-c07d-4a00-b5d9-fb85448ef76a
x-runtime:
- '0.904849'
x-xss-protection:
- 1; mode=block
status:
code: 200
message: OK
- request:
body: '{"messages":[{"role":"system","content":"Please convert the following text
into valid JSON.\n\nOutput ONLY the valid JSON and nothing else.\n\nThe JSON
must follow this schema exactly:\n```json\n{\n score: int\n}\n```"},{"role":"user","content":"4"}],"model":"gpt-4.1-mini"}'
headers:
accept:
- application/json
accept-encoding:
- gzip, deflate, zstd
connection:
- keep-alive
content-length:
- '277'
content-type:
- application/json
host:
- api.openai.com
user-agent:
- OpenAI/Python 1.109.1
x-stainless-arch:
- arm64
x-stainless-async:
- 'false'
x-stainless-lang:
- python
x-stainless-os:
- MacOS
x-stainless-package-version:
- 1.109.1
x-stainless-read-timeout:
- '600'
x-stainless-retry-count:
- '0'
x-stainless-runtime:
- CPython
x-stainless-runtime-version:
- 3.12.10
method: POST
uri: https://api.openai.com/v1/chat/completions
response:
body:
string: !!binary |
H4sIAAAAAAAAAwAAAP//jJIxb9swEIV3/QriZiuwFNlxtBadig6ZGrQKJJo8SbQpkiWpwoHh/16Q
ci0lTYEuGu679/TueOeEEBAcSgKsp54NRqafvj2ffh4PX56e2n37+vW7Gj8/n/qjE/64OcAqKPT+
gMz/Ud0xPRiJXmg1YWaRegyu2cM22z3crx/XEQyaowyyzvi0uMvSQSiR5ut8k66LNCuu8l4Lhg5K
8iMhhJBz/IagiuMJShLNYmVA52iHUN6aCAGrZagAdU44T5WH1QyZVh5VzN40zcFpValzpQKrwDFt
sYKSFJW6VKppmqXUYjs6GvKrUcoFoEppT8P8MfTLlVxuMaXujNV7904KrVDC9bVF6rQKkZzXBiK9
JIS8xHWMbyYEY/VgfO31EePvisfJDuZXmGF2f4Veeyrn+jZffeBWc/RUSLdYJzDKeuSzct49HbnQ
C5AsZv47zEfe09xCdf9jPwPG0HjktbHIBXs78NxmMdzov9puO46BwaH9JRjWXqAN78CxpaOcDgfc
q/M41K1QHVpjxXQ9rakLlu82Wbvb5pBckt8AAAD//wMA5Zmg4EwDAAA=
headers:
CF-RAY:
- 996f475b7e3fedda-MXP
Connection:
- keep-alive
Content-Encoding:
- gzip
Content-Type:
- application/json
Date:
- Fri, 31 Oct 2025 01:11:31 GMT
Server:
- cloudflare
Set-Cookie:
- __cf_bm=9OwoBJAn84Nsq0RZdCIu06cNB6RLqor4C1.Q58nU28U-1761873091-1.0.1.1-p82_h8Vnxe0NfH5Iv6MFt.SderZj.v9VnCx_ro6ti2MGhlJOLFsPd6XhBxPsnmuV7Vt_4_uqAbE57E5f1Epl1cmGBT.0844N3CLnTwZFWQI;
path=/; expires=Fri, 31-Oct-25 01:41:31 GMT; domain=.api.openai.com; HttpOnly;
Secure; SameSite=None
- _cfuvid=E4.xW3I8m58fngo4vkTKo8hmBumar1HkV.yU8KKjlZg-1761873091967-0.0.1.1-604800000;
path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None
Strict-Transport-Security:
- max-age=31536000; includeSubDomains; preload
Transfer-Encoding:
- chunked
X-Content-Type-Options:
- nosniff
access-control-expose-headers:
- X-Request-ID
alt-svc:
- h3=":443"; ma=86400
cf-cache-status:
- DYNAMIC
openai-organization:
- crewai-iuxna1
openai-processing-ms:
- '1770'
openai-project:
- proj_xitITlrFeen7zjNSzML82h9x
openai-version:
- '2020-10-01'
x-envoy-upstream-service-time:
- '1998'
x-openai-proxy-wasm:
- v0.1
x-ratelimit-limit-project-tokens:
- '150000000'
x-ratelimit-limit-requests:
- '30000'
x-ratelimit-limit-tokens:
- '150000000'
x-ratelimit-remaining-project-tokens:
- '149999955'
x-ratelimit-remaining-requests:
- '29999'
x-ratelimit-remaining-tokens:
- '149999952'
x-ratelimit-reset-project-tokens:
- 0s
x-ratelimit-reset-requests:
- 2ms
x-ratelimit-reset-tokens:
- 0s
x-request-id:
- req_ba7a12cb40744f648d17844196f9c2c6
status:
code: 200
message: OK
- request:
body: '{"messages":[{"role":"system","content":"Please convert the following text
into valid JSON.\n\nOutput ONLY the valid JSON and nothing else.\n\nThe JSON
must follow this schema exactly:\n```json\n{\n score: int\n}\n```"},{"role":"user","content":"4"}],"model":"gpt-4.1-mini","response_format":{"type":"json_schema","json_schema":{"schema":{"properties":{"score":{"title":"Score","type":"integer"}},"required":["score"],"title":"ScoreOutput","type":"object","additionalProperties":false},"name":"ScoreOutput","strict":true}},"stream":false}'
headers:
accept:
- application/json
accept-encoding:
- gzip, deflate, zstd
connection:
- keep-alive
content-length:
- '541'
content-type:
- application/json
cookie:
- __cf_bm=9OwoBJAn84Nsq0RZdCIu06cNB6RLqor4C1.Q58nU28U-1761873091-1.0.1.1-p82_h8Vnxe0NfH5Iv6MFt.SderZj.v9VnCx_ro6ti2MGhlJOLFsPd6XhBxPsnmuV7Vt_4_uqAbE57E5f1Epl1cmGBT.0844N3CLnTwZFWQI;
_cfuvid=E4.xW3I8m58fngo4vkTKo8hmBumar1HkV.yU8KKjlZg-1761873091967-0.0.1.1-604800000
host:
- api.openai.com
user-agent:
- OpenAI/Python 1.109.1
x-stainless-arch:
- arm64
x-stainless-async:
- 'false'
x-stainless-helper-method:
- chat.completions.parse
x-stainless-lang:
- python
x-stainless-os:
- MacOS
x-stainless-package-version:
- 1.109.1
x-stainless-read-timeout:
- '600'
x-stainless-retry-count:
- '0'
x-stainless-runtime:
- CPython
x-stainless-runtime-version:
- 3.12.10
method: POST
uri: https://api.openai.com/v1/chat/completions
response:
body:
string: !!binary |
H4sIAAAAAAAAAwAAAP//jFLBbqMwFLzzFdY7hypQklKuVS899NpK2wo59gPcGtuyH92uovz7ypAE
0t1KvXB482Y8M7x9whgoCRUD0XESvdPp3dPzZ/gty77xO7fZPj4MMs/ldYf3Lt/CKjLs7g0FnVhX
wvZOIylrJlh45IRRNbvZZuXN9fo2H4HeStSR1jpKi6ss7ZVRab7ON+m6SLPiSO+sEhigYr8Sxhjb
j99o1Ej8hIqtV6dJjyHwFqE6LzEG3uo4AR6CCsQNwWoGhTWEZvS+f4EgrMcXqIrDcsdjMwQejZpB
6wXAjbHEY9DR3esROZz9aNs6b3fhCxUaZVToao88WBPfDmQdjOghYex1zD1cRAHnbe+oJvuO43Pl
ZpKDue4ZPGFkiet5fHus6lKslkhc6bCoDQQXHcqZOXfMB6nsAkgWkf/18j/tKbYy7U/kZ0AIdISy
dh6lEpd55zWP8Ra/WztXPBqGgP5DCaxJoY+/QWLDBz0dCIQ/gbCvG2Va9M6r6UoaVxciLzdZU25z
SA7JXwAAAP//AwAXjqY4NAMAAA==
headers:
CF-RAY:
- 996f47692b63edda-MXP
Connection:
- keep-alive
Content-Encoding:
- gzip
Content-Type:
- application/json
Date:
- Fri, 31 Oct 2025 01:11:33 GMT
Server:
- cloudflare
Strict-Transport-Security:
- max-age=31536000; includeSubDomains; preload
Transfer-Encoding:
- chunked
X-Content-Type-Options:
- nosniff
access-control-expose-headers:
- X-Request-ID
alt-svc:
- h3=":443"; ma=86400
cf-cache-status:
- DYNAMIC
openai-organization:
- crewai-iuxna1
openai-processing-ms:
- '929'
openai-project:
- proj_xitITlrFeen7zjNSzML82h9x
openai-version:
- '2020-10-01'
x-envoy-upstream-service-time:
- '991'
x-openai-proxy-wasm:
- v0.1
x-ratelimit-limit-project-tokens:
- '150000000'
x-ratelimit-limit-requests:
- '30000'
x-ratelimit-limit-tokens:
- '150000000'
x-ratelimit-remaining-project-tokens:
- '149999955'
x-ratelimit-remaining-requests:
- '29999'
x-ratelimit-remaining-tokens:
- '149999955'
x-ratelimit-reset-project-tokens:
- 0s
x-ratelimit-reset-requests:
- 2ms
x-ratelimit-reset-tokens:
- 0s
x-request-id:
- req_892607f68e764ba3846c431954608c36
status:
code: 200
message: OK
version: 1