# Gen AI Experience Concierge ## Introduction Gen AI Experience Concierge is a collection of agent design pattern implementations. All design patterns are built using the LangGraph framework for agent orchestration and session management. ## Contents For self-contained notebooks for interactively building each agent design pattern, navigate to the [agent-design-patterns/](./agent-design-patterns/) directory. The readme provides background and visualizations of each design pattern, including: - A chat assistant with a guardrail classifier layer ([reference](./agent-design-patterns/README.md#guardrail-classifier-agent)) - A multi-agent chat assistant with an intent detection layer to route to experts ([reference](./agent-design-patterns/README.md#semantic-router-agent)). - A chat assistant with function calling streaming capabilities, grounded on a mock retail dataset ([reference](./agent-design-patterns/README.md#function-calling-agent)). - A multi-agent chat assistant for generating research plans, executing them and reflecting on the results ([reference](./agent-design-patterns/README.md#task-planner)) We have also packaged these implementations as a "click-to-deploy" application that serves each LangGraph agent on a FastAPI Server with a Streamlit frontend demo. The agent server is compatible with the [LangGraph Cloud API spec](https://langchain-ai.github.io/langgraph/cloud/reference/api/api_ref.html) (to learn more about why this is useful, visit this [section](#why-use-the-langgraph-cloud-api-spec)). For instructions on deployment, please navigate to the [End-to-end Deployment](#end-to-end-deployment-) section. The command-line tool for automated deployment is defined in the [scripts/cli](./scripts/cli/) folder. The source code for the deployable demo is broken into the following structure: ```bash langgraph-demo │ ├── backend ; Backend agent server │ ├── concierge │ │ ├── agents ; All agent definitions │ │ ├── langgraph_server ; LangGraph -> fastapi.APIRouter adapter │ │ ├── nodes ; All LangGraph node definitions │ │ │ └── task_planning │ │ │ └── ops │ │ └── tools ; LLM tool definitions │ └── notebooks ; Notebooks to interact with agents │ ├── frontend ; Frontend Streamlit server │ └── concierge_ui │ └── agents ; Chat handlers for each agent │ └── terraform ; Infrastructure code for deployment ``` The [backend](./langgraph-demo/backend/) and [frontend](./langgraph-demo/frontend/) directories each contain their own readme for a deeper dive on local environment setup. ## Why use the LangGraph Cloud API spec? The LangGraph Cloud API spec is used by the standard LangGraph client SDKs to interact with deployed agents. A minimal subset of endpoints required by the [langgraph_sdk.RemoteGraph](https://langchain-ai.github.io/langgraph/reference/remote_graph/) interface. The `RemoteGraph` interface supports the same protocol used by `CompiledGraph` (the local LangGraph class). Instead of designing custom routes for each new agent, you can rely on a consistent, predictable interface for interacting with LangGraph agents during development and deployment. This also benefits downstream teams (such as frontend developers) that need to invoke deployed agents. By supporting the LangGraph remote client, downstream teams only need to learn one client implementation and can quickly integrate newly deployed agents. Currently, LangGraph only offers a solution for LangGraph Cloud API-compatible deployments on the managed LangGraph Platform. To enable this for self-hosted deployments, we wrote a small module ([source code](./langgraph-demo/backend/concierge/langgraph_server/)) to transform LangGraph agents into FastAPI routes. This doesn't support many of the premium features offered by the LangGraph Platform but is sufficient for using the `RemoteGraph` client. To demonstrate the portability of this approach, the Streamlit frontend demo hosts 5 different chat agents with the only dependency being the standard `langgraph` package for calling the remote agents. The frontend implementations for each agent can be found in [this folder](./langgraph-demo/frontend/concierge_ui/agents). ## Quickstart Demo ✨ ### Environment Setup Clone the repository and ensure that the Google Application Default Credentials are configured. You can do this by running the following commands: ```bash # Clone repository and navigate to project root directory git clone https://github.com/GoogleCloudPlatform/generative-ai.git cd generative-ai/gemini/agents/genai-experience-concierge # Set up Google Application Default Credentials gcloud auth login gcloud auth application-default login ``` ### (Optional) Create the Cymbal Retail dataset The function calling demo agent requires a BigQuery dataset and embedding model connection to exist to query a fictional retail dataset. This is automatically created during demo deployment, but must be manually created if the demo project doesn't exist. To manually create these tables and embedding model, you can run this command: ```bash uv run --frozen concierge langgraph create-dataset --project-id $PROJECT_ID ``` ### Start the agent backend server To start the backend server, open a new terminal window, navigate to `langgraph-demo/backend` and run: ```bash CONCIERGE_PROJECT=$PROJECT_ID uv run --frozen uvicorn concierge.server:app \ --port 3000 \ --reload ``` You can view the swagger documentation at [https://localhost:3000/docs](https://localhost:3000/docs). The docs include separate sections for each agent's router.