import uvicorn from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware from src.interface.api.routes import router # Import tools to register them (disabled for Hugging Face Spaces deployment) # import src.infrastructure.tools.browser # import src.infrastructure.tools.shell # import src.infrastructure.tools.file app = FastAPI( title="Gemini Agentic Platform", description="Intelligent conversation agent system based on Gemini 3", version="1.0.0" ) # CORS middleware app.add_middleware( CORSMiddleware, allow_origins=["*"], allow_credentials=True, allow_methods=["*"], allow_headers=["*"], ) # Include routers app.include_router(router, prefix="/api/v1") @app.get("/") def root(): return {"message": "Gemini Agentic Platform is running", "docs_url": "/docs"} if __name__ == "__main__": uvicorn.run("app:app", host="0.0.0.0", port=7860, reload=True)