Skip to main content
The Sage server exposes a REST API used by the client and the agent to manage the full proposal lifecycle — from sponsored creation and risk scoring to autonomous execution, deep analysis, and policy configuration.

Base URL

Authentication

Routes are guarded by a single auth middleware that accepts either:
  • Agent / server-to-serverAuthorization: Bearer $AGENT_SECRET (the shared secret)
  • End userAuthorization: Bearer <privy-jwt> (verified against the Privy app)
A few read endpoints (/portfolio, /tokens, /events) are public; the rest require a bearer token.

Endpoints

The server self-calls /execute and /sponsor/close over localhost using AGENT_SECRET, so the same secret powers both the agent and internal server-to-server flows.