server

command
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 27, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Command server serves an agent over HTTP: the session API, the Vercel AI SDK useChat endpoint, AG-UI and A2A.

Set AGENTX_SERVER_TOKEN to a random secret in the server and client environments.

go run ./cmd/server   # in agentx-examples
curl -N localhost:8080/sessions/demo/runs -H "Authorization: Bearer $AGENTX_SERVER_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"input":"Deploy the latest build to staging"}'
curl localhost:8080/sessions/demo -H "Authorization: Bearer $AGENTX_SERVER_TOKEN"
curl -N localhost:8080/sessions/demo/resume -H "Authorization: Bearer $AGENTX_SERVER_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"approvals":{"<call_id>":{"approved":true}}}'

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL