{"id":50831358,"url":"https://github.com/langchain-samples/adk-deployment-demo","last_synced_at":"2026-06-13T23:30:31.209Z","repository":{"id":362736133,"uuid":"1260579002","full_name":"langchain-samples/adk-deployment-demo","owner":"langchain-samples","description":"You can now deploy Google ADK (Agent Development Kit) agents straight to LangSmith Deployments. In this short walkthrough, I take a Google ADK agent and ship it to managed infrastructure — with session persistence, streaming, and tracing — using a tiny wrapper and a single deploy command.","archived":false,"fork":false,"pushed_at":"2026-06-05T16:39:26.000Z","size":121,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-05T18:42:55.051Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/langchain-samples.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-05T16:37:14.000Z","updated_at":"2026-06-05T16:40:00.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/langchain-samples/adk-deployment-demo","commit_stats":null,"previous_names":["langchain-samples/adk-deployment-demo"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/langchain-samples/adk-deployment-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/langchain-samples%2Fadk-deployment-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/langchain-samples%2Fadk-deployment-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/langchain-samples%2Fadk-deployment-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/langchain-samples%2Fadk-deployment-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/langchain-samples","download_url":"https://codeload.github.com/langchain-samples/adk-deployment-demo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/langchain-samples%2Fadk-deployment-demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34304627,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-13T02:00:06.617Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-13T23:30:30.467Z","updated_at":"2026-06-13T23:30:31.197Z","avatar_url":"https://github.com/langchain-samples.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# adk-demo\n\nA minimal demo of deploying a [Google Agent Development Kit (ADK)](https://github.com/google/adk-python) agent to [LangSmith Agent Server](https://docs.langchain.com/langsmith/agent-server), following the [Deploy Google ADK agents](https://docs.langchain.com/langsmith/deploy-google-adk) guide.\n\nThe agent is a **personal task manager**: a single ADK `LlmAgent` whose tools read and write a per-session to-do list via `tool_context.state`. Because state is persisted through `saf_sdk.adk.wrap` and `LangsmithSessionService`, tasks survive across turns (and restarts) on the same thread.\n\n## How it works\n\n[`agent.py`](./agent.py) defines:\n\n- **Tools** that mutate a task list stored in session state:\n  - `add_task(title, priority)` — add a task (`low` / `medium` / `high`)\n  - `list_tasks(include_done)` — list open (or all) tasks, sorted by priority\n  - `complete_task(task_ref)` — mark a task done by id or exact title\n  - `delete_task(task_ref)` — remove a task by id or exact title\n  - `summarize()` — counts by status and priority\n- An `Agent` (`task_manager`) using `gemini-2.5-flash` that drives those tools.\n- A module-level `agent` produced by `wrap(Runner(...))`, which Agent Server imports and serves.\n\nTwo things make this deployable:\n\n1. The runner uses `LangsmithSessionService()` so session state is stored in the deployment's checkpoint store.\n2. The wrapped graph is exported as the module-level `agent` symbol, which [`langgraph.json`](./langgraph.json) registers under the graph id `adk_echo`.\n\n## Project layout\n\n```\nadk-demo/\n├── agent.py          # exports the wrapped ADK agent\n├── langgraph.json    # Agent Server config (graph id: adk_echo)\n├── pyproject.toml    # Python dependencies\n├── uv.lock           # pinned dependency lockfile\n├── .python-version   # pinned Python version (3.12)\n├── .env.example      # environment variable template\n└── README.md\n```\n\n## Prerequisites\n\n- [uv](https://docs.astral.sh/uv/) (package manager; installs Python 3.12 for you via `.python-version`)\n- A [LangSmith API key](https://docs.langchain.com/langsmith/create-account-api-key)\n- A [Gemini API key](https://aistudio.google.com/api-keys) (the agent uses a Gemini model)\n\nThe [LangGraph CLI](https://docs.langchain.com/langsmith/cli) is pulled in as a project dependency (`langgraph-cli[inmem]`), so syncing the project gives you the `langgraph` command.\n\n## Setup\n\nInstall dependencies (creates a virtualenv and installs from the lockfile):\n\n```bash\nuv sync\n```\n\nCopy the environment template and fill in your credentials:\n\n```bash\ncp .env.example .env\n```\n\n```bash\nGEMINI_API_KEY=your-gemini-api-key\nLANGSMITH_API_KEY=your-langsmith-api-key\nLANGSMITH_TRACING=true\nLANGSMITH_PROJECT_NAME=adk-demo\n```\n\n## Run locally\n\n```bash\nuv run langgraph dev\n```\n\nThis serves the agent at `http://127.0.0.1:2024` and opens [LangSmith Studio](https://docs.langchain.com/langsmith/studio). Try messages like:\n\n- \"Add 'write the demo readme' as a high priority task\"\n- \"What's on my list?\"\n- \"Mark the readme task done\"\n- \"How am I doing?\"\n\nOr call it over HTTP:\n\n```bash\n# Create a thread\nTHREAD=$(curl -s -X POST http://127.0.0.1:2024/threads \\\n  -H \"Content-Type: application/json\" -d '{}' \\\n  | python -c \"import sys, json; print(json.load(sys.stdin)['thread_id'])\")\n\n# Run the agent and wait for the final response\ncurl -s -X POST \"http://127.0.0.1:2024/threads/$THREAD/runs/wait\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"assistant_id\": \"adk_echo\",\n    \"input\": {\"messages\": [{\"type\": \"human\", \"content\": \"Add buy milk as a low priority task\"}]}\n  }'\n```\n\nReusing the same `THREAD` across requests demonstrates that the task list persists in session state.\n\n## Deploy to LangSmith\n\n```bash\nuv run langgraph deploy --name adk-demo\n```\n\nSee [Deploy to cloud](https://docs.langchain.com/langsmith/deploy-to-cloud) for environment configuration, deployment types, and revision management.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flangchain-samples%2Fadk-deployment-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flangchain-samples%2Fadk-deployment-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flangchain-samples%2Fadk-deployment-demo/lists"}