Skip to content

Conversation

@valentinabojan
Copy link
Contributor

@valentinabojan valentinabojan commented Dec 4, 2025

Implementation Matrix

Legend

✔️ = Implemented (and tested)
⬜ = Not implemented
⭐ = Already exists

Guardrail Type Scope Block Log Escalate Filter
Out of The Box guardrail Agent ✔️ ✔️ N/A
Out of The Box guardrail LLM N/A
Out of The Box guardrail Tools N/A
Deterministic guardrail Agent N/A N/A N/A N/A
Deterministic guardrail LLM N/A N/A N/A N/A
Deterministic guardrail Tools In progress In progress In progress
  • this PR focuses only on action enforcement at Agent level
  • we created a guardrails subgraph after the INIT node and a guardrails subgraph after the TERMINATE node
  • after INIT - because this is where we have the messages
  • after TERMINATE - because this is where we have the agent result
  • log and block actions should now work at Agent level too

@valentinabojan valentinabojan force-pushed the AL-242-log-guardrail-llm branch 5 times, most recently from 2d0fed4 to 58d550d Compare December 5, 2025 14:13
@valentinabojan valentinabojan force-pushed the AL-228-log-block-guardrail-agent branch 4 times, most recently from e6c9850 to 44571ae Compare December 5, 2025 16:31
Base automatically changed from AL-242-log-guardrail-llm to main December 8, 2025 12:28
Comment on lines 89 to 102
init_with_guardrails_subgraph = create_agent_guardrails_subgraph(
(AgentGraphNode.INIT, init_node), guardrails, ExecutionStage.POST_EXECUTION
)
builder.add_node(AgentGraphNode.INIT, init_with_guardrails_subgraph)

for tool_name, tool_node in tool_nodes.items():
builder.add_node(tool_name, tool_node)

builder.add_node(AgentGraphNode.TERMINATE, terminate_node)
terminate_with_guardrails_subgraph = create_agent_guardrails_subgraph(
(AgentGraphNode.TERMINATE, terminate_node),
guardrails,
ExecutionStage.POST_EXECUTION,
)
builder.add_node(AgentGraphNode.TERMINATE, terminate_with_guardrails_subgraph)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are init and terminate nodes subject to guardrails? these are control flow nodes used to manage the state, not the execution of the agent.

@valentinabojan valentinabojan force-pushed the AL-228-log-block-guardrail-agent branch 5 times, most recently from 1893a87 to 75f1788 Compare December 15, 2025 10:23
@valentinabojan valentinabojan force-pushed the AL-228-log-block-guardrail-agent branch 5 times, most recently from 17fa69e to 3ca5d64 Compare December 15, 2025 19:17
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