Skip to content
EventPast event

LangChain4j proposal to add tool guardrails to the core

1 reports1 reporting sourcesLatest report

Start here

AI overview

The langchain4j repository submitted issue #7065, proposing to add tool guardrails to the core, starting with tool output guardrails. The proposal says that results from local tools, MCP tools, scraped web pages and the like are passed directly to the model without validation, while existing guardrails cover only user messages and final replies, leaving a gap for indirect prompt injection; the plan is to port the existing tool guardrails from quarkus-langchain4j into the core and apply them uniformly along the tool execution path. The maintainers have agreed to include it, with technical validation first before implementation, and injection checks and tests to follow once the API lands.

Generated by AI from reports · Updated 19 days ago

Progress timeline

Nov 10
  1. langchain4j/langchain4j
    langchain4j plans to add tool guardrails to core, starting with tool output guardrails

    The langchain4j repository filed issue #7065, proposing to add tool guardrails to langchain4j core, starting with tool output guardrails. The proposal notes that tool results such as local tools, MCP tools, fetched web pages and search summaries are currently passed to the model without validation, while input guardrails only look at user messages and output guardrails only look at the final AI reply, leaving a gap for indirect prompt injection. The plan is to port the existing ToolInputGuardrail and ToolOutputGuardrail concepts from quarkus-langchain4j into core, reusing existing Guardrail types and executor mechanisms as much as possible, applying them uniformly on the tool execution path so that local tools and MCP tools behave consistently; maintainers jmartisk and mariofusco have already agreed in prior discussion to include it in core. A technical validation will be done before implementation, and prompt injection checks and test cases similar to PatternBasedPromptInjectionGuardrail will follow once the API lands.