[pyne-agent-worker chat]

POST /v1/chat, search, sessions, and the optional pyne-worker validate loop.

pyne-agent-worker chat

Abstract

Chat is POST /v1/chat. When API_KEY is unset, open mode is allowed for local dev only. Admin embed/index always require API_KEY.

Sister repo: hoox-sh/pyne-agent-worker.

Endpoints

MethodPathAuthRole
GET/healthnoLiveness + mode
GET/noDemo chat UI
POST/v1/chatyes*NL → Pine
GET/POST/v1/searchyes*Vectorize search
POST/v1/sessionsyes*Create session
GET/v1/sessions/:idyes*Session + messages
POST/v1/admin/embedyesBatch embeddings
POST/v1/admin/indexyesEmbed + R2 + Vectorize
GET/plugin/axis-pine-agent.jsnoAXIS plugin module

* Required when API_KEY is set.

POST /v1/chat

{
  "message": "v6 RSI strategy with ATR trailing stop",
  "pine_version": "v6",
  "style": "strategy",
  "session_id": null,
  "validate": true,
  "max_retries": 2
}

Response includes reply, extracted pine, validation (attempts / pyne-worker errors), rag hits, and a trademark disclaimer.

Validate loop (optional)

Only when PYNE_SERVICE or PYNE_WORKER_URL is set:

generate (Workers AI)
  → extract ```pine
  → POST pyne-worker /run (synthetic OHLCV)
  → ok? return
  → else fix prompt + retry (max_retries)

Without a binding, validation.available is false and the Worker returns the first draft.

See also