docs: note the adk web/api servers are unauthenticated and local-only

Co-authored-by: George Weale <gweale@google.com>
PiperOrigin-RevId: 956679982
This commit is contained in:
George Weale
2026-07-30 12:41:42 -07:00
committed by Copybara-Service
parent a5b5b46831
commit 76c64efd00
3 changed files with 26 additions and 0 deletions
+9
View File
@@ -671,6 +671,15 @@ class ApiServer:
instance returned by get_fast_api_app as this class exposes the agent runners
and most other bits of state retained during the lifetime of the server.
Security:
The served endpoints are unauthenticated. Any client that can reach the
server can read and write sessions, memory, and artifacts and run agents
for any user or app. Run it only on a trusted network (for example bound
to localhost for local development) and do not expose it directly to
untrusted or public networks. Put it behind your own authentication and
authorization layer before serving multiple users or exposing it beyond
the local machine.
Attributes:
agent_loader: An instance of BaseAgentLoader for loading agents.
session_service: An instance of BaseSessionService for managing sessions.
+8
View File
@@ -1961,6 +1961,10 @@ def cli_web(
agent containing `agent.py`, `__init__.py`, or `root_agent.yaml`) or a path
pointing directly to a single agent folder.
This server is intended for local development. Its endpoints are
unauthenticated, so run it on a trusted network only and do not expose it to
untrusted or public networks.
Example:
adk web --session_service_uri=[uri] --port=[port] path/to/agents_dir
@@ -2102,6 +2106,10 @@ def cli_api_server(
agent containing `agent.py`, `__init__.py`, or `root_agent.yaml`) or a path
pointing directly to a single agent folder.
This server's endpoints are unauthenticated. Run it on a trusted network
only, and put it behind your own authentication and authorization layer
before exposing it to untrusted or public networks or serving multiple users.
Example:
adk api_server --session_service_uri=[uri] --port=[port] path/to/agents_dir
+9
View File
@@ -20,6 +20,12 @@ All dev-only endpoints (eval, debug, graph, test management) are added by DevSer
Use this for local development with `adk web`.
For production deployments, use api_server.py instead.
Security: like ApiServer, every endpoint here is unauthenticated, and the
dev-only endpoints additionally read and write agent files on disk and run
evaluation and debugging code. This server is intended solely for local
development on a trusted machine. Never expose it to an untrusted or public
network, and never use it for a production or multi-user deployment.
"""
from __future__ import annotations
@@ -185,6 +191,9 @@ class DevServer(ApiServer):
Inherits all production endpoints from ApiServer and adds development-specific
endpoints for evaluation, debugging, and developer UI features.
Like ApiServer, all endpoints are unauthenticated. This server is intended
for local development only and must not be exposed to untrusted networks.
"""
_allow_special_agents: bool = True