Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
4655003
feat: touch adk
Apr 17, 2025
7555d31
Merge branch 'main' into feature/adk
Apr 17, 2025
fc6c36c
feat: remove pycache files
Apr 17, 2025
714795f
feat: remove adk-samples submodule
Apr 17, 2025
c480255
feat: tool validation
Apr 22, 2025
d6d3f8a
Merge branch 'main' into feature/adk
Apr 23, 2025
ba178a8
feat: adk web with all mcps
Apr 24, 2025
d6fb8a1
Merge branch 'main' into feature/adk
Apr 24, 2025
b6d8fb0
chore: add README
Apr 26, 2025
323fd63
`erge branch 'main' into feature/adk
Apr 26, 2025
2b6911c
feat: erigon up
Apr 28, 2025
6a91a36
feat: obol-agent-web
May 15, 2025
e534d5e
chore: remove obol-adk/docs directory from repo
May 15, 2025
8ccb1da
chore: erigon typo
May 15, 2025
39f5317
Deleting unused scripts, tweaking readmes
OisinKyne May 16, 2025
3f0c2a9
Merge pull request #12 from ObolNetwork/oisin/cleanup
May 19, 2025
5d4b062
Add obol-agent deployment with Docker and API key integration
bussyjd May 20, 2025
eb888df
Merge pull request #13 from bussyjd/feature/adk
May 20, 2025
f009272
feat: refacto agent.py and add Dockerfiles
May 28, 2025
ea8083c
feat: refacto foundry dockerfile
May 28, 2025
b0529d3
feat: refacto foundry dockerfile
May 29, 2025
37ccaec
feat: all mcp as docker
Jun 7, 2025
d72537d
Merge branch 'main' into feature/adk
Jun 7, 2025
ddbda83
feat: add support for bash prior to 4
Jun 9, 2025
73feaf8
feature: full node
Jun 16, 2025
7d3731e
feat: first release
Jun 23, 2025
685dfd9
Merge branch 'main' into feature/adk
Jun 23, 2025
5d0c904
chore: fix obolup
Jun 23, 2025
07b7935
chore: fix typo in obolup
Jun 23, 2025
0193131
feat: add google-adk dependency and expose agent via ingress
Jun 23, 2025
f4f69e9
chore: bump flux159/mcp-server-kubernetes
Jul 13, 2025
7937234
Merge branch 'main' into feature/adk
Jul 13, 2025
e0e7831
Merge branch 'main' into feature/adk
Aug 8, 2025
51f33b3
Merge branch 'main' into feature/adk
Aug 12, 2025
43ea982
Merge branch 'main' into feature/adk
Sep 10, 2025
3ae7f0e
feat: update obol-agent-web
Sep 15, 2025
639f289
chore: checkout obolup from main
Sep 15, 2025
6ed2dbf
Merge branch 'main' into feature/adk
Sep 29, 2025
59be7a1
feat: wip
Oct 2, 2025
6709d71
Merge branch 'main' into feature/adk
Oct 2, 2025
0e2a813
feat: obol-adk/obol-agent-ag-ui
Oct 2, 2025
62e2fdb
chore: .gitignore
Oct 2, 2025
d1d45ba
feat: enhance obol-agent-ag-ui with configurable filesystem MCP and c…
Oct 10, 2025
f5ab55e
ci: add comprehensive testing for obol-agent-ag-ui
Oct 10, 2025
1dfe118
refactor: improve agent instruction for proactive documentation search
Oct 10, 2025
dae9ee8
fix: update workflow for Python 3.12 and use GitHub secrets for API key
Oct 10, 2025
b02c5ae
chore: remove obsolete MCP builds workflow
Oct 10, 2025
6babe09
fix: simplify workflow to only test agent.py with Python 3.12
Oct 10, 2025
36aa1ba
feat: add Python-based dev workflow for obol-adk
Oct 11, 2025
8283b88
feat: enhance Makefile with venv management
Oct 11, 2025
8416ef3
fix: use absolute path for venv in Makefile
Oct 11, 2025
b3cd9ef
docs: update README with Makefile dev workflow
Oct 11, 2025
e7bcf13
feat: add CI workflow simulation to Makefile
Oct 11, 2025
d600f46
chore: bump dependencies to latest versions
Oct 11, 2025
e48db7e
feat: refresh obol-agent-web and add make start-web command
Oct 11, 2025
bbeb00d
feat: deploy adk
Oct 21, 2025
f290156
feat: eagerly initialize MCP toolsets on startup
Oct 21, 2025
62411ea
feat: add deploy with makefile
Oct 21, 2025
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
71 changes: 71 additions & 0 deletions .github/workflows/test-obol-agent-ag-ui.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Test Obol Agent AG-UI

on:
push:
branches: [ main, feature/* ]
paths:
- 'obol-adk/obol-agent-ag-ui/**'
- '.github/workflows/test-obol-agent-ag-ui.yml'
pull_request:
branches: [ main ]
paths:
- 'obol-adk/obol-agent-ag-ui/**'
- '.github/workflows/test-obol-agent-ag-ui.yml'

jobs:
test-agent-endpoint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install dependencies
run: |
cd obol-adk/obol-agent-ag-ui
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install requests

- name: Start agent in background
env:
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
run: |
cd obol-adk/obol-agent-ag-ui
# Create minimal .env
echo "FILESYSTEM_MCP_PATHS=" > .env
echo "GOOGLE_API_KEY=${GOOGLE_API_KEY}" >> .env
# Start agent in background
nohup python agent.py > agent.log 2>&1 &
echo $! > agent.pid
# Wait for agent to start
sleep 10

- name: Run health check
run: |
# Check if agent is responding
curl -f http://localhost:8000/health || (cat obol-adk/obol-agent-ag-ui/agent.log && exit 1)

- name: Run endpoint tests
run: |
cd obol-adk/obol-agent-ag-ui
python test_agent.py || (cat agent.log && exit 1)

- name: Stop agent
if: always()
run: |
if [ -f obol-adk/obol-agent-ag-ui/agent.pid ]; then
kill $(cat obol-adk/obol-agent-ag-ui/agent.pid) || true
fi

- name: Upload agent logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: agent-logs
path: obol-adk/obol-agent-ag-ui/agent.log

30 changes: 30 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,33 @@ build/
tmp/
temp/
.tmp/
__pycache__/

adk-samples/
obol-adk/docs/*
obol-adk/obol-gitbook/

# SECURITY Prevent sensitive data leaks
# ========================================

# Cluster test data and keys
**/canary-*/
**/node[0-9]*/
**/cluster-lock.json
**/validator_keys/
**/keystore-*.json
**/keystore-*.txt
**/charon-enr-private-key

# Dependencies
**/node_modules/

# Local test files
test-*.yaml
demo-*.yaml
*.log
*.pid

# Local LLMs
llms-full.txt
CLAUDE.md
36 changes: 36 additions & 0 deletions obol-adk/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Obol ADK Configuration
# This file is used by obol-agent-ag-ui/agent.py

# Google API Configuration
# Get your API key from: https://aistudio.google.com/app/apikey
GOOGLE_GENAI_USE_VERTEXAI=FALSE
GOOGLE_API_KEY=your-api-key-here

# Prometheus MCP Server Configuration (optional)
# PROMETHEUS_URL=http://prometheus-kube-prometheus-prometheus.monitoring.svc.cluster.local:9090

# Filesystem MCP Server Paths (comma-separated list)
# The 'make setup' command will automatically configure this to point to obol-gitbook
# Each path will be accessible via the filesystem MCP server for documentation access
FILESYSTEM_MCP_PATHS=

## Development Workflow
#
# Quick Start:
# make dev # Full setup (venv + gitbook + env) and start agent
#
# Individual Commands:
# make install # Create venv and install Python dependencies
# make setup # Clone/update obol-gitbook and configure this .env
# make start # Start the obol-agent-ag-ui agent
# make test # Run agent tests
# make clean # Remove obol-gitbook directory
#
# The 'make install' command will:
# 1. Create a Python virtual environment at ./.venv/
# 2. Install dependencies from requirements.txt
#
# The 'make setup' command will:
# 1. Clone https://github.com/ObolNetwork/obol-gitbook.git to ./obol-gitbook/
# 2. Update FILESYSTEM_MCP_PATHS in this .env file
# 3. Preserve your existing GOOGLE_API_KEY
143 changes: 143 additions & 0 deletions obol-adk/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
.PHONY: help install setup start start-web dev clean test ci deploy

# Use absolute path for venv to work from subdirectories
VENV := $(CURDIR)/.venv
PYTHON := $(VENV)/bin/python
PIP := $(VENV)/bin/pip
ADK := $(VENV)/bin/adk
AGENT_DIR := $(CURDIR)/obol-agent-ag-ui
WEB_AGENT_DIR := $(CURDIR)/obol-agent-web

# Default target
help:
@echo "Obol ADK - Development Commands"
@echo ""
@echo "Usage:"
@echo " make dev - Full setup (venv + gitbook + env) and start agent"
@echo " make install - Create venv and install Python dependencies"
@echo " make setup - Clone/update obol-gitbook and configure .env"
@echo " make start - Start the obol-agent-ag-ui agent (FastAPI backend)"
@echo " make start-web - Start the obol-agent-web agent (ADK Web UI)"
@echo " make test - Run agent unit tests"
@echo " make ci - Run full CI workflow locally (simulates GitHub Actions)"
@echo " make deploy - Deploy obol-agent-ag-ui to Google Cloud Run"
@echo " make clean - Remove obol-gitbook directory"
@echo ""

# Create virtual environment and install dependencies
install:
@echo "Setting up Python virtual environment..."
@if [ ! -d "$(VENV)" ]; then \
python3 -m venv $(VENV); \
echo "✓ Virtual environment created"; \
else \
echo "✓ Virtual environment already exists"; \
fi
@echo "Installing dependencies..."
@$(PIP) install --upgrade pip
@$(PIP) install -r requirements.txt
@echo "✓ Dependencies installed"

# Setup development environment (clone gitbook, configure .env)
setup:
@echo "Setting up development environment..."
@$(PYTHON) scripts/setup_dev.py

# Start the agent (assumes install + setup are done)
start:
@if [ ! -d "$(VENV)" ]; then \
echo "✗ Virtual environment not found. Run 'make install' first."; \
exit 1; \
fi
@echo "Starting Obol Agent AG-UI (FastAPI backend)..."
@echo "Available at: http://localhost:8000/"
@cd obol-agent-ag-ui && $(PYTHON) agent.py

# Start the web agent with ADK Web UI
start-web:
@if [ ! -d "$(VENV)" ]; then \
echo "✗ Virtual environment not found. Run 'make install' first."; \
exit 1; \
fi
@echo "Starting Obol Agent Web UI..."
@echo "This will launch the ADK Web interface"
@echo ""
@echo "Important: Make sure to select 'obol-agent-web' from the dropdown in the web UI"
@echo ""
@$(ADK) web

# Dev workflow: install + setup + start
dev: install setup
@echo ""
@echo "Starting agent..."
@cd obol-agent-ag-ui && $(PYTHON) agent.py

# Run tests
test:
@if [ ! -d "$(VENV)" ]; then \
echo "✗ Virtual environment not found. Run 'make install' first."; \
exit 1; \
fi
@echo "Running agent tests..."
@cd obol-agent-ag-ui && $(PYTHON) test_agent.py

# Run CI workflow locally (simulates GitHub Actions)
ci:
@if [ ! -d "$(VENV)" ]; then \
echo "✗ Virtual environment not found. Run 'make install' first."; \
exit 1; \
fi
@echo "==================================================================="
@echo "Running CI workflow (simulates GitHub Actions)"
@echo "==================================================================="
@echo ""
@echo "Step 1: Installing test dependencies..."
@$(PIP) install requests > /dev/null 2>&1
@echo "✓ Dependencies installed"
@echo ""
@echo "Step 2: Creating minimal .env..."
@cd $(AGENT_DIR) && echo "FILESYSTEM_MCP_PATHS=" > .env
@cd $(AGENT_DIR) && echo "GOOGLE_API_KEY=$${GOOGLE_API_KEY}" >> .env
@echo "✓ .env created"
@echo ""
@echo "Step 3: Starting agent in background..."
@cd $(AGENT_DIR) && (nohup $(PYTHON) agent.py > agent.log 2>&1 & echo $$! > agent.pid)
@sleep 1
@echo "✓ Agent started (PID: $$(cat $(AGENT_DIR)/agent.pid 2>/dev/null || echo 'unknown'))"
@echo ""
@echo "Step 4: Waiting for agent to start (10s)..."
@sleep 10
@echo "✓ Ready"
@echo ""
@echo "Step 5: Running health check..."
@curl -f http://localhost:8000/health > /dev/null 2>&1 || (echo "✗ Health check failed" && cat $(AGENT_DIR)/agent.log && kill $$(cat $(AGENT_DIR)/agent.pid) 2>/dev/null || true && exit 1)
@echo "✓ Health check passed"
@echo ""
@echo "Step 6: Running endpoint tests..."
@cd $(AGENT_DIR) && $(PYTHON) test_agent.py || (echo "✗ Tests failed" && cat agent.log && kill $$(cat agent.pid) 2>/dev/null || true && exit 1)
@echo "✓ Tests passed"
@echo ""
@echo "Step 7: Stopping agent..."
@kill $$(cat $(AGENT_DIR)/agent.pid) 2>/dev/null || true
@rm -f $(AGENT_DIR)/agent.pid $(AGENT_DIR)/agent.log
@echo "✓ Agent stopped"
@echo ""
@echo "==================================================================="
@echo "✓ CI workflow completed successfully!"
@echo "==================================================================="

# Deploy to Google Cloud Run
deploy:
@echo "Deploying obol-agent-ag-ui to Google Cloud Run..."
@echo "Region: us-east4"
@echo "Project: prj-d-playgrounds-f0cb"
@cd $(AGENT_DIR) && gcloud builds submit \
--config=cloudbuild.yaml \
--region=us-east4 \
--substitutions=SHORT_SHA=$$(git rev-parse --short HEAD)

# Clean up gitbook directory
clean:
@echo "Cleaning up obol-gitbook..."
@rm -rf obol-gitbook
@echo "✓ Cleaned"
Loading