Skip to content

docs: add secure tool execution how-to for delegated tool calls#2789

Open
Christopher (PetrefiedThunder) wants to merge 6 commits intolangchain-ai:mainfrom
PetrefiedThunder:codex/aecp-secure-tool-execution
Open

docs: add secure tool execution how-to for delegated tool calls#2789
Christopher (PetrefiedThunder) wants to merge 6 commits intolangchain-ai:mainfrom
PetrefiedThunder:codex/aecp-secure-tool-execution

Conversation

@PetrefiedThunder
Copy link

@PetrefiedThunder Christopher (PetrefiedThunder) commented Feb 24, 2026

Summary

Add a new LangChain Python docs page for secure tool execution patterns when tools can trigger side effects.

This PR adds:

  • src/oss/langchain/secure-tool-execution.mdx
  • src/docs.json navigation entry under Open source -> Python -> LangChain -> Core components

Why

Teams deploying tools in production often need explicit patterns for:

  • authorize-before-execute
  • budget-aware deny behavior
  • fail-closed execution
  • receipt-based auditability

Scope

  • Docs-only change
  • No runtime/package changes
  • No generated reference docs touched

Related

Closes #2787
Migrated from: langchain-ai/langchain#35413

AI assistance disclosure

This PR text and draft content were prepared with AI assistance and reviewed by the author.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 24, 2026

❌ Import check failed

This PR contains imports from langchain_core that should be imported from langchain instead.

Detailed issues
Analyzing diff for import issues...
 Found 1 import issues:

File: src/oss/langchain/secure-tool-execution.mdx
Line: 43
Issue: Import from langchain.tools instead of langchain_core.tools
Current:   from langchain_core.tools import tool
Suggested: from langchain.tools import tool
--------------------------------------------------------------------------------

 Found 1 import issues that need to be fixed.

Why this is a problem

The langchain package re-exports many modules and classes from langchain_core. When possible, imports should use langchain instead of langchain_core for:

  • Better user experience (single import source)
  • Consistency across documentation
  • Reduced cognitive load for users

How to fix

Replace the imports as suggested above. For example:

  • from langchain_core.messages import HumanMessage
  • from langchain.messages import HumanMessage

🤖 Automated check

This check is based on the latest analysis of langchain re-exports from langchain_core.

@PetrefiedThunder Christopher (PetrefiedThunder) marked this pull request as draft February 24, 2026 17:41
@PetrefiedThunder Christopher (PetrefiedThunder) marked this pull request as ready for review February 24, 2026 22:18
@PetrefiedThunder
Copy link
Author

Updated per CI import feedback and marked this PR ready for review. All required checks are now passing on commit d823884.

@PetrefiedThunder
Copy link
Author

Friendly follow-up on this docs addition. The PR is ready for review and all checks are passing on commit d823884. Please let me know if any changes are needed and I can update quickly. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external User is not a member of langchain-ai langchain For docs changes to LangChain oss

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs request: add AECP secure tool execution how-to (moved from langchain-ai/langchain#35413)

1 participant