Skip to content

Commit aa8dc9d

Browse files
authored
Add source to LLM Guardrail events (#3572)
This commit adds the source attribute to LLM Guardrail event calls to identify the Lite Agent or Task that executed the guardrail.
1 parent 9c1096d commit aa8dc9d

File tree

5 files changed

+111
-152
lines changed

5 files changed

+111
-152
lines changed

src/crewai/lite_agent.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,7 @@ def _execute_core(self, agent_info: dict[str, Any]) -> LiteAgentOutput:
367367
output=output,
368368
guardrail=self._guardrail,
369369
retry_count=self._guardrail_retry_count,
370+
event_source=self,
370371
)
371372

372373
if not guardrail_result.success:

0 commit comments

Comments
 (0)