How drotschie/ai-agent-challenge works
This is a gardening guidance and planting-record verification application. Gardeners ask locally grounded crop, soil and watering questions, or submit planting records for cleanup and agronomic validation. The guide path rewrites queries, retrieves structured references and synthesizes cited advice with weather; the verification path ingests calendar and email data, normalizes records, checks rules and produces an audited CSV. The graph follows documented capabilities and sampled calls; some frontend-to-API and external-service links are documented rather than visible in backend excerpts.
Main entry points: pipeline.py Grounded synthesis · graph.py Workflow orchestration · main.py FastAPI routes · verifier.py Rule verification
Components 26
Gardener interface
- Guide workspace
frontend/src/components/RagWorkspace.tsx - Verification workspace
frontend/src/components/AgentWorkspace.tsx - Data explorer
frontend/src/components/DataExplorer.tsx - API client
frontend/src/lib/api.ts
Application API
- FastAPI routes
backend/app/main.py - LLM configuration
backend/app/config.py
Gardening guide
- Query transform
backend/app/rag/query_transform.py - Grounded synthesis
backend/app/rag/pipeline.py - Source chunking
backend/app/rag/chunkers.py - Vector retrieval
backend/app/rag/vector_store.py - Guide data models
backend/app/rag/schemas.py - Garden references
backend/data
Planting verification
- Workflow orchestration
backend/app/agent/graph.py - Calendar ingestion
backend/app/agent/tools/calendar_tool.py - Email ingestion
backend/app/agent/tools/email_tool.py - Record cleanup
backend/app/agent/normalizer.py - Rule verification
backend/app/agent/verifier.py - Agent data models
backend/app/agent/schemas.py - Taxonomy lookup
backend/app/agent/tools/gbif_tool.py - Weather lookup
backend/app/agent/tools/weather_tool.py
Other components
- Gardener
- Google Calendar
- Gmail
- Open-Meteo
- GBIF API
- LLM providers
Connections 30
- Gardener → Guide workspace: asks
README.md - Gardener → Verification workspace: runs verification
README.md - Gardener → Data explorer: browses sources
README.md - Guide workspace → API client: submits query
- Verification workspace → API client: starts workflow
- Data explorer → API client: requests sources
- API client → FastAPI routes: calls routes
- FastAPI routes → Grounded synthesis: runs query
backend/app/main.py - FastAPI routes → Workflow orchestration: runs workflow
backend/app/main.py - FastAPI routes → Garden references: loads source data
backend/app/main.py - Grounded synthesis → Query transform: transforms query
backend/app/rag/pipeline.py - Grounded synthesis → Vector retrieval: retrieves chunks
backend/app/rag/pipeline.py - Vector retrieval → Source chunking: indexes chunks
backend/app/rag/vector_store.py - Source chunking → Garden references: parses references
README.md - Grounded synthesis → Garden references: uses agronomic rules
README.md - Grounded synthesis → Open-Meteo: fetches forecast
README.md - Grounded synthesis → LLM configuration: uses synthesis fallback
backend/app/rag/pipeline.py - LLM configuration → LLM providers: invokes providers
backend/app/config.py - Workflow orchestration → Calendar ingestion: fetches events
backend/app/agent/graph.py - Workflow orchestration → Email ingestion: fetches messages
backend/app/agent/graph.py - Workflow orchestration → Record cleanup: cleans records
backend/app/agent/graph.py - Workflow orchestration → Rule verification: validates records
backend/app/agent/graph.py - Calendar ingestion → Google Calendar: reads events
backend/app/agent/tools/calendar_tool.py - Email ingestion → Gmail: reads messages
backend/app/agent/tools/email_tool.py - Rule verification → Taxonomy lookup: checks taxonomy
backend/app/agent/verifier.py - Rule verification → Weather lookup: checks forecast
backend/app/agent/verifier.py - Taxonomy lookup → GBIF API: matches species
README.md - Weather lookup → Open-Meteo: gets forecast
README.md - Rule verification → Garden references: checks crop rules
README.md - Workflow orchestration → Verification workspace: returns audit and CSV