Add event emission for agent execution lifecycle

- Emit AgentExecutionStarted and AgentExecutionError events
- Update CrewAgentExecutor to use event_bus for tracking agent execution
- Refactor error handling to include event emission
- Minor code formatting improvements in task.py and crew_agent_executor.py
- Fix a typo in test file
This commit is contained in:
Lorenze Jay
2025-02-11 14:35:55 -08:00
parent 9eb5b361dd
commit 3a89b9feab
3 changed files with 40 additions and 21 deletions

View File

@@ -190,7 +190,7 @@ def test_agent_emits_execution_started_and_completed_events():
"ask_for_human_input": False,
"input": "Just say hi\n"
"\n"
"This is the expect criteria for your final answer: hi\n"
"This is the expected criteria for your final answer: hi\n"
"you MUST return the actual complete content as the final answer, not a "
"summary.",
"tool_names": "",