Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 25 additions & 13 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,13 @@ ipython_config.py
# commonly ignored for libraries.
#uv.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
poetry.lock

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
Expand All @@ -127,16 +134,16 @@ celerybeat.pid
*.sage.py

# Environments
**/.env
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
**/.env*
!**/.env.example
!**/.env.local.example
.env*
!.env.example
!.env.local.example

# Spyder project settings
.spyderproject
Expand All @@ -162,6 +169,13 @@ dmypy.json
# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

# Ruff stuff:
.ruff_cache/

Expand All @@ -170,8 +184,7 @@ cython_debug/

# Others
.DS_Store
Thumbs.db
ehthumbs.db
bin

# Node.js
node_modules/
Expand Down Expand Up @@ -226,10 +239,9 @@ go/agents/sail-researcher/server
*.class
local.properties

# Credentials & Secrets
*service-account*.json
client_secret*.json
*creds*.json
*credentials*.json
*.pem
*.key
# AlphaEvolve R&D Experiments
experiments/

# Local Developer Cache & Tokens
.firebase/
.gcloud_token
6 changes: 6 additions & 0 deletions python/agents/economic-research-agent/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ SERPER_API_KEY=your-serper-api-key
# HUD Fair Market Rents (HUDUser.gov)
HUD_API_KEY=your-hud-api-key

# Real Estate Active Listings (RentCast.io)
RENTCAST_API_KEY=your-rentcast-api-key

# O*NET Web Services API Key
ONET_API_KEY=your-onet-api-key

# Optional: LangChain/AgentOps Tracing
LANGCHAIN_API_KEY=your-langchain-key
AGENTOPS_API_KEY=your-agentops-key
Expand Down
9 changes: 8 additions & 1 deletion python/agents/economic-research-agent/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -194,4 +194,11 @@ my_env.tfvars
.streamlit_chats
.saved_chats
.env
.requirements.txt
.requirements.txt

# Local tokens, caches, and test logs
.gcloud_token
.firebase/
scratch/
tests/*_results.json
tests/*_failures.json
16 changes: 7 additions & 9 deletions python/agents/economic-research-agent/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,16 @@ streamlit: ## Launch the Economic Research Agent Dashboard (Streamlit)

test-integration: ## Run integration tests (Requires API keys)
@echo "🛰️ Running ERA integration tests..."
uv run pytest tests/integration/
ERA_BYPASS_SUPERVISOR=true uv run pytest tests/integration/

deploy: ## Deploy the agent to Vertex AI Reasoning Engine (Direct Vertex SDK)
@echo "🚀 Deploying ERA to Vertex (Direct SDK)..."
PYTHONPATH=. uv run python3 economic_research/deployment/deploy.py
deploy: ## Deploy the agent to Vertex AI Agent Runtime and register to Gemini Enterprise
@echo "🚀 Executing Production Deployment & Registration..."
./deploy.sh




register-gemini-enterprise: ## Register the agent with Gemini Enterprise (Reasoning Engine Spec)
register-gemini-enterprise: ## Register the agent with Gemini Enterprise via agents-cli
@echo "🛰️ Registering ERA with Gemini Enterprise..."
@uvx agent-starter-pack register-gemini-enterprise
agents-cli publish gemini-enterprise

lint: ## Run ruff check without fixing
@echo "🔍 Running ruff checks..."
uvx ruff check .
Expand Down
219 changes: 96 additions & 123 deletions python/agents/economic-research-agent/README.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "economic-research-agent"
name: "alphaevolved_econ_research"
acli_version: "0.2.0"
agent_directory: "economic_research"
region: "us-east1"
Expand Down
129 changes: 129 additions & 0 deletions python/agents/economic-research-agent/deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
#!/usr/bin/env bash
# Copyright 2026 Google LLC
# Production Deploy and Registration Script for Evolved Economic Research Agent (ERA)
set -e

# Load local .env if it exists
if [ -f ".env" ]; then
echo "🔑 Loading local .env parameters..."
export $(grep -v '^#' .env | xargs)
fi

# Usage/Help
show_help() {
echo "Usage: $0 [options]"
echo ""
echo "Options:"
echo " --gemini-enterprise-app-id ID Full Gemini Enterprise app resource name"
echo " --region REGION Target GCP Region (default: read from agents-cli-manifest.yaml)"
echo " --no-register Deploy to Agent Runtime only (skip Gemini Enterprise registration)"
echo " --help Show this help message"
echo ""
echo "Examples:"
echo " ./deploy.sh --gemini-enterprise-app-id projects/123/locations/us/collections/default_collection/engines/my-engine"
echo " ./deploy.sh --no-register"
exit 0
}

# Parse Arguments
APP_ID="${GEMINI_ENTERPRISE_APP_ID:-}"
NO_REGISTER=false
DRY_RUN=false
REGION=""

while [[ $# -gt 0 ]]; do
case "$1" in
--gemini-enterprise-app-id)
APP_ID="$2"
shift 2
;;
--region)
REGION="$2"
shift 2
;;
--dry-run)
DRY_RUN=true
shift
;;
--no-register)
NO_REGISTER=true
shift
;;
--help)
show_help
;;
*)
echo "⚠️ Unknown parameter: $1"
show_help
;;
esac
done


# Step 1: Verify agents-cli installation
if ! command -v agents-cli &> /dev/null; then
echo "❌ Error: agents-cli tool not found!"
echo "Please install it using: uv tool install google-agents-cli"
exit 1
fi

# Step 2: Extract all API keys from .env to compile the update-env-vars string
echo "🛰️ Compiling live API grounding keys from .env..."
UPDATE_VARS=""
API_KEYS=(
"BEA_API_KEY" "FRED_API_KEY" "CENSUS_API_KEY" "BLS_API_KEY"
"FEC_API_KEY" "HUD_API_KEY" "EIA_API_KEY" "NEWS_API_KEY"
"SERPER_API_KEY" "RENTCAST_API_KEY" "ONET_API_KEY"
)

for key in "${API_KEYS[@]}"; do
eval value=\$$key
if [ ! -z "$value" ]; then
if [ ! -z "$UPDATE_VARS" ]; then
UPDATE_VARS="${UPDATE_VARS},"
fi
UPDATE_VARS="${UPDATE_VARS}${key}=${value}"
fi
done

# Step 3: Execute deployment to Vertex AI Agent Runtime
DEPLOY_CMD="agents-cli deploy --no-confirm-project"
if [ "$DRY_RUN" = true ]; then
DEPLOY_CMD="${DEPLOY_CMD} --dry-run"
fi
if [ ! -z "$REGION" ]; then
DEPLOY_CMD="${DEPLOY_CMD} --region ${REGION}"
fi
if [ ! -z "$UPDATE_VARS" ]; then
DEPLOY_CMD="${DEPLOY_CMD} --update-env-vars=\"${UPDATE_VARS}\""
fi


echo "🚀 Executing Agent Runtime deployment..."
echo "Command: $DEPLOY_CMD"
eval "$DEPLOY_CMD"

# Step 4: Execute registration to Gemini Enterprise (Unless skipped or dry-run)
if [ "$NO_REGISTER" = false ] && [ "$DRY_RUN" = false ]; then
echo ""
echo "🤖 Registering Agent to Gemini Enterprise..."

REG_CMD="agents-cli publish gemini-enterprise"
if [ ! -z "$APP_ID" ]; then
REG_CMD="${REG_CMD} --gemini-enterprise-app-id=\"${APP_ID}\""
fi

echo "Command: $REG_CMD"
eval "$REG_CMD"
else
echo ""
if [ "$DRY_RUN" = true ]; then
echo "ℹ️ Skipping Gemini Enterprise registration (Dry-run mode enabled)."
else
echo "ℹ️ Skipping Gemini Enterprise registration (--no-register flag provided)."
fi
fi


echo ""
echo "🥂 Deployed & Registered Successfully!"
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"remote_agent_engine_id": "projects/697625214430/locations/us-east1/reasoningEngines/8177762867118866432",
"deployment_target": "agent_engine",
"remote_agent_runtime_id": "projects/697625214430/locations/us-east1/reasoningEngines/3370909136714727424",
"deployment_target": "agent_runtime",
"is_a2a": false,
"deployment_timestamp": "2026-05-08T13:13:04.397458"
"deployment_timestamp": "2026-07-10T17:08:22.632797"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
"""Economic Research Agent: Advisors Module.
Evolved autonomously by AlphaEvolve.
"""

from economic_research.advisors.real_estate_advisor import RealEstatePortfolioAdvisor
Loading