Skip to content

Commit 02476a7

Browse files
committed
Initial commit
0 parents  commit 02476a7

26 files changed

Lines changed: 4645 additions & 0 deletions

File tree

.env.example

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
GOOGLE_GENAI_USE_VERTEXAI=TRUE
2+
GOOGLE_CLOUD_PROJECT=your-gcp-project
3+
GOOGLE_CLOUD_LOCATION=europe-west1
4+
CLOUD_ML_REGION=europe-west1
5+
MODEL=gemini-2.5-flash
6+
7+
# Enables standard OpenTelemetry traces and logs in Vertex AI
8+
GOOGLE_CLOUD_AGENT_ENGINE_ENABLE_TELEMETRY=true
9+
10+
# Enables capturing the actual text of prompts and responses
11+
OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=true
12+
13+
# ADK Specifics
14+
ADK_TRACE_ENABLED=true
15+
ADK_CAPTURE_MESSAGE_CONTENT_IN_SPANS=true
16+
17+
# Standard OTEL (Helps the backend identify your service)
18+
OTEL_SERVICE_NAME=example-agent
19+
OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED=true
20+
21+
# Silence gRPC fork/logging spam locally
22+
GRPC_VERBOSITY=ERROR
23+
GRPC_ENABLE_FORK_SUPPORT=0
24+
GLOG_minloglevel=2
25+
26+
# Add your API keys and configs here
27+
OAUTH_CLIENT_ID=
28+
OAUTH_CLIENT_SECRET=
29+
BQ_WRITE_MODE=ALLOWED
30+
CREDENTIALS_TYPE=application_default

.github/workflows/lint.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: pre-commit
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
pre-commit:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
- uses: actions/setup-python@v5
13+
with:
14+
python-version: '3.12'
15+
- name: install pre-commit
16+
run: pip install pre-commit
17+
- name: run pre-commit
18+
run: pre-commit run --all-files

.gitignore

Lines changed: 226 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,226 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[codz]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
#
10+
**/.env
11+
~/.pyenv/*
12+
*.db
13+
*.txt
14+
.R/*
15+
*.code-workspace
16+
*.txt
17+
*.db
18+
19+
# Distribution / packaging
20+
.Python
21+
build/
22+
develop-eggs/
23+
dist/
24+
downloads/
25+
eggs/
26+
.eggs/
27+
lib/
28+
lib64/
29+
parts/
30+
sdist/
31+
var/
32+
wheels/
33+
share/python-wheels/
34+
*.egg-info/
35+
.installed.cfg
36+
*.egg
37+
MANIFEST
38+
39+
# PyInstaller
40+
# Usually these files are written by a python script from a template
41+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
42+
*.manifest
43+
*.spec
44+
45+
# Installer logs
46+
pip-log.txt
47+
pip-delete-this-directory.txt
48+
49+
# Unit test / coverage reports
50+
htmlcov/
51+
.tox/
52+
.nox/
53+
.coverage
54+
.coverage.*
55+
.cache
56+
nosetests.xml
57+
coverage.xml
58+
*.cover
59+
*.py.cover
60+
.hypothesis/
61+
.pytest_cache/
62+
cover/
63+
64+
# Translations
65+
*.mo
66+
*.pot
67+
68+
# Django stuff:
69+
*.log
70+
local_settings.py
71+
db.sqlite3
72+
db.sqlite3-journal
73+
74+
# Flask stuff:
75+
instance/
76+
.webassets-cache
77+
78+
# Scrapy stuff:
79+
.scrapy
80+
81+
# Sphinx documentation
82+
docs/_build/
83+
84+
# PyBuilder
85+
.pybuilder/
86+
target/
87+
88+
# Jupyter Notebook
89+
.ipynb_checkpoints
90+
91+
# IPython
92+
profile_default/
93+
ipython_config.py
94+
95+
# pyenv
96+
# For a library or package, you might want to ignore these files since the code is
97+
# intended to run in multiple environments; otherwise, check them in:
98+
# .python-version
99+
100+
# pipenv
101+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
102+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
103+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
104+
# install all needed dependencies.
105+
# Pipfile.lock
106+
107+
# UV
108+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
109+
# This is especially recommended for binary packages to ensure reproducibility, and is more
110+
# commonly ignored for libraries.
111+
# uv.lock
112+
113+
# poetry
114+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
115+
# This is especially recommended for binary packages to ensure reproducibility, and is more
116+
# commonly ignored for libraries.
117+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
118+
# poetry.lock
119+
# poetry.toml
120+
121+
# pdm
122+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
123+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
124+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
125+
# pdm.lock
126+
# pdm.toml
127+
.pdm-python
128+
.pdm-build/
129+
130+
# pixi
131+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
132+
# pixi.lock
133+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
134+
# in the .venv directory. It is recommended not to include this directory in version control.
135+
.pixi
136+
137+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
138+
__pypackages__/
139+
140+
# Celery stuff
141+
celerybeat-schedule
142+
celerybeat.pid
143+
144+
# Redis
145+
*.rdb
146+
*.aof
147+
*.pid
148+
149+
# RabbitMQ
150+
mnesia/
151+
rabbitmq/
152+
rabbitmq-data/
153+
154+
# ActiveMQ
155+
activemq-data/
156+
157+
# SageMath parsed files
158+
*.sage.py
159+
160+
# Environments
161+
.env
162+
.envrc
163+
.venv
164+
env/
165+
venv/
166+
ENV/
167+
env.bak/
168+
venv.bak/
169+
170+
# Spyder project settings
171+
.spyderproject
172+
.spyproject
173+
174+
# Rope project settings
175+
.ropeproject
176+
177+
# mkdocs documentation
178+
/site
179+
180+
# mypy
181+
.mypy_cache/
182+
.dmypy.json
183+
dmypy.json
184+
185+
# Pyre type checker
186+
.pyre/
187+
188+
# pytype static type analyzer
189+
.pytype/
190+
191+
# Cython debug symbols
192+
cython_debug/
193+
194+
# PyCharm
195+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
196+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
197+
# and can be added to the global gitignore or merged into this file. For a more nuclear
198+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
199+
# .idea/
200+
201+
# Abstra
202+
# Abstra is an AI-powered process automation framework.
203+
# Ignore directories containing user credentials, local state, and settings.
204+
# Learn more at https://abstra.io/docs
205+
.abstra/
206+
207+
# Visual Studio Code
208+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
209+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
210+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
211+
# you could uncomment the following to ignore the entire vscode folder
212+
# .vscode/
213+
214+
# Ruff stuff:
215+
.ruff_cache/
216+
217+
# PyPI configuration file
218+
.pypirc
219+
220+
# Marimo
221+
marimo/_static/
222+
marimo/_lsp/
223+
__marimo__/
224+
225+
# Streamlit
226+
.streamlit/secrets.toml

.pre-commit-config.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.5.0
4+
hooks:
5+
- id: trailing-whitespace
6+
- id: end-of-file-fixer
7+
- id: check-yaml
8+
- id: check-added-large-files
9+
10+
- repo: https://github.com/astral-sh/ruff-pre-commit
11+
rev: v0.3.5
12+
hooks:
13+
- id: ruff
14+
args: ["--fix"]
15+
- id: ruff-format
16+
17+
- repo: https://github.com/pre-commit/mirrors-mypy
18+
rev: v1.9.0
19+
hooks:
20+
- id: mypy
21+
args: [--ignore-missing-imports]

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2026
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

Makefile

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
.PHONY: setup run run-agent run-web export-reqs test lint typecheck format check
2+
3+
setup:
4+
@echo "Setting up project environments using uv..."
5+
uv sync
6+
uv pip install pre-commit
7+
uv run pre-commit install
8+
@echo "Setup complete. Please ensure you have copied .env.example to .env and configured your variables."
9+
10+
export-reqs:
11+
@echo "Exporting pyproject.toml to requirements.txt..."
12+
chmod +x scripts/export_requirements.sh
13+
./scripts/export_requirements.sh
14+
15+
run-agent:
16+
@if [ -z "$(AGENT)" ]; then \
17+
echo "Usage: make run-agent AGENT=<agent_folder_name>"; \
18+
echo "Example: make run-agent AGENT=bq_adk_tools_agent"; \
19+
exit 1; \
20+
fi
21+
@echo "Running $(AGENT) in terminal mode..."
22+
GRPC_VERBOSITY=ERROR GRPC_ENABLE_FORK_SUPPORT=False GLOG_minloglevel=2 uv run adk run agents/$(AGENT)
23+
24+
run:
25+
@echo "Running the default agent in terminal mode..."
26+
GRPC_VERBOSITY=ERROR GRPC_ENABLE_FORK_SUPPORT=False GLOG_minloglevel=2 uv run adk run agents/workflow_agents
27+
28+
run-web:
29+
@echo "Running agents in web UI mode..."
30+
GRPC_VERBOSITY=ERROR GRPC_ENABLE_FORK_SUPPORT=False GLOG_minloglevel=2 uv run adk web
31+
32+
lint:
33+
@echo "Running linter..."
34+
uv run pre-commit run ruff --all-files
35+
36+
typecheck:
37+
@echo "Running type checker..."
38+
uv run pre-commit run mypy --all-files
39+
40+
format:
41+
@echo "Running formatter..."
42+
uv run pre-commit run ruff-format --all-files
43+
44+
check: lint typecheck format
45+
@echo "Checking codebase..."
46+
uv run pre-commit run --all-files

0 commit comments

Comments
 (0)