Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.simplefunctions.dev/llms.txt

Use this file to discover all available pages before exploring further.

Use the HTTP API when a service, notebook, dashboard, or custom runtime needs stable JSON contracts and does not want to shell out to sf.

1. Base URL

https://simplefunctions.dev

2. Public reads

curl "https://simplefunctions.dev/api/public/query?q=Fed%20rate%20cut&limit=3"
curl "https://simplefunctions.dev/api/agent/world?format=json"
curl "https://simplefunctions.dev/api/agent/world/delta?since=1h&format=json"
curl "https://simplefunctions.dev/api/agent/inspect/KXRATECUT-26DEC31"
Start broad with query or world state, then inspect one ticker before acting on it.

3. Authenticated reads

export SF_API_KEY="sf_..."

curl -H "Authorization: Bearer $SF_API_KEY" \
  "https://simplefunctions.dev/api/portfolio/state"

curl -H "Authorization: Bearer $SF_API_KEY" \
  "https://simplefunctions.dev/api/intents?limit=10"
Authenticated surfaces are scoped to the key owner. Do not pass arbitrary user ids from clients.

4. Discover canonical SDK and Agent tools

curl "https://simplefunctions.dev/api/contracts/tools"
Use /api/contracts/tools for SDK and Agent SDK canonical tool names, side-effect classes, cost classes, replay metadata, and auth requirements. /api/tools is broader compatibility inventory.

5. Minimal service wrapper

async function sfGet<T>(path: string, apiKey?: string): Promise<T> {
  const res = await fetch(`https://simplefunctions.dev${path}`, {
    headers: apiKey ? { Authorization: `Bearer ${apiKey}` } : {},
  })
  const body = await res.json()
  if (!res.ok) throw new Error(body?.error?.message ?? `SimpleFunctions HTTP ${res.status}`)
  return body as T
}

const world = await sfGet('/api/agent/world?format=json')
const portfolio = await sfGet('/api/portfolio/state', process.env.SF_API_KEY)

Next steps

REST API overview

Endpoint groups and response style.

Direct API access

Curl, TypeScript, Python, and service patterns.

SDK quickstart

Use typed TypeScript wrappers.

Contract tools

Canonical SDK and Agent manifest.