Commit Graph

1934 Commits

Author SHA1 Message Date
Greyson LaLonde
f7838fdcb7 feat: add context variables for event chain tracking 2026-01-21 01:53:49 -05:00
Greyson LaLonde
ad12d2c070 feat: add previous_event_id and triggered_by_event_id fields 2026-01-21 01:53:28 -05:00
Greyson LaLonde
3281bae3a2 Merge branch 'main' into gl/feat/event-ordering 2026-01-21 01:06:25 -05:00
Lorenze Jay
741bf12bf4 Lorenze/enh decouple executor from crew (#4209)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Notify Downstream / notify-downstream (push) Has been cancelled
* wip restrcuturing agent executor and liteagent

* fix: handle None task in AgentExecutor to prevent errors

Added a check to ensure that if the task is None, the method returns early without attempting to access task properties. This change improves the robustness of the AgentExecutor by preventing potential errors when the task is not set.

* refactor: streamline AgentExecutor initialization by removing redundant parameters

Updated the Agent class to simplify the initialization of the AgentExecutor by removing unnecessary task and crew parameters in standalone mode. This change enhances code clarity and maintains backward compatibility by ensuring that the executor is correctly configured without redundant assignments.

* ensure executors work inside a flow due to flow in flow async structure

* refactor: enhance agent kickoff preparation by separating common logic

Updated the Agent class to introduce a new private method  that consolidates the common setup logic for both synchronous and asynchronous kickoff executions. This change improves code clarity and maintainability by reducing redundancy in the kickoff process, while ensuring that the agent can still execute effectively within both standalone and flow contexts.

* linting and tests

* fix test

* refactor: improve test for Agent kickoff parameters

Updated the test for the Agent class to ensure that the kickoff method correctly preserves parameters. The test now verifies the configuration of the agent after kickoff, enhancing clarity and maintainability. Additionally, the test for asynchronous kickoff within a flow context has been updated to reflect the Agent class instead of LiteAgent.

* refactor: update test task guardrail process output for improved validation

Refactored the test for task guardrail process output to enhance the validation of the output against the OpenAPI schema. The changes include a more structured request body and updated response handling to ensure compliance with the guardrail requirements. This update aims to improve the clarity and reliability of the test cases, ensuring that task outputs are correctly validated and feedback is appropriately provided.

* test fix cassette

* test fix cassette

* working

* working cassette

* refactor: streamline agent execution and enhance flow compatibility

Refactored the Agent class to simplify the execution method by removing the event loop check and clarifying the behavior when called from synchronous and asynchronous contexts. The changes ensure that the method operates seamlessly within flow methods, improving clarity in the documentation. Additionally, updated the AgentExecutor to set the response model to None, enhancing flexibility. New test cassettes were added to validate the functionality of agents within flow contexts, ensuring robust testing for both synchronous and asynchronous operations.

* fixed cassette

* Enhance Flow Execution Logic

- Introduced conditional execution for start methods in the Flow class.
- Unconditional start methods are prioritized during kickoff, while conditional starts are executed only if no unconditional starts are present.
- Improved handling of cyclic flows by allowing re-execution of conditional start methods triggered by routers.
- Added checks to continue execution chains for completed conditional starts.

These changes improve the flexibility and control of flow execution, ensuring that the correct methods are triggered based on the defined conditions.

* Enhance Agent and Flow Execution Logic

- Updated the Agent class to automatically detect the event loop and return a coroutine when called within a Flow, simplifying async handling for users.
- Modified Flow class to execute listeners sequentially, preventing race conditions on shared state during listener execution.
- Improved handling of coroutine results from synchronous methods, ensuring proper execution flow and state management.

These changes enhance the overall execution logic and user experience when working with agents and flows in CrewAI.

* Enhance Flow Listener Logic and Agent Imports

- Updated the Flow class to track fired OR listeners, ensuring that multi-source OR listeners only trigger once during execution. This prevents redundant executions and improves flow efficiency.
- Cleared fired OR listeners during cyclic flow resets to allow re-execution in new cycles.
- Modified the Agent class imports to include Coroutine from collections.abc, enhancing type handling for asynchronous operations.

These changes improve the control and performance of flow execution in CrewAI, ensuring more predictable behavior in complex scenarios.

* adjusted test due to new cassette

* ensure we dont finalize batch on just a liteagent finishing

* feat: cancellable parallelized flow methods

* feat: allow methods to be cancelled & run parallelized

* feat: ensure state is thread safe through proxy

* fix: check for proxy state

* fix: mimic BaseModel method

* chore: update final attr checks; test

* better description

* fix test

* chore: update test assumptions

* extra

---------

Co-authored-by: Greyson LaLonde <greyson.r.lalonde@gmail.com>
2026-01-20 21:44:45 -08:00
Greyson LaLonde
f3cacdcf1d fix: ensure context isolation 2026-01-20 15:27:16 -05:00
Greyson LaLonde
f9ee229ea1 Merge branch 'gl/feat/event-ordering' of https://github.com/crewAIInc/crewAI into gl/feat/event-ordering 2026-01-20 13:00:07 -05:00
Greyson LaLonde
8dc54d79ff chore: fix existing flaky test 2026-01-20 12:59:57 -05:00
Greyson LaLonde
62d3170929 Merge branch 'main' into gl/feat/event-ordering 2026-01-20 12:54:50 -05:00
Greyson LaLonde
1e281af39f chore: tweak tests to account for vcr race condiiton
- noted race condition within the vcr package
2026-01-20 12:51:36 -05:00
Lorenze Jay
b267bb4054 Lorenze/fix google vertex api using api keys (#4243)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Notify Downstream / notify-downstream (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
* supporting vertex through api key use - expo mode

* docs update here

* docs translations

---------

Co-authored-by: Greyson LaLonde <greyson.r.lalonde@gmail.com>
2026-01-20 09:34:36 -08:00
Greyson LaLonde
afe6d48128 chore: regen cassettes; ensure decode 2026-01-20 10:41:23 -05:00
Greyson LaLonde
6a545d4686 chore: update test assumption 2026-01-20 10:31:21 -05:00
Greyson LaLonde
9a27fbb36b feat: use flush in atexit to not block results 2026-01-20 02:56:55 -05:00
Greyson LaLonde
74b9a7d9ab chore: update test assumption 2026-01-20 02:45:12 -05:00
Greyson LaLonde
ff9108dac4 feat: add flush() to event bus for deterministic event handling 2026-01-20 02:43:25 -05:00
Greyson LaLonde
c8f9547816 fix: ensure cache hit formatting; additional event types 2026-01-20 02:14:08 -05:00
Greyson LaLonde
d78ee915dc fix: add additional stack checks 2026-01-20 01:39:55 -05:00
Greyson LaLonde
5914f8be7d chore: update test assumptions 2026-01-20 01:19:47 -05:00
Greyson LaLonde
da07bd4d9f refactor: use try/finally for event pairing in tool usage 2026-01-20 01:15:05 -05:00
Greyson LaLonde
161f9bd063 feat: reset emission counter for test isolation 2026-01-20 01:12:52 -05:00
Greyson LaLonde
ae253b4156 refactor: improve tracing listener typing and sorting 2026-01-20 01:07:56 -05:00
Greyson LaLonde
f7e1bdb64e feat: integrate ordering and hierarchy into event bus 2026-01-20 01:07:13 -05:00
Greyson LaLonde
1707df8785 feat: add parent-child event hierarchy with scope management 2026-01-20 01:03:40 -05:00
Greyson LaLonde
decdefe8f5 feat: add emission sequence for event ordering 2026-01-20 01:01:14 -05:00
Greyson LaLonde
ceef062426 feat: add additional a2a events and enrich event metadata
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Notify Downstream / notify-downstream (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
2026-01-16 16:57:31 -05:00
Heitor Carvalho
e44d778e0e feat: keycloak sso provider support (#4241)
Some checks failed
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Notify Downstream / notify-downstream (push) Has been cancelled
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
2026-01-15 15:38:40 -03:00
nicoferdi96
5645cbb22e CrewAI AMP Deployment Guidelines (#4205)
* doc changes for better deplyment guidelines and checklist

* chore: remove .claude folder from version control

The .claude folder contains local Claude Code skills and configuration
that should not be tracked in the repository. Already in .gitignore.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* Better project structure for flows

* docs.json updated structure

* Ko and Pt traslations for deploying guidelines to AMP

* fix broken links

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Greyson LaLonde <greyson.r.lalonde@gmail.com>
2026-01-15 16:32:20 +01:00
Lorenze Jay
8f022be106 feat: bump versions to 1.8.1 (#4242)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Notify Downstream / notify-downstream (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
* feat: bump versions to 1.8.1

* bump bump
1.8.1
2026-01-14 20:49:14 -08:00
Greyson LaLonde
6a19b0a279 feat: a2a task execution utilities 2026-01-14 22:56:17 -05:00
Greyson LaLonde
641c336b2c chore: a2a agent card docs, refine existing a2a docs 2026-01-14 22:46:53 -05:00
Greyson LaLonde
22f1812824 feat: add a2a server config; agent card generation 2026-01-14 22:09:11 -05:00
Lorenze Jay
9edbf89b68 fix: enhance Azure model stop word support detection (#4227)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Notify Downstream / notify-downstream (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
- Updated the `supports_stop_words` method to accurately reflect support for stop sequences based on model type, specifically excluding GPT-5 and O-series models.
- Added comprehensive tests to verify that GPT-5 family and O-series models do not support stop words, ensuring correct behavior in completion parameter preparation.
- Ensured that stop words are not included in parameters for unsupported models while maintaining expected behavior for supported models.
2026-01-13 10:23:59 -08:00
Vini Brasil
685f7b9af1 Increase frame inspection depth to detect parent_flow (#4231)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Notify Downstream / notify-downstream (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
This commit fixes a bug where `parent_flow` was not being set because
the maximum depth was not sufficient to search for an instance of `Flow`
in the current call stack frame during Flow instantiation.
2026-01-13 18:40:22 +01:00
Anaisdg
595fdfb6e7 feat: add galileo to integrations page (#4130)
* feat: add galileo to integrations page

* fix: linting issues

* fix: clarification on hanlder

* fix: uv install, load_dotenv redundancy, spelling error

* add: translations fix uv install and typo

* fix: broken links

---------

Co-authored-by: Anais <anais@Anaiss-MacBook-Pro.local>
Co-authored-by: Lorenze Jay <63378463+lorenzejay@users.noreply.github.com>
Co-authored-by: Anais <anais@Mac.lan>
2026-01-13 08:49:17 -08:00
Koushiv
8f99fa76ed feat: additional a2a transports
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Notify Downstream / notify-downstream (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
Co-authored-by: Koushiv Sadhukhan <koushiv.777@gmail.com>
Co-authored-by: Greyson LaLonde <greyson.r.lalonde@gmail.com>
2026-01-12 12:03:06 -05:00
GininDenis
17e3fcbe1f fix: unlink task in execution spans
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Notify Downstream / notify-downstream (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
Co-authored-by: Greyson LaLonde <greyson.r.lalonde@gmail.com>
2026-01-12 02:58:42 -05:00
Joao Moura
b858d705a8 updating docs
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Notify Downstream / notify-downstream (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
2026-01-11 16:02:55 -08:00
Lorenze Jay
d60f7b360d WIP docs for pii-redaction feat (#4189)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Notify Downstream / notify-downstream (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
Build uv cache / build-cache (3.10) (push) Has been cancelled
Build uv cache / build-cache (3.11) (push) Has been cancelled
Build uv cache / build-cache (3.12) (push) Has been cancelled
Build uv cache / build-cache (3.13) (push) Has been cancelled
* WIP docs for pii-redaction feat

* fix

* updated image

* Update PII Redaction documentation to clarify Enterprise plan requirements and version constraints

* visual re-ordering

* dropping not useful info

* improve docs

* better wording

* Add PII Redaction feature documentation in Korean and Portuguese, including details on activation, supported entity types, and best practices for usage.
2026-01-09 17:53:05 -08:00
Lorenze Jay
6050a7b3e0 chore: update changelog for version 1.8.0 release (#4206)
- Added new features including native async chain for a2a, a2a update mechanisms, and global flow configuration for human-in-the-loop feedback.
- Improved event handling with enhancements to EventListener and TraceCollectionListener.
- Fixed bugs related to missing a2a dependencies and WorkOS login polling.
- Updated documentation for webhook-streaming and adjusted language in AOP to AMP documentation.
- Acknowledged contributors for this release.
2026-01-09 16:44:45 -08:00
João Moura
46846bcace fix: improve error handling for HumanFeedbackPending in flow execution (#4203)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Notify Downstream / notify-downstream (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
* fix: handle HumanFeedbackPending in flow error management

Updated the flow error handling to treat HumanFeedbackPending as expected control flow rather than an error. This change ensures that the flow can appropriately manage human feedback scenarios without signaling an error, improving the robustness of the flow execution.

* fix: improve error handling for HumanFeedbackPending in flow execution

Refined the flow error management to emit a paused event for HumanFeedbackPending exceptions instead of treating them as failures. This enhancement allows the flow to better manage human feedback scenarios, ensuring that the execution state is preserved and appropriately handled without signaling an error. Regular failure events are still emitted for other exceptions, maintaining robust error reporting.
2026-01-08 03:40:02 -03:00
João Moura
d71e91e8f2 fix: handle HumanFeedbackPending in flow error management (#4200)
Updated the flow error handling to treat HumanFeedbackPending as expected control flow rather than an error. This change ensures that the flow can appropriately manage human feedback scenarios without signaling an error, improving the robustness of the flow execution.
2026-01-08 00:52:38 -03:00
Lorenze Jay
9a212b8e29 feat: bump versions to 1.8.0 (#4199)
* feat: bump versions to 1.8.0

* bump 1.8.0
1.8.0
2026-01-07 15:36:46 -08:00
Greyson LaLonde
67953b3a6a feat: a2a native async chain
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Notify Downstream / notify-downstream (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
2026-01-07 14:07:40 -05:00
Greyson LaLonde
a760923c50 fix: handle missing a2a dep as optional 2026-01-07 14:01:36 -05:00
Vidit Ostwal
1c4f44af80 Adding usage info in llm.py (#4172)
* Adding usage info everywhere

* Changing the check

* Changing the logic

* Adding tests

* Adding casellets

* Minor change

* Fixing testcase

* remove the duplicated test case, thanks to cursor

* Adding async test cases

* Updating test case

---------

Co-authored-by: Lorenze Jay <63378463+lorenzejay@users.noreply.github.com>
2026-01-07 10:42:27 -08:00
Greyson LaLonde
09014215a9 feat: add a2a update mechanisms (poll/stream/push) with handlers, config, and tests
introduces structured update config, shared task helpers/error types, polling + streaming handlers with activated events, and a push notification protocol/events + handler. refactors handlers into a unified protocol with shared message sending logic and python-version-compatible typing. adds a2a integration tests + async update docs, fixes push config propagation, response model parsing safeguards, failure-state handling, stream cleanup, polling timeout catching, agent-card fallback behavior, and prevents duplicate artifacts.
2026-01-07 11:36:36 -05:00
João Moura
0ccc155457 feat: Introduce global flow configuration for human-in-the-loop feedback (#4193)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Notify Downstream / notify-downstream (push) Has been cancelled
* feat: Introduce global flow configuration for human-in-the-loop feedback

- Added a new `flow_config` module to manage global Flow configuration, allowing customization of Flow behavior at runtime.
- Integrated the `hitl_provider` attribute to specify the human-in-the-loop feedback provider, enhancing flexibility in feedback collection.
- Updated the `human_feedback` function to utilize the configured HITL provider, improving the handling of feedback requests.

* TYPO
2026-01-07 05:42:28 -03:00
Lorenze Jay
8945457883 Lorenze/metrics for human feedback flows (#4188)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Notify Downstream / notify-downstream (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
* measuring human feedback feat

* add some tests
2026-01-06 16:12:34 -08:00
Mike Plachta
b787d7e591 Update webhook-streaming.mdx (#4184)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Notify Downstream / notify-downstream (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
2026-01-06 09:09:48 -08:00
Lorenze Jay
25c0c030ce adjust aop to amp docs lang (#4179)
Some checks failed
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Check Documentation Broken Links / Check broken links (push) Has been cancelled
Notify Downstream / notify-downstream (push) Has been cancelled
Mark stale issues and pull requests / stale (push) Has been cancelled
* adjust aop to amp docs lang

* whoop no print
2026-01-05 15:30:21 -08:00