Skip to content

Commit c282c53

Browse files
authored
feat: add docs page (#127)
* feat: add docs page * feat: add docs page
1 parent 82c950d commit c282c53

25 files changed

+2883
-103
lines changed

.github/workflows/docs.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Deploy Docs to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
paths:
7+
- 'docs/**'
8+
- '.github/workflows/docs.yml'
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: read
13+
pages: write
14+
id-token: write
15+
16+
concurrency:
17+
group: "pages"
18+
cancel-in-progress: true
19+
20+
jobs:
21+
build:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v4
26+
27+
- name: Setup Node.js
28+
uses: actions/setup-node@v4
29+
with:
30+
node-version: 18
31+
cache: 'npm'
32+
cache-dependency-path: docs/package-lock.json
33+
34+
- name: Install dependencies
35+
working-directory: docs
36+
run: npm ci
37+
38+
- name: Build VitePress site
39+
working-directory: docs
40+
run: |
41+
npm run docs:build
42+
43+
- name: Setup Pages
44+
id: pages
45+
uses: actions/configure-pages@v5
46+
47+
- name: Upload artifact
48+
uses: actions/upload-pages-artifact@v3
49+
with:
50+
path: docs/.vitepress/dist
51+
52+
deploy:
53+
environment:
54+
name: github-pages
55+
url: ${{ steps.deployment.outputs.page_url }}
56+
runs-on: ubuntu-latest
57+
needs: build
58+
steps:
59+
- name: Deploy to GitHub Pages
60+
id: deployment
61+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,3 +196,4 @@ delete_genai_repos.sh
196196
cleanup_e2e_projects.sh
197197
.cloudbuild/terraform/backend.tf
198198
.cloudbuild/terraform/vars/env.tfvars
199+
docs/.vitepress/cache

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,6 @@ clean:
2323

2424
install:
2525
uv sync --dev --extra lint --frozen
26+
27+
docs-dev:
28+
cd docs && npm install && NODE_OPTIONS="--no-warnings" npm run docs:dev

agents/live_api/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# Multimodal Live Agent
22

3-
This pattern showcases a real-time conversational RAG agent powered by Google Gemini. The agent handles audio, video, and text interactions while leveraging tool calling with a vector DB for grounded responses.
3+
This pattern showcases a real-time conversational agent powered by Google Gemini. The agent handles audio, video, and text interactions while leveraging tool calling capabilities for enhanced responses.
44

55
![live_api_diagram](https://storage.googleapis.com/github-repo/generative-ai/sample-apps/e2e-gen-ai-app-starter-pack/live_api_diagram.png)
66

77
**Key components:**
88

9-
- **Python Backend** (in `app/` folder): A production-ready server built with [FastAPI](https://fastapi.tiangolo.com/) and [google-genai](https://googleapis.github.io/python-genai/) that features:
9+
- **Python Backend** (in `app/` folder): A production-ready server built with [FastAPI](https://fastapi.tiangolo.com/) and [google-genai](https://googleapis.github.io/python-python-genai/) that features:
1010

1111
- **Real-time bidirectional communication** via WebSockets between the frontend and Gemini model
12-
- **Integrated tool calling** with vector database support for contextual document retrieval
12+
- **Integrated tool calling** with a weather information tool for demonstrating external data retrieval
1313
- **Production-grade reliability** with retry logic and automatic reconnection capabilities
1414
- **Deployment flexibility** supporting both AI Studio and Vertex AI endpoints
1515
- **Feedback logging endpoint** for collecting user interactions
@@ -18,7 +18,7 @@ This pattern showcases a real-time conversational RAG agent powered by Google Ge
1818

1919
![live api demo](https://storage.googleapis.com/github-repo/generative-ai/sample-apps/e2e-gen-ai-app-starter-pack/live_api_pattern_demo.gif)
2020

21-
Once both the backend and frontend are running, click the play button in the frontend UI to establish a connection with the backend. You can now interact with the Multimodal Live Agent! You can try asking questions such as "Using the tool you have, define Governance in the context MLOPs" to allow the agent to use the [documentation](https://cloud.google.com/architecture/deploy-operate-generative-ai-applications) it was provided to.
21+
Once both the backend and frontend are running, click the play button in the frontend UI to establish a connection with the backend. You can now interact with the Multimodal Live Agent! You can try asking questions such as "What's the weather like in San Francisco?" to see the agent use its weather information tool.
2222

2323
## Additional Resources for Multimodal Live API
2424

agents/live_api/app/agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def get_weather(query: str) -> dict:
5656

5757
live_connect_config = types.LiveConnectConfig(
5858
response_modalities=[types.Modality.AUDIO],
59-
tools=[get_weather],
59+
tools=list(tool_functions.values()),
6060
# Change to desired language code (e.g., "es-ES" for Spanish, "fr-FR" for French)
6161
speech_config=types.SpeechConfig(language_code="en-US"),
6262
system_instruction=types.Content(

docs/.vitepress/config.js

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
import { defineConfig } from 'vitepress'
2+
3+
export default defineConfig({
4+
title: 'Agent Starter Pack',
5+
description: 'Build Production Agents faster',
6+
base: '/agent-starter-pack/',
7+
head: [
8+
['link', { rel: 'preconnect', href: 'https://fonts.googleapis.com' }],
9+
['link', { rel: 'preconnect', href: 'https://fonts.gstatic.com', crossorigin: '' }],
10+
['link', { href: 'https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap', rel: 'stylesheet' }],
11+
['style', {}, `
12+
:root {
13+
--vp-font-family-base: 'Roboto', sans-serif;
14+
--vp-font-family-mono: 'Roboto Mono', monospace;
15+
--vp-c-text-1: 0.9rem;
16+
--vp-font-size-base: 0.9rem;
17+
}
18+
`]
19+
],
20+
21+
themeConfig: {
22+
nav: [
23+
{ text: 'Home', link: '/' },
24+
{ text: 'Guide', link: '/guide/getting-started' },
25+
{ text: 'Agents', link: '/agents/overview' },
26+
{ text: 'CLI', link: '/cli/index.md' }
27+
],
28+
sidebar: [
29+
{
30+
text: 'Guide',
31+
items: [
32+
{ text: 'Getting Started', link: '/guide/getting-started' },
33+
{ text: 'Why Starter Pack?', link: '/guide/why_starter_pack' },
34+
{ text: 'Installation', link: '/guide/installation' },
35+
{ text: 'Deployment', link: '/guide/deployment' },
36+
{ text: 'Data Ingestion', link: '/guide/data-ingestion' },
37+
{ text: 'Observability', link: '/guide/observability' },
38+
{ text: 'Troubleshooting', link: '/guide/troubleshooting' }
39+
]
40+
},
41+
{
42+
text: 'Agents',
43+
items: [
44+
{ text: 'Overview', link: '/agents/overview' },
45+
46+
]
47+
},
48+
{
49+
text: 'CLI Reference',
50+
items: [
51+
{ text: 'create', link: '/cli/create' },
52+
{ text: 'setup-cicd', link: '/cli/setup_cicd' }
53+
]
54+
}
55+
],
56+
socialLinks: [
57+
{
58+
icon: 'github',
59+
link: 'https://github.com/GoogleCloudPlatform/agent-starter-pack'
60+
},
61+
],
62+
search: {
63+
provider: 'local'
64+
},
65+
66+
footer: {
67+
message: 'Released under the Apache 2.0 License.'
68+
}
69+
}
70+
})

docs/README.md

Lines changed: 0 additions & 25 deletions
This file was deleted.

docs/agents/overview.md

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# Agent Templates
2+
3+
The Agent Starter Pack follows a "bring your own agent" approach. It provides several production-ready agent templates designed to accelerate your development while offering the flexibility to use your preferred agent framework or pattern.
4+
5+
## Available Templates
6+
7+
8+
| Agent Name | Description | Use Case |
9+
|------------|-------------|----------|
10+
| `adk_base` | A base ReAct agent implemented using Google's [Agent Development Kit](https://github.com/google/adk-python) | General purpose conversational agent |
11+
| `agentic_rag` | A RAG agent for document retrieval and Q&A | Document search and question answering |
12+
| `langgraph_base_react` | A base ReAct agent using LangGraph | Graph based conversational agent |
13+
| `crewai_coding_crew` | A multi-agent system implemented with CrewAI | Collaborative coding assistance |
14+
| `live_api` | A real-time multimodal RAG agent | Audio/video/text chat with knowledge base |
15+
16+
## Choosing the Right Template
17+
18+
When selecting a template, consider these factors:
19+
20+
1. **Primary Goal**: Are you building a conversational bot, a Q&A system over documents, a task-automation crew, or something else?
21+
2. **Core Pattern/Framework**: Do you have a preference for Google's ADK, LangChain/LangGraph, CrewAI, or implementing a pattern like RAG directly? The Starter Pack supports various approaches.
22+
3. **Reasoning Complexity**: Does your agent need complex planning and tool use (like ReAct), or is it more focused on retrieval and synthesis (like basic RAG)?
23+
4. **Collaboration Needs**: Do you need multiple specialized agents working together?
24+
5. **Modality**: Does your agent need to process or respond with audio, video, or just text?
25+
26+
## Template Details
27+
28+
### ADK Base (`adk_base`)
29+
30+
This template provides a minimal example of a ReAct agent built using Google's [Agent Development Kit (ADK)](https://github.com/google/adk-python). It demonstrates core ADK concepts like agent creation and tool integration, enabling reasoning and tool selection. Ideal for:
31+
32+
* Getting started with agent development on Google Cloud.
33+
* Building general-purpose conversational agents.
34+
* Learning the ADK framework and ReAct pattern.
35+
36+
### Agentic RAG (`agentic_rag`)
37+
38+
Built on the ADK, this template implements [Retrieval-Augmented Generation (RAG)](https://cloud.google.com/use-cases/retrieval-augmented-generation?hl=en) with a production-ready data ingestion pipeline for document-based question answering. It allows you to ingest, process, and embed custom data to enhance response relevance. Features include:
39+
40+
* Automated data ingestion pipeline for custom data.
41+
* Flexible datastore options: [Vertex AI Search](https://cloud.google.com/vertex-ai-search-and-conversation) and [Vertex AI Vector Search](https://cloud.google.com/vertex-ai/docs/vector-search/overview).
42+
* Generation of custom embeddings for enhanced semantic search.
43+
* Answer synthesis from retrieved context.
44+
* Infrastructure deployment via Terraform and Cloud Build.
45+
46+
### LangGraph Base ReAct (`langgraph_base_react`)
47+
48+
This template provides a minimal example of a ReAct agent built using [LangGraph](https://langchain-ai.github.io/langgraph/). It serves as an excellent starting point for developing agents with graph-based structures, offering:
49+
50+
* Explicit state management for complex, multi-step reasoning flows.
51+
* Fine-grained control over reasoning cycles.
52+
* Robust tool integration and error handling capabilities.
53+
* Streaming response support using Vertex AI.
54+
* Includes a basic search tool to demonstrate tool usage.
55+
56+
### CrewAI Coding Crew (`crewai_coding_crew`)
57+
58+
This template combines [CrewAI](https://www.crewai.com/)'s multi-agent collaboration with LangGraph's conversational control to create an interactive coding assistant. It orchestrates specialized agents (e.g., Senior Engineer, QA Engineer) to understand requirements and generate code. Key features include:
59+
60+
* Interactive requirements gathering through natural dialogue (LangGraph).
61+
* Collaborative code development by a crew of specialized AI agents (CrewAI).
62+
* Sequential processing for tasks from requirements to implementation and QA.
63+
* Ideal for complex tasks requiring delegation and simulating team collaboration.
64+
65+
### Live API (`live_api`)
66+
67+
Powered by Google Gemini, this template showcases a real-time, multimodal conversational RAG agent using the [Vertex AI Live API](https://cloud.google.com/vertex-ai/generative-ai/docs/live-api). Features include:
68+
69+
* Handles audio, video, and text interactions.
70+
* Leverages tool calling.
71+
* Real-time bidirectional communication via WebSockets for low-latency chat.
72+
* Production-ready Python backend (FastAPI) and React frontend.
73+
* Includes feedback collection capabilities.
74+
75+
## Customizing Templates
76+
77+
All templates are provided as starting points and are designed for customization:
78+
79+
1. Choose a template that most closely matches your needs.
80+
2. Create a new agent instance based on the selected template.
81+
3. Familiarize yourself with the code structure, focusing on the agent logic, tool definitions, and any UI components.
82+
4. Modify and extend the code: adjust prompts, add or remove tools, integrate different data sources, change the reasoning logic, or update the framework versions as needed.
83+
84+
Have fun building your agent!

docs/cli/create.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,21 @@ agent-starter-pack create PROJECT_NAME [OPTIONS]
1212

1313
### Arguments
1414

15-
- `PROJECT_NAME`: Name of the project to create (must be 26 characters or less, will be converted to lowercase).
15+
- `PROJECT_NAME`: Name for your new agent project directory and base for resource naming.
16+
*Note: This name will be converted to lowercase and must be 26 characters or less.*
1617

1718
### Options
1819

1920
The following options will be prompted interactively if not provided via the command line:
2021
- `--agent`, `-a`: Agent name or number to use. Lists available agents if omitted.
2122
- `--deployment-target`, `-d`: Deployment target (`agent_engine` or `cloud_run`). Prompts if omitted.
22-
- `--datastore`, `-ds`: Type of datastore to use (`vertex_ai_search`, `vertex_ai_vector_search`). Prompted if `--include-data-ingestion` is specified or if the selected agent requires data ingestion, and this option is omitted.
23-
- `--region`: GCP region for deployment. Defaults to `us-central1`. Prompts for confirmation if not specified and `--auto-approve` is not used.
23+
- `--datastore`, `-ds`: Datastore for RAG agents (`vertex_ai_search` or `vertex_ai_vector_search`). Prompted if `--include-data-ingestion` is specified, or if the selected agent (e.g., `agentic_rag`) requires data ingestion, and this option is omitted.
24+
- `--region`: GCP region for deployment (default: `us-central1`). Prompts for confirmation if not specified and `--auto-approve` is not used.
2425

25-
GCP account and project ID are detected automatically. You will be prompted to confirm or change them unless `--auto-approve` is used.
26+
GCP account and project ID are detected automatically (using your active `gcloud config` settings). You will be prompted to confirm or change them unless `--auto-approve` is used.
2627

2728
Additional options:
28-
- `--include-data-ingestion`, `-i`: Include data ingestion pipeline components in the project. If specified without `--datastore`, you will be prompted to select a datastore. Some agents require data ingestion and will enable this automatically.
29+
- `--include-data-ingestion`, `-i`: Include data ingestion pipeline components (required by some agents like `agentic_rag`, which enable this automatically). If specified manually without `--datastore`, you will be prompted to select one.
2930
- `--debug`: Enable debug logging.
3031
- `--output-dir`, `-o`: Output directory for the project (default: current directory).
3132
- `--auto-approve`: Skip interactive confirmation prompts for GCP credentials and region.
@@ -42,4 +43,7 @@ agent-starter-pack create my-agent-project -a agentic_rag -d cloud_run --region
4243

4344
# Create without interactive prompts (uses detected GCP credentials)
4445
agent-starter-pack create my-other-agent -a chat_agent -d agent_engine --auto-approve
46+
47+
# Create in a specific output directory
48+
agent-starter-pack create my-specific-loc-agent -o ./my-agents/
4549
```
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# CLI Reference
22

3-
This document provides an overview of the available CLI commands for managing your generative AI applications.
3+
The Agent Starter Pack provides a command-line interface (CLI) to create and setup Generative AI Agent templates in Google Cloud.
44

55
## Available Commands
66

0 commit comments

Comments
 (0)