Files
cavepediav2/web/agent/server.py
Paul Walko 79fc89a7f4
All checks were successful
Build and Push Agent Docker Image / build (push) Successful in 2m10s
Build and Push Web Docker Image / build (push) Successful in 3m33s
use pydantic
2025-12-13 01:39:31 +01:00

21 lines
407 B
Python

"""
Self-hosted PydanticAI agent server using AG-UI protocol.
"""
import os
import uvicorn
from dotenv import load_dotenv
from pydantic_ai.ui.ag_ui.app import AGUIApp
from main import agent
load_dotenv()
# Convert PydanticAI agent to ASGI app with AG-UI protocol
app = AGUIApp(agent)
if __name__ == "__main__":
port = int(os.getenv("PORT", "8000"))
uvicorn.run(app, host="0.0.0.0", port=port)