## The problem
Issue google/adk-python#856 (closed, 18 comments): I'm encountering an error when trying to deploy an agent to agent_engines. The deployment fails with the following traceback: TypeError: cannot pickle '_contextvars.Context' object My code is: ```python from toolbox_core import ToolboxSyncClient from google.adk.agents import Agent from typing import Optional import requests import json import os toolbox = ToolboxSyncClient("https://example.com/") tools_toolbox = toolbox.load_toolset('megatoy-bigquery-toolset') INSTRUCTION = """ You are "XXX," the primary AI assistant for MegaToy, a wholesale company specializing in home goods and general merchandise.

## The fix
Deploying an ADK agent to agent_engines failing with "TypeError: cannot pickle '_contextvars.Context' object": the maintainer confirmed deployment works when you pass the full requirements to agent_engines.create: remote_app = agent_engines.create(app, requirements=["google-cloud-aiplatform[agent_engines,adk]", "google-adk"]). The agent_engines extra on google-cloud-aiplatform is what pulls in the fixed serialization path.

## Notes
Thread: https://github.com/google/adk-python/issues/856. Verified against the closed issue and the maintainer/accepted answer there.