chore: merge main into release/v1.0.0

Resolved merge conflicts:
- agent.py: kept main's docker validation, restored get_platform_tools method, fixed KnowledgeRetrievalStartedEvent position
- agent_utils.py: merged both LLM and LiteAgent imports
- test_cache_hitting.yaml: accepted main's test recordings
- Removed 4 deprecated test cassettes from old tests/ directory

Key changes from main:
- Enhanced knowledge event handling with from_agent/from_task parameters
- Updated LLMMessage typing in kickoff methods
- Added guardrail parameter to async kickoff
- Restored runtime validation in guardrail.py
This commit is contained in:
Greyson LaLonde
2025-10-08 16:52:55 -04:00
103 changed files with 4218 additions and 1821 deletions

View File

@@ -224,4 +224,326 @@ interactions:
status:
code: 200
message: OK
- request:
body: '{"trace_id": "9e29cf0f-0172-4e4b-ad63-a2a36f3c2d7f", "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:18:11.026941+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":"b44103f0-cd32-4754-8274-080d86c21b77","trace_id":"9e29cf0f-0172-4e4b-ad63-a2a36f3c2d7f","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:18:11.351Z","updated_at":"2025-10-08T18:18:11.351Z"}'
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/"73d0c52807c852d93864a56af30f75a8"
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.07, cache_fetch_hit.active_support;dur=0.00,
cache_read_multi.active_support;dur=0.33, start_processing.action_controller;dur=0.00,
sql.active_record;dur=20.29, instantiation.active_record;dur=1.34, feature_operation.flipper;dur=0.07,
start_transaction.active_record;dur=0.01, transaction.active_record;dur=12.34,
process_action.action_controller;dur=285.83
vary:
- Accept
x-content-type-options:
- nosniff
x-frame-options:
- SAMEORIGIN
x-permitted-cross-domain-policies:
- none
x-request-id:
- 7e049107-e9cc-4684-bd18-813aa705a054
x-runtime:
- '0.331307'
x-xss-protection:
- 1; mode=block
status:
code: 201
message: Created
- request:
body: '{"events": [{"event_id": "357cb901-97dd-49cc-8751-6a264a1ac808", "timestamp":
"2025-10-08T18:18:11.363478+00:00", "type": "crew_kickoff_started", "event_data":
{"timestamp": "2025-10-08T18:18:11.025479+00:00", "type": "crew_kickoff_started",
"source_fingerprint": null, "source_type": null, "fingerprint_metadata": null,
"crew_name": "crew", "crew": null, "inputs": null}}, {"event_id": "ca54f930-8d49-4dc0-8199-bd4ad56a85a9",
"timestamp": "2025-10-08T18:18:11.365096+00:00", "type": "task_started", "event_data":
{"task_description": "What is the date today?", "expected_output": "The date
today as you were told, same format as the date you were told.", "task_name":
"What is the date today?", "context": "", "agent_role": "Reporter", "task_id":
"db8b8b82-005a-44bb-a050-518555011b70"}}, {"event_id": "b0dd7cd7-580e-463b-8faf-1cee16916431",
"timestamp": "2025-10-08T18:18:11.365522+00:00", "type": "agent_execution_started",
"event_data": {"agent_role": "Reporter", "agent_goal": "Report the date", "agent_backstory":
"You''re an expert reporter, specialized in reporting the date."}}, {"event_id":
"714f094e-47b6-489e-a0a7-33c0857b194f", "timestamp": "2025-10-08T18:18:11.365608+00:00",
"type": "llm_call_started", "event_data": {"timestamp": "2025-10-08T18:18:11.365579+00:00",
"type": "llm_call_started", "source_fingerprint": null, "source_type": null,
"fingerprint_metadata": null, "task_name": "What is the date today?\n\nCurrent
Date: 2025-10-08", "task_id": "db8b8b82-005a-44bb-a050-518555011b70", "agent_id":
"10058b89-7480-409b-af5d-1b46e90ded50", "agent_role": "Reporter", "from_task":
null, "from_agent": null, "model": "gpt-4o-mini", "messages": [{"role": "system",
"content": "You are Reporter. You''re an expert reporter, specialized in reporting
the date.\nYour personal goal is: Report the date\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: What is the date today?\n\nCurrent Date: 2025-10-08\n\nThis is the expected
criteria for your final answer: The date today as you were told, same format
as the date you were told.\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:"}],
"tools": null, "callbacks": ["<crewai.utilities.token_counter_callback.TokenCalcHandler
object at 0x136d6fef0>"], "available_functions": null}}, {"event_id": "541765c5-3c58-4291-8d94-9b1a6471b0f9",
"timestamp": "2025-10-08T18:18:11.368580+00:00", "type": "llm_call_completed",
"event_data": {"timestamp": "2025-10-08T18:18:11.368543+00:00", "type": "llm_call_completed",
"source_fingerprint": null, "source_type": null, "fingerprint_metadata": null,
"task_name": "What is the date today?\n\nCurrent Date: 2025-10-08", "task_id":
"db8b8b82-005a-44bb-a050-518555011b70", "agent_id": "10058b89-7480-409b-af5d-1b46e90ded50",
"agent_role": "Reporter", "from_task": null, "from_agent": null, "messages":
[{"role": "system", "content": "You are Reporter. You''re an expert reporter,
specialized in reporting the date.\nYour personal goal is: Report the date\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: What is the date today?\n\nCurrent Date: 2025-10-08\n\nThis
is the expected criteria for your final answer: The date today as you were told,
same format as the date you were told.\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:"}], "response": "I now can give a great answer \nFinal Answer:
2025-05-21", "call_type": "<LLMCallType.LLM_CALL: ''llm_call''>", "model": "gpt-4o-mini"}},
{"event_id": "a3f8f3df-a936-433b-840a-0e954942dcc4", "timestamp": "2025-10-08T18:18:11.368711+00:00",
"type": "agent_execution_completed", "event_data": {"agent_role": "Reporter",
"agent_goal": "Report the date", "agent_backstory": "You''re an expert reporter,
specialized in reporting the date."}}, {"event_id": "5648e8f5-f933-48e8-a0f0-c63c6441033d",
"timestamp": "2025-10-08T18:18:11.368766+00:00", "type": "task_completed", "event_data":
{"task_description": "What is the date today?\n\nCurrent Date: 2025-10-08",
"task_name": "What is the date today?\n\nCurrent Date: 2025-10-08", "task_id":
"db8b8b82-005a-44bb-a050-518555011b70", "output_raw": "2025-05-21", "output_format":
"OutputFormat.RAW", "agent_role": "Reporter"}}, {"event_id": "3d2889c4-32fe-43bb-b557-89c553a97f7f",
"timestamp": "2025-10-08T18:18:11.370072+00:00", "type": "crew_kickoff_completed",
"event_data": {"timestamp": "2025-10-08T18:18:11.370057+00:00", "type": "crew_kickoff_completed",
"source_fingerprint": null, "source_type": null, "fingerprint_metadata": null,
"crew_name": "crew", "crew": null, "output": {"description": "What is the date
today?\n\nCurrent Date: 2025-10-08", "name": "What is the date today?\n\nCurrent
Date: 2025-10-08", "expected_output": "The date today as you were told, same
format as the date you were told.", "summary": "What is the date today?\n\nCurrent
Date: 2025-10-08...", "raw": "2025-05-21", "pydantic": null, "json_dict": null,
"agent": "Reporter", "output_format": "raw"}, "total_tokens": 207}}], "batch_metadata":
{"events_count": 8, "batch_sequence": 1, "is_final_batch": false}}'
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate, zstd
Connection:
- keep-alive
Content-Length:
- '5906'
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/9e29cf0f-0172-4e4b-ad63-a2a36f3c2d7f/events
response:
body:
string: '{"events_created":8,"trace_batch_id":"b44103f0-cd32-4754-8274-080d86c21b77"}'
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/"295a6ddb279e61059e1ed3d18598fafa"
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.04, cache_fetch_hit.active_support;dur=0.00,
cache_read_multi.active_support;dur=0.09, start_processing.action_controller;dur=0.00,
sql.active_record;dur=56.17, instantiation.active_record;dur=0.66, start_transaction.active_record;dur=0.01,
transaction.active_record;dur=89.62, process_action.action_controller;dur=445.82
vary:
- Accept
x-content-type-options:
- nosniff
x-frame-options:
- SAMEORIGIN
x-permitted-cross-domain-policies:
- none
x-request-id:
- 3ddf8102-9e64-4ab5-8074-7dcb0b428898
x-runtime:
- '0.492724'
x-xss-protection:
- 1; mode=block
status:
code: 200
message: OK
- request:
body: '{"status": "completed", "duration_ms": 846, "final_event_count": 8}'
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate, zstd
Connection:
- keep-alive
Content-Length:
- '67'
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/9e29cf0f-0172-4e4b-ad63-a2a36f3c2d7f/finalize
response:
body:
string: '{"id":"b44103f0-cd32-4754-8274-080d86c21b77","trace_id":"9e29cf0f-0172-4e4b-ad63-a2a36f3c2d7f","execution_type":"crew","crew_name":"crew","flow_name":null,"status":"completed","duration_ms":846,"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:18:11.351Z","updated_at":"2025-10-08T18:18:12.214Z"}'
headers:
Content-Length:
- '481'
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/"2380ed0ea9c0d4781911f35fb1c14e51"
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.09, cache_fetch_hit.active_support;dur=0.00,
cache_read_multi.active_support;dur=0.13, start_processing.action_controller;dur=0.00,
sql.active_record;dur=19.78, instantiation.active_record;dur=0.64, unpermitted_parameters.action_controller;dur=0.01,
start_transaction.active_record;dur=0.01, transaction.active_record;dur=5.29,
process_action.action_controller;dur=286.35
vary:
- Accept
x-content-type-options:
- nosniff
x-frame-options:
- SAMEORIGIN
x-permitted-cross-domain-policies:
- none
x-request-id:
- a0c4c511-b4ff-4c84-ba41-f25cfa083475
x-runtime:
- '0.337283'
x-xss-protection:
- 1; mode=block
status:
code: 200
message: OK
version: 1