Skip to content

'Build and run agentic AI applications with Docker' is out of date #25620

Description

@john-v3

Is this a docs issue?

  • My issue is about the documentation content or website

Type of issue

Information is incorrect

Description

I encountered a http 401 error when attempting to send a query to the application on localhost:8080 after following the directions to the best of my ability today.

See full logs below:

PowerShell 7.5.8

Administrator in compose-for-agents\adk on  main [!] is 📦 v0.1.0 via 🐍 v3.10.5 
❯ docker compose up
[+] up 1/1
 ✔ gemma3 Configured                                                                                                                                     1.1s
Attaching to adk-1, mcp-gateway-1
mcp-gateway-1  | Note: dynamic-tools disabled when using --servers flag
mcp-gateway-1  | - Reading configuration...
mcp-gateway-1  |   - Reading catalog from [https://desktop.docker.com/mcp/catalog/v3/catalog.yaml]
adk-1          | Using Docker Model Runner with ai/gemma3:4B-Q4_0
mcp-gateway-1  | Warning: Failed to fetch secrets from secrets engine: secrets engine is not available: unavailable: dial unix /root/.cache/docker-secrets-en
gine/engine.sock: connect: no such file or directory
mcp-gateway-1  | - Configuration read in 266.61601ms
mcp-gateway-1  | - Using images:
mcp-gateway-1  |   - mcp/duckduckgo@sha256:5617c4c60f48f47556c0735de7a73f6abd731c132c65ec8c720b511819c9f88f
mcp-gateway-1  | - Verifying images [mcp/duckduckgo]
mcp-gateway-1  | > Images verified in 602.874422ms
mcp-gateway-1  | > Images pulled in 8.093603ms
mcp-gateway-1  | - Those servers are enabled: duckduckgo
mcp-gateway-1  | - Listing MCP tools...
mcp-gateway-1  |   - Running mcp/duckduckgo with [run --rm -i --init --security-opt no-new-privileges --cpus 1 --memory 2Gb --pull never -l docker-mcp=true -
l docker-mcp-tool-type=mcp -l docker-mcp-name=duckduckgo -l docker-mcp-transport=stdio --network adk_default]
mcp-gateway-1  | - duckduckgo: DuckDuckGo MCP Server initialized:
mcp-gateway-1  | - duckduckgo:   SafeSearch: MODERATE (kp=-1)
mcp-gateway-1  | - duckduckgo:   Default Region: none
mcp-gateway-1  | - duckduckgo:   Search backend: auto
mcp-gateway-1  | - duckduckgo:   Fetch backend: httpx
mcp-gateway-1  | - duckduckgo:   Allow private URLs: False
mcp-gateway-1  | - duckduckgo: [07/22/26 03:08:24] INFO     Processing request of type            server.py:733
mcp-gateway-1  | - duckduckgo:                              ListToolsRequest
mcp-gateway-1  | - duckduckgo:                     INFO     Processing request of type            server.py:733
mcp-gateway-1  | - duckduckgo:                              ListPromptsRequest
mcp-gateway-1  | - duckduckgo:                     INFO     Processing request of type            server.py:733
mcp-gateway-1  | - duckduckgo:                              ListResourcesRequest
mcp-gateway-1  | - duckduckgo:                     INFO     Processing request of type            server.py:733
mcp-gateway-1  | - duckduckgo:                              ListResourceTemplatesRequest
mcp-gateway-1  |   > duckduckgo: (2 tools)
mcp-gateway-1  | > 2 tools listed in 1.606730551s
mcp-gateway-1  | > Initialized in 2.490862331s
mcp-gateway-1  | > Start sse server on port 8811
mcp-gateway-1  | > Gateway URL: http://localhost:8811/sse
mcp-gateway-1  | > Use Bearer token: Authorization: Bearer kt1lshvdfimfmsmc3oonrg43ve9aopjzeiw1lvmxr9juv5pogh
adk-1          | INFO:google_adk.google.adk.models.registry:Updating LLM class for gemini-.* from <class 'google.adk.models.google_llm.Gemini'> to <class 'go
ogle.adk.models.google_llm.Gemini'>
adk-1          | INFO:google_adk.google.adk.models.registry:Updating LLM class for projects\/.+\/locations\/.+\/endpoints\/.+ from <class 'google.adk.models.
google_llm.Gemini'> to <class 'google.adk.models.google_llm.Gemini'>                                                                                         
adk-1          | INFO:google_adk.google.adk.models.registry:Updating LLM class for projects\/.+\/locations\/.+\/publishers\/google\/models\/gemini.+ from <cl
ass 'google.adk.models.google_llm.Gemini'> to <class 'google.adk.models.google_llm.Gemini'>                                                                  
adk-1          | INFO:google_adk.google.adk.models.registry:Updating LLM class for gemini-.* from <class 'google.adk.models.google_llm.Gemini'> to <class 'go
ogle.adk.models.google_llm.Gemini'>                                                                                                                          
adk-1          | INFO:google_adk.google.adk.models.registry:Updating LLM class for projects\/.+\/locations\/.+\/endpoints\/.+ from <class 'google.adk.models.
google_llm.Gemini'> to <class 'google.adk.models.google_llm.Gemini'>                                                                                         
adk-1          | INFO:google_adk.google.adk.models.registry:Updating LLM class for projects\/.+\/locations\/.+\/publishers\/google\/models\/gemini.+ from <cl
ass 'google.adk.models.google_llm.Gemini'> to <class 'google.adk.models.google_llm.Gemini'>                                                                  
adk-1          | /app/.venv/lib/python3.13/site-packages/google/adk/cli/fast_api.py:334: UserWarning: [EXPERIMENTAL] InMemoryCredentialService: This feature 
is experimental and may change or be removed in future versions without notice. It may introduce breaking changes at any time.
adk-1          |   credential_service = InMemoryCredentialService()
adk-1          | /app/.venv/lib/python3.13/site-packages/google/adk/auth/credential_service/in_memory_credential_service.py:33: UserWarning: [EXPERIMENTAL] B
aseCredentialService: This feature is experimental and may change or be removed in future versions without notice. It may introduce breaking changes at any t
ime.
adk-1          |   super().__init__()
adk-1          | INFO:     Started server process [1]                                                                                                        
adk-1          | INFO:     Waiting for application startup.
adk-1          | INFO:     Application startup complete.                                                                                                     
adk-1          |                                                                                                                                             
adk-1          | +-----------------------------------------------------------------------------+
adk-1          | | ADK Web Server started                                                      |                                                             
adk-1          | |                                                                             |                                                             
adk-1          | | For local testing, access at http://localhost:8080.                         |
adk-1          | +-----------------------------------------------------------------------------+                                                             
adk-1          |                                                                                                                                             
adk-1          | INFO:     Uvicorn running on http://0.0.0.0:8080 (Press CTRL+C to quit)
adk-1          | INFO:     172.20.0.1:50680 - "GET /dev-ui/?app=agents HTTP/1.1" 304 Not Modified                                                            
adk-1          | INFO:     172.20.0.1:50680 - "GET /list-apps?relative_path=./ HTTP/1.1" 200 OK
adk-1          | INFO:google_adk.google.adk.cli.fast_api:New session created
adk-1          | INFO:     172.20.0.1:50680 - "POST /apps/agents/users/user/sessions HTTP/1.1" 200 OK
adk-1          | INFO:     172.20.0.1:50688 - "GET /apps/agents/eval_results HTTP/1.1" 200 OK                                                                
adk-1          | INFO:     172.20.0.1:50680 - "GET /apps/agents/eval_sets HTTP/1.1" 200 OK
adk-1          | INFO:     172.20.0.1:50680 - "GET /apps/agents/users/user/sessions HTTP/1.1" 200 OK                                                         
adk-1          | INFO:     172.20.0.1:50680 - "GET /apps/agents/users/user/sessions HTTP/1.1" 200 OK
adk-1          | INFO:     172.20.0.1:50680 - "POST /run_sse HTTP/1.1" 200 OK
adk-1          | INFO:/app/.venv/lib/python3.13/site-packages/google/adk/cli/utils/envs.py:No .env file found for agents
adk-1          | DEBUG:google_adk.google.adk.cli.utils.agent_loader:Loading agent agents - not in cache.                                                     
adk-1          | DEBUG:google_adk.google.adk.cli.utils.agent_loader:Loading .env for agent agents from /app                                                  
adk-1          | INFO:/app/.venv/lib/python3.13/site-packages/google/adk/cli/utils/envs.py:No .env file found for agents
adk-1          | INFO:httpx:HTTP Request: GET https://raw.githubusercontent.com/BerriAI/litellm/main/model_prices_and_context_window.json "HTTP/1.1 200 OK"  
adk-1          | 2026-07-22 03:09:01,864 - google_adk.google.adk.cli.utils.agent_loader - DEBUG - Module agents has no root_agent. Trying next pattern.
adk-1          | 2026-07-22 03:09:01,865 - google_adk.google.adk.cli.utils.agent_loader - INFO - Found root_agent in agents.agent
adk-1          | 2026-07-22 03:09:01,890 - google_adk.google.adk.cli.fast_api - ERROR - Error in event_generator: unhandled errors in a TaskGroup (1 sub-exce
ption)
adk-1          |   + Exception Group Traceback (most recent call last):
adk-1          |   |   File "/app/.venv/lib/python3.13/site-packages/google/adk/cli/fast_api.py", line 809, in event_generator
adk-1          |   |     async for event in runner.run_async(                                                                                                
adk-1          |   |     ...<8 lines>...
adk-1          |   |       yield f"data: {sse_event}\n\n"                                                                                                    
adk-1          |   |   File "/app/.venv/lib/python3.13/site-packages/google/adk/runners.py", line 203, in run_async                                          
adk-1          |   |     async for event in invocation_context.agent.run_async(invocation_context):
adk-1          |   |     ...<2 lines>...                                                                                                                     
adk-1          |   |       yield event                                                                                                                       
adk-1          |   |   File "/app/.venv/lib/python3.13/site-packages/google/adk/agents/base_agent.py", line 147, in run_async
adk-1          |   |     async for event in self._run_async_impl(ctx):                                                                                       
adk-1          |   |       yield event                                                                                                                       
adk-1          |   |   File "/app/.venv/lib/python3.13/site-packages/google/adk/agents/sequential_agent.py", line 37, in _run_async_impl
adk-1          |   |     async for event in sub_agent.run_async(ctx):                                                                                        
adk-1          |   |       yield event                                                                                                                       
adk-1          |   |   File "/app/.venv/lib/python3.13/site-packages/google/adk/agents/base_agent.py", line 147, in run_async
adk-1          |   |     async for event in self._run_async_impl(ctx):                                                                                       
adk-1          |   |       yield event                                                                                                                       
adk-1          |   |   File "/app/.venv/lib/python3.13/site-packages/google/adk/agents/llm_agent.py", line 275, in _run_async_impl
adk-1          |   |     async for event in self._llm_flow.run_async(ctx):                                                                                   
adk-1          |   |       self.__maybe_save_output_to_state(event)                                                                                          
adk-1          |   |       yield event
adk-1          |   |   File "/app/.venv/lib/python3.13/site-packages/google/adk/flows/llm_flows/base_llm_flow.py", line 282, in run_async                    
adk-1          |   |     async for event in self._run_one_step_async(invocation_context):                                                                    
adk-1          |   |       last_event = event
adk-1          |   |       yield event                                                                                                                       
adk-1          |   |   File "/app/.venv/lib/python3.13/site-packages/google/adk/flows/llm_flows/base_llm_flow.py", line 302, in _run_one_step_async          
adk-1          |   |     async for event in self._preprocess_async(invocation_context, llm_request):                                                         
adk-1          |   |       yield event                                                                                                                       
adk-1          |   |   File "/app/.venv/lib/python3.13/site-packages/google/adk/flows/llm_flows/base_llm_flow.py", line 340, in _preprocess_async
adk-1          |   |     for tool in await agent.canonical_tools(                                                                                            
adk-1          |   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                            
adk-1          |   |         ReadonlyContext(invocation_context)
adk-1          |   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                             
adk-1          |   |     ):                                                                                                                                  
adk-1          |   |     ^
adk-1          |   |   File "/app/.venv/lib/python3.13/site-packages/google/adk/agents/llm_agent.py", line 364, in canonical_tools                           
adk-1          |   |     resolved_tools.extend(await _convert_tool_union_to_tools(tool_union, ctx))                                                          
adk-1          |   |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
adk-1          |   |   File "/app/.venv/lib/python3.13/site-packages/google/adk/agents/llm_agent.py", line 114, in _convert_tool_union_to_tools              
adk-1          |   |     return await tool_union.get_tools(ctx)                                                                                              
adk-1          |   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
adk-1          |   |   File "/app/.venv/lib/python3.13/site-packages/google/adk/tools/mcp_tool/mcp_session_manager.py", line 128, in wrapper                 
adk-1          |   |     return await func(self, *args, **kwargs)                                                                                            
adk-1          |   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
adk-1          |   |   File "/app/.venv/lib/python3.13/site-packages/google/adk/tools/mcp_tool/mcp_toolset.py", line 151, in get_tools                       
adk-1          |   |     session = await self._mcp_session_manager.create_session()                                                                          
adk-1          |   |               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
adk-1          |   |   File "/app/.venv/lib/python3.13/site-packages/google/adk/tools/mcp_tool/mcp_session_manager.py", line 332, in create_session          
adk-1          |   |     transports = await exit_stack.enter_async_context(client)                                                                           
adk-1          |   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                           
adk-1          |   |   File "/usr/local/lib/python3.13/contextlib.py", line 668, in enter_async_context                                                      
adk-1          |   |     result = await _enter(cm)                                                                                                           
adk-1          |   |              ^^^^^^^^^^^^^^^^                                                                                                           
adk-1          |   |   File "/usr/local/lib/python3.13/contextlib.py", line 214, in __aenter__
adk-1          |   |     return await anext(self.gen)                                                                                                        
adk-1          |   |            ^^^^^^^^^^^^^^^^^^^^^
adk-1          |   |   File "/app/.venv/lib/python3.13/site-packages/mcp/client/sse.py", line 54, in sse_client                                              
adk-1          |   |     async with anyio.create_task_group() as tg:                                                                                         
adk-1          |   |                ~~~~~~~~~~~~~~~~~~~~~~~^^
adk-1          |   |   File "/app/.venv/lib/python3.13/site-packages/anyio/_backends/_asyncio.py", line 772, in __aexit__                                    
adk-1          |   |     raise BaseExceptionGroup(                                                                                                           
adk-1          |   |         "unhandled errors in a TaskGroup", self._exceptions
adk-1          |   |     ) from None                                                                                                                         
adk-1          |   | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)                                                                       
adk-1          |   +-+---------------- 1 ----------------
adk-1          |     | Traceback (most recent call last):                                                                                                    
adk-1          |     |   File "/app/.venv/lib/python3.13/site-packages/mcp/client/sse.py", line 65, in sse_client                                            
adk-1          |     |     event_source.response.raise_for_status()
adk-1          |     |     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^                                                                                          
adk-1          |     |   File "/app/.venv/lib/python3.13/site-packages/httpx/_models.py", line 829, in raise_for_status                                      
adk-1          |     |     raise HTTPStatusError(message, request=request, response=self)
adk-1          |     | httpx.HTTPStatusError: Client error '401 Unauthorized' for url 'http://mcp-gateway:8811/sse'                                          
adk-1          |     | For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/401                                              
adk-1          |     +------------------------------------
adk-1          | INFO:     172.20.0.1:50680 - "GET /apps/agents/users/user/sessions/deb582bc-a834-49a4-8d86-86ca57513e4b HTTP/1.1" 200 OK                    
adk-1          | INFO:     172.20.0.1:50688 - "GET /debug/trace/session/deb582bc-a834-49a4-8d86-86ca57513e4b HTTP/1.1" 200 OK                                


v View in Docker Desktop   o View Config   w Enable Watch   d Detach

Location

https://docs.docker.com/guides/agentic-ai/

Suggestion

I assume the mcp-gateway project was updated such that the following the exact directions of the linked URL does not work out of the box.

I recommend adding either a new step between step 1 and 2, or adding to step 1 details for either disabling the bearer token requirement by adding
- --allow-unauthenticated
to the compose.yaml file, or getting that bearer token generated by the mcp-gateway container into the adk container

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions