| name | sparkgen-deploy |
| description | Deploy SparkGen agent to local, docker, or aws mode |
| user_invokable | true |
| auto_invokable | false |
| arguments | <local|docker|aws> [--target eks|lambda] |
SparkGen Deploy
Deploy the agent server in the specified mode.
Dynamic Context
Before deploying, gather current state:
- Read
.env (if exists) to check current DEPLOYMENT_MODE and LLM_PROVIDER
- Check if server is already running:
curl -sf http://localhost:8000/health
- For docker mode: check Docker is running with
docker info
- For local mode: check Ollama with
curl -sf http://localhost:11434/api/tags
Deployment Modes
Local (/sparkgen-deploy local)
- Verify Ollama is running:
curl -sf http://localhost:11434/api/tags
- If not: instruct user to run
ollama serve and ollama pull llama3.2:3b
- Source environment:
set -a && source .env.local && set +a
- Start server:
uvicorn app.api:app --host 0.0.0.0 --port 8000 --reload
- Verify:
curl -sf http://localhost:8000/health
- Print summary: endpoint URL, provider, model, available agents
Docker (/sparkgen-deploy docker)
- Verify Docker is running:
docker info
- Copy env file:
cp .env.docker .env
- Start stack:
docker compose up --build -d
- Wait for health: poll
curl -sf http://localhost:8080/health (up to 60s)
- Check all services:
docker compose ps
- Print summary: agent URL (:8080), DynamoDB Local (:8000), Redis (:6379)
AWS (/sparkgen-deploy aws [--target eks|lambda])
- Verify AWS credentials:
aws sts get-caller-identity
- Check
.env.aws exists and has required vars (AWS_REGION, AWS_MODEL_ID)
- For EKS: run
bash scripts/deploy.sh eks
- For Lambda: run
bash scripts/deploy.sh lambda
- Verify deployment health via API Gateway URL from
.env.aws
Error Handling
- If port 8000 is already in use: suggest
lsof -i :8000 to find the process
- If Ollama model not found: run
ollama pull <model>
- If Docker build fails: show
docker compose logs output