How raflfaisal/agentsmithy works
Project Type & Purpose
• AgentSmithy is a full-stack AI agent starter kit for Google Cloud. It provides:
• A frontend Chatbot UI (Angular) for end-user interaction
• A backend Python API (FastAPI/Cloud Run) that hosts agent orchestration, RAG, and custom tools
• Infrastructure-as-code (Terraform) and CI/CD pipelines to deploy to Cloud Run and Vertex AI services
File Structure Analysis
• Top level
• .github/workflows: CI definitions
• build.py, download_wheels.py, license_check.sh: build & release scripts
• Runtime_env/: Python backend + deployment infra
• ChatbotUI/: Angular frontend
• ChatbotUI/
• src/app/components, services, models, environments → MVC-style Angular app
• Dockerfile, nginx.conf, deployment/cd/dev.yaml → containerized, statically served + CI/CD
• Runtime_env/
• app/orchestration: agent control loops (LangChain/LangGraph/LlamaIndex)
• app/rag: retrieval templates backed by Vertex AI Search
• app/server.py: FastAPI server entrypoint
• deployment/terraform: GCP infra modules (Cloud Run, Artifact Registry, IAM, etc.)
• deployment/cd/dev.yaml: Cloud Build / GitHub Actions triggers
README Insights
• Three main components:
A. Agent Orchestration (selectable frameworks + models + tools)
B. Backend API Server (FastAPI on Cloud Run)
C. Frontend App Server (Angular on Cloud Run or static hosting)
a. Main Components & Packaging
1. User’s Browser / Client
2. ChatbotUI Service
• Angular SPA served via Nginx in a container on Cloud Run
• Components: chat UI, suggestion cards, speech-to-text, toast messages
3. Backend API Service
• FastAPI app on Cloud Run (Runtime_env/app/server.py)
• Endpoints for conversational requests, health checks, metrics
4. Agent Orchestration Layer
• Python modules orchestrating LLM calls, state management
• Configurable frameworks: LangChain, LangGraph, LlamaIndex
5. Tools & RAG
• RAG retriever using Vertex AI Search
• OOTB LangChain tools (YahooFinance, PubMed, etc.)
6. Foundation Models
• Google Gemini, Claude, Llama models via Vertex AI APIs or Agent Engine
7. Infrastructure & CI/CD
• Terraform modules: Cloud Run, Artifact Registry, IAM
• GitHub Actions / Cloud Build pipelines for build, test, deploy
8. External Services
• Vertex AI Search / Agent Engine
• Google Cloud IAM, Cloud Logging, Monitoring
b. Relationships & Data Flows
c. Architectural Patterns & Principles
• Microservices: frontend and backend as separate Cloud Run services
• Layered architecture: UI → API → Orchestration → External tools/models
• Infrastructure-as-code and GitOps for repeatable deployments
• Pluggable strategy pattern for orchestration frameworks and foundation models
• Twelve-factor app compliance: config via environment variables, stateless containers
d. Key Technologies & Libraries
• Angular, Nginx
• FastAPI, Uvicorn
• LangChain / LangGraph / LlamaIndex
• Vertex AI Search (RAG), Vertex AI Agent Engine
• Terraform, Cloud Build, GitHub Actions
• Docker, Python 3.10+, Poetry