Skip to content

Jessmatth/production-langgraph-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deploying an AI Agent with Google Vertex Agent Engine

A production-style layout for deploying a LangGraph agent to Vertex AI Agent Engine, based on Google's tutorial_langgraph.ipynb.

The agent uses the LanggraphAgent template with a custom product-catalog tool, deploys to managed Agent Engine, and supports local testing, remote queries, and teardown via a CLI.

Architecture

flowchart LR
  src[src/agent.py + tools.py] --> deploy[deploy.py]
  deploy --> gcs[GCS staging bucket]
  gcs --> engine[Vertex Agent Engine]
  engine --> query[deploy.py query]
Loading
  • Local: src/ defines the agent; deploy.py local or notebooks/development.ipynb run queries against Gemini before deploy.
  • Deploy: deploy.py deploy bundles src/ and uploads to your staging bucket, then creates an Agent Engine resource.
  • Remote: deploy.py query calls the deployed agent API.

Prerequisites

  • Google Cloud project with billing enabled
  • Vertex AI API and Cloud Storage API enabled
  • Python 3.10+
  • Google Cloud SDK with gcloud auth application-default login

First-time GCP setup: see docs/gcp-setup.md.

Quickstart

python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env   # edit with your project ID and staging bucket

Local test (no deploy):

python deploy.py local --prompt "Get product details for headphones"

Deploy, query, delete:

python deploy.py deploy
python deploy.py query --prompt "Get product details for headphones"
python deploy.py delete

Project layout

production-langgraph-agent/
├── deploy.py              # CLI: deploy | query | delete | local
├── src/
│   ├── agent.py           # LanggraphAgent factory
│   └── tools.py           # get_product_details tool
├── notebooks/
│   └── development.ipynb  # Local sandbox only
└── docs/
    └── gcp-setup.md       # GCP bootstrap guide

Local development notebook

Open notebooks/development.ipynb to prototype against src/ without deploying. Remote steps use deploy.py.

Cost and cleanup

Agent Engine charges while a deployment is running. Always run python deploy.py delete after demos. See docs/gcp-setup.md for bucket cleanup notes.

Reference

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors