Run agents locally using Ollama and OGX for model serving, or connect to any OpenAI-compatible API.
Windows users: The Makefiles require a bash-compatible shell. Use WSL, Git Bash, or a similar environment.
# macOS
brew install ollama
# Linux
curl -fsSL https://ollama.com/install.sh | shFor other platforms, see the Ollama docs.
Start the Ollama service (keep this terminal open):
ollama serveollama pull llama3.2:3bFor RAG agents that need embeddings:
ollama pull embeddinggemma:latestFrom a standard agent directory (e.g., agents/langgraph/templates/react_agent):
cd agents/langgraph/templates/react_agent # or any other standard agent
make init
make env
make ogx-serverThe make ogx-server target installs OGX, starts it with run_ogx_server.yaml, and serves requests on http://localhost:8321.
cd agents/langgraph/templates/react_agent # or any other agentEdit .env:
API_KEY=dummy
BASE_URL=http://localhost:8321/v1
MODEL_ID=llama3.2:3bmake run-appThe agent starts on http://localhost:8000.
Note: Non-standard agents like
agents/langflow/templates/simple_tool_calling_agentuse different local run commands. Follow the agent-specific README when its Makefile does not provide the standardmake env/make ogx-server/make run-appworkflow.
If you have an OpenAI-compatible API endpoint (OpenAI, Azure OpenAI, vLLM, etc.), just point BASE_URL and API_KEY at it:
API_KEY=sk-...
BASE_URL=https://api.openai.com/v1
MODEL_ID=gpt-4o# Health check
curl http://localhost:8000/health
# Non-streaming
curl -X POST http://localhost:8000/chat/completions \
-H "Content-Type: application/json" \
-d '{"messages": [{"role": "user", "content": "Hello!"}], "stream": false}'
# Streaming
curl -sN -X POST http://localhost:8000/chat/completions \
-H "Content-Type: application/json" \
-d '{"messages": [{"role": "user", "content": "Hello!"}], "stream": true}'cd agents/langgraph/templates/react_agent
make testAll agents use uv for dependency management:
curl -LsSf https://astral.sh/uv/install.sh | shTo install an agent's dependencies locally:
cd agents/langgraph/templates/react_agent
uv pip install -e ".[dev]"