- Add AgentOps optional dependency to pyproject.toml
- Implement AgentOpsListener with event handling for crew kickoff, tool usage, and task evaluation
- Add comprehensive AgentOps documentation in English, Portuguese, and Korean
- Update docs.json navigation to include AgentOps in observability sections
- Add agentops.log to .gitignore
- Include comprehensive tests for AgentOps integration with mocking
- Ensure graceful handling when AgentOps package is not installed
Addresses issue #3348 by restoring AgentOps integration removed in PR #3334
Co-Authored-By: João <joao@crewai.com>
* build(dev): add pytest-randomly dependency
By randomizing the test execution order, this helps identify tests
that unintentionally depend on shared state or specific execution
order, which can lead to flaky or unreliable test behavior.
* build(dev): add pytest-timeout
This will prevent a test from running indefinitely
* test: block external requests in CI and set default 10s timeout per test
* test: adding missing cassettes
We notice that those cassettes are missing after enabling block-network on CI
* test: increase tests timeout on CI
* test: fix flaky test ValueError: Circular reference detected (id repeated)
* fix: prevent crash when event handler raises exception
Previously, if a registered event handler raised an exception during execution,
it could crash the entire application or interrupt the event dispatch process.
This change wraps handler execution in a try/except block within the `emit` method,
ensuring that exceptions are caught and logged without affecting other handlers or flow.
This improves the resilience of the event bus, especially when handling third-party
or temporary listeners.
Add `__init__.py` files to 20 directories to conform with Python package standards. This ensures directories are properly recognized as packages, enabling cleaner imports.
- Renamed `CrewEvent` to `BaseEvent` across the codebase for consistency
- Created a `CrewBaseEvent` that automatically identifies fingerprints for DRY
- Added a new `to_json()` method for serializing events
* Support wildcard handling in `emit()`
Change `emit()` to call handlers registered for parent classes using
`isinstance()`. Ensures that base event handlers receive derived
events.
* Fix failing test
* Remove unused variable