Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ dependencies = [
"langchain-llama-stack>=0.1.0,<1.0.0",
"pandas>=2.0.0,<3.0.0",
"pydantic>=2.0.0,<3.0.0",
"uvicorn[standard]>=0.30.0,<1.0.0",
"uvicorn[standard]>=0.41.0,<1.0.0",
]

[project.optional-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion agents/autogen/mcp_agent/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ dependencies = [
"autogen-agentchat",
"autogen-ext[openai,mcp]",
"openai",
"fastapi>=0.129.0",
"fastapi>=0.135.1",
"uvicorn[standard]>=0.41.0",
"pydantic>=2.0.0",
"python-dotenv>=1.2.0",
Expand Down
4 changes: 2 additions & 2 deletions agents/crewai/websearch_agent/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ run-app: ## Run agent locally with hot-reload
echo " Change PORT in .env or run: make run-app-fresh" && \
exit 1; \
fi && \
uv run $${MLFLOW_TRACKING_URI:+--extra tracing} uvicorn main:app --host 0.0.0.0 --port $${PORT:-8000} --reload --reload-exclude .venv
uv run $${MLFLOW_TRACKING_URI:+--extra tracing} uvicorn main:app --host 127.0.0.1 --port $${PORT:-8000} --reload --reload-exclude .venv

run-app-fresh: ## Kill existing process on port and run agent with hot-reload
@source .venv/bin/activate && set -a && source .env && set +a && \
echo "==> Killing existing process on port $${PORT:-8000}..." && \
lsof -ti:$${PORT:-8000} | xargs kill -9 2>/dev/null; true && \
uv run $${MLFLOW_TRACKING_URI:+--extra tracing} uvicorn main:app --host 0.0.0.0 --port $${PORT:-8000} --reload --reload-exclude .venv
uv run $${MLFLOW_TRACKING_URI:+--extra tracing} uvicorn main:app --host 127.0.0.1 --port $${PORT:-8000} --reload --reload-exclude .venv

run-cli: ## Run interactive CLI chat (no web server)
@source .venv/bin/activate && set -a && source .env && set +a && \
Expand Down
8 changes: 6 additions & 2 deletions agents/crewai/websearch_agent/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

from crewai import LLM
from fastapi import FastAPI, HTTPException
from fastapi.responses import FileResponse, HTMLResponse, StreamingResponse
from fastapi.responses import FileResponse, HTMLResponse, JSONResponse, StreamingResponse
from pydantic import BaseModel, Field

from crewai_web_search.crew import AssistanceAgents
Expand Down Expand Up @@ -364,7 +364,11 @@ async def event_generator():
"/health", response_model=HealthResponse, summary="Health check", tags=["Health"]
)
async def health():
return {"status": "healthy", "agent_initialized": llm is not None}
initialized = llm is not None
body = {"status": "healthy" if initialized else "not_ready", "agent_initialized": initialized}
if not initialized:
return JSONResponse(status_code=503, content=body)
return body


# ── Playground API aliases (so the same index.html works in both modes) ───────
Expand Down
4 changes: 2 additions & 2 deletions agents/google/adk/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@ run-app: ## Run agent locally with hot-reload
echo " Change PORT in .env or run: make run-app-fresh" && \
exit 1; \
fi && \
uv run uvicorn main:app --host 0.0.0.0 --port $${PORT:-8000} --reload --reload-exclude .venv
uv run uvicorn main:app --host 127.0.0.1 --port $${PORT:-8000} --reload --reload-exclude .venv

run-app-fresh: ## Kill existing process on port and run agent with hot-reload
@source .venv/bin/activate && set -a && source .env && set +a && \
echo "==> Killing existing process on port $${PORT:-8000}..." && \
lsof -ti:$${PORT:-8000} | xargs kill -9 2>/dev/null; true && \
uv run uvicorn main:app --host 0.0.0.0 --port $${PORT:-8000} --reload --reload-exclude .venv
uv run uvicorn main:app --host 127.0.0.1 --port $${PORT:-8000} --reload --reload-exclude .venv

run-cli: ## Run interactive CLI chat (no web server)
@source .venv/bin/activate && set -a && source .env && set +a && \
Expand Down
8 changes: 6 additions & 2 deletions agents/google/adk/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from pathlib import Path

from fastapi import FastAPI, HTTPException
from fastapi.responses import FileResponse, HTMLResponse, StreamingResponse
from fastapi.responses import FileResponse, HTMLResponse, JSONResponse, StreamingResponse
from google.genai import types
from pydantic import BaseModel, Field

Expand Down Expand Up @@ -411,7 +411,11 @@ async def event_generator():
"/health", response_model=HealthResponse, summary="Health check", tags=["Health"]
)
async def health():
return {"status": "healthy", "agent_initialized": runner is not None}
initialized = runner is not None
body = {"status": "healthy" if initialized else "not_ready", "agent_initialized": initialized}
if not initialized:
return JSONResponse(status_code=503, content=body)
return body
Comment thread
tarun-etikala marked this conversation as resolved.
Resolved


# ── Playground UI ────────────────────────────────────────────────────────────
Expand Down
2 changes: 1 addition & 1 deletion agents/google/adk/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ authors = [{ name = "Your Name", email = "you@example.com" }]
license = { text = "MIT" }
requires-python = ">=3.12,<=3.14"
dependencies = [
"fastapi>=0.129.0",
"fastapi>=0.135.1",
"uvicorn[standard]>=0.41.0",
"google-adk>=2.0.0a1",
"litellm>=1.50.0,!=1.82.7,!=1.82.8", # Those versions were compromised so we skip them
Expand Down
4 changes: 2 additions & 2 deletions agents/langgraph/agentic_rag/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@ run-app: ## Run agent locally with hot-reload
echo " Change PORT in .env or run: make run-app-fresh" && \
exit 1; \
fi && \
uv run $${MLFLOW_TRACKING_URI:+--extra tracing} uvicorn main:app --host 0.0.0.0 --port $${PORT:-8000} --reload --reload-exclude .venv
uv run $${MLFLOW_TRACKING_URI:+--extra tracing} uvicorn main:app --host 127.0.0.1 --port $${PORT:-8000} --reload --reload-exclude .venv

run-app-fresh: ## Kill existing process on port and run agent with hot-reload
@source .venv/bin/activate && set -a && source .env && set +a && \
echo "==> Killing existing process on port $${PORT:-8000}..." && \
lsof -ti:$${PORT:-8000} | xargs kill -9 2>/dev/null; true && \
uv run $${MLFLOW_TRACKING_URI:+--extra tracing} uvicorn main:app --host 0.0.0.0 --port $${PORT:-8000} --reload --reload-exclude .venv
uv run $${MLFLOW_TRACKING_URI:+--extra tracing} uvicorn main:app --host 127.0.0.1 --port $${PORT:-8000} --reload --reload-exclude .venv

run-cli: ## Run interactive CLI chat (no web server)
@source .venv/bin/activate && set -a && source .env && set +a && \
Expand Down
8 changes: 6 additions & 2 deletions agents/langgraph/agentic_rag/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from pathlib import Path

from fastapi import FastAPI, HTTPException
from fastapi.responses import FileResponse, HTMLResponse, StreamingResponse
from fastapi.responses import FileResponse, HTMLResponse, JSONResponse, StreamingResponse
from langchain_core.messages import HumanMessage, AIMessage, ToolMessage
from pydantic import BaseModel, Field
from agentic_rag.agent import get_graph_closure
Expand Down Expand Up @@ -387,7 +387,11 @@ async def event_generator():
"/health", response_model=HealthResponse, summary="Health check", tags=["Health"]
)
async def health():
return {"status": "healthy", "agent_initialized": agent_graph is not None}
initialized = agent_graph is not None
body = {"status": "healthy" if initialized else "not_ready", "agent_initialized": initialized}
if not initialized:
return JSONResponse(status_code=503, content=body)
return body


# ── Playground UI ────────────────────────────────────────────────────────────
Expand Down
2 changes: 1 addition & 1 deletion agents/langgraph/agentic_rag/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ authors = [{ name = "Your Name", email = "you@example.com" }]
license = { text = "MIT" }
requires-python = ">=3.12, <3.14"
dependencies = [
"fastapi>=0.132.0",
"fastapi>=0.135.1",
"uvicorn[standard]>=0.41.0",
"langchain>=1.2.10",
"langchain-openai>=1.1.10",
Expand Down
4 changes: 2 additions & 2 deletions agents/langgraph/human_in_the_loop/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@ run-app: ## Run agent locally with hot-reload
echo " Change PORT in .env or run: make run-app-fresh" && \
exit 1; \
fi && \
uv run $${MLFLOW_TRACKING_URI:+--extra tracing} uvicorn main:app --host 0.0.0.0 --port $${PORT:-8000} --reload --reload-exclude .venv
uv run $${MLFLOW_TRACKING_URI:+--extra tracing} uvicorn main:app --host 127.0.0.1 --port $${PORT:-8000} --reload --reload-exclude .venv

run-app-fresh: ## Kill existing process on port and run agent with hot-reload
@source .venv/bin/activate && set -a && source .env && set +a && \
echo "==> Killing existing process on port $${PORT:-8000}..." && \
lsof -ti:$${PORT:-8000} | xargs kill -9 2>/dev/null; true && \
uv run $${MLFLOW_TRACKING_URI:+--extra tracing} uvicorn main:app --host 0.0.0.0 --port $${PORT:-8000} --reload --reload-exclude .venv
uv run $${MLFLOW_TRACKING_URI:+--extra tracing} uvicorn main:app --host 127.0.0.1 --port $${PORT:-8000} --reload --reload-exclude .venv

run-cli: ## Run interactive CLI chat (no web server)
@source .venv/bin/activate && set -a && source .env && set +a && \
Expand Down
8 changes: 6 additions & 2 deletions agents/langgraph/human_in_the_loop/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from pathlib import Path

from fastapi import FastAPI, HTTPException
from fastapi.responses import FileResponse, HTMLResponse, StreamingResponse
from fastapi.responses import FileResponse, HTMLResponse, JSONResponse, StreamingResponse
from langchain_core.messages import HumanMessage, AIMessage, ToolMessage
from langgraph.checkpoint.memory import MemorySaver
from langgraph.types import Command
Expand Down Expand Up @@ -538,7 +538,11 @@ async def event_generator():
"/health", response_model=HealthResponse, summary="Health check", tags=["Health"]
)
async def health():
return {"status": "healthy", "agent_initialized": agent_graph_closure is not None}
initialized = agent_graph_closure is not None
body = {"status": "healthy" if initialized else "not_ready", "agent_initialized": initialized}
if not initialized:
return JSONResponse(status_code=503, content=body)
return body


# ── Playground UI ────────────────────────────────────────────────────────────
Expand Down
4 changes: 2 additions & 2 deletions agents/langgraph/react_agent/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@ run-app: ## Run agent locally with hot-reload
echo " Change PORT in .env or run: make run-app-fresh" && \
exit 1; \
fi && \
uv run $${MLFLOW_TRACKING_URI:+--extra tracing} uvicorn main:app --host 0.0.0.0 --port $${PORT:-8000} --reload --reload-exclude .venv
uv run $${MLFLOW_TRACKING_URI:+--extra tracing} uvicorn main:app --host 127.0.0.1 --port $${PORT:-8000} --reload --reload-exclude .venv

run-app-fresh: ## Kill existing process on port and run agent with hot-reload
@source .venv/bin/activate && set -a && source .env && set +a && \
echo "==> Killing existing process on port $${PORT:-8000}..." && \
lsof -ti:$${PORT:-8000} | xargs kill -9 2>/dev/null; true && \
uv run $${MLFLOW_TRACKING_URI:+--extra tracing} uvicorn main:app --host 0.0.0.0 --port $${PORT:-8000} --reload --reload-exclude .venv
uv run $${MLFLOW_TRACKING_URI:+--extra tracing} uvicorn main:app --host 127.0.0.1 --port $${PORT:-8000} --reload --reload-exclude .venv

run-cli: ## Run interactive CLI chat (no web server)
@source .venv/bin/activate && set -a && source .env && set +a && \
Expand Down
8 changes: 6 additions & 2 deletions agents/langgraph/react_agent/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from pathlib import Path

from fastapi import FastAPI, HTTPException
from fastapi.responses import FileResponse, HTMLResponse, StreamingResponse
from fastapi.responses import FileResponse, HTMLResponse, JSONResponse, StreamingResponse
from langchain_core.messages import HumanMessage, AIMessage, ToolMessage
from pydantic import BaseModel, Field
from react_agent.agent import get_graph_closure
Expand Down Expand Up @@ -384,7 +384,11 @@ async def event_generator():
"/health", response_model=HealthResponse, summary="Health check", tags=["Health"]
)
async def health():
return {"status": "healthy", "agent_initialized": agent_graph is not None}
initialized = agent_graph is not None
body = {"status": "healthy" if initialized else "not_ready", "agent_initialized": initialized}
if not initialized:
return JSONResponse(status_code=503, content=body)
return body


# ── Playground UI ────────────────────────────────────────────────────────────
Expand Down
2 changes: 1 addition & 1 deletion agents/langgraph/react_agent/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ authors = [{ name = "Your Name", email = "you@example.com" }]
license = { text = "MIT" }
requires-python = ">=3.12,<=3.14"
dependencies = [
"fastapi>=0.132.0",
"fastapi>=0.135.1",
"uvicorn[standard]>=0.41.0",
"langchain>=1.2.10",
"langchain-openai>=1.1.10",
Expand Down
6 changes: 3 additions & 3 deletions agents/langgraph/react_with_database_memory/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ re-init: ## Activate venv and reload .env variables
init: ## Copy .env.example to .env for configuration
@if [ ! -f .env ]; then cp .env.example .env && echo "Created .env from .env.example — edit it with your configuration"; else echo ".env already exists — skipping"; fi

env: init ## Create venv, load .env, and install dependencies
env: ## Create venv, load .env, and install dependencies
@echo "==> Creating virtual environment and installing dependencies..." && \
rm -rf .venv && \
uv sync --python 3.12 && \
Expand Down Expand Up @@ -73,13 +73,13 @@ run-app: ## Run agent locally with hot-reload
echo " Change PORT in .env or run: make run-app-fresh" && \
exit 1; \
fi && \
uv run $${MLFLOW_TRACKING_URI:+--extra tracing} uvicorn main:app --host 0.0.0.0 --port $${PORT:-8000} --reload --reload-exclude .venv
uv run $${MLFLOW_TRACKING_URI:+--extra tracing} uvicorn main:app --host 127.0.0.1 --port $${PORT:-8000} --reload --reload-exclude .venv

run-app-fresh: ## Kill existing process on port and run agent with hot-reload
@source .venv/bin/activate && set -a && source .env && set +a && \
echo "==> Killing existing process on port $${PORT:-8000}..." && \
lsof -ti:$${PORT:-8000} | xargs kill -9 2>/dev/null; true && \
uv run $${MLFLOW_TRACKING_URI:+--extra tracing} uvicorn main:app --host 0.0.0.0 --port $${PORT:-8000} --reload --reload-exclude .venv
uv run $${MLFLOW_TRACKING_URI:+--extra tracing} uvicorn main:app --host 127.0.0.1 --port $${PORT:-8000} --reload --reload-exclude .venv

run-cli: ## Run interactive CLI chat (no web server)
@source .venv/bin/activate && set -a && source .env && set +a && \
Expand Down
12 changes: 8 additions & 4 deletions agents/langgraph/react_with_database_memory/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from pathlib import Path

from fastapi import FastAPI, HTTPException
from fastapi.responses import FileResponse, HTMLResponse, StreamingResponse
from fastapi.responses import FileResponse, HTMLResponse, JSONResponse, StreamingResponse
from langchain_core.messages import HumanMessage, AIMessage, ToolMessage, SystemMessage
from langgraph.checkpoint.postgres import PostgresSaver
from langgraph.checkpoint.postgres.aio import AsyncPostgresSaver
Expand Down Expand Up @@ -462,11 +462,15 @@ async def event_generator():
"/health", response_model=HealthResponse, summary="Health check", tags=["Health"]
)
async def health():
return {
"status": "healthy",
"agent_initialized": agent_graph_closure is not None,
initialized = agent_graph_closure is not None
body = {
"status": "healthy" if initialized else "not_ready",
"agent_initialized": initialized,
"database_connected": DB_URI is not None,
}
if not initialized:
return JSONResponse(status_code=503, content=body)
return body


# ── Playground UI ────────────────────────────────────────────────────────────
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ license = { text = "MIT" }
readme = "README.md"
requires-python = ">=3.12,<3.14"
dependencies = [
"fastapi>=0.132.0",
"fastapi>=0.135.1",
"uvicorn[standard]>=0.41.0",
"pydantic>=2.12.5",
"langchain>=1.2.10",
Expand Down
4 changes: 2 additions & 2 deletions agents/llamaindex/websearch_agent/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@ run-app: ## Run agent locally with hot-reload
echo " Change PORT in .env or run: make run-app-fresh" && \
exit 1; \
fi && \
uv run $${MLFLOW_TRACKING_URI:+--extra tracing} uvicorn main:app --host 0.0.0.0 --port $${PORT:-8000} --reload --reload-exclude .venv
uv run $${MLFLOW_TRACKING_URI:+--extra tracing} uvicorn main:app --host 127.0.0.1 --port $${PORT:-8000} --reload --reload-exclude .venv

run-app-fresh: ## Kill existing process on port and run agent with hot-reload
@source .venv/bin/activate && set -a && source .env && set +a && \
echo "==> Killing existing process on port $${PORT:-8000}..." && \
lsof -ti:$${PORT:-8000} | xargs kill -9 2>/dev/null; true && \
uv run $${MLFLOW_TRACKING_URI:+--extra tracing} uvicorn main:app --host 0.0.0.0 --port $${PORT:-8000} --reload --reload-exclude .venv
uv run $${MLFLOW_TRACKING_URI:+--extra tracing} uvicorn main:app --host 127.0.0.1 --port $${PORT:-8000} --reload --reload-exclude .venv

run-cli: ## Run interactive CLI chat (no web server)
@source .venv/bin/activate && set -a && source .env && set +a && \
Expand Down
8 changes: 6 additions & 2 deletions agents/llamaindex/websearch_agent/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from pathlib import Path

from fastapi import FastAPI, HTTPException
from fastapi.responses import FileResponse, HTMLResponse, StreamingResponse
from fastapi.responses import FileResponse, HTMLResponse, JSONResponse, StreamingResponse
from websearch_agent.agent import get_workflow_closure
from websearch_agent.tracing import enable_tracing
from websearch_agent.workflow import ToolCallEvent, InputEvent
Expand Down Expand Up @@ -451,7 +451,11 @@ async def event_generator():
"/health", response_model=HealthResponse, summary="Health check", tags=["Health"]
)
async def health():
return {"status": "healthy", "agent_initialized": get_agent is not None}
initialized = get_agent is not None
body = {"status": "healthy" if initialized else "not_ready", "agent_initialized": initialized}
if not initialized:
return JSONResponse(status_code=503, content=body)
return body


# ── Playground API aliases (so the same index.html works in both modes) ───────
Expand Down
4 changes: 2 additions & 2 deletions agents/vanilla_python/openai_responses_agent/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ run-app: ## Run agent locally with hot-reload
echo " Change PORT in .env or run: make run-app-fresh" && \
exit 1; \
fi && \
uv run $${MLFLOW_TRACKING_URI:+--extra tracing} uvicorn main:app --host 0.0.0.0 --port $${PORT:-8000} --reload --reload-exclude .venv
uv run $${MLFLOW_TRACKING_URI:+--extra tracing} uvicorn main:app --host 127.0.0.1 --port $${PORT:-8000} --reload --reload-exclude .venv

run-app-fresh: ## Kill existing process on port and run agent with hot-reload
@source .venv/bin/activate && set -a && source .env && set +a && \
echo "==> Killing existing process on port $${PORT:-8000}..." && \
lsof -ti:$${PORT:-8000} | xargs kill -9 2>/dev/null; true && \
uv run $${MLFLOW_TRACKING_URI:+--extra tracing} uvicorn main:app --host 0.0.0.0 --port $${PORT:-8000} --reload --reload-exclude .venv
uv run $${MLFLOW_TRACKING_URI:+--extra tracing} uvicorn main:app --host 127.0.0.1 --port $${PORT:-8000} --reload --reload-exclude .venv

run-cli: ## Run interactive CLI chat (no web server)
@source .venv/bin/activate && set -a && source .env && set +a && \
Expand Down
8 changes: 6 additions & 2 deletions agents/vanilla_python/openai_responses_agent/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from pathlib import Path

from fastapi import FastAPI, HTTPException
from fastapi.responses import FileResponse, HTMLResponse, StreamingResponse
from fastapi.responses import FileResponse, HTMLResponse, JSONResponse, StreamingResponse
from openai_responses_agent.agent import get_agent_closure, AIAgent
from openai_responses_agent.tracing import enable_tracing, wrap_func_with_mlflow_trace
from pydantic import BaseModel, Field
Expand Down Expand Up @@ -388,7 +388,11 @@ def _map_event_to_chunk(
"/health", response_model=HealthResponse, summary="Health check", tags=["Health"]
)
async def health():
return {"status": "healthy", "agent_initialized": get_agent is not None}
initialized = get_agent is not None
body = {"status": "healthy" if initialized else "not_ready", "agent_initialized": initialized}
if not initialized:
return JSONResponse(status_code=503, content=body)
return body


# ── Playground API aliases (so the same index.html works in both modes) ───────
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ dependencies = [
"openai>=2.24.0",
"setuptools>=80.9.0,<82.0.0",
"flask>=3.1.0",
"fastapi>=0.129.0",
"fastapi>=0.135.1",
"uvicorn[standard]>=0.41.0",
]

Expand Down