[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
| Method | Path | Auth | Role |
|---|---|---|---|
GET | /health | no | Liveness + mode |
GET | / | no | Demo chat UI |
POST | /v1/chat | yes* | NL → Pine |
GET/POST | /v1/search | yes* | Vectorize search |
POST | /v1/sessions | yes* | Create session |
GET | /v1/sessions/:id | yes* | Session + messages |
POST | /v1/admin/embed | yes | Batch embeddings |
POST | /v1/admin/index | yes | Embed + R2 + Vectorize |
GET | /plugin/axis-pine-agent.js | no | AXIS 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
- pyne-agent-worker
- Deploy
- pyne-worker
/run - PyneTS — in-process TS evaluate, not this chat API