PYNE Agent plugin
Install the pyne-agent-worker AXIS component plugin — natural-language PYNE script chat via Cloudflare® Workers AI™ (standalone or HOOX-enhanced).
This page
Abstract
pyne-agent-worker is a sister Cloudflare® Worker that turns natural language into PYNE-compatible scripts. AXIS consumes it as a component plugin (kind: 'component') loaded from URL. It does not replace engines — evaluation still goes through your active engine (server, pyodide, …). The agent only writes script source into the editor / chat UI.
| Repo | hoox-sh/pyne-agent-worker |
| Plugin module | AXIS ships /plugins/axis-pine-agent.js; remote GET /plugin/axis-pine-agent.js on the agent Worker |
| API | POST /v1/chat |
| Standalone | Workers AI™ only — no pyne-worker / HOOX mesh required |
| Optional | pyne-worker 0.10.0+ staged parse→lint→eval (/ast/* + /run) when configured |
| Plugin | 0.1.9 (Agent panel, orchestrate + pyneBackend) |
Pine Script™ and TradingView® are trademarks of TradingView®, Inc. Cloudflare® is a registered trademark of Cloudflare®, Inc. Independent project — not affiliated with TradingView®, Inc. or Cloudflare®, Inc.
Conceptual model
Rendering…
Install in AXIS
- Deploy pyne-agent-worker (standalone is enough) for the API endpoint.
- AXIS → Manager → Plugins → Install from URL — prefer the same-origin module:
/plugins/axis-pine-agent.js
Remote (needs CORS on the agent Worker):
https://pyne-agent-worker.cryptolinx.workers.dev/plugin/axis-pine-agent.js
- Configure plugin fields:
| Field | Meaning |
|---|---|
endpoint | Agent Worker origin (no trailing slash) — not the AXIS page origin |
apiKey | Worker API_KEY (optional in open local mode) |
pineVersion | auto | v5 | v6 |
style | auto | indicator | strategy | library |
persona | auto | pine (coder) | axis (app guide + operator — changes the app via MCP) | trader (market analysis, risk, psychology) |
pyneBackend | auto | pro | local | worker | container | none — named PYNE host for parse/lint/eval (kind only, never a URL) |
Plugin 0.1.9 always POSTs orchestrate: true (Grandmaster tool loop). Sync the vendored same-origin copy with bun run sync:pyne-agent-plugin from the AXIS repo.
- Open the Agent panel from the module-bar AI button. Command palette “Toggle Agent”, Extras, and the mobile Panels sheet do the same. The plugin fills the panel body. AXIS owns the title, dock, and close.
Component URL load is enabled (AXIS 2.0.x): loadPluginFromUrl accepts kind: 'component', registers via registry.registerComponent, and runs optional init({ getConfig }).
Contract namespace remains pynescript.axis.plugins.v1. Export shape: default ES module with kind: 'component', slots, mount, optional init/dispose.
See also: Dynamic loader, Plugin examples, end-user guide PYNE Agent, Workers Manager.
Standalone vs HOOX
| Mode | Config | Behavior |
|---|---|---|
| Standalone (default) | No PYNE_SERVICE / PYNE_WORKER_URL on the worker | Chat + optional RAG; validation.skipped |
| HOOX-enhanced | Agent PYNE_SERVICE / PYNE_WORKER_URL → pyne-worker 0.10.0+ | staged parse → lint → eval (/ast/* + /run) |
AXIS users who only want natural-language script authoring never need to deploy pyne-worker.
API surface (worker)
| Method | Path | Role |
|---|---|---|
GET | /health | mode: standalone | hoox |
POST | /v1/chat | NL → reply + extracted pine |
GET | /plugin/axis-pine-agent.js | This plugin module |
GET | / | Built-in chat shell (iframe / demo) |
Auth: X-API-Key or Authorization: Bearer when the worker secret is set.
Legal / content
- The agent repo never ships TradingView® built-in indicator sources.
- Knowledge (docs v5/v6, open corpus ≤ 1000, operator builtin refs) is ingested privately into R2 + Vectorize™.
- Always treat marks: Pine Script™, TradingView®, Cloudflare®.
Failure modes
| Symptom | Likely cause |
|---|---|
Plugin load fails (kind: component) | CORS / mixed content on module URL; verify HTTPS and that AXIS is current (component URL load is supported) |
| 401 on chat | Missing/wrong apiKey vs worker API_KEY |
| Empty RAG quality | KB not ingested; chat still works with model knowledge only |
validation.available: false | Expected in standalone — not an error |