from fastapi import FastAPI from pydantic import BaseModel app = FastAPI(title="GAIA Agent") # ----------------------------- # REQUEST FORMAT # ----------------------------- class QuestionRequest(BaseModel): question: str # ----------------------------- # SIMPLE AGENT (START HERE) # ----------------------------- def solve(question: str) -> str: """ STEP 1: Simple baseline agent You will improve this later with tools + RAG """ # BASIC RULE: return only final answer # (temporary logic) return question # ----------------------------- # API ENDPOINT # ----------------------------- @app.post("/predict") def predict(req: QuestionRequest): answer = solve(req.question) return { "answer": answer } # ----------------------------- # HEALTH CHECK # ----------------------------- @app.get("/") def home(): return {"status": "GAIA agent is running 🚀"}