Skip to content
Source
Sign inSign up
TanStack/ai

examples/ag-ui/servers/bash

Contents of examples/ag-ui/servers/bash
NameLast commit messageLast commit date
..
README.md
server.sh

README.md

Bash AG-UI server

A deliberately minimal AG-UI server written in Bash. It uses:

  • socat to accept concurrent HTTP connections
  • curl to stream OpenAI or Anthropic responses
  • jq to translate JSON and emit AG-UI SSE events

Prerequisites

On macOS:

brew install bash jq socat

The server expects Bash 4+ and also requires curl.

Run

From examples/ag-ui:

OPENAI_API_KEY=... pnpm dev:bash

The server listens on http://127.0.0.1:8005. Its endpoints are:

  • GET /health
  • POST / with an AG-UI RunAgentInput body
  • OPTIONS / for CORS preflight

This server exists to demonstrate the portability of the AG-UI wire protocol. It is intentionally a local development example, not a production HTTP server.