Deploy as an HTTP server
Turn any agent into an HTTP service with no FastAPI boilerplate
([server] extra).
from neuroagent import Agent
Agent(provider="openai").serve(port=8000)
# POST /chat, /ask, /run → {"content": ..., "trace_id": ..., "tokens": ...}
# POST /stream → server-sent events (token streaming)
# GET /health, /stats
curl -X POST localhost:8000/run -H "content-type: application/json" \
-d '{"input": "Hello!"}'
Need the app object for your own server/middleware? Use agent.create_app()
(returns a FastAPI app).
Install the server extra first:
pip install "neuroagent-ai[server]".
NeuroAgent AI