import logfire from fastapi import FastAPI from app import agent, models logfire.configure( service_name="api", scrubbing=False, send_to_logfire="if-token-present" ) logfire.instrument_pydantic_ai() app = FastAPI() logfire.instrument_fastapi(app, excluded_urls=["health"]) @app.get("/health") def health_check(): return "ok" @app.get("/ask", response_model=models.Statements) async def ask(query: str): response = await agent.agent.run(query) return response.output