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.

Repohoox-sh/pyne-agent-worker
Plugin moduleAXIS ships /plugins/axis-pine-agent.js; remote GET /plugin/axis-pine-agent.js on the agent Worker
APIPOST /v1/chat
StandaloneWorkers AI™ only — no pyne-worker / HOOX mesh required
Optionalpyne-worker 0.10.0+ staged parse→lint→eval (/ast/* + /run) when configured
Plugin0.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

Diagram

Rendering…

Install in AXIS

  1. Deploy pyne-agent-worker (standalone is enough) for the API endpoint.
  2. AXIS → Manager → Plugins → Install from URL — prefer the same-origin module:
text
/plugins/axis-pine-agent.js

Remote (needs CORS on the agent Worker):

text
https://pyne-agent-worker.cryptolinx.workers.dev/plugin/axis-pine-agent.js
  1. Configure plugin fields:
FieldMeaning
endpointAgent Worker origin (no trailing slash) — not the AXIS page origin
apiKeyWorker API_KEY (optional in open local mode)
pineVersionauto | v5 | v6
styleauto | indicator | strategy | library
personaauto | pine (coder) | axis (app guide + operator — changes the app via MCP) | trader (market analysis, risk, psychology)
pyneBackendauto | 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.

  1. 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

ModeConfigBehavior
Standalone (default)No PYNE_SERVICE / PYNE_WORKER_URL on the workerChat + optional RAG; validation.skipped
HOOX-enhancedAgent 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)

MethodPathRole
GET/healthmode: standalone | hoox
POST/v1/chatNL → reply + extracted pine
GET/plugin/axis-pine-agent.jsThis 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

SymptomLikely 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 chatMissing/wrong apiKey vs worker API_KEY
Empty RAG qualityKB not ingested; chat still works with model knowledge only
validation.available: falseExpected in standalone — not an error

See also