The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
Add security notices to toolkits (#11900)
Eugene Yurtsev12d7eaa0c259
diff --git a/libs/langchain/langchain/agents/agent_toolkits/__init__.py b/libs/langchain/langchain/agents/agent_toolkits/__init__.pyindex 93532981e5..537d5b6c25 100644--- a/libs/langchain/langchain/agents/agent_toolkits/__init__.py+++ b/libs/langchain/langchain/agents/agent_toolkits/__init__.py@@ -1,4 +1,18 @@-"""Agent toolkits."""+"""Agent toolkits contain integrations with various resources and services.++LangChain has a large ecosystem of integrations with various external resources+like local and remote file systems, APIs and databases.++These integrations allow developers to create versatile applications that combine the+power of LLMs with the ability to access, interact with and manipulate external+resources.++When developing an application, developers should inspect the capabilities and+permissions of the tools that underlie the given agent toolkit, and determine+whether permissions of the given toolkit are appropriate for the application.++See [Security](https://python.langchain.com/docs/security) for more information.+"""from langchain.agents.agent_toolkits.ainetwork.toolkit import AINetworkToolkitfrom langchain.agents.agent_toolkits.amadeus.toolkit import AmadeusToolkitfrom langchain.agents.agent_toolkits.azure_cognitive_services import (diff --git a/libs/langchain/langchain/agents/agent_toolkits/file_management/toolkit.py b/libs/langchain/langchain/agents/agent_toolkits/file_management/toolkit.pyindex 95615271da..6e4c59b49e 100644--- a/libs/langchain/langchain/agents/agent_toolkits/file_management/toolkit.py+++ b/libs/langchain/langchain/agents/agent_toolkits/file_management/toolkit.py@@ -47,6 +47,8 @@ class FileManagementToolkit(BaseToolkit):- Limit the tools available to the agent to only the file operationsnecessary for the agent's intended use.- Sandbox the agent by running it in a container.++ See https://python.langchain.com/docs/security for more information."""root_dir: Optional[str] = Nonediff --git a/libs/langchain/langchain/agents/agent_toolkits/github/toolkit.py b/libs/langchain/langchain/agents/agent_toolkits/github/toolkit.pyindex 80cd784196..390866ac88 100644--- a/libs/langchain/langchain/agents/agent_toolkits/github/toolkit.py+++ b/libs/langchain/langchain/agents/agent_toolkits/github/toolkit.py@@ -18,7 +18,17 @@ from langchain.utilities.github import GitHubAPIWrapperclass GitHubToolkit(BaseToolkit):- """GitHub Toolkit."""+ """GitHub Toolkit.++ *Security Note*: This toolkit contains tools that can read and modify+ the state of a service; e.g., by creating, deleting, or updating,+ reading underlying data.++ For example, this toolkit can be used to create issues, pull requests,+ and comments on GitHub.++ See [Security](https://python.langchain.com/docs/security) for more information.+ """tools: List[BaseTool] = []diff --git a/libs/langchain/langchain/agents/agent_toolkits/gitlab/toolkit.py b/libs/langchain/langchain/agents/agent_toolkits/gitlab/toolkit.pyindex 87e83756cc..1a2ac72652 100644--- a/libs/langchain/langchain/agents/agent_toolkits/gitlab/toolkit.py+++ b/libs/langchain/langchain/agents/agent_toolkits/gitlab/toolkit.py@@ -18,7 +18,17 @@ from langchain.utilities.gitlab import GitLabAPIWrapperclass GitLabToolkit(BaseToolkit):- """GitLab Toolkit."""+ """GitLab Toolkit.++ *Security Note*: This toolkit contains tools that can read and modify+ the state of a service; e.g., by creating, deleting, or updating,+ reading underlying data.++ For example, this toolkit can be used to create issues, pull requests,+ and comments on GitLab.++ See https://python.langchain.com/docs/security for more information.+ """tools: List[BaseTool] = []diff --git a/libs/langchain/langchain/agents/agent_toolkits/gmail/toolkit.py b/libs/langchain/langchain/agents/agent_toolkits/gmail/toolkit.pyindex cb456d6aab..34120cc284 100644--- a/libs/langchain/langchain/agents/agent_toolkits/gmail/toolkit.py+++ b/libs/langchain/langchain/agents/agent_toolkits/gmail/toolkit.py@@ -27,7 +27,17 @@ SCOPES = ["https://mail.google.com/"]class GmailToolkit(BaseToolkit):- """Toolkit for interacting with Gmail."""+ """Toolkit for interacting with Gmail.++ *Security Note*: This toolkit contains tools that can read and modify+ the state of a service; e.g., by reading, creating, updating, deleting+ data associated with this service.++ For example, this toolkit can be used to send emails on behalf of the+ associated account.++ See https://python.langchain.com/docs/security for more information.+ """api_resource: Resource = Field(default_factory=build_resource_service)diff --git a/libs/langchain/langchain/agents/agent_toolkits/jira/toolkit.py b/libs/langchain/langchain/agents/agent_toolkits/jira/toolkit.pyindex cba3fd336b..1e6c350b13 100644--- a/libs/langchain/langchain/agents/agent_toolkits/jira/toolkit.py+++ b/libs/langchain/langchain/agents/agent_toolkits/jira/toolkit.py@@ -14,7 +14,14 @@ from langchain.utilities.jira import JiraAPIWrapperclass JiraToolkit(BaseToolkit):- """Jira Toolkit."""+ """Jira Toolkit.++ *Security Note*: This toolkit contains tools that can read and modify+ the state of a service; e.g., by creating, deleting, or updating,+ reading underlying data.++ See https://python.langchain.com/docs/security for more information.+ """tools: List[BaseTool] = []