Skip to content

chore: bug fixes and more refactor#4375

Merged
greysonlalonde merged 3 commits intomainfrom
gl/chore/bug-fixes-and-more-refactor
Feb 5, 2026
Merged

chore: bug fixes and more refactor#4375
greysonlalonde merged 3 commits intomainfrom
gl/chore/bug-fixes-and-more-refactor

Conversation

@greysonlalonde
Copy link
Contributor

No description provided.

Allow hook registration to accept both typed hook types and plain callables by importing and using After*/Before*CallHookCallable types; add explicit LLMCallHookContext and ToolCallHookContext typing in crew_base. Introduce a post-initialize crew hook list and invoke hooks after Crew instance initialization. Refactor filtered hook factory functions to include precise typing and clearer local names (before_llm_hook/after_llm_hook/before_tool_hook/after_tool_hook) and register those with the instance. Update CrewInstance protocol to include _registered_hook_functions and _hooks_being_registered fields.
Refactor agent executor to delegate human interactions to a provider: add messages and ask_for_human_input properties, implement _invoke_loop and _format_feedback_message, and replace the internal iterative/training feedback logic with a call to get_provider().handle_feedback.

Make LLMGuardrail kickoff coroutine-aware by detecting coroutines and running them via asyncio.run so both sync and async agents are supported.

Make telemetry more robust by safely handling missing task.output (use empty string) and returning early if span is None before setting attributes.

Improve serialization to detect circular references via an _ancestors set, propagate it through recursive calls, and pass exclude/max_depth/_current_depth consistently to prevent infinite recursion and produce stable serializable output.
@greysonlalonde greysonlalonde requested a review from a team February 5, 2026 01:20
@greysonlalonde greysonlalonde merged commit fe2a4b4 into main Feb 5, 2026
44 checks passed
@greysonlalonde greysonlalonde deleted the gl/chore/bug-fixes-and-more-refactor branch February 5, 2026 02:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants