fix sync main issues

This commit is contained in:
lorenzejay
2026-01-21 07:40:27 -08:00
parent 1b67629149
commit d6e04ba24d
2 changed files with 3 additions and 2 deletions

View File

@@ -246,7 +246,6 @@ class Agent(BaseAgent):
Can be a single A2AConfig/A2AClientConfig/A2AServerConfig, or a list of any number of A2AConfig/A2AClientConfig with a single A2AServerConfig.
""",
)
executor_class: type[CrewAgentExecutor] | type[AgentExecutor] = Field(
executor_class: type[CrewAgentExecutor] | type[AgentExecutor] = Field(
default=CrewAgentExecutor,
description="Class to use for the agent executor. Defaults to CrewAgentExecutor, can optionally use AgentExecutor.",
@@ -1616,7 +1615,6 @@ class Agent(BaseAgent):
)
return None
def _prepare_kickoff(
def _prepare_kickoff(
self,
messages: str | list[LLMMessage],

View File

@@ -1,6 +1,8 @@
from __future__ import annotations
from collections.abc import Callable, Coroutine
from datetime import datetime
import json
import threading
import time
from typing import TYPE_CHECKING, Any, Literal, cast
@@ -541,6 +543,7 @@ class AgentExecutor(Flow[AgentReActState], CrewAgentExecutorMixin):
@listen("execute_tool")
def execute_tool_action(self) -> Literal["tool_completed", "tool_result_is_final"]:
"""Execute the tool action and handle the result."""
try:
action = cast(AgentAction, self.state.current_answer)