> Every Taji docs page as Markdown: https://docs.taji.is/llms.txt # What is Taji Taji is the open source operating system for trading, built for you and your agent. It is free, runs on your machine, and works over the brokerages, data providers and AI subscription you already have. This page lists what it can do today; the [quickstart](https://docs.taji.is/guide/first-session.md) puts a chart on your screen with no account and no key. ## What can Taji do? No fixed layout, no fixed data source, no fixed toolset, and one API under all of it that the window, your agent and your scripts share. - **No fixed layout.** You build each desk from any panes in any arrangement and save it as a layout, and a plugin adds a pane or a chart layer of your own ([Desks and panes](https://docs.taji.is/guide/desks.md), [Write a pane](https://docs.taji.is/plugins/pane.md), [Draw a chart layer](https://docs.taji.is/plugins/layer.md)). - **No fixed data source.** You link any brokerage or vendor Taji has a plugin for, and any data of your own, a feed, a file or a database, comes in as a plugin ([Add a data source](https://docs.taji.is/plugins/source.md), [Write a compiled-in provider](https://docs.taji.is/plugins/provider.md), [Chart your own CSV](https://docs.taji.is/cookbook/python-csv-source.md)). - **No fixed toolset.** You add indicators, plugins whose verbs your agent calls as tools, and channels that reach you where you are ([Indicators](https://docs.taji.is/indicators.md), [Your first plugin](https://docs.taji.is/plugins/first-plugin.md), [Write a channel](https://docs.taji.is/plugins/channel.md)). - **One API for every client.** Every piece of data and every action in Taji is a route on one local API, and the window, your agent, your phone and your scripts call the same routes. Nothing the window shows or does is closed to your agent or your code; only the token's scope differs, so your agent cannot open the vault or approve its own live order ([The Taji API](https://docs.taji.is/api.md), [API reference](https://docs.taji.is/wire.json)). [Fit Taji to your workflow](https://docs.taji.is/guide/fit-your-workflow.md) builds one such setup, step by step, from a layout, a data source of your own, a plugin's pane and an indicator. Coming from TradingView, [Taji vs TradingView and Pine Script](https://docs.taji.is/guide/tradingview.md) sets the two side by side. ### Customizable Your desk is yours to build: every pane, layout, chart and key. - **Desks.** A desk is one directory per line of work, holding its instructions, notes, documents and layouts, and it outlives every conversation ([Desks and panes](https://docs.taji.is/guide/desks.md)). - **Panes.** Chart, ladder, option chain, positions and orders, watchlist, alerts, screener, calendar, news, financials, filings, notes and your agent's conversation, dragged, resized, stacked as tabs or popped out. - **Layouts.** A desk keeps named layouts, and you switch between them. - **Chart styles.** Candles, Heikin Ashi, Renko, Kagi, line break, point and figure, range bars and more, at any interval you define ([Chart](https://docs.taji.is/catalog/chart.md)). - **Drawings.** Trendlines, channels, Fibonacci and Gann tools, pitchforks, Elliott waves, patterns, anchored VWAP and volume profiles; your agent reads each one and an alert can ride it. - **A source per chart.** Each chart names its source, and you can pin one. - **Hotkeys.** You rebind them, and `⌘/` lists them. - **Watchlists and notes.** Lists with sections and flags, and notes kept per symbol. - **All of it over the wire.** Whatever you arrange by hand, your agent or a script arranges too ([Desks and panes](https://docs.taji.is/guide/desks.md#lay-out-a-desk-over-the-wire)). ### Extensible Everything Taji does beyond its core is a plugin, the chart included, and a plugin you write is driven like Taji's own. - **A backend.** A plugin adds verbs your agent calls as tools, nodes it reads, data sources and data products of its own ([Plugins](https://docs.taji.is/plugins.md)). - **Views.** It adds panes to Taji's window and layers drawn on the chart from its own products ([Write a pane](https://docs.taji.is/plugins/pane.md), [Draw a chart layer](https://docs.taji.is/plugins/layer.md)). - **Indicators of its own.** A plugin ships script indicators that bind to a chart like any other ([Your first plugin](https://docs.taji.is/plugins/first-plugin.md)). - **Python, Rust or any language.** Taji's SDKs are Python and Rust, and any program that speaks JSON lines over stdio is a plugin ([Protocol](https://docs.taji.is/plugins/protocol.md)). - **One loop to build it.** `taji plugin new` scaffolds a plugin, `taji plugin check` runs its fixtures and `taji plugin dev` plays it on a throwaway kernel. - **Published by you.** You pack a plugin into a registry you sign; Taji installs it by its consent digest and updates or removes it while it runs ([Publish a plugin](https://docs.taji.is/plugins/publish.md)). There is no hosted registry, and installing from one needs a debug kernel and your own signed registry. - **What ships as plugins.** Every brokerage, data source, pane, channel and voice, and four features: [GEX](https://docs.taji.is/catalog/taji-gex.md) for dealer gamma, [Order flow](https://docs.taji.is/catalog/taji-orderflow.md), [Dark pool](https://docs.taji.is/catalog/taji-darkpool.md) for off-exchange prints and a [Sector heatmap](https://docs.taji.is/catalog/taji-sectors.md). The four features are built from a source checkout; the packaged app does not carry them and no registry serves them. ### Open Taji is free and open source, and it runs on your machine with no account, no subscription and no telemetry. - **Apache-2.0 throughout.** [LICENSING.md](https://github.com/TajiAI/Taji/blob/main/LICENSING.md) names the third-party files. - **No language of its own.** An indicator is TypeScript, and a plugin is Python or Rust. - **One API, published.** Every route the window uses is yours too, described as OpenAPI 3.1: `GET /read/routes` lists them and `GET /read/openapi` describes them ([API reference](https://docs.taji.is/wire.json), [Wire](https://docs.taji.is/reference/wire.md)). - **A published plugin contract.** The manifest and every message are one schema, versioned by stated rules ([Compatibility](https://docs.taji.is/reference/compatibility.md)). - **Your services, at their prices.** You bring your brokerages, data providers and AI subscription and pay them directly; Taji adds no fee and resells no AI ([0002](https://github.com/TajiAI/Taji/blob/main/docs/decisions/0002-taji-embeds-no-model.md)). - **Your files.** The bars you fetch live in a store on your machine, and a desk is a directory you can read ([Data](https://docs.taji.is/architecture/data.md#where-are-the-rows-kept)). ### AI-native Your agent has programmatic access to every piece of data and every capability Taji has: nine MCP tools cover every route of the wire. - **Deep backtests.** It runs a rule as an indicator over every bar the chart holds, and reads any span as of a past instant, which refuses a look ahead ([Backtest a 200-day reclaim](https://docs.taji.is/cookbook/backtest-200-day-reclaim.md), [Data](https://docs.taji.is/architecture/data.md#what-can-a-read-see-at-an-instant)). - **Advanced signals, indicators and tools.** It writes an indicator from one sentence, has the kernel check it and binds it to your chart, and it builds a plugin with Taji's docs at hand, then calls its verbs as tools ([Have your agent write an indicator](https://docs.taji.is/cookbook/agent-writes-an-indicator.md), [Your first plugin](https://docs.taji.is/plugins/first-plugin.md)). - **Real-time assistance.** It reads your charts, panes and live quotes as you trade, and answers by voice or by message ([Connect your agent](https://docs.taji.is/guide/agent.md)). - **The agent you already run.** Claude Code, Codex, Cursor, Antigravity, Grok or Muse, on your own sign-in and the model you chose; Taji ships no model ([Connect your agent](https://docs.taji.is/guide/agent.md)). - **It sees your chart.** It reads where your crosshair rests, what you selected, every pane, and the bars as typed rows. - **It works on your chart.** It points, draws, changes the symbol and interval, adds an indicator or writes a new one, and you watch it happen. - **It trades with your yes.** It stages and places orders, and a live one waits for your approval ([0008](https://github.com/TajiAI/Taji/blob/main/docs/decisions/0008-live-orders-wait-for-approval.md)). - **Talk to it.** Press `⌘⇧V` and ask out loud, on your own OpenAI or Gemini key ([Talk to your agent](https://docs.taji.is/ai/voice.md)). - **Message it.** From Discord, Slack, iMessage or WhatsApp it answers with the figure, or a picture of the chart ([Reach your agent from your phone](https://docs.taji.is/ai/phone.md)). - **It works with the window closed.** The kernel runs headless, and your agent's first call starts it. - **Docs it can read.** Every page is Markdown at its own URL ([Give your agent the docs](https://docs.taji.is/ai/docs-for-agents.md)). ### Fast One Rust kernel computes each figure once and serves it to every client. - **Rust where it counts.** The kernel is one Rust process, and its 106 built-in indicators are compiled into it. - **Computed once.** Charts and alerts that share a definition, inputs and series share one instance, so the window, your agent and an alert never show two numbers for one figure ([Execution](https://docs.taji.is/indicators/execution.md#who-shares-a-computation), [0001](https://github.com/TajiAI/Taji/blob/main/docs/decisions/0001-kernel-computes.md)). - **A tick costs one bar.** A live update advances the forming bar from the last close's state and never reruns the history. - **Scripts on a budget.** Your indicator has 50 ms of CPU for a tick or a close and one second for a whole history; past it, that script faults alone ([Execution](https://docs.taji.is/indicators/execution.md#how-long-may-a-script-run)). - **Compiled primitives.** A script's `ta` functions are the built-ins' own Rust, compiled to WebAssembly ([The indicator SDK](https://docs.taji.is/indicators/sdk.md#why-typescript)). - **Timed on every write.** A write's report carries the run's time over 1,024 fixture bars; the captured reports on [Execution](https://docs.taji.is/indicators/execution.md#what-does-a-write-check) read about 3 ms. - **Your store answers first.** A read comes from the store on your machine, and a provider is asked only for the span the store lacks ([Data](https://docs.taji.is/architecture/data.md)). - **One feed, every consumer.** One upstream per provider, product, symbol and timeframe fans out to everything in the kernel that reads it. - **Rows, not text.** Market data crosses the wire as Arrow ([Architecture](https://docs.taji.is/architecture/overview.md)). ### Private and secure Nothing leaves your machine except toward what you link, and your agent never holds a key. - **Local only.** There is no Taji account, telemetry, analytics or crash reporting, and no Taji server receives your keys, accounts or orders; [Security](https://docs.taji.is/architecture/security.md#what-does-taji-contact-before-you-link-a-key) names what a keyless Taji contacts. - **A vault on your device.** Each key is sealed there and goes only to its own vendor, never to your agent, the window's page or a plugin ([0005](https://github.com/TajiAI/Taji/blob/main/docs/decisions/0005-no-key-reaches-a-client.md)). - **Approvals.** A live order from your agent parks until you approve it, and only your hand in the window turns that off. - **Paper and live never mix.** A live account refuses an order that does not say it is live, and a paper or simulated account refuses one that does ([Orders](https://docs.taji.is/architecture/orders.md)). - **Scoped tokens.** Your agent's token cannot open the vault, install a plugin or switch approvals off ([Bound your agent](https://docs.taji.is/guide/agent.md#bound-your-agent)). - **Sandboxed plugins.** A process plugin runs in the OS sandbox, reaches only the hosts its manifest grants and signs in without seeing your key ([Security](https://docs.taji.is/architecture/security.md#what-stops-a-process-plugin)). - **Your phone, by passkey.** Remote Control pairs a phone by passkey and opens with Face ID, with nothing installed on the phone ([Tailscale](https://docs.taji.is/catalog/tailscale.md)). - **Stated limits.** Security lists [what Taji does not protect yet](https://docs.taji.is/architecture/security.md#what-does-taji-not-protect-yet). ### Your data and accounts Every source and account you link reads as one, any data of your own joins them as a plugin, and what you fetch is yours to keep. - **Nothing to link on day one.** A first run charts Yahoo Finance's delayed bars, quotes and option chains, Cboe's index history and SEC filings with no key. - **Your brokerages.** Alpaca, Interactive Brokers, Robinhood, Schwab, TradeStation and Tradovate accounts link, each with the data it includes. - **Your data providers.** Databento, Massive and FRED keys link the same way. - **Read as one.** Bars, quotes, depth, trades, option chains, news, corporate actions, earnings, fundamentals, filings, insider trades, fund holdings and economic releases are each one product whatever the source, so nothing changes when you switch provider ([0004](https://github.com/TajiAI/Taji/blob/main/docs/decisions/0004-capabilities-through-the-hub.md)); [Coverage](https://docs.taji.is/reference/coverage.md) says who serves what, and [Read market data](https://docs.taji.is/guide/market-data.md) shows each call. - **Fetched once.** Every bar you fetch is stored on your machine, and a metered read is priced first and held to the budget you set ([Data](https://docs.taji.is/architecture/data.md#when-does-a-read-spend-money)). - **As of any date.** A read at a past instant returns only what was knowable then and refuses a look ahead, so a backtest cannot see its future ([Data](https://docs.taji.is/architecture/data.md#what-can-a-read-see-at-an-instant)). - **Any data of your own.** Any feed, file or database you can read becomes a data source as a plugin: a few lines of Python serve its rows, and Taji charts them and hands them to your agent like a vendor's ([Chart your own CSV](https://docs.taji.is/cookbook/python-csv-source.md), [Add a data source](https://docs.taji.is/plugins/source.md)). - **One book.** Positions, orders and fills across every linked account sit in one place ([Trade](https://docs.taji.is/guide/trading.md)). - **Trade from the ticket, the chart or the ladder.** Orders and their exits are lines you drag, and the option chain builds and finds strategies ([Options](https://docs.taji.is/catalog/options.md)). - **Where orders go.** Alpaca, Interactive Brokers, TradeStation and Tradovate take your orders today, and an order that names no account goes where a stated rule sends it ([Orders](https://docs.taji.is/architecture/orders.md#which-account-does-an-order-go-to)); Coverage lists each order type by brokerage and class. - **A simulated broker.** `taji_sim` takes equities, options, futures and crypto orders with no key, and none leaves your machine. ### Indicators Taji has 106 indicators built in, and your agent writes the next one in TypeScript. - **Built in.** 106 indicators in compiled Rust: moving averages, momentum, volatility, trend, volume and session ([Indicators](https://docs.taji.is/indicators.md)). - **Your own.** A TypeScript module your agent writes from a prompt; you review the file and add it to a chart ([Your first indicator](https://docs.taji.is/indicators/first-indicator.md)). - **Checked on every write.** The kernel compiles it, holds it to three invariants and runs its tests; a failure names the line and column and stores nothing. - **The same live as on reload.** A value never depends on when computing began, and a script cannot look ahead ([Execution](https://docs.taji.is/indicators/execution.md)). - **The whole market as input.** Other intervals and symbols, intrabars, dividends, splits, earnings, the tape, quotes and any plugin's product, the order book and option chains included ([Inputs](https://docs.taji.is/indicators/inputs.md)). - **More than lines.** Plots, fills, lines, labels, boxes and a table or card ([Outputs](https://docs.taji.is/indicators/outputs.md)). - **Versioned.** Every write is an immutable `name@N`; a chart follows the latest or pins one, and an alert pins the one it was made with. - **No daily count.** Writes, checks and tests run on your machine, as many as your agent makes. - **From Pine.** Your agent ports a Pine indicator and reads the last values back for you to compare ([Taji indicators and plugins vs Pine Script](https://docs.taji.is/indicators/pine.md)). ### Automation Taji watches the market and carries out what you set while you do something else; it never originates a trade. - **Alerts.** On a price, a move, a drawing or any indicator's plot, with conditions joined by `and`, once or every time ([Set an alert](https://docs.taji.is/guide/alerts.md)). - **Wherever you are.** Every alert, fill, exit, rejection and approval reaches Discord, Slack, iMessage, WhatsApp or your own webhook. - **Exits.** An order carries a take profit and a stop, and Taji holds the exits no venue will hold, such as a stop on another symbol, working them while it runs ([Orders](https://docs.taji.is/architecture/orders.md#which-exits-does-taji-hold-itself)). - **Your agent on a task.** It waits for a change instead of polling, works with the window closed, and its live orders wait for you, in the window or on your paired phone. - **Scripts.** Anything the window does is a wire call: read bars with `curl`, or stream quotes over a WebSocket ([Read bars over the wire](https://docs.taji.is/cookbook/wire-read-bars.md), [Stream live quotes](https://docs.taji.is/cookbook/wire-stream-quotes.md)). ## How do the pieces fit? ```mermaid flowchart LR you["You"] --> win["Window"] agent["Your agent"] -->|"MCP"| mcp["MCP bridge"] win -->|"API"| kern["Kernel"] mcp -->|"API"| kern scripts["Your scripts"] -->|"API"| kern kern --> hub["Hub"] hub <--> store[("Store")] sources["Data sources"] --> hub kern <-->|"orders"| brokers["Brokerages"] kern <-->|"stdio"| proc["Process plugins"] ``` Read it from the left. You work in the window, your agent works through Taji's MCP bridge, and your scripts call the kernel directly; all three reach it over the same API on one loopback wire, each request carrying a token the kernel mints at launch. Market data reaches the kernel only through the hub, which keeps what it reads in a store on your machine. Brokerages take your orders. Process plugins run beside the kernel, each in the OS sandbox, and speak to it over stdio. [Architecture](https://docs.taji.is/architecture/overview.md) draws every process and interface. ## Who is Taji for? Taji is for someone who trades with their own money and their own agent (Claude Code, Codex and the like) and has limited attention for markets. At one end that is a person with a day job and a few minutes at a time; at the other, an intraday trader at the screen by choice. Both own every step alone: research, building the trade, executing it. What does not fit their attention gets decided by feel. ## What will Taji not do without you? Taji trusts you; it does not trust your agent. Three rules follow from that. - **A live order from your agent waits for you.** While an account's approvals are on, your agent's order parks until you approve it in the window. Approvals are on by default for a live account and off for paper and sim. Only a hand in the window turns them off, because your click is the consent ([0008](https://github.com/TajiAI/Taji/blob/main/docs/decisions/0008-live-orders-wait-for-approval.md)). - **An order says which side of the line it is on.** A live account refuses an order that does not say it is live, and a paper or simulated account refuses one that does. A test order cannot reach real money by mistake ([Orders](https://docs.taji.is/architecture/orders.md)). - **Your agent never sees a key.** You type a key into the window's link sheet or `taji-link` in a terminal; it is sealed in your vault and goes only to its vendor ([0005](https://github.com/TajiAI/Taji/blob/main/docs/decisions/0005-no-key-reaches-a-client.md), [Security](https://docs.taji.is/architecture/security.md)). Taji also embeds no model and resells no AI. Voice aside, it calls no model API: the agent and its model are yours ([0002](https://github.com/TajiAI/Taji/blob/main/docs/decisions/0002-taji-embeds-no-model.md)). ## What is Taji not? - **Not a robo-advisor.** It has no model portfolio and no rebalance to target; you design and approve every plan. - **Not an autonomous trading bot.** Taji sends your orders, your agent's orders under the approvals you set, and the exits you arm. It never originates a trade of its own. - **Not a stock-picking newsletter, a signal service, a portfolio dashboard or a social trading platform.** - **Not a behavioural-coaching layer.** It reads no emotion and models no state of mind. - **Not a financial advisor.** It is not a fiduciary and not a registered investment adviser. - **Not an AI vendor.** ## What needs a key, and what does not? A first run needs no account and no key. The kernel makes `taji_sim`, a simulated broker for equities, options, futures and crypto, and turns on three keyless data sources: Yahoo Finance, Cboe and SEC EDGAR. Keyless data is delayed, and Yahoo Finance streams no bars, so a keyless chart reads **Not live**. Taji reads Yahoo Finance by automated access its terms forbid; the first run says so, and Connections turns it off. A key is needed for a brokerage account, a paid data vendor such as Databento or Massive, or voice. Each key is sealed in the vault on your device and goes only to its own vendor ([Security](https://docs.taji.is/architecture/security.md)). The window's conversation needs your agent platform installed and signed in. ## Where does Taji run? On macOS on Apple Silicon. Windows is a preview, and Linux builds from source ([Build from source](https://docs.taji.is/guide/install.md)). ## See also - [Manifesto](https://docs.taji.is/manifesto.md): why we built Taji and where we are taking it. - [Architecture](https://docs.taji.is/architecture/overview.md): each process, how it reaches the kernel, what each token is refused, and the platforms it runs on. - [Decisions](https://github.com/TajiAI/Taji/blob/main/docs/decisions/README.md): why each rule stands. - [Glossary](https://docs.taji.is/reference/glossary.md): the locked nouns. > Every Taji docs page as Markdown: https://docs.taji.is/llms.txt # Install the app You will have Taji installed as an app with its window open, the download checked against the release's signatures, and the way to update and remove it. You need macOS 26 or later on Apple Silicon, or Windows 11 24H2, build 26100.9278 or later (x64), where [KB5120998](https://support.microsoft.com/en-us/servicing/os/windows-11/2026/08/kb5120998-windows-11-24h2-25h2-update)'s gradual rollout has reached the machine: without it, Taji runs but refuses every process plugin and Python source, so Yahoo's keyless data and EDGAR are unavailable. On Linux, or to build it yourself, use [Build from source](https://docs.taji.is/guide/install.md). ## Download 1. Open this repository's GitHub Releases and download the latest release's signed `.dmg` (macOS) or `.exe` (Windows). No sign-in is asked. ## Open it 1. On macOS, open the `.dmg`, drag Taji onto Applications and open it. macOS asks you to confirm an app downloaded from the internet: choose Open. If it says it cannot verify Taji, stop and [verify the download](#verify-the-download). 2. On Windows, if Edge says the download isn't commonly downloaded, open its **…** in the downloads panel, **Keep**, then **Show more** › **Keep anyway**. Run the `.exe`. It installs for you alone in `%LOCALAPPDATA%\Programs\Taji`, needs no administrator and opens Taji. 3. A new signature has no SmartScreen reputation yet, so SmartScreen can warn that Taji is an unrecognized app and shows the publisher's name. Choose More info, check the name against `Get-AuthenticodeSignature` in [step 5 below](#verify-the-download), then Run anyway. The warning fades as clean installs accumulate. The first run needs no account and no key: [Quickstart: your first session](https://docs.taji.is/guide/first-session.md). Agent conversations in the window with Claude Code or Codex need Node 22 or later and `npm` on your `PATH`; on Windows, Codex also needs Developer Mode, and Taji says where to turn it on. ## Verify the download Each release holds six files: `taji-.tar.gz` and its `.sig`, the `.dmg`, the `.exe`, `SHA256SUMS` and `SHA256SUMS.sig`. Put the ones you downloaded in one folder. 1. Check the checksums list. `SHA256SUMS.sig` is signed with the release key, in a clone of this repository (or with `.github/allowed_signers` downloaded): ```sh tab={"label":"macOS and Linux"} # macOS and Linux ssh-keygen -Y verify -f .github/allowed_signers -I taji-release -n file -s SHA256SUMS.sig < SHA256SUMS ``` ```powershell tab={"label":"Windows"} # Windows: PowerShell has no `<` cmd /c "ssh-keygen -Y verify -f .github/allowed_signers -I taji-release -n file -s SHA256SUMS.sig < SHA256SUMS" ``` 2. Check each file against it, under the name the release gives it: rename a download your browser renamed. ```sh tab={"label":"macOS and Linux"} # macOS and Linux: fails on a file that is missing grep -F ' ' SHA256SUMS | shasum -a 256 -c - ``` ```powershell tab={"label":"Windows"} # Windows: prints True when the hash matches that file's line in SHA256SUMS (Get-FileHash .\).Hash -ieq (Select-String -SimpleMatch ' ' SHA256SUMS).Line.Split(' ')[0] ``` 3. Check that the installer is the release's asset, which GitHub checks: ```sh gh release verify-asset v -R TajiAI/Taji ``` 4. Check that GitHub built the installer from this repository's release workflow at the release's tag: ```sh gh attestation verify -R TajiAI/Taji --signer-workflow TajiAI/Taji/.github/workflows/release.yml --source-ref refs/tags/v ``` Release installers are attested rather than byte-for-byte reproducible: verify this provenance attestation and the signatures above rather than comparing local rebuilds. 5. Check the installer's signer. On macOS, after installing, `codesign -dvv /Applications/Taji.app` names `Developer ID Application: Kevin Chun (GLN225WYE5)`, Team ID `GLN225WYE5`. On Windows, `Status` reads `Valid` and `SignerCertificate.Subject` names the publisher SmartScreen showed: ```sh tab={"label":"macOS"} # macOS codesign --verify --deep --strict --verbose=2 /Applications/Taji.app spctl -a -vv /Applications/Taji.app ``` ```powershell tab={"label":"Windows"} # Windows Get-AuthenticodeSignature .\ | Format-List Status, SignerCertificate ``` 6. Check the source tarball, in a clone of this repository: ```sh ssh-keygen -Y verify -f .github/allowed_signers -I taji-release -n file -s .sig < ``` ## Update At launch and once a day the app asks GitHub's latest-release API for this repository for the latest version. The ask is a bare GET that sends nothing about you, and it installs nothing. 1. Look at the top bar. When a newer release is out it shows `Taji is out.`; install that release as above. 2. To turn the ask off, set `TAJI_NO_UPDATE_CHECK=1` when you start Taji from a terminal. For a Finder or Start-menu launch, quit Taji and set `"update_url": ""` in `settings.json` in the state dir [below](#find-your-data). If you edit `settings.json` by hand and it does not parse, the kernel moves it to `settings.json.bad` and starts with empty settings. The wire gives the same answer: `GET /read/update` is `{"version": ""}` while a newer release exists, else `null`. A source build has no update page, so it answers `null`: ```json file="examples/app/update.json" title="update.json" null ``` *Captured 2026-12-03 on a keyless headless kernel.* Each launch records its version in `version` inside the state dir and refuses to start on a state dir stamped by a newer release. ## Find your data | OS | State (vault, desks, settings, logs) | |---|---| | macOS | `~/Library/Application Support/Taji` | | Linux | `~/.local/share/taji` | | Windows | `%LOCALAPPDATA%\Taji` | The market data store is `~/.local/share/taji/store` on macOS and Linux (an absolute `$XDG_DATA_HOME` replaces `~/.local/share` on Linux), and `%LOCALAPPDATA%\Taji\store` on Windows. Taji's home, `~/.taji` (`%USERPROFILE%\.taji` on Windows), holds what the app lays out at boot. [Configuration](https://docs.taji.is/reference/configuration.md) lists the files. ## Uninstall 1. While Taji runs, sign out of Tailscale, unlink your channels (WhatsApp's unlink also signs the device out of your phone, while it is reachable) and revoke each brokerage's grant for Taji: nothing runs after you uninstall, and what you granted stays granted at the other end. Unlinking a brokerage deletes its sealed credential here and asks the brokerage to revoke the sign-in where it offers that (TradeStation does, and ends every refresh token of that API key); where it does not, or Taji could not reach it, revoke the grant in the brokerage's own settings. 2. Quit Taji from its tray item, then stop a headless kernel an agent started: ```sh tab={"label":"macOS"} # macOS /Applications/Taji.app/Contents/Resources/bin/taji quit ``` ```powershell tab={"label":"Windows"} # Windows & "$env:LOCALAPPDATA\Programs\Taji\resources\bin\taji.exe" quit ``` 3. Remove it from your agent apps. Windows's uninstaller does this itself, so Windows needs no command: ```sh tab={"label":"macOS"} # macOS /Applications/Taji.app/Contents/Resources/bin/taji-register remove ``` 4. On macOS, drag Taji from Applications to the Trash. On Windows, open Settings › Apps › Taji › Uninstall. 5. To remove your data too, delete the state dir and the store in the table above, `~/.taji` and the `taji-agent` folder beside the state dir (`~/Library/Application Support/taji-agent` on macOS, `~/.local/share/taji-agent` on Linux, `%LOCALAPPDATA%\taji-agent` on Windows). They hold your vault and desks: nothing recovers them. Claude Code keeps each Agent chat's session in its own `~/.claude`: delete it there if you want it gone. ## If it fails - **macOS says it cannot verify Taji.** Stop and [verify the download](#verify-the-download): the checks say whether it is the release's. - **`no sandbox: needs Windows' process isolation, …: run Windows Update` on every process plugin and Python source (Windows).** The build is below 24H2 build 26100.9278 or KB5120998's rollout has not reached the machine. Run Windows Update; nothing runs unconfined meanwhile. ## Next - [Quickstart: your first session](https://docs.taji.is/guide/first-session.md) opens a chart and fills a simulated order. - [Connect your agent](https://docs.taji.is/guide/agent.md) registers Taji with your agent. - [Build from source](https://docs.taji.is/guide/install.md) is the route on Linux. > Every Taji docs page as Markdown: https://docs.taji.is/llms.txt # Quickstart: your first session You will have a daily chart of `equity:SPY`, a simulated order filled on it, your agent reading that order back, and a sealed vault ready for a provider's key. It needs no account and no key. You need a Mac, a Windows PC or a Linux machine with the network, and, for step 4, Claude Code or Codex signed in. ## 1. Install and open Taji Install the app ([Install the app](https://docs.taji.is/guide/app.md)), or build it from source ([Build from source](https://docs.taji.is/guide/install.md)) and run `make dev` at the repository root. Open Taji. The window opens on the welcome. Click **Get started**. - The kernel, `taji`, has started on your machine: one process that owns your desks, accounts, orders and market data. The window is one of its clients. - On first boot it made `taji_sim`, a simulated broker inside the kernel for equities, options, futures and crypto, with no key and no vendor. ## 2. Open the chart **Link your first provider** lists what you can link. Its foot reads `SEC EDGAR and Yahoo Finance on, no key needed.`, then Yahoo's terms: they do not permit automated access, which is how Taji reads Yahoo Finance. Click **Continue to Taji**. The desk opens on a daily chart of `equity:SPY` from Yahoo Finance. The picture below was captured on a made-up series, so its prices and its source tag differ from yours: ![A daily candlestick chart of a made-up SPY series with volume, labelled CSV source](https://raw.githubusercontent.com/TajiAI/Taji/main/docs/guide/examples/first-chart/shot.png) The chart draws bars the kernel serves. Its newest five, as the kernel answers `GET /get/bars?symbols=equity:SPY&timeframe=D&limit=5`: ```json file="examples/first-chart/bars.json" title="bars.json" [ { "symbol": "SPY", "provider": "csv-source", "start_dt": "2026-11-27T00:00:00+00:00", "knowable": "2026-11-27T18:00:00+00:00", "open": 139.47, "high": 139.58, "low": 139.38, "close": 139.51, "volume": 2400000, "vwap": null, "trade_count": null, "up_volume": null, "down_volume": null }, { "symbol": "SPY", "provider": "csv-source", "start_dt": "2026-11-30T00:00:00+00:00", "knowable": "2026-11-30T21:00:00+00:00", "open": 139.56, "high": 140.04, "low": 138.89, "close": 139.93, "volume": 4000000, "vwap": null, "trade_count": null, "up_volume": null, "down_volume": null }, { "symbol": "SPY", "provider": "csv-source", "start_dt": "2026-12-01T00:00:00+00:00", "knowable": "2026-12-01T21:00:00+00:00", "open": 139.8, "high": 140.71, "low": 139.01, "close": 140.42, "volume": 4400000, "vwap": null, "trade_count": null, "up_volume": null, "down_volume": null }, { "symbol": "SPY", "provider": "csv-source", "start_dt": "2026-12-02T00:00:00+00:00", "knowable": "2026-12-02T21:00:00+00:00", "open": 140.84, "high": 141.21, "low": 140.78, "close": 141.19, "volume": 4500000, "vwap": null, "trade_count": null, "up_volume": null, "down_volume": null }, { "symbol": "SPY", "provider": "csv-source", "start_dt": "2026-12-03T00:00:00+00:00", "knowable": "2026-12-03T21:00:00+00:00", "open": 141.45, "high": 143.43, "low": 141.23, "close": 142.62, "volume": 5000000, "vwap": null, "trade_count": null, "up_volume": null, "down_volume": null } ] ``` *Captured 2026-12-04 on a headless kernel reading a made-up daily series for SPY: your chart shows the market on your date.* - With no key, the kernel reads three data sources: | Source | Serves | Reaches | |---|---|---| | Yahoo Finance | Bars, delayed quotes, option chains, fundamentals, earnings, movers, economic calendar | `HOSTS` in `plugins/yahoo/src/lib.rs` | | Cboe | Daily history of SPX, VIX, VIX1D and VVIX (`index_daily`) | `cdn-api.cboe.com` | | SEC EDGAR | Filings, financial statements, insider trades, fund holdings | `data.sec.gov`, `www.sec.gov`, `efts.sec.gov` | - Yahoo Finance is contacted at boot; SEC EDGAR and Cboe only when a read asks. Uncached symbol logos come from `logos.taji.is` (`TAJI_LOGO_URL=` turns them off). To turn a source off, set `{"data.": false}` in `/settings.json` ([Configuration](https://docs.taji.is/reference/configuration.md), [Security](https://docs.taji.is/architecture/security.md)). ## 3. Place a simulated order Press `⇧T` anywhere outside a text field. The ticket opens on the chart's symbol, on a market buy, and the book chip in the top bar names the account it goes to, `taji_sim`. Set **Shares** to 1 and press **Buy**. The ticket stages the order as the account's draft, then places that draft by its revision. The kernel's answers: ```json file="examples/first-session/stage.json" title="stage.json" { "node": "trading/taji_sim/draft", "rev": "01a24252-797d-7263-8cb3-f5bb48bce12a" } ``` ```json file="examples/first-session/place.json" title="place.json" { "node": "trading/taji_sim/draft", "intent_id": "01a24252-7a6c-7261-a3a1-f945557b1f3a" } ``` **Positions and orders** shows the order. It is the newest row of `GET /read/trading/taji_sim/orders?limit=1`: ```json file="examples/first-session/order.json" title="order.json" { "rows": [ { "account": "taji_sim", "acked_utc": 1796409031, "adopted": false, "answer": "PLACED BUY MKT 142.62", "at_utc": 1796409031, "avg_fill_price": null, "chase": null, "ended": null, "ended_utc": null, "exits": null, "fees": null, "filled_qty": "0", "held": null, "intent": { "account": "taji_sim", "intent_id": "01a24252-7a6c-7261-a3a1-f945557b1f3a", "kind": { "Order": { "entry": "Market", "instrument": { "Equity": { "symbol": "SPY" } }, "qty": "1", "side": "Buy", "tif": "Day" } }, "ref_price": "142.62", "ref_price_asof": "2026-12-04T00:00:00Z", "source": "Human" }, "intent_id": "01a24252-7a6c-7261-a3a1-f945557b1f3a", "item": "equity:SPY", "limit_now": null, "line_state": "WORKING", "live": false, "price_now": null, "replaced_utc": [], "resting_qty": "1", "route_why": null, "state": "Acked", "stop_now": null, "successor": null, "why": null } ], "rows_total": 1 } ``` *Captured 2026-12-04 on a headless kernel.* - A market buy fills at the ask standing when it arrives, else at the first print after it ([Orders](https://docs.taji.is/architecture/orders.md)). - The capture read the order the instant after the place, before it filled: `state` `Acked`, `line_state` `WORKING`, `filled_qty` `0`. **Positions and orders** turns it **Filled** when it fills. - Placed while the market is closed, it stays **Working** and fills on the first price of the next session. - No money moves: `taji_sim` is a simulator ([Trade](https://docs.taji.is/guide/trading.md)). ## 4. Ask your agent Press `⌘K` and type: > Buy 1 share of SPY on `taji_sim` at market, then tell me its state and, once it fills, the price and why. Your agent stages and places the order over MCP on the same account draft the ticket uses, and the window shows its work as it goes. - The order is not held for your approval, because **Agent approvals** is off on `taji_sim` ([Trade](https://docs.taji.is/guide/trading.md)). - The same prompt works from your own agent app once it is connected ([Connect your agent](https://docs.taji.is/guide/agent.md)). ## 5. Seal your vault Open **Connections**, click the **Vault** row, and click **Seal your vault** (**Seal your vault with Touch ID** on a Mac that has it). Copy the backup password, which Taji shows once and cannot recover, and click **I saved it**. The vault holds the keys you link. It lives in ``: `~/Library/Application Support/Taji` on macOS, `%LOCALAPPDATA%\Taji` on Windows, `~/.local/share/taji` on Linux. - It locks at each restart and, unless you turn that off, 12 hours after an unlock. Your agent cannot unlock it. While it is locked, the chart and `taji_sim` still work. - To link a provider, click **Link** on its card in Connections and follow its steps. Taji checks a key with its provider before storing it, and a refused key is not stored. ## If something goes wrong - **The chart stays empty.** The kernel reads Yahoo Finance over the network. Check your connection, and that `data.yahoo` is not `false` in `/settings.json`. - **The order stays Working.** The market is closed, or no price has reached `taji_sim` since you placed it. It fills on the first price that arrives. - **`touch id: unbound on this build (docs/guide/first-session.md)` in `/taji.log`.** This build's Touch ID slot is not bound to Taji's signature. Sealing with Touch ID still works, and the sheet says what it guards against: someone else using this device or a copied disk, not other software running as you. Your backup password always opens the vault. ## Next - Lay out panes and charts in [Desks and panes](https://docs.taji.is/guide/desks.md). - Place, change and cancel orders in [Trade](https://docs.taji.is/guide/trading.md). - Connect Claude Code or Codex in [Connect your agent](https://docs.taji.is/guide/agent.md). - Write an indicator in [Your first indicator](https://docs.taji.is/indicators/first-indicator.md). > Every Taji docs page as Markdown: https://docs.taji.is/llms.txt # Fit Taji to your workflow You build one trader's setup on a keyless Taji: a layout of your own, a chart on a data file of your own, a pane a plugin adds, and an indicator, each over the same wire the window uses. You need a checkout [built from source](https://docs.taji.is/guide/install.md) and a headless kernel booted with `TAJI_PLUGINS` naming a directory that holds two plugins the docs already ship: `csv-source`, from [Chart your own CSV of daily bars](https://docs.taji.is/cookbook/python-csv-source.md), and `memo`, packed as [Write a pane](https://docs.taji.is/plugins/pane.md#4-pack-the-pane) does. A plugin is a directory holding its manifest and its program ([Plugins](https://docs.taji.is/plugins.md#what-is-a-plugin)). The whole setup is one list of [wire](https://docs.taji.is/reference/glossary.md#wire) requests. `{desk}` stands for your desk's id, which `GET /read/desks` lists: ```json file="examples/fit-your-workflow/calls.json" title="calls.json" [ {"name": "chart", "method": "POST", "route": "/verb/desk/{desk}/layout/add_pane", "body": {"kind": "chart", "symbol": "equity:QQQ", "position": "right"}}, {"name": "pin", "method": "POST", "route": "/verb/desk/{desk}/chart/1/set_provider", "body": {"provider": "csv-source"}}, {"name": "bars", "method": "GET", "route": "/get/bars?symbols=equity:SPY&timeframe=D&from=2026-11-01&to=2026-12-02&provider=csv-source", "until": "length == 9"}, {"name": "memo", "method": "POST", "route": "/verb/memo/write", "body": {"text": "Watch SPY's 105 from my own file"}}, {"name": "pane", "method": "POST", "route": "/verb/desk/{desk}/layout/add_pane", "body": {"anchor_pane_id": "{chart.pane_ids[0]}", "position": "below", "kind": "memo.view"}}, {"name": "write", "method": "POST", "route": "/verb/desk/{desk}/indicators/write", "body": {"name": "typical", "source": {"$file": "typical.ts"}}}, {"name": "bind", "method": "POST", "route": "/verb/desk/{desk}/chart/1/add_indicator", "body": {"pane_id": 1, "definition": "typical", "params": {}}}, {"name": "keep", "method": "POST", "route": "/verb/desk/{desk}/layouts/rename", "body": {"id": 1, "name": "My setup"}}, {"name": "layouts", "method": "GET", "route": "/read/desk/{desk}/layouts", "shot": "1"} ] ``` ## 1. Lay out the desk **`POST /verb/desk/{desk}/layout/add_pane`** with `{"kind": "chart", "symbol": "equity:QQQ", "position": "right"}` places a QQQ chart on the right half of the focused pane. `pane_ids` is the new pane's number: ```json file="examples/fit-your-workflow/chart.json" { "node": "desk/01a24246-34b2-7233-bb6b-1ae4cb7afaa9/layout", "pane_ids": [ 8 ] } ``` By hand, click **All panes** in the dock, then the Chart card: it takes the right half of the focused pane ([Desks and panes](https://docs.taji.is/guide/desks.md)). - The desk's layout has a second chart. Any pane goes anywhere: `position` is `left`, `right`, `above`, `below` or `tab`. ## 2. Chart your own data `csv-source` reads `/plugins/csv-source/data/.csv`. Lay a file of SPY's daily bars there (`$STATE` is the kernel's state directory): ```sh file="examples/fit-your-workflow/setup.sh" title="setup.sh" mkdir -p "$STATE/plugins/csv-source/data" cat > "$STATE/plugins/csv-source/data/SPY.csv" <<'CSV' date,open,high,low,close,volume 2026-11-19,99.95,100.6,99.77,100.46,4100000 2026-11-20,100.41,100.88,100.35,100.72,3700000 2026-11-23,100.8,101.77,100.41,101.05,2400000 2026-11-24,101.1,102.87,100.88,102.32,3500000 2026-11-25,102.38,102.7,102.07,102.44,2500000 2026-11-27,102.57,103.3,102.29,103.15,2150000 2026-11-30,103.02,103.21,102.42,102.51,2200000 2026-12-01,102.59,104.25,102.39,103.89,4300000 2026-12-02,103.72,104.25,103.07,104.03,2900000 CSV ``` **`POST /verb/desk/{desk}/chart/1/set_provider`** with `{"provider": "csv-source"}` pins chart 1 to the plugin: ```json file="examples/fit-your-workflow/pin.json" { "node": "desk/01a24246-34b2-7233-bb6b-1ae4cb7afaa9/chart/1/view", "seq": 1796408226844202 } ``` **`GET /get/bars?symbols=equity:SPY&timeframe=D&from=2026-11-01&to=2026-12-02&provider=csv-source`** reads the bars the chart now draws, your file's nine rows: ```json file="examples/fit-your-workflow/bars.json" [ { "symbol": "SPY", "provider": "csv-source", "start_dt": "2026-11-19T00:00:00+00:00", "knowable": "2026-11-19T21:00:00+00:00", "open": 99.95, "high": 100.6, "low": 99.77, "close": 100.46, "volume": 4100000, "vwap": null, "trade_count": null, "up_volume": null, "down_volume": null }, { "symbol": "SPY", "provider": "csv-source", "start_dt": "2026-11-20T00:00:00+00:00", "knowable": "2026-11-20T21:00:00+00:00", "open": 100.41, "high": 100.88, "low": 100.35, "close": 100.72, "volume": 3700000, "vwap": null, "trade_count": null, "up_volume": null, "down_volume": null }, { "symbol": "SPY", "provider": "csv-source", "start_dt": "2026-11-23T00:00:00+00:00", "knowable": "2026-11-23T21:00:00+00:00", "open": 100.8, "high": 101.77, "low": 100.41, "close": 101.05, "volume": 2400000, "vwap": null, "trade_count": null, "up_volume": null, "down_volume": null }, { "symbol": "SPY", "provider": "csv-source", "start_dt": "2026-11-24T00:00:00+00:00", "knowable": "2026-11-24T21:00:00+00:00", "open": 101.1, "high": 102.87, "low": 100.88, "close": 102.32, "volume": 3500000, "vwap": null, "trade_count": null, "up_volume": null, "down_volume": null }, { "symbol": "SPY", "provider": "csv-source", "start_dt": "2026-11-25T00:00:00+00:00", "knowable": "2026-11-25T21:00:00+00:00", "open": 102.38, "high": 102.7, "low": 102.07, "close": 102.44, "volume": 2500000, "vwap": null, "trade_count": null, "up_volume": null, "down_volume": null }, { "symbol": "SPY", "provider": "csv-source", "start_dt": "2026-11-27T00:00:00+00:00", "knowable": "2026-11-27T18:00:00+00:00", "open": 102.57, "high": 103.3, "low": 102.29, "close": 103.15, "volume": 2150000, "vwap": null, "trade_count": null, "up_volume": null, "down_volume": null }, { "symbol": "SPY", "provider": "csv-source", "start_dt": "2026-11-30T00:00:00+00:00", "knowable": "2026-11-30T21:00:00+00:00", "open": 103.02, "high": 103.21, "low": 102.42, "close": 102.51, "volume": 2200000, "vwap": null, "trade_count": null, "up_volume": null, "down_volume": null }, { "symbol": "SPY", "provider": "csv-source", "start_dt": "2026-12-01T00:00:00+00:00", "knowable": "2026-12-01T21:00:00+00:00", "open": 102.59, "high": 104.25, "low": 102.39, "close": 103.89, "volume": 4300000, "vwap": null, "trade_count": null, "up_volume": null, "down_volume": null }, { "symbol": "SPY", "provider": "csv-source", "start_dt": "2026-12-02T00:00:00+00:00", "knowable": "2026-12-02T21:00:00+00:00", "open": 103.72, "high": 104.25, "low": 103.07, "close": 104.03, "volume": 2900000, "vwap": null, "trade_count": null, "up_volume": null, "down_volume": null } ] ``` By hand, click the source chip in chart 1's legend and pick **CSV source** ([Chart](https://docs.taji.is/catalog/chart.md)). - Chart 1 draws your file instead of the source it had. Any feed or file becomes a source the same way: a plugin that answers `bars` ([Write a data source](https://docs.taji.is/plugins/source.md)). ## 3. Add a pane of your own **`POST /verb/memo/write`** with `{"text": ...}` sets the note `memo`'s pane shows: ```json file="examples/fit-your-workflow/memo.json" { "wrote": "Watch SPY's 105 from my own file" } ``` **`POST /verb/desk/{desk}/layout/add_pane`** with `{"kind": "memo.view", "anchor_pane_id": , "position": "below"}` puts memo's pane under the QQQ chart: ```json file="examples/fit-your-workflow/pane.json" { "node": "desk/01a24246-34b2-7233-bb6b-1ae4cb7afaa9/layout", "pane_ids": [ 10 ] } ``` ![The Memo pane showing the note written over the wire](https://raw.githubusercontent.com/TajiAI/Taji/main/docs/guide/examples/fit-your-workflow-pane/shot.png) By hand, drag the **Memo** card from **All panes** onto the lower part of the QQQ chart. - The desk has a pane no build of Taji ships: a plugin declared it, and Taji's window draws it. - `memo/write` is also a tool your agent now has, `memo_write`: memo's manifest gives the verb that name and the `agent` scope ([the manifest reference](https://docs.taji.is/plugins/manifest.md)). ## 4. Add your indicator The indicator, `typical.ts`: an average of each bar's typical price, `(high + low + close) / 3`, drawn over the price: ```ts file="examples/fit-your-workflow/typical.ts" title="typical.ts" import { indicator, input, plot, ta } from "@taji/indicators"; export default indicator({ name: "Typical", pane: "price", inputs: { length: input.int(3, { min: 1 }) }, plots: { typical: plot.line({ title: "Typical", color: "#ff9800", width: 2 }) }, setup: ({ inputs }) => ({ avg: ta.ema(inputs.length) }), next(bar, s) { return { typical: s.avg.next((bar.high + bar.low + bar.close) / 3) }; }, }); ``` **`POST /verb/desk/{desk}/indicators/write`** with `{"name": "typical", "source": }` checks it and stores it as the desk's next version: ```json file="examples/fit-your-workflow/write.json" { "definition": "typical@1", "report": { "bars": 1024, "drawings": { "bar_categories": 0, "boxes": 0, "cards": 0, "labels": 0, "lines": 0, "polylines": 0, "tables": 0 }, "fault": null, "invariants": [ { "detail": null, "name": "determinism", "ok": true }, { "detail": null, "name": "prefix", "ok": true }, { "detail": null, "name": "ticks_then_close", "ok": true } ], "logs": [], "ms": 2.3639170000000003, "plots": [ { "first": 1705656600, "last": 96.70046529297619, "max": 101.6293794824592, "min": 92.1008215806068, "na": 2, "name": "typical" } ], "tests": [] } } ``` **`POST /verb/desk/{desk}/chart/1/add_indicator`** with `{"pane_id": 1, "definition": "typical", "params": {}}` binds it to chart 1, the chart on your file: ```json file="examples/fit-your-workflow/bind.json" { "node": "desk/01a24246-34b2-7233-bb6b-1ae4cb7afaa9/chart/1/indicators/01a24246-3b74-74e7-a2bb-c64050e0d23f", "seq": 1796408226844207 } ``` ![Chart 1 drawing the CSV file's SPY bars with the Typical line over them](https://raw.githubusercontent.com/TajiAI/Taji/main/docs/guide/examples/fit-your-workflow/shot.png) By hand, ask your agent (`⌘K`) to write it, then pick it under **My scripts** in chart 1's **Indicators** (`/`). - Chart 1 draws your indicator over your data, the orange line in the picture. - The kernel stored it as `typical@1`, the desk's first version of it; a binding to the bare `typical` follows the newest version. ## 5. Keep it **`POST /verb/desk/{desk}/layouts/rename`** with `{"id": 1, "name": "My setup"}` names the layout you built: ```json file="examples/fit-your-workflow/keep.json" { "node": "desk/01a24246-34b2-7233-bb6b-1ae4cb7afaa9/layouts" } ``` **`GET /read/desk/{desk}/layouts`** lists the desk's layouts: ```json file="examples/fit-your-workflow/layouts.json" [ { "active": true, "id": 1, "name": "My setup", "panes": [ 1, 8, 10, 6, 2, 4, 5 ], "symbol": "equity:QQQ", "timeframe": "D" } ] ``` *Captured 2026-12-04 on a headless kernel, with `csv-source` and `memo` staged; the CSV's figures are made up.* By hand, double-click the layout's tab and type its name. - There is nothing to save: the kernel keeps every change as you make it, panes, bindings and indicators, across relaunches. **My setup** is the layout's name in the strip. `POST /verb/desk/{desk}/layouts/add` opens another beside it, and `layouts/pick` brings this one back. ## If something goes wrong - **`422 not_linked` from `set_provider`.** The kernel has no `csv-source`: `TAJI_PLUGINS` does not name the directory holding it. `GET /read/plugins` lists what the kernel seated. - **`bars` is `[]`.** The CSV is not at `/plugins/csv-source/data/SPY.csv`, or no row falls between `from` and `to`. - **`404 unknown_pane` from `add_pane`.** `anchor_pane_id` names no pane of the active layout; take the number from the `pane_ids` the QQQ chart's request answered. - **`422` with `"error": "compile"` from `indicators/write`.** The source does not compile; each entry of `errors` gives its line, column and message. ## Next - [Write a data source](https://docs.taji.is/plugins/source.md) - [Write a pane](https://docs.taji.is/plugins/pane.md) - [Write a chart layer](https://docs.taji.is/plugins/layer.md) - [Your first indicator](https://docs.taji.is/indicators/first-indicator.md) > Every Taji docs page as Markdown: https://docs.taji.is/llms.txt # Connect your agent You register Taji's MCP bridge with your agent, watch one short session turn into wire requests, and learn what the agent may do without you. You need Taji [installed](https://docs.taji.is/guide/app.md) or [built](https://docs.taji.is/guide/install.md), an MCP client such as Claude Code, and the agent signed in to its vendor ([why](https://github.com/TajiAI/Taji/blob/main/docs/decisions/0002-taji-embeds-no-model.md)). ## Connect over MCP Your agent reaches Taji through the bridge, a stdio MCP server. It reads the [wire](https://docs.taji.is/reference/glossary.md#wire) with the state dir's agent token; with no `TAJI_WIRE`, its first request boots Taji headless and detached, outliving the session. **From the installed app.** Run Taji once to lay its skill in `~/.taji`. For Claude Code: 1. Register the bundled `taji-mcp`. ```sh tab={"label":"macOS"} # macOS claude mcp add -s user taji -e TAJI_WIRE=7780 -- /Applications/Taji.app/Contents/Resources/bin/taji-mcp ``` ```powershell tab={"label":"Windows"} # Windows claude mcp add -s user taji -e TAJI_WIRE=7780 -- "$env:LOCALAPPDATA\Programs\Taji\resources\bin\taji-mcp.exe" ``` 2. Install the skill: ```sh tab={"label":"macOS"} # macOS /Applications/Taji.app/Contents/Resources/bin/taji-register skills ~/.taji/skills/taji --agent claude-code ``` ```powershell tab={"label":"Windows"} # Windows & "$env:LOCALAPPDATA\Programs\Taji\resources\bin\taji-register.exe" skills "$env:USERPROFILE\.taji\skills\taji" --agent claude-code ``` **From a source checkout**, with Bun, at the repository root: 1. Register the bridge, `agent/src/mcp/stdio.ts`. On Windows, the kernel is `taji.exe`. ```sh tab={"label":"macOS and Linux"} # macOS and Linux claude mcp add -s user taji -e TAJI_WIRE=7780 -e TAJI_BIN=$PWD/target/debug/taji -- bun run $PWD/agent/src/mcp/stdio.ts ``` ```powershell tab={"label":"Windows"} # Windows claude mcp add -s user taji -e TAJI_WIRE=7780 -e TAJI_BIN=$PWD\target\debug\taji.exe -- bun run $PWD\agent\src\mcp\stdio.ts ``` Against `FRESH=1 make dev`, give `-e TAJI_WIRE=7790 -e TAJI_STATE_DIR=$PWD/target/fresh/state` instead: with nothing on 7780, the bridge's first request boots a headless Taji on your own state. 2. Install the skill: ```sh bun run agent/src/register.ts skills $PWD/agent/skills/taji --agent claude-code ``` `-e TAJI_STATE_DIR=` reads the token from another state dir. `-s user` registers Taji for every project, where `taji-register remove` finds it. A new session has nine tools (`describe`, `read`, `call`, `commit`, `stage`, `order`, `wait`, `link_choose`, `ui_open`: [the wire reference](https://docs.taji.is/reference/wire.md#the-mcp-tools)) and follows [`SKILL.md`](https://docs.taji.is/skill.md). **Another client** (Claude Desktop, Codex, Cursor, Grok, OpenCode) keeps its own config file, which the app's `bin/taji-register` writes: `taji-register list` prints each agent found, `TAJI_WIRE=7780 taji-register mcp --agent ` registers the bridge (`claude-desktop`, `codex`) and `taji-register skills ~/.taji/skills/taji --agent ` the skill. Without `--agent`, each goes to every agent found. A source checkout gives the client the same `command`, `args` and `env`. Restart the client. Where your organization manages MCP servers, the client may ignore Taji's entry: ask its administrator. ## Watch a session reach the wire Each tool call is one request to the wire, a route and a JSON body, so anything your agent does you can send yourself. The session below reads a chart, adds an RSI to chart 1 and stages a `taji_sim` order. `calls.json` lists the wire requests its tool calls make; `{desk}` stands for the desk's id, which the agent reads off `read/desks`. ```json file="examples/agent/calls.json" title="calls.json" [ {"name": "view", "method": "GET", "route": "/read/desk/{desk}/chart/1/view"}, {"name": "indicator", "method": "POST", "route": "/verb/desk/{desk}/chart/add_indicator", "body": {"pane_id": 1, "definition": "rsi", "params": {}}}, {"name": "quote", "method": "GET", "route": "/get/quotes?symbols=equity%3ASPY"}, {"name": "stage", "method": "POST", "route": "/verb/trading/taji_sim/draft/stage", "body": {"symbol": "equity:SPY", "side": "buy", "qty": 10, "price": 135, "spot": 142.3, "order_type": "limit"}, "shot": true} ] ``` ![Chart 1 with an RSI below the candles, a staged 10-share buy limit on the price scale, and the order ticket open](https://raw.githubusercontent.com/TajiAI/Taji/main/docs/guide/examples/agent/shot.png) Each tool call below becomes the request beside it. The bridge adds the leading `/`, URL-encodes a `query` and sends every request with the agent token. 1. **`read {route: "read/desk//chart/1/view"}`** is `GET /read/desk/{desk}/chart/1/view`. The answer says what the chart shows: its symbol, timeframe, style and settings. 2. **`describe {route: "verb/desk//chart/add_indicator"}`** is `GET /read/routes`, the catalog of every route. The bridge keeps the catalog and answers from the one row: its summary, scopes, effect, the tool that sends it, its body's schema and its refusals. The catalog is too large to show, so `calls.json` does not make this request; `read`, `call`, `commit`, `stage` and `order` each check their route against it before they send. 3. **`call {route: "verb/desk//chart/add_indicator", body: {pane_id: 1, definition: "rsi", params: {}}}`** is `POST /verb/desk/{desk}/chart/add_indicator` with that body. `call` sends a route whose effect is `write`. The answer names the binding's `node`, and the empty `params` leave the indicator's defaults, the `RSI 14` in the picture. 4. **`read {route: "get/quotes", query: {symbols: "equity:SPY"}}`** is `GET /get/quotes?symbols=equity%3ASPY`, the price the agent stages against. 5. **`stage {route: "verb/trading/taji_sim/draft/stage", body: {symbol: "equity:SPY", side: "buy", qty: 10, price: 135, spot: 142.3, order_type: "limit"}}`** is `POST /verb/trading/taji_sim/draft/stage` with that body. `stage` sends a trading route no venue hears, so nothing is placed and nothing waits for you. The answer's `rev` is the draft's version, which placing it needs. The answer to the view read: ```json file="examples/agent/view.json" { "adjust_dividends": false, "axis": "right", "bar_count": 0, "box": null, "box_method": null, "box_size": null, "compare": [], "instrument": { "class": "equity", "facts": { "min_qty": "1", "multiplier": "1", "qty_step": "1", "ticks": [ { "from": "0", "increment": "0.0001" }, { "from": "1", "increment": "0.01" } ] }, "item": "equity:SPY", "price_format": "decimal", "trades_as": { "Equity": { "symbol": "SPY" } } }, "invert": false, "legs": false, "link": null, "panes": [], "pin": null, "price_range": null, "profile": false, "ratio": null, "scale": "linear", "session": null, "settings": { "alert_active_only": true, "alert_color": "#dbdbdb", "alert_hide_toasts": true, "alert_lines": true, "alert_sound": true, "alert_volume": 50, "area_line": "#2962ff", "auto_ladder": [ "1m", "5m", "15m", "1h", "4h", "D", "W", "M" ], "auto_max_px": 30.0, "auto_min_px": 1.5, "auto_timeframe": true, "background": "#0f0f0f", "background_top": "#1f1f1f", "background_type": "solid", "bar_change": true, "bar_down": "#ff6a9c", "bar_up": "#34e8c6", "baseline_bottom": "#ff6a9c", "baseline_level": 50, "baseline_top": "#34e8c6", "bid_ask_line": false, "bid_ask_value": false, "body": true, "body_down": "#ff6a9c", "body_up": "#34e8c6", "border": true, "border_down": "#ff6a9c", "border_up": "#34e8c6", "box_percent": null, "brick_down": "#ff6a9c", "brick_up": "#34e8c6", "column_down": "#ff6a9c", "column_prev_close": true, "column_up": "#34e8c6", "countdown": true, "crosshair_color": "#8c8c8c", "crosshair_style": "dashed", "day_change": false, "day_of_week": true, "events_dividends": true, "events_earnings": true, "events_earnings_breaks": false, "events_filings": false, "events_insiders": false, "events_news": true, "events_splits": true, "executions": true, "ext_line": true, "ext_value": true, "grid_h": true, "grid_h_color": "#3c3c3c", "grid_h_style": "dotted", "grid_v": true, "grid_v_color": "#3c3c3c", "grid_v_style": "dotted", "high_low_color": "#2962ff", "high_low_line": false, "high_low_value": false, "hlc_bars": false, "hlc_close": "#2962ff", "hlc_high": "#00bcd4", "hlc_low": "#e91e63", "indicator_inputs": true, "indicator_labels": false, "indicator_titles": true, "indicator_value_labels": true, "indicator_values": true, "last_line": true, "last_value": true, "line_break_lines": 3, "line_color": "#2962ff", "logo": true, "nav_buttons": "hover", "no_overlap": true, "ohlc": true, "orders": true, "plus_button": true, "pnf_one_step_back": false, "pnf_reversal": 3, "precision": null, "prev_close_colors": false, "prev_close_line": false, "prev_close_value": false, "scale_modes": "hover", "scale_price_only": false, "scale_text": "#b8b8b8", "separator_color": "#2e2e2e", "session_breaks": false, "symbol_label": false, "title": true, "title_source": "description", "volume": false, "wick": true, "wick_down": "#ff6a9c", "wick_up": "#34e8c6" }, "style": "candles", "symbol": "equity:SPY", "timeframe": "D", "visible_range": null, "window": null } ``` The answer to adding the RSI: ```json file="examples/agent/indicator.json" { "node": "desk/01a2426c-1498-7325-ab36-7bac945122e5/chart/indicators/01a2426c-170c-73ac-8367-9deedbb7e559", "seq": 1796410708898373 } ``` The quote: ```json file="examples/agent/quote.json" [ { "symbol": "SPY", "ts": "2026-12-04T18:58:29.984664+00:00", "ts_init": 1796410709984664000, "provider": "samplefeed", "delayed": false, "halted": null, "session": null, "bid": 142.3, "ask": 142.32, "last": 142.31, "bid_size": null, "ask_size": null, "book_ts": null, "last_ts": null, "last_exchange": null, "last_conditions": [], "prev_close": 142.62, "change": -0.31, "change_pct": -0.2174, "session_close": null, "session_change": null, "session_change_pct": null, "market_session": "regular", "next_session": "post", "next_at": "2026-12-04T21:00:00+00:00" } ] ``` The answer to staging: ```json file="examples/agent/stage.json" { "node": "trading/taji_sim/draft", "rev": "01a2426c-1b61-76e1-907e-f45e7694ea73" } ``` *Captured 2026-12-04 on a headless kernel reading a made-up daily series and quote for SPY.* To send the draft, the agent calls `order {route: "verb/trading/taji_sim/draft/place", body: {rev: ""}}`. While the account's Agent approvals is on, the kernel parks that place as an approval and waits for you in Taji's window ([Bound your agent](#bound-your-agent)). ## Use the conversation 1. Click the agent's orb at the canvas's foot or press `⌘K` (`Ctrl+K` on Windows and Linux) to slide up the composer (a click elsewhere hides it). Enter starts the desk's chat; **New conversation** in the left bar starts another and lists the desk's chats. 2. Pick an agent in the composer: Claude Code (`claude`), Codex (`codex`), Antigravity (`agy`), Grok (`grok`), Cursor (`cursor-agent`) or Muse (`muse`). One missing from `PATH` is disabled, with its reason. Pickers beside the field set mode and model. 3. Start with `/` for commands: window ones (`/open`, `/split`, `/layout`, `/symbol`, `/alert`) and plugins' (`/screen`) need no agent. A pane head's **Ask** orb puts that pane in your draft. 4. Or [talk](https://docs.taji.is/ai/voice.md): link [OpenAI](https://docs.taji.is/catalog/openai.md) or [Gemini](https://docs.taji.is/catalog/gemini.md) in Connections › Voice, then press Voice or `⌘⇧V` and speak. The conversation floats; **Place as pane** puts it in the canvas, **Pop out** in a window. `✕` hides it, its turn running on. Approval cards dock under its head while it shows, else at the canvas's top centre. Each chat starts in an empty directory, without your settings, MCP servers or plugins. Claude Code's and Codex's adapters install from lockfiles Taji ships, scripts off, needing Node 22+, `npm` and the network once per version. The agent chip beside the book chip shows a chat's state (Working, Needs approval, Waiting on you, Stopped or Failed); its popover has Open chat, Show chat, Stop and, during a guided link, Take over. A chat opens in Auto, where the client asks nothing and only Taji's own holds apply ([below](#bound-your-agent)). In a mode that asks (Claude Code's Manual, Codex's Read-only) you allow each call, `commit` and `order` included. ## Talk to it Speak to the agent instead of typing: [Talk to your agent](https://docs.taji.is/ai/voice.md). ## Bound your agent - **It can** read data and the desk, drive the window (desks, layouts, panes, charts, indicators, alerts, watchlists, notes and most settings), and stage, place and cancel orders. Removing a drawing an alert rides disarms that alert. - **It waits for you.** An order-sending verb, or a cancel or disarm stripping an exit over held shares, waits for your approval while its account's Agent approvals is on, as a live account's is until you turn it off ([Trade](https://docs.taji.is/guide/trading.md)). These always wait: `link/prefer`, `link/vault/{ttl,lock}`, `link/{venue,data}/{link,unlink}`, `link/venue/{oauth,redirect,start,cancel,redetect}`, `link/account/alias`, `agent/{detect,connect,disconnect}`, an account's `approve`, and a `ui/settings/set` of `taji.trading` (One-click trading), `taji.plugins.registry` (where plugins install from), `taji.keys`, `update_url` or `report_url`. - **It cannot**, by its MCP tools (the agent token; this list binds them), seal, unlock or erase the vault, start a conversation, search your chats, set the data budget, install, enable, disable or uninstall a plugin, or switch an account's approvals. Given a shell, it runs as you and can read `wire-token` ([Security](https://docs.taji.is/architecture/security.md)), reaching what only the local token holds, the vault and plugin installs included; only your hand in Taji's window approves its acts or turns approvals off. - **It never sees a key you hold.** You type keys into the link sheet, no read returns one, and a link it sends carrying a key is refused, save one it generated on the provider's page in a guided link and hands the sheet with `flow/secret` for you to link ([0005](https://github.com/TajiAI/Taji/blob/main/docs/decisions/0005-no-key-reaches-a-client.md)). `commit` and `order` carry MCP's `destructiveHint`; `stage` (draft, route, preview) does not: no venue hears it. Taji's own hold is the approval card. ## Your phone Message the agent from a chat app, or open the whole window on your phone: [Reach your agent from your phone](https://docs.taji.is/ai/phone.md). ## If it fails - **A conversation's start is refused in the vendor's words** (say, a sign-in). Do as told, then press Try again, or Pick another agent. - **An agent is disabled.** Its reason, the missing command or Node 22, is `why` in `GET /read/agent/adapters`. - **429 `rate_limited`.** The agent spent its 600 reads or 120 writes a minute; it waits out `rest_after`. ## Next - [Place and cancel orders](https://docs.taji.is/guide/trading.md): the ticket, and whether your agent's orders wait for you. - [The wire](https://docs.taji.is/reference/wire.md): every route, scope and refusal the tools reach. - [The Taji skill](https://docs.taji.is/skill.md): how your agent drives Taji. - [Security](https://docs.taji.is/architecture/security.md): the tokens, the vault and what an agent with a shell can reach. > Every Taji docs page as Markdown: https://docs.taji.is/llms.txt # Taji vs TradingView and Pine Script Your data, your AI, your accounts, your platform, without limits. Taji is free and open source, runs on your machine, and connects to the brokerages, data providers and AI subscription you already have, which you pay for separately, at their own prices. | | Taji | TradingView | See it | |---|---|---|---| | Your layout | Any panes in any arrangement, saved per desk as layouts, and a pane or chart layer of your own as a plugin | A script adds plots, drawings and tables to a chart[^limits] | [Tutorial](https://docs.taji.is/guide/fit-your-workflow.md) | | Your data sources | Any brokerage or vendor Taji has a plugin for, and a source plugin for any other feed or file | Its own data providers, and `request.seed()` from a GitHub repository its author maintains[^otf] | [Recipe](https://docs.taji.is/cookbook/python-csv-source.md) | | Your tools | Indicators, plugins whose verbs your agent calls as tools, and channels that reach you where you are | Pine scripts and libraries[^libraries] | [Guide](https://docs.taji.is/plugins/first-plugin.md) | | Price | Free and open source, Apache-2.0 | $12.95 to $199.95 a month, billed annually, after a limited free Basic plan[^pricing] | [Install](https://docs.taji.is/guide/app.md) | | Where it runs | Your machine | TradingView's servers, where your scripts and alerts run[^pine][^pine-alerts] | [Security](https://docs.taji.is/architecture/security.md) | | Market data | Real-time and deeper history from your brokerage or a data provider such as Databento or Massive, at their prices: use what you already have access to, or buy it directly from your brokerage or vendor | Charges extra for real-time data, per exchange, on top of the plan: Ultimate with real-time US stocks, S&P and Dow Jones indices and CME futures is $228.90 a month[^data] | [Coverage](https://docs.taji.is/reference/coverage.md) | | History | No plan cap on bars: every bar you fetch is stored on your machine and read again without asking the vendor twice | 5K to 40K historical bars by plan; minute history for 180 days on Essential and 365 on Plus[^pricing] | [Data](https://docs.taji.is/architecture/data.md#what-happens-when-you-read-the-same-bars-twice) | | Testing an idea | A rule written as an indicator runs over every bar the chart holds, each trade counted on the bar its result is known, so the test never sees ahead; your agent writes it, runs it and reads the tally back | A strategy simulates orders and writes a strategy report[^strategies], over the plan's 5K to 40K bars[^pricing] | [Recipe](https://docs.taji.is/cookbook/backtest-200-day-reclaim.md) | | AI | Your agent, on Claude, GPT, Gemini or Grok through the subscription you already have, reaches every piece of data and every capability Taji has: it runs deep backtests over every bar you have stored, writes and tests indicators and plugins, and assists you in real time from your charts, panes and live quotes, at no extra cost from Taji | AI Copilot is a paid add-on below Ultimate[^pricing]; it defaults to DeepSeek V4.1 Flash, and Claude Sonnet 5.5 uses 7.5 times the allowance per request, with a refill at the add-on's price[^copilot]. 10 to 500 MCP requests, 100 to 500 AI Screener scans and 50 to 500 AI alert generations by plan[^pricing] | [Recipe](https://docs.taji.is/cookbook/agent-writes-an-indicator.md) | | Brokerages | Alpaca, Interactive Brokers, TradeStation and Tradovate in one book, paper and live; market data comes from the best source you have, and Intelligent routing sends each order to the account its router picks. What each brokerage takes is listed in [Coverage](https://docs.taji.is/reference/coverage.md) | The brokers it integrates[^brokers] | [Guide](https://docs.taji.is/guide/trading.md) | | Custom indicators | TypeScript, the open, industry-standard language your agent already writes | Pine Script, TradingView's own language, run only on TradingView[^pine] | [Compare](https://docs.taji.is/indicators/pine.md) | | What a script reads | Bars, events, the tape, quotes and auction imbalance; through a plugin, the order book, option chains with greeks and any vendor or file | Bars, events, financials, economic series and a volume footprint; bid, ask and the aggressor on 1-tick charts[^otf][^release] | [Recipe](https://docs.taji.is/cookbook/orderflow-heatmap.md) | | Beyond indicators | Plugins add verbs your agent calls as tools and nodes it reads; data sources, and products of their own computed from Taji's data or a vendor's; panes in Taji's window; chart layers drawn from their products; indicators of their own | Plots, drawings and tables on a chart;[^limits] a strategy's simulated orders and its strategy report[^strategies] | [Guide](https://docs.taji.is/plugins/first-plugin.md) | What indicators and plugins read, from the trade tape to the order book and option chains, and every difference in depth, from execution and history to repainting and limits: [Taji indicators and plugins vs Pine Script](https://docs.taji.is/indicators/pine.md). ## The short answer Taji has charts in candles, Heikin Ashi, Renko and more, drawing tools, 106 built-in indicators, alerts, an option chain, a screener, and paper and live trading through your own brokerages ([What is Taji](https://docs.taji.is/guide/what-is-taji.md)). A first run needs no account and no key. Taji has no fixed layout, no fixed data source and no fixed toolset, so you fit it to how you trade, and your agent reaches all of it: it runs deep backtests over every bar you have stored, writes and tests your indicators and plugins, and assists you in real time from your charts, panes and live quotes ([Connect your agent](https://docs.taji.is/guide/agent.md)). It is free and runs on your machine, real-time data comes from the brokerage or vendor you already pay, every bar you fetch is kept with no plan cap, and four brokerages take orders into one book. Your scripts are TypeScript, read the tape, quotes, the order book and option chains, and grow into plugins with a backend, panes and chart layers of their own. ## What you can do in Taji and not in TradingView - **Let your agent trade, and approve each order.** Ask Claude Code, Codex or Cursor to buy 10 SPY at a limit on your live account; the order waits in Taji's window until you approve it ([Have your agent place an order](https://docs.taji.is/cookbook/agent-sim-order.md)). TradingView's terms say not to let an AI client place, change or cancel broker orders[^mcp]. - **Have your agent build an indicator all day.** Your agent writes a TypeScript indicator, and your own machine checks, tests and draws it, with no daily count ([Have your agent write an indicator](https://docs.taji.is/cookbook/agent-writes-an-indicator.md)). On TradingView every Pine check, run and backtest is a call against a cap of 10 to 500 a day[^mcp][^mcp-blog]. - **Backtest over all your history, as often as you like.** Bars you fetch stay cached on your machine, and point-in-time reads refuse a look ahead, so your agent can run a test over all the history your sources hold again and again without a daily cap or a bar limit ([Data](https://docs.taji.is/architecture/data.md#what-can-a-read-see-at-an-instant)). TradingView caps history at 5K to 40K bars by plan[^pricing]. - **Chart your own data.** Point Taji at your Databento or Massive account, or at a CSV file, and chart it beside everything else ([Chart your own CSV](https://docs.taji.is/cookbook/python-csv-source.md)). On TradingView, data you bring is `request.seed()`, from a GitHub repository its author maintains[^otf], and real-time data is priced per exchange[^data]. - **Keep it all on your machine.** Your desks, indicators, alerts and bars stay on your computer and your keys are sealed there, with no account and no telemetry ([Security](https://docs.taji.is/architecture/security.md)). TradingView runs your scripts and alerts on its servers[^pine][^pine-alerts]. - **Port your Pine scripts with one prompt.** Your agent reads a Pine indicator, maps each line, writes the TypeScript with a test, adds it to your chart and reads the last values back for you to set beside TradingView's ([Bring your Pine scripts](https://docs.taji.is/indicators/pine.md#bring-your-pine-scripts) shows one port side by side; [Porting a Pine script](https://docs.taji.is/skill/references/pine.md) is the map your agent follows). - **Test an indicator before it reaches a chart.** Taji runs your indicator's own tests on every write and refuses one that fails; Pine is checked by its compiler[^mcp-blog] ([Your first indicator](https://docs.taji.is/indicators/first-indicator.md)). ## Coming from TradingView 1. **Your first chart.** Taji opens on a daily chart of SPY from Yahoo Finance, with no account and no key ([Quickstart](https://docs.taji.is/guide/first-session.md)). ![A daily candlestick chart of a made-up SPY series with volume, labelled CSV source](https://raw.githubusercontent.com/TajiAI/Taji/main/docs/guide/examples/first-chart/shot.png) *Captured 2026-12-04 on a headless kernel reading a made-up daily series for SPY: your chart shows the market on your date.* 2. **Your layout.** You tile charts and panes into a desk and save it as a layout ([Desks and panes](https://docs.taji.is/guide/desks.md)), then fit it with your own data, a plugin's pane and your indicator ([Fit Taji to your workflow](https://docs.taji.is/guide/fit-your-workflow.md)). 3. **Your indicators.** You add any of the 106 built-in indicators to a chart, and your agent ports a Pine script you bring ([Taji indicators and plugins vs Pine Script](https://docs.taji.is/indicators/pine.md)). 4. **Your broker.** You link your brokerage and place orders from the ticket, the chart or the ladder ([Place and cancel orders](https://docs.taji.is/guide/trading.md)), and [Coverage](https://docs.taji.is/reference/coverage.md) lists what each brokerage takes. 5. **Your agent.** You connect Claude Code, Codex, Cursor or the agent you already run, and it reads and works on your chart while you watch ([Connect your agent](https://docs.taji.is/guide/agent.md)). ## Questions ### Can Taji replace TradingView? Yes, and more. Taji has charts, drawing tools, indicators, alerts and layouts over stocks and ETFs, indices, futures, options, futures options, crypto and forex, and trading through your own brokerages, as [Coverage](https://docs.taji.is/reference/coverage.md) lists class by class ([What is Taji](https://docs.taji.is/guide/what-is-taji.md)). It adds a desk you lay out as you like, plugins that bring any data source or tool, open source code that runs on your machine, and an agent of your own that reaches every piece of data and every capability Taji has. ### Can I run my Pine scripts? Not as they are: your agent ports a Pine indicator to TypeScript, adds it to your chart and reads its last values back for you to compare ([Bring your Pine scripts](https://docs.taji.is/indicators/pine.md#bring-your-pine-scripts) shows one port side by side; [Porting a Pine script](https://docs.taji.is/skill/references/pine.md) is the map your agent follows). It does not port strategies, a script that imports a library, user-defined types, enums or methods, `varip`, `request.financial`, `request.economic` or `request.seed`, most `syminfo.*` fields, or a script that requests Heikin Ashi or other non-standard bars. ### What does Taji cost? Nothing: Taji is free and open source under Apache-2.0 ([LICENSING.md](https://github.com/TajiAI/Taji/blob/main/LICENSING.md)). You pay your brokerages, data providers and AI subscription directly, at their own prices, and Taji adds no fee. TradingView's paid plans are $12.95 to $199.95 a month, billed annually[^pricing]. ### Do I need an AI subscription? No. Taji's window works without an agent: you chart, draw and trade by hand ([Quickstart](https://docs.taji.is/guide/first-session.md)). When you want one, you connect the agent you already pay for ([Connect your agent](https://docs.taji.is/guide/agent.md)). ### Is real-time data included? A keyless Taji charts Yahoo Finance's delayed data. Real-time data comes from the brokerage or data provider you link, at their prices ([Coverage](https://docs.taji.is/reference/coverage.md)). TradingView prices real-time data per exchange, on top of its plans[^data]. ### Where do my alerts and scripts run? On your machine: the kernel judges each alert and runs each script there, so an alert fires while Taji runs ([How an indicator executes](https://docs.taji.is/indicators/execution.md#where-does-your-script-run)). ### Which brokerages take orders? Alpaca, Interactive Brokers, TradeStation and Tradovate, paper and live, as [Coverage](https://docs.taji.is/reference/coverage.md) marks `sent`. `taji_sim`, Taji's simulated account, takes orders with no key. TradingView is a trademark of its owner, named here only to identify it; Taji is independent of TradingView and not affiliated with or endorsed by it. ## See also - [Install the app](https://docs.taji.is/guide/app.md) - [Connect your agent](https://docs.taji.is/guide/agent.md) - [Taji indicators and plugins vs Pine Script](https://docs.taji.is/indicators/pine.md), what each reads and every difference in depth - [Porting a Pine script](https://docs.taji.is/skill/references/pine.md) [^pricing]: TradingView, "Pricing", [tradingview.com/pricing](https://www.tradingview.com/pricing/), fetched 2026-12-03. Prices are labelled "Special price" and shown per month, billed annually. [^data]: TradingView, "Data coverage", [tradingview.com/data-coverage](https://www.tradingview.com/data-coverage/), fetched 2026-12-03: real-time fees per month, US Stock Markets bundle $9.95, S&P Indices $7.00, Dow Jones Indices $5.00, CME Group (E-mini included) $7.00. With Ultimate at $199.95 that is $228.90 a month. [^brokers]: TradingView, "Brokers", [tradingview.com/brokers](https://www.tradingview.com/brokers/), fetched 2026-12-03. The page states no total; 33 is the count of brokers it listed when fetched, and it disagrees with the features page's "100+". [^pine]: TradingView, "Welcome to Pine Script", [tradingview.com/pine-script-docs/welcome](https://www.tradingview.com/pine-script-docs/welcome/), fetched 2026-12-03: "run them on our servers". [^pine-alerts]: TradingView, "Alerts" (Pine Script docs), [tradingview.com/pine-script-docs/concepts/alerts](https://www.tradingview.com/pine-script-docs/concepts/alerts/), fetched 2026-12-03. [^libraries]: TradingView, "Libraries" (Pine Script docs), [tradingview.com/pine-script-docs/concepts/libraries](https://www.tradingview.com/pine-script-docs/concepts/libraries/), fetched 2026-12-03. [^strategies]: TradingView, "Strategies" (Pine Script docs), [tradingview.com/pine-script-docs/concepts/strategies](https://www.tradingview.com/pine-script-docs/concepts/strategies/), fetched 2026-12-03. [^limits]: TradingView, "Limitations" (Pine Script docs), [tradingview.com/pine-script-docs/writing/limitations](https://www.tradingview.com/pine-script-docs/writing/limitations/), fetched 2026-12-03. [^copilot]: TradingView, "New in AI Copilot: use Claude, ChatGPT, or DeepSeek", [tradingview.com/blog/en/ai-copilot-claude-chatgpt-deepseek-62292](https://www.tradingview.com/blog/en/ai-copilot-claude-chatgpt-deepseek-62292/), fetched 2026-12-03. [^mcp]: TradingView, "MCP docs", [tradingview.com/mcp/docs](https://www.tradingview.com/mcp/docs), fetched 2026-12-03. [^mcp-blog]: TradingView, "TradingView MCP: Pine Script and daily limits", [tradingview.com/blog/en/tradingview-mcp-pine-script-and-daily-limits-62532](https://www.tradingview.com/blog/en/tradingview-mcp-pine-script-and-daily-limits-62532/), fetched 2026-12-03. [^otf]: TradingView, "Other timeframes and data" (Pine Script docs), [tradingview.com/pine-script-docs/concepts/other-timeframes-and-data](https://www.tradingview.com/pine-script-docs/concepts/other-timeframes-and-data/), fetched 2026-12-03: "it relies on its data providers for the information displayed on charts and accessed by scripts"; `request.seed()` "retrieves data from a user-maintained GitHub repository". [^release]: TradingView, "Release notes" (Pine Script docs), [tradingview.com/pine-script-docs/release-notes](https://www.tradingview.com/pine-script-docs/release-notes/), fetched 2026-12-03. > Every Taji docs page as Markdown: https://docs.taji.is/llms.txt # Build and run Taji from source You finish with Taji's kernel built from this checkout, running windowed or headless. You need macOS 26 or later on Apple Silicon, Linux (builds on Debian 13, where the sandbox suite passes; CI runs the workspace tests on Ubuntu 24.04, but no installed build has been walked there), or Windows 11 24H2, build 26100.9278 or later (x64); a network, since the build downloads dependencies and keyless data sources read the internet; and disk and time: a cold build takes minutes and `target/` passes 10 GB. To use the app instead, [install it](https://docs.taji.is/guide/app.md). Run every command at the repository root, in Git Bash on Windows. ## Prerequisites On Windows, do [Windows](#windows) first. 1. Install your platform's build tools, then `rustup`, `mise` and `uv`. `rustup` and `mise` fetch the pinned toolchain in step 3; `uv` lays Taji's Python in [Build](#build). Each installer's script asks you to follow its on-screen instructions. ```sh tab={"label":"macOS"} # macOS: the Command Line Tools, since `make dev` compiles the Touch ID helper with `xcrun swiftc` xcode-select --install curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh curl -fsSL https://mise.run | sh curl -LsSf https://astral.sh/uv/install.sh | sh ``` ```sh tab={"label":"Linux"} # Linux (Debian, Ubuntu) sudo apt-get update && sudo apt-get install -y --no-install-recommends build-essential bubblewrap slirp4netns iptables iproute2 ca-certificates curl git python3 xz-utils unzip curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh curl -fsSL https://mise.run | sh curl -LsSf https://astral.sh/uv/install.sh | sh ``` ```powershell tab={"label":"Windows"} # Windows, in PowerShell winget install Microsoft.VisualStudio.2022.BuildTools --override "--wait --passive --add Microsoft.VisualStudio.Workload.VCTools --includeRecommended" winget install LLVM.LLVM winget install --id Git.Git -e winget install Rustlang.Rustup winget install jdx.mise winget install ezwinports.make winget install astral-sh.uv ``` Open a new terminal (Git Bash on Windows) so the new tools are on `PATH`. mise must be 2026.11.15 or later, which reads `mise.lock`'s format; on Windows `winget upgrade jdx.mise` moves an older one. 2. Clone the repository and enter it. ```sh tab={"label":"macOS and Linux"} # macOS and Linux git clone https://github.com/TajiAI/Taji.git cd Taji ``` ```sh tab={"label":"Windows"} # Windows, in Git Bash git config --global core.longpaths true git clone https://github.com/TajiAI/Taji.git cd Taji ``` 3. Install the toolchain `.mise.toml` pins (Rust, Node, Go for the Tailscale sidecar, Bun and pnpm). Without mise, install Rust, Go 1.27, Node 22.13 or later, pnpm 12 and Bun 1.4 yourself. ```sh tab={"label":"macOS"} # macOS (zsh) eval "$(~/.local/bin/mise activate zsh)" mise trust mise install ``` ```sh tab={"label":"Linux"} # Linux (bash) eval "$(~/.local/bin/mise activate bash)" mise trust mise install ``` ```sh tab={"label":"Windows"} # Windows (Git Bash) eval "$(mise activate bash)" mise trust mise install ``` ## Build 1. Set up the checkout: ```sh make setup ``` It adds Rust's `wasm32-unknown-unknown` target, runs `pnpm install --frozen-lockfile`, unpacks Electron, installs the headless browser the gate scripts drive, and lays Taji's Python, Yahoo's and EDGAR's runtime, in `.python`. It ends with the interpreter `.python/python` (`python.exe` on Windows) in place. 2. Build the page, the window, the kernel and the sidecars the kernel spawns from its own directory, in this order: the kernel embeds the page, and a debug kernel spawns `window/`. ```sh tab={"label":"macOS"} # macOS pnpm --filter @taji/ui build pnpm --filter @taji/window build cargo build --locked -p taji-open make sidecar whatsapp unlock ``` ```sh tab={"label":"Linux"} # Linux pnpm --filter @taji/ui build pnpm --filter @taji/window build cargo build --locked -p taji-open make sidecar whatsapp ``` ```sh tab={"label":"Windows"} # Windows (Git Bash): libcxx.sh points the C++ build at V8's libc++ source engine/crates/taji/scripts/libcxx.sh pnpm --filter @taji/ui build pnpm --filter @taji/window build cargo build --locked -p taji-open make sidecar whatsapp ``` Cargo ends with `Finished`. The kernel is `target/debug/taji`, with `taji-tailscale` and `taji-whatsapp` beside it (`.exe` on Windows), and `taji-unlock` on macOS, the Touch ID helper. ## Run 1. **With the window.** `make dev` runs the builds above, then opens Taji's window. ```sh make dev ``` `FRESH=1 make dev` starts empty, with state, store and home under `target/fresh` on port 7790, and never attaches to a kernel on 7780. 2. **Headless**, the wire the only client. `TAJI_WIRE=0` takes a free port, which the kernel writes to `wire-port` in its state dir, after its token: ```sh export TAJI_STATE_DIR=$(mktemp -d) TAJI_STORE_DIR=$(mktemp -d) TAJI_HOME=$(mktemp -d) TAJI_WIRE=0 TAJI_HEADLESS=1 target/debug/taji & until [ -s "$TAJI_STATE_DIR/wire-token" ]; do sleep 1; done curl -H "x-taji-token: $(cat "$TAJI_STATE_DIR/wire-token")" "http://127.0.0.1:$(cat "$TAJI_STATE_DIR/wire-port")/read/desks" ``` The kernel listens on `127.0.0.1` only. Each launch writes new tokens to the state dir, and every request carries `wire-token` as `x-taji-token` ([the wire](https://docs.taji.is/reference/wire.md)). One kernel runs per state dir and store. The answer lists the desks of the empty state, one active: ```json file="examples/install/desks.json" [ { "active": true, "created_at": 1796331819, "id": "01a23db8-4fff-7583-ae2b-b12000a08625", "last_active": 1796331819, "name": null, "notes": 0 } ] ``` *Captured 2026-12-03 on a keyless headless kernel.* 3. Stop it, with the same variables set: `target/debug/taji quit` prints `taji quit: stopped Taji on 127.0.0.1:`. ## Upgrade Stop Taji ([below](#stop-and-reset)), `git pull` and build again; the state dir is kept. Before 1.0 an upgrade can change the store's layout: the next start rebuilds an older store from `pulls.db`, and refuses one a newer Taji wrote (run that Taji, or delete the store dir's `taji.duckdb` to rebuild it). Never `make reset` for this: it deletes the state, store and home. What a version may change: [Compatibility](https://docs.taji.is/reference/compatibility.md). ## Stop and reset - Stop one Taji: `target/debug/taji quit`. It reads `TAJI_WIRE` (default 7780) and the state dir's token. `POST /verb/ui/quit` does the same. Holding exits, it refuses, naming them; `taji quit --yes` stops them too. - Stop every running Taji: `make down`. - Start over: `make reset` lists the state, store and home it would delete and stops there. With Taji stopped, `YES=1 make reset` deletes them and removes Taji's MCP server and skill from every agent it finds. Unless `TAJI_STATE_DIR`, `TAJI_STORE_DIR` and `TAJI_HOME` name them, they are: | | State | Store | Home | |---|---|---|---| | macOS | `~/Library/Application Support/Taji` | `~/.local/share/taji/store` | `~/.taji` | | Linux | `~/.local/share/taji` | `~/.local/share/taji/store` | `~/.taji` | | Windows | `%LOCALAPPDATA%\Taji` | `%LOCALAPPDATA%\Taji\store` | `%USERPROFILE%\.taji` | On Linux an absolute `$XDG_DATA_HOME` replaces `~/.local/share`. ## Windows 1. Update Windows to 24H2 build 26100.9278 or later (`winver` shows it). Process plugins and the Python sources (Yahoo, EDGAR) need a sandbox that [KB5120998](https://support.microsoft.com/en-us/servicing/os/windows-11/2026/08/kb5120998-windows-11-24h2-25h2-update) rolls out gradually, so a machine at that build may lack it; once built, Yahoo's and EDGAR's `GET /read/plugins` rows reading `enabled: true` and `reason: null` show it, where a machine without it reads `no sandbox: …`. 2. The Visual Studio workload `Microsoft.VisualStudio.Workload.VCTools` (the MSVC x64 tools and a Windows 11 SDK) comes with the Build Tools command above. LLVM 21 or later needs `C:\Program Files\LLVM\bin` on `PATH`. 3. `rustup`'s default host is `x86_64-pc-windows-msvc`. You do not need NASM, CMake or Developer Mode. Build and run as above. The kernel is `taji.exe` in `target/debug/`, with `taji-tailscale.exe` and `taji-whatsapp.exe` beside it. ## Linux - Process plugins and the Python sources (Yahoo, EDGAR) run only in the sandbox. [Security](https://docs.taji.is/architecture/security.md) holds the sandbox suite's results. - On Ubuntu 24.04, allow unprivileged user namespaces for unprofiled programs: `sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0`. - On Debian, add `/usr/sbin` to your `PATH`: `iptables` lives there. - The vault opens by backup password alone. - Closing the window leaves Taji running. GNOME shows its tray item only with the AppIndicator extension; without it, `taji ui` reopens Taji and `taji quit` stops it. - To run plugins you wrote unconfined, use a debug build with `TAJI_UNSANDBOXED=1`. ## If it fails - **`another Taji owns `, exit 0.** A kernel holds that state dir or store. Run `target/debug/taji quit` or `make down`, or give the second its own `TAJI_STATE_DIR` and `TAJI_STORE_DIR`. - **`no sandbox: …` on every process plugin and Python source (Linux).** Bubblewrap, unprivileged user namespaces, `slirp4netns`, `iptables` or `ip` is missing or off, the message naming which. Nothing runs unconfined: fix the cause under [Linux](#linux). - **`no sandbox: needs Windows' process isolation, …: run Windows Update` on every process plugin and Python source; the chart shows it for Yahoo's bars (Windows).** The build is below the floor or KB5120998's rollout has not reached it; nothing runs unconfined. - **The linker is killed or the build runs out of memory.** Set `CARGO_BUILD_JOBS=2` (Linking with GNU ld is memory-hungry; this fits a 16 GB machine). ## Next - [Quickstart](https://docs.taji.is/guide/first-session.md): a first order on the simulated broker. - [Connect your agent](https://docs.taji.is/guide/agent.md): register Taji's MCP bridge from this checkout. - [Configuration](https://docs.taji.is/reference/configuration.md): every variable, setting and file. > Every Taji docs page as Markdown: https://docs.taji.is/llms.txt # Arrange desks, panes and layouts You end with a desk laid out your way: panes placed, charts synced, layouts named, by hand in the window or by the wire requests your agent sends. You need a running Taji window ([Install](https://docs.taji.is/guide/install.md)). A desk is one line of work ([Glossary](https://docs.taji.is/reference/glossary.md)); a layout is one arrangement of panes on it. ## Make and switch desks 1. Click **New desk** in the left bar (**⌘ B** shows or hides it), type a name and press Enter. The new desk becomes active; Esc cancels. 2. Click a desk's name in the left bar to switch desks. 3. A desk's **⋮** menu (or a right-click) holds **Rename**, **Move up** and **Move down**, and **Remove…**, which asks first. ## Arrange the panes 1. Click **+** (New layout, **⌘ T**) after the layout tabs. It opens as a new layout on one chart of the focused chart's symbol. 2. Click **All panes** in the dock (**⌘ ⌥ B**, or point at the dock's edge, the right one unless you moved it), then a card (type in its search to find one): it takes the right half of the focused pane, and the gallery stays open; or drag a card or dock icon onto the canvas. An empty layout shows the same gallery. A dock click opens a popup or focuses the pane. 3. Drag a pane by its head or a tab onto another pane: drop it on an outer third to place it beside, on the middle to place it above or below, or on the head to stack it as a tab. A preview marks where it lands. **⋮** moves or maximizes it too (**Place** on a popup places it), and **✕** (**⌘ W**) closes it. 4. Drag the gap between two panes to resize them; double-click it to even them. 5. With more than one pane, ⌥-click a chart (Toggle maximize chart, **⌥ ↵**) to show the focused pane alone; again to return. Each pane's controls are on its own page: | Pane | Opens as | Page | |---|---|---| | Chart | pane | [Chart](https://docs.taji.is/catalog/chart.md) | | Ladder | pane | [Ladder](https://docs.taji.is/catalog/ladder.md) | | Watchlist | pane | [Watchlist](https://docs.taji.is/catalog/watchlist.md) | | Book | pane | [Book](https://docs.taji.is/catalog/book.md) | | Calendar | pane | [Calendar](https://docs.taji.is/catalog/calendar.md) | | Screener | pane | [Stock Screener](https://docs.taji.is/catalog/screener.md) | | Options | pane | [Options](https://docs.taji.is/catalog/options.md) | | Reference | pages in place of the chart | [Reference](https://docs.taji.is/catalog/reference.md) | ## Sync charts 1. In the active layout tab's **⋮** menu, switch on what this layout's charts share under **Sync in layout**: **Symbol**, **Interval**, **Crosshair**, **Time** or **Date range**. 2. Each chart's head leads with a link dot. Pick one of five groups (🔶 🍀 💧 ❤️ 💩): charts in a group follow each other's symbol and interval, on any of the desk's layouts. Pick the same group again to leave it. ## Save and switch layouts 1. Taji keeps every change as you make it; there is nothing to save. 2. Each layout of the open desk is a tab in the top bar: click one to switch, or step with `⌘ ⌥ →` and `⌘ ⌥ ←`. 3. Double-click a tab to rename it: Enter commits, Esc restores. Its **⋮** menu holds **Rename**, **Duplicate**, **Download chart data…**, **Sync in layout**, **Move left** and **Move right** where the tab can go, and **Remove…**, which asks first. ## Lay out a desk over the wire Each act above is a request to the kernel's wire, and the window and your agent send the same ones ([the wire](https://docs.taji.is/reference/wire.md)). `calls.json` lists six: it renames the desk, adds a layout named Compare, places a QQQ chart and a watchlist in it, syncs symbol and crosshair, and reads the layouts back. `{desk}` stands for the desk's id, which `GET /read/desks` lists. A layout's `panes` and a new pane's id are numbers the kernel hands out, so each request that needs one takes it from the answer before. ```json file="examples/desks/calls.json" title="calls.json" [ {"name": "rename", "method": "POST", "route": "/verb/desk/{desk}/rename", "body": {"name": "Pairs"}}, {"name": "layout", "method": "POST", "route": "/verb/desk/{desk}/layouts/add", "body": {"name": "Compare"}}, {"name": "chart", "method": "POST", "route": "/verb/desk/{desk}/layout/add_pane", "body": {"kind": "chart", "symbol": "equity:QQQ", "position": "right"}}, {"name": "watchlist", "method": "POST", "route": "/verb/desk/{desk}/layout/add_pane", "body": {"kind": "watchlist", "anchor_pane_id": "{chart.pane_ids[0]}", "position": "below"}}, {"name": "sync", "method": "POST", "route": "/verb/desk/{desk}/layout/set_sync", "body": {"symbol": true, "crosshair": true}}, {"name": "layouts", "method": "GET", "route": "/read/desk/{desk}/layouts", "shot": "{chart.pane_ids[0]}"} ] ``` ![The Compare layout's QQQ chart, one of its three panes](https://raw.githubusercontent.com/TajiAI/Taji/main/docs/guide/examples/desks/shot.png) The picture is the QQQ chart pane the calls placed: the capture photographs one pane, not the whole desk. 1. **`POST /verb/desk/{desk}/rename`** with `{"name": "Pairs"}` names the desk, as **Rename** in its menu does. The answer is the desk's id. `POST /verb/desks/new` with `{"name": ...}` makes a desk instead and answers its id and directory; `switch` and `delete` take no body, and `POST /verb/desks/order` takes every desk's id once, in the new order. ```json file="examples/desks/rename.json" { "desk": "01a24252-53bc-700b-9502-40fd3f0bb021" } ``` 2. **`POST /verb/desk/{desk}/layouts/add`** with `{"name": "Compare"}` is **+**: a layout at the end of the strip, active, over one chart of the focused chart's symbol. Its `preset` (`single`, `two_col`, `two_row`, `three_col`, `left_major_right_stacked`, `quad_grid`) and `panes` shape it in the same request. The answer is the new layout's number. ```json file="examples/desks/layout.json" { "id": 2, "node": "desk/01a24252-53bc-700b-9502-40fd3f0bb021/layouts" } ``` 3. **`POST /verb/desk/{desk}/layout/add_pane`** with `{"kind": "chart", "symbol": "equity:QQQ", "position": "right"}` places a chart on the right half of the focused pane, as an All panes card does. `pane_ids` is the new pane's number. ```json file="examples/desks/chart.json" { "node": "desk/01a24252-53bc-700b-9502-40fd3f0bb021/layout", "pane_ids": [ 9 ] } ``` 4. **The same route** with `{"kind": "watchlist", "anchor_pane_id": , "position": "below"}` halves the QQQ chart's stack and puts a watchlist under it. `position` is `left`, `right`, `above`, `below` or `tab`, the zones of a drag; only a chart takes a `symbol` or `timeframe`. A half under a pane's least size is refused with 409 `no_room`. ```json file="examples/desks/watchlist.json" { "node": "desk/01a24252-53bc-700b-9502-40fd3f0bb021/layout", "pane_ids": [ 11 ] } ``` 5. **`POST /verb/desk/{desk}/layout/set_sync`** with `{"symbol": true, "crosshair": true}` switches on those two of the layout's five **Sync in layout** toggles (`symbol`, `interval`, `crosshair`, `time`, `date_range`); the others keep their value. ```json file="examples/desks/sync.json" { "node": "desk/01a24252-53bc-700b-9502-40fd3f0bb021/layout" } ``` 6. **`GET /read/desk/{desk}/layouts`** reads the strip in order, exactly one `active`, each row's `panes` the ids of every pane it holds. ```json file="examples/desks/layouts.json" [ { "active": false, "id": 1, "name": "Layout 1", "panes": [ 1, 6, 2, 4, 5 ], "symbol": "equity:SPY", "timeframe": "D" }, { "active": true, "id": 2, "name": "Compare", "panes": [ 8, 9, 11 ], "symbol": "equity:QQQ", "timeframe": "D" } ] ``` *Captured 2026-12-04 on a headless kernel, its chart a made-up daily series for SPY.* The other layout verbs are `move_pane` (a drag; with `layout` it lands in another layout of the desk), `resize {split, at}`, `set_kind`, `close_pane`, `set_link` and `popup`; the layout's own are `layouts/pick`, `rename`, `remove`, `copy` and `order`. Each, with its body and refusals, is a row of the wire's route table ([the wire](https://docs.taji.is/reference/wire.md)). ## If it fails - **A layout has no Remove.** It is the desk's last layout; over the wire, `layouts/remove` answers 409 `last_layout`. - **A chart's chip reads Delayed, Not live or Disconnected.** The kernel marks a quote **Delayed**; a refused stream shows **Not live** and a lapsed one **Disconnected**. Keyless data is delayed: [Yahoo Finance](https://docs.taji.is/catalog/yahoo.md) serves delayed bars and quotes but streams no bars, so a keyless chart reads **Not live**. Linking an account lists each class as **Real-time**, **History** or **Delayed**; `GET /read/data/freshness` gives how late each linked source can be and `GET /read/data/liveness` what flows now. ## Next - [Place and cancel orders](https://docs.taji.is/guide/trading.md): the ticket on a chart, and whether your agent's orders wait for you. - [Chart](https://docs.taji.is/catalog/chart.md): the pane you will place most. - [The wire](https://docs.taji.is/reference/wire.md): every desk and layout route, with its refusals. - [Connect your agent](https://docs.taji.is/guide/agent.md): let your agent send these requests. > Every Taji docs page as Markdown: https://docs.taji.is/llms.txt # Place and cancel orders You pick the account your orders go to, place an order from the ticket, the chart or the ladder, cancel it, and decide whether your agent's orders wait for you. You need a running window ([install](https://docs.taji.is/guide/app.md) or [build](https://docs.taji.is/guide/install.md)); `taji_sim`, Taji's simulated account, needs no key, and the [quickstart](https://docs.taji.is/guide/first-session.md) places a first order on it. ## Pick an account 1. Open Accounts (Account › Accounts in the left bar). It lists every linked account of the stage, with one book across them. 2. Read each account's handle: `taji_sim`, `_paper_` or `_live_`, the last four being the venue's own account number's. A handle always spells its side of the paper and live line. 3. Pick where orders go in the top bar's book chip. Its popover lists Paper, then Live, each with its accounts and, with more than one, Intelligent routing (each order to the account the router picks). Picking an account in the other stage switches the window's stage to it. Every launch starts on the paper stage. The paper stage holds every account that is not live, `taji_sim` included. `taji_sim` is a simulated broker inside Taji, made the first time Taji starts, for equities, options, futures and crypto. It keeps its book and journal across restarts, and no order it takes leaves your machine. It refuses a market order on one option contract and a resting equity order on a symbol with no quote stream; a limit order on one option contract fills only where that contract has bars. [Orders](https://docs.taji.is/architecture/orders.md#how-does-taji_sim-fill-an-order) holds its fill rules. ## Place an order 1. Open the ticket: it floats over the chart. Shift+T, pressed anywhere outside a text field, opens it on the focused chart (else the last one focused) on a market buy, and places nothing. 2. Pick buy or sell with the bid and ask halves, the type with the tabs (Market, Limit, Stop, and any other the account offers), and the size. Exits adds a take profit and a stop loss. The line under the halves names the account and stage the order goes to. 3. Press the button. Staging reaches no venue; only the place does. A place passes the kernel's checks and is written to the account's journal before it goes to the account's venue, which for `taji_sim` is the simulator inside Taji ([Orders](https://docs.taji.is/architecture/orders.md#where-does-an-order-go-before-it-reaches-a-broker)). Other ways to stage one: - A staged order draws on the chart; its Buy or Sell chip places it, behind a confirm unless One-click trading is on (Chart settings › Trading; off by default). - ⇧B and ⇧S stage a market order at the quoted side, ask or bid; with no quote on that side they send nothing and say so. A ladder click stages a limit. With One-click trading on, each places at once. - Click the chart's price-axis + or right-click the plot to stage a limit or stop there. Dragging a working order's line to a new price asks to confirm unless One-click trading is on. Orders are tested on paper, sim and demo accounts only. ## Place an order on a live account 1. Pick a live account in the book chip: the window's stage turns Live. 2. Place as above. The ticket sends the order with `live: true`, and the kernel refuses an order whose `live` does not match its account's side of the line. ## Where your stops rest A stop you send rests at the venue. Taji holds a stop itself, only while Taji runs, in two cases: - A spread's stop and take, and a bracket's pair the venue does not rest on the entry. The ticket asks before it sends them (`held: true`). - A plan leg the venue does not rest, which needs `held: true` to arm; the chart tags it "Taji holds". ## Cancel an order - Chart: the order line's ✕ or its Cancel order cancels at once. - Book pane: the order's row, Cancel order, which asks to confirm. - Ladder: an order's ✕, or Cancel all; both ask unless One-click trading is on. ## Read how an order ended An ended order's Status is the venue's word: Filled, Cancelled, Expired or Rejected, and the Filled column says how much executed. An order the venue ended with part filled by neither word reads Partially filled. A filled order whose fills the venue busts (cancels after the fact) is filled no longer: with part left it reads Partially filled, with none Cancelled, and the notice says it was busted. ## Decide what your agent's orders do Your own click in Taji's window is never held. An order sent by your agent, or by a script with the wire token, waits for your approval while its account's Agent approvals is on (by default on a live account, off on paper accounts and `taji_sim`), and always when it names no account. So, while approvals are on, does your agent's cancel or disarm that strips an exit over shares you hold. Your agent's reprice or cancel of an order Taji did not place always waits. 1. Open Connections, then the venue's page. Its accounts table has an Agent approvals switch per account and, on a live account, an Auto-route switch (off by default: an order with no account never routes to that account). 2. Turn Agent approvals off, and confirm, to send its orders at once. Only Taji's own window turns them off. While the vault is locked, every venue account reads on. `taji_sim` has no page in Connections, so the window has no switch for it yet: you turn its approvals on with your own token over the wire, as [Have your agent place a `taji_sim` order](https://docs.taji.is/cookbook/agent-sim-order.md) does, and they then stay on. The capture below turns `taji_sim`'s approvals on and places a staged order with the wire token, as your agent would. `calls.json` lists the wire requests in order; `{bars.[-1].close}` and `{stage.rev}` stand for values from earlier answers: ```json file="examples/trading/calls.json" title="calls.json" [ {"name": "accounts", "method": "GET", "route": "/read/link/accounts"}, {"name": "approvals_on", "method": "POST", "route": "/verb/link/accounts/taji_sim/approvals", "body": {"on": true}}, {"name": "bars", "method": "GET", "route": "/get/bars?symbols=equity:SPY&timeframe=D&limit=1"}, {"name": "stage", "method": "POST", "route": "/verb/trading/taji_sim/draft/stage", "body": {"symbol": "equity:SPY", "side": "buy", "qty": 10, "order_type": "limit", "price": 140, "spot": "{bars.[-1].close}"}}, {"name": "place", "method": "POST", "route": "/verb/trading/taji_sim/draft/place", "body": {"rev": "{stage.rev}"}, "shot": true} ] ``` ![Chart 1 of SPY with a staged 10-share buy limit at 140 on the price scale, the order ticket open on the right, and the approval card over the chart with Decline and Approve](https://raw.githubusercontent.com/TajiAI/Taji/main/docs/guide/examples/trading/shot.png) 1. **`accounts`** is `GET /read/link/accounts`, every account row on this device. On a fresh Taji, `taji_sim` is the one row: `live` false, `approvals` false. 2. **`approvals_on`** is `POST /verb/link/accounts/taji_sim/approvals` with `{on: true}`. Your agent's token is refused it (403 `scope`). 3. **`bars`** reads SPY's last daily bar, whose close is the draft's `spot`. 4. **`stage`** stages a 10-share buy limit at 140 on `taji_sim`. The ticket opens on it and its line draws on the chart, as in the picture; nothing is sent. 5. **`place`** places the draft its `rev` names. With approvals on, the kernel sends nothing: it parks the place and answers 202. The accounts read: ```json file="examples/trading/accounts.json" [ { "alias": "sim", "allocated_usd": "0", "approvals": false, "approved": true, "arm": "sim", "bound": true, "brokerage": "sim", "classes": [ "equity", "option", "future", "crypto" ], "id": "taji_sim", "kind": "", "linked_at": "2026-12-04T18:32:29.048539Z", "live": false, "reason": null, "record": "", "settling": false, "state": "bound", "tail": "" } ] ``` The answer to the place, 202: ```json file="examples/trading/place.json" { "approval": "01a24254-4ad9-763c-8dec-95e036e8f7f5", "expires_at": 1796412750, "window": false, "summary": "SPY · BUY · LIMIT 140.00 · 10 shares · DAY on taji_sim" } ``` *Captured 2026-12-04 on a headless kernel reading a made-up daily series for SPY.* The held order is the card in the picture. It sits at the canvas's top centre, or under the conversation's head while the conversation shows: the agent, the order, the account, the held route and draft, why it waits, the minutes left, Decline and Approve. Approve sends it as your agent's, and its checks run then; Decline sends nothing. A card waits an hour in memory; a restart drops it, sending nothing. An account holds five pending; the next is refused. [Orders](https://docs.taji.is/architecture/orders.md#when-does-an-order-wait-for-your-approval) says why the path is built this way; [Connect your agent](https://docs.taji.is/guide/agent.md#bound-your-agent), what else your agent waits for. ## See your positions as groups A group is 2 to 4 held equity or option legs of one underlying held together, such as a short iron condor. Its preset names it (`short_iron_condor`); it has its own figures. Your agent reads your groups and edits them (create, update, split, merge); an edit places no order. The window has no groups view yet. TradeStation keeps its groups, so an edit shows in TradeStation's own platform too. On every other venue Taji keeps them on your machine. ## If it fails - **409 `live_intent` or `not_live`.** The order and the account disagree about live. Pick the account in the matching stage. - **409 `not_by_hand`, "Quit Taji and open it again".** The order came from a page other than Taji's own window, and such a page cannot send what its account holds for approval. Quit Taji, open it again and send it from the window. - **429 `approvals_full`.** Five of the agent's acts already wait on that account. Approve or decline them first. - **"Not sent: no ask" (or bid).** ⇧B and ⇧S need a quote on their side. Open the ticket with ⇧T and send a limit instead. ## Next - [Have your agent place a `taji_sim` order](https://docs.taji.is/cookbook/agent-sim-order.md): an agent's order, parked for your approval. - [Connect your agent](https://docs.taji.is/guide/agent.md): what your agent may do without you, and what waits. - [Orders](https://docs.taji.is/architecture/orders.md): how the kernel sends, journals and fills an order. > Every Taji docs page as Markdown: https://docs.taji.is/llms.txt # Read market data You read Taji's market data with one call per product, `GET /get/`: bars, quotes, depth, trades, option chains, news, corporate actions, earnings, fundamentals, filings, insider trades, fund holdings and economic releases, each the same call whatever provider answers, so nothing changes when you link another ([why](https://github.com/TajiAI/Taji/blob/main/docs/decisions/0004-capabilities-through-the-hub.md)). A keyless Taji answers the five calls below from its own sources, and [Coverage](https://docs.taji.is/reference/coverage.md) says which provider serves which product. Data of your own, a CSV, a private feed or a database, is served the same way by a plugin you write ([Chart your own CSV](https://docs.taji.is/cookbook/python-csv-source.md)). You need a running Taji, `curl`, and Python with `pyarrow` (`pip install pyarrow`) to decode the answers. ## 1. Your first read Define `get` once: it calls your own Taji's [wire](https://docs.taji.is/reference/glossary.md) with the token Taji writes for you and prints the answer's metadata, then its rows. Then read SPY's last two daily bars: ```sh STATE="$HOME/Library/Application Support/Taji" get() { curl -s -H "x-taji-token: $(cat "$STATE/wire-token")" "http://localhost:$(cat "$STATE/wire-port")$1" | python3 -c 'import sys, pyarrow as pa b = sys.stdin.buffer.read() if b[:1] == b"{": sys.exit(b.decode()) t = pa.ipc.open_stream(b).read_all() print({k.decode(): v.decode() for k, v in t.schema.metadata.items()}); print(t.to_pylist())' } get "/get/bars?symbols=equity:SPY&timeframe=D&limit=2" ``` `STATE` is the macOS state dir; [Configuration](https://docs.taji.is/reference/configuration.md) names Linux's and Windows'. The answer, as the harness decoded it to JSON (prices are `Decimal128` on the wire, instants UTC): ```json file="examples/market-data/bars.json" { "metadata": { "adjustment": "raw", "dataset_id": "bars:csv-source:SPY:D:raw", "provider": "{\"equity:SPY\":\"csv-source\"}", "source": "{\"equity:SPY\":\"vendor\"}", "timeframe": "D" }, "rows": [ { "symbol": "SPY", "provider": "csv-source", "start_dt": "2026-12-02T00:00:00+00:00", "knowable": "2026-12-02T21:00:00+00:00", "open": 140.84, "high": 141.21, "low": 140.78, "close": 141.19, "volume": 4500000, "vwap": null, "trade_count": null, "up_volume": null, "down_volume": null }, { "symbol": "SPY", "provider": "csv-source", "start_dt": "2026-12-03T00:00:00+00:00", "knowable": "2026-12-03T21:00:00+00:00", "open": 141.45, "high": 143.43, "low": 141.23, "close": 142.62, "volume": 5000000, "vwap": null, "trade_count": null, "up_volume": null, "down_volume": null } ] } ``` *Captured 2026-12-04 on a headless kernel reading a made-up daily series for SPY.* The `provider` in the metadata names who answered, here `csv-source`, the made-up series (on your Taji, a source you have, such as `yahoo`), and `source` says it came from the `vendor` and not your store; each row is one bar, oldest first, with `knowable` the instant it could first be read. ## 2. A quote ```sh get "/get/quotes?symbols=equity:SPY" ``` ```json file="examples/market-data/quote.json" { "metadata": { "provider": "{\"equity:SPY\":\"samplefeed\"}", "source": "{\"equity:SPY\":\"vendor\"}" }, "rows": [ { "symbol": "SPY", "ts": "2026-12-04T20:21:11.955014+00:00", "ts_init": 1796415671955014000, "provider": "samplefeed", "delayed": false, "halted": null, "session": null, "bid": 143.07, "ask": 143.09, "last": 143.08, "bid_size": null, "ask_size": null, "book_ts": null, "last_ts": null, "last_exchange": null, "last_conditions": [], "prev_close": 142.62, "change": 0.46, "change_pct": 0.3225, "session_close": null, "session_change": null, "session_change_pct": null, "market_session": "regular", "next_session": "post", "next_at": "2026-12-04T21:00:00+00:00" } ] } ``` *Captured 2026-12-04 on a headless kernel reading a made-up quote for SPY.* A quote is one row per symbol, `bid`, `ask` and `last` with `last_ts` dating the trade behind `last`, and `market_session` is the calendar's word for the moment you asked (`regular` here, during the session); after the close it reads `post`, and the quote is the last session's. ## 3. An option chain ```sh get "/get/chains?symbols=equity:SPY&expiry=2026-12-18&strikes=2&right=call" ``` ```json file="examples/market-data/chain.json" { "metadata": { "expiries": "{\"equity:SPY\":[{\"atm_strike\":\"143\",\"dte\":14,\"expiry\":\"2026-12-18\",\"root\":\"SPY\"}]}", "feed": "{}", "provider": "{\"equity:SPY\":\"samplefeed\"}", "source": "{\"equity:SPY\":\"vendor\"}", "spot": "{\"equity:SPY\":\"143.08\"}" }, "rows": [ { "underlying": "SPY", "provider": "samplefeed", "snapshot_dt": "2026-12-04T20:21:12.345965+00:00", "contract": "SPY261218C00143000", "root": "SPY", "expiry": "2026-12-18", "strike": 143, "right": "call", "listed": true, "tradable": null, "ts": null, "ticks": [ { "from": 0, "increment": 0.01 }, { "from": 3, "increment": 0.05 } ], "spread_ticks": null, "last_trade_at": null, "first_notice": null, "settlement": null, "style": null, "expiry_type": null, "qty_step": 1, "min_qty": 1, "multiplier": 100, "bid": 1.86, "ask": 1.9, "mid": 1.88, "last": null, "spot": 143.08, "volume": null, "open_interest": 12189, "iv": 0.1602, "bid_iv": 0.1518, "ask_iv": 0.1554, "delta": 0.5345, "gamma": 0.0885, "theta": -0.0725, "vega": 0.1114, "rho": 0.0286, "theo": 1.9535, "std_dev": 0.0314, "p_itm": null, "p_otm": null, "p_be": null, "p_itm_iv": 0.522, "p_otm_iv": 0.478, "p_be_iv": 0.3591, "computed": [ "bid_iv", "ask_iv", "delta", "gamma", "theta", "vega", "rho", "theo", "std_dev", "probability" ], "intrinsic": 0.08, "time_value": 1.8735, "breakeven": 144.9535, "to_breakeven_pct": 1.3094073246, "distance": 0.08, "distance_pct": 0.0559127761, "spread_pct": 2.1276595745, "bid_yield_pct": 1.2999720436, "ask_yield_pct": 1.3279284316, "bid_yield_ann_pct": 33.8921282799, "ask_yield_ann_pct": 34.6209912536, "iv_spread": 0.0036 }, { "underlying": "SPY", "provider": "samplefeed", "snapshot_dt": "2026-12-04T20:21:12.345965+00:00", "contract": "SPY261218C00144000", "root": "SPY", "expiry": "2026-12-18", "strike": 144, "right": "call", "listed": true, "tradable": null, "ts": null, "ticks": [ { "from": 0, "increment": 0.01 }, { "from": 3, "increment": 0.05 } ], "spread_ticks": null, "last_trade_at": null, "first_notice": null, "settlement": null, "style": null, "expiry_type": null, "qty_step": 1, "min_qty": 1, "multiplier": 100, "bid": 1.72, "ask": 1.76, "mid": 1.74, "last": null, "spot": 143.08, "volume": null, "open_interest": 4497, "iv": 0.1582, "bid_iv": 0.1821, "ask_iv": 0.1857, "delta": 0.4453, "gamma": 0.0891, "theta": -0.0699, "vega": 0.1108, "rho": 0.0239, "theo": 1.4544, "std_dev": 0.031, "p_itm": null, "p_otm": null, "p_be": null, "p_itm_iv": 0.4331, "p_otm_iv": 0.5669, "p_be_iv": 0.2891, "computed": [ "bid_iv", "ask_iv", "delta", "gamma", "theta", "vega", "rho", "theo", "std_dev", "probability" ], "intrinsic": 0, "time_value": 1.4544, "breakeven": 145.4544, "to_breakeven_pct": 1.6594911937, "distance": 0.92, "distance_pct": 0.6429969248, "spread_pct": 2.2988505747, "bid_yield_pct": 1.2021246855, "ask_yield_pct": 1.2300810735, "bid_yield_ann_pct": 31.3411078717, "ask_yield_ann_pct": 32.0699708455, "iv_spread": 0.0036 } ] } ``` *Captured 2026-12-04 on a headless kernel reading a made-up option chain for SPY.* `expiry` picks one date and `strikes=2` the two strikes nearest `spot`, which the metadata states beside the listed `expiries`; each row is one contract with its quote, volume and open interest, and its greeks are Taji's own where `computed` names them (use another `expiry` once this one has passed). ## 4. Earnings ```sh get "/get/earnings?symbols=equity:ACME&from=2026-01-01&to=2027-02-01" ``` ```json file="examples/market-data/earnings.json" { "metadata": { "provider": "{\"equity:ACME\":\"samplefeed\"}", "source": "{\"equity:ACME\":\"vendor\"}" }, "rows": [ { "symbol": "ACME", "item": "equity:ACME", "knowable_utc": 1769720700, "report_date": "2026-01-29", "timing": "amc", "fiscal_year": 2025, "fiscal_period": "Q4", "eps_estimate": 1.42, "eps_actual": 1.51, "eps_surprise": 0.09, "eps_surprise_pct": 6.338, "revenue_estimate": 2150000000, "revenue_actual": 2210000000, "revenue_surprise": 60000000, "revenue_surprise_pct": 2.7907, "verified": true, "provider": "samplefeed", "revenue_estimate_provider": "samplefeed", "revenue_actual_provider": "samplefeed", "name": null, "primary": null }, { "symbol": "ACME", "item": "equity:ACME", "knowable_utc": 1777579500, "report_date": "2026-04-30", "timing": "amc", "fiscal_year": 2026, "fiscal_period": "Q1", "eps_estimate": 1.38, "eps_actual": 1.33, "eps_surprise": -0.05, "eps_surprise_pct": -3.6232, "revenue_estimate": 2090000000, "revenue_actual": 2075000000, "revenue_surprise": -15000000, "revenue_surprise_pct": -0.7177, "verified": true, "provider": "samplefeed", "revenue_estimate_provider": "samplefeed", "revenue_actual_provider": "samplefeed", "name": null, "primary": null }, { "symbol": "ACME", "item": "equity:ACME", "knowable_utc": 1785441900, "report_date": "2026-07-30", "timing": "amc", "fiscal_year": 2026, "fiscal_period": "Q2", "eps_estimate": 1.45, "eps_actual": 1.58, "eps_surprise": 0.13, "eps_surprise_pct": 8.9655, "revenue_estimate": 2180000000, "revenue_actual": 2260000000, "revenue_surprise": 80000000, "revenue_surprise_pct": 3.6697, "verified": true, "provider": "samplefeed", "revenue_estimate_provider": "samplefeed", "revenue_actual_provider": "samplefeed", "name": null, "primary": null }, { "symbol": "ACME", "item": "equity:ACME", "knowable_utc": 1793304300, "report_date": "2026-10-29", "timing": "amc", "fiscal_year": 2026, "fiscal_period": "Q3", "eps_estimate": 1.55, "eps_actual": 1.61, "eps_surprise": 0.06, "eps_surprise_pct": 3.871, "revenue_estimate": 2240000000, "revenue_actual": 2295000000, "revenue_surprise": 55000000, "revenue_surprise_pct": 2.4554, "verified": true, "provider": "samplefeed", "revenue_estimate_provider": "samplefeed", "revenue_actual_provider": "samplefeed", "name": null, "primary": null }, { "symbol": "ACME", "item": "equity:ACME", "knowable_utc": 1793624400, "report_date": "2027-01-28", "timing": "amc", "fiscal_year": 2026, "fiscal_period": "Q4", "eps_estimate": 1.66, "eps_actual": null, "eps_surprise": null, "eps_surprise_pct": null, "revenue_estimate": 2350000000, "revenue_actual": null, "revenue_surprise": null, "revenue_surprise_pct": null, "verified": false, "provider": "samplefeed", "revenue_estimate_provider": "samplefeed", "revenue_actual_provider": null, "name": null, "primary": null } ] } ``` *Captured 2026-12-04 on a headless kernel reading made-up earnings for ACME.* Each row is one report, with its `report_date`, `timing` (`amc` after the close, `bmo` before the open) and the estimate, actual and surprise of its earnings per share and revenue; the last row is scheduled, so its actuals and surprises are null until the company reports. `provider` names who stated the row (here the made-up `samplefeed`), and `name` and `primary` are null because the kernel's listings do not know ACME. `from` is required: without it the kernel answers 400 `bad_ask`; `to` ends the range, which otherwise ends now and would leave the scheduled report out. ## 5. The same bars, as of a past date ```sh get "/get/bars?symbols=equity:SPY&timeframe=D&from=2026-11-24&at=2026-11-27T17:00:00Z" ``` ```json file="examples/market-data/past.json" { "metadata": { "adjustment": "raw", "dataset_id": "bars:csv-source:SPY:D:raw", "provider": "{\"equity:SPY\":\"csv-source\"}", "source": "{\"equity:SPY\":\"store\"}", "timeframe": "D" }, "rows": [ { "symbol": "SPY", "provider": "csv-source", "start_dt": "2026-11-24T00:00:00+00:00", "knowable": "2026-11-24T21:00:00+00:00", "open": 137.68, "high": 138.22, "low": 136.76, "close": 137.32, "volume": 5500000, "vwap": null, "trade_count": null, "up_volume": null, "down_volume": null }, { "symbol": "SPY", "provider": "csv-source", "start_dt": "2026-11-25T00:00:00+00:00", "knowable": "2026-11-25T21:00:00+00:00", "open": 137.31, "high": 140.3, "low": 136.39, "close": 139.53, "volume": 2000000, "vwap": null, "trade_count": null, "up_volume": null, "down_volume": null } ] } ``` *Captured 2026-12-04 on a headless kernel reading a made-up daily series for SPY.* `at` reads the bars as the market could have shown them at that instant, so the 2026-11-27 bar, which became knowable only at that day's close, is not in the answer; an `at` needs a `from`, and a `to` past `at` is refused as `lookahead` ([Data](https://docs.taji.is/architecture/data.md#what-can-a-read-see-at-an-instant)). ## The pattern Every product is `GET /get/` with `symbols`, a span (`from`, `to`, `limit`) and `at`; and the answer names its `provider`. Who can make the same call: | Who reads | How | |---|---| | Your agent | The `read` tool, the same route ([Wire](https://docs.taji.is/reference/wire.md)) | | An indicator | A `data` entry ([Inputs](https://docs.taji.is/indicators/inputs.md#how-does-a-script-read-another-series)) | | A plugin | `[grants] reads` in its manifest ([Build a feature plugin](https://docs.taji.is/plugins/feature.md)) | | A script | The wire, as above ([Read bars over the wire with curl](https://docs.taji.is/cookbook/wire-read-bars.md)) | ## What you can build from it | You want | Read | Built with it | |---|---|---| | A liquidity heatmap and cumulative delta | `/get/taji-orderflow.depth`, `.prints`, `.delta` | [Draw an order-flow heatmap](https://docs.taji.is/cookbook/orderflow-heatmap.md) | | Dealer gamma by strike | `/get/taji-gex.levels`, `.strikes`, built on `/get/chains` | [Chart dealer gamma exposure on SPY](https://docs.taji.is/cookbook/gex-profile.md) | | Your own file charted beside the rest | `/get/bars` with `provider=csv-source` | [Chart your own CSV of daily bars](https://docs.taji.is/cookbook/python-csv-source.md) | | Live quotes in a script | `quotes` over the market socket | [Stream live quotes over the wire](https://docs.taji.is/cookbook/wire-stream-quotes.md) | ## If it fails A refusal is JSON, `{"error": , "reason": }`, so `get` prints it as text. The three a first read meets ([the full list](https://docs.taji.is/architecture/data.md#which-refusals-can-a-read-answer)): | Code | Cause | Fix | |---|---|---| | `not_served` (501) | No linked provider serves the ask, or not on its basis | Read `reason`, which names each linked provider passed over and why; link one that serves it, or change the ask | | `not_linked` (422) | You pinned a `provider` that is not linked, or whose data is switched off | Link it, or drop the pin | | `fetch_first` (409) | A span only a metered provider can fill, and a read never buys | Price it with `fetch`'s `dry_run`, then buy within your data budget ([Data](https://docs.taji.is/architecture/data.md#when-does-a-read-spend-money)) | ## Next - [Set an alert](https://docs.taji.is/guide/alerts.md): an alert on a price or an indicator's plot, judged by the kernel as quotes arrive. - [Wire](https://docs.taji.is/reference/wire.md): every `GET /get/` row, its words and its refusals. - [Data](https://docs.taji.is/architecture/data.md): where a read is answered from, and what it costs. - [Coverage](https://docs.taji.is/reference/coverage.md): which provider serves which product. > Every Taji docs page as Markdown: https://docs.taji.is/llms.txt # Set an alert You end with an alert on a price and one on an indicator's plot, both judged by the kernel, listed in the Alerts pane and read back over the wire. You need a running Taji ([Install](https://docs.taji.is/guide/install.md)) and, for the wire steps, its token ([Read bars over the wire](https://docs.taji.is/cookbook/wire-read-bars.md) shows where it is). An alert needs a symbol a provider streams, and a keyless Taji's Yahoo Finance streams SPY. An alert is a watch on one symbol: a condition (a price level, a move, a drawing's level, an indicator's plot, or a time of day), how often it fires, and what its message says. Each alert belongs to a desk ([Desks and panes](https://docs.taji.is/guide/desks.md)). ## 1. Set one in the window 1. Click **Alert** on the focused chart or press `⌥A`, or type `/alert` in the agent's composer: all three press the focused chart's Alert. **Add alert** on a drawing's floating toolbar or on the plot's right-click menu starts one on that drawing or price. 2. Set the Condition, Trigger (once or every time), Expiration, Message and Notifications, then click **Create**. 3. Open the **Alerts** pane (the dock, the gallery or Account › Alerts). Its Alerts tab lists each alert and its state, and its Log tab lists what fired ([Chart](https://docs.taji.is/catalog/chart.md)). Each act is a request to the kernel's wire, and your agent sends the same ones with its `call` tool ([Connect your agent](https://docs.taji.is/guide/agent.md)). The next steps send them by hand. `calls.json` has five: it reads a quote, adds a price alert, adds an alert on an indicator's plot, opens an Alerts pane and reads the desk's alerts back. `{desk}` stands for the desk's id, which `GET /read/desks` lists. ```json file="examples/alerts/calls.json" title="calls.json" [ {"name": "quote", "method": "GET", "route": "/get/quotes?symbols=equity:SPY"}, {"name": "price", "method": "POST", "route": "/verb/desk/{desk}/watches/add", "body": {"symbol": "equity:SPY", "when": "crosses_up", "price": "{quote.[0].last | ceil + 5}", "trigger": "once", "message": "SPY is through my level"}}, {"name": "plot", "method": "POST", "route": "/verb/desk/{desk}/watches/add", "body": {"symbol": "equity:SPY", "when": "crosses_up", "of": {"indicator": {"name": "rsi", "params": {"length": 14}, "plot": "rsi"}}, "price": 70, "interval": "D", "trigger": "every", "message": "SPY's daily RSI crossed 70"}}, {"name": "pane", "method": "POST", "route": "/verb/desk/{desk}/layout/add_pane", "body": {"kind": "alerts", "position": "right"}}, {"name": "watches", "method": "GET", "route": "/read/desk/{desk}/watches", "until": "length == 2 and .[1].of_value != null", "shot": "{pane.pane_ids[0]}"} ] ``` `{quote.[0].last | ceil + 5}` is the capture filling in a number: the quote's last price rounded up, plus 5, so the level sits above the market whenever you run it. You type a level. ## 2. Set a price alert `POST /verb/desk/{desk}/watches/add` takes the alert's members. A price alert states `symbol` (`kind:key`, here `equity:SPY`), `when` and `price`. `when` is one of `crosses`, `crosses_up`, `crosses_down`, `above`, `below`, the four channel words and `moving_up`, `moving_down`, `moving_up_pct` and `moving_down_pct` for a move. `trigger` is `once` (the default: one fire, then the alert is `triggered`) or `every`. `message` is what a fire says; left out, the alert builds one from its condition. ```json file="examples/alerts/quote.json" [ { "symbol": "SPY", "ts": "2026-12-04T18:58:36.133726+00:00", "ts_init": 1796410716133726000, "provider": "samplefeed", "delayed": false, "halted": null, "session": null, "bid": 142.3, "ask": 142.32, "last": 142.31, "bid_size": null, "ask_size": null, "book_ts": null, "last_ts": null, "last_exchange": null, "last_conditions": [], "prev_close": 142.62, "change": -0.31, "change_pct": -0.2174, "session_close": null, "session_change": null, "session_change_pct": null, "market_session": "regular", "next_session": "post", "next_at": "2026-12-04T21:00:00+00:00" } ] ``` ```json file="examples/alerts/price.json" { "id": "01a2426c-336d-70a3-a261-83060b35322a", "level": null, "node": "desk/01a2426c-2f23-712e-8c2a-605d3bde65f5/watches/01a2426c-336d-70a3-a261-83060b35322a", "refused": null, "source": "samplefeed", "waiting": null } ``` The answer is the new alert's `id` and `node`, and what its feed says now: `source` is the provider streaming the symbol, and `refused` is `null` while one does. `level` is `null` here because a price alert has no level to read; a drawing's or an indicator's does. ## 3. Set an alert on an indicator's plot Replace the price with a plot. `of` names an indicator, its `params` and one of its `plot`s, and `price` is the bound it is compared with. `interval` sets the bars the indicator is read in; left out, it is the chart pane's. A built-in's plots are in `GET /read/catalog` (RSI has `rsi`, `ma`, `bb_upper` and `bb_lower`), a plugin's script or your own custom indicator takes the same `name`, and the kernel checks `params` against the indicator's schema. ```json file="examples/alerts/plot.json" { "id": "01a2426c-351e-761c-b049-92ff9df551a0", "level": null, "node": "desk/01a2426c-2f23-712e-8c2a-605d3bde65f5/watches/01a2426c-351e-761c-b049-92ff9df551a0", "refused": null, "source": "samplefeed", "waiting": null } ``` The kernel reads the plot from its own instance of the indicator whether or not a chart shows it, and where a chart does, from that chart's, so the alert sees the figure the chart's legend shows. It pins the version when you add: the row below reads `rsi@1`, not `rsi`. ## 4. Read your alerts `GET /read/desk/{desk}/watches` lists the desk's alerts in the order they were added, and the Alerts pane draws exactly these rows. ![The Alerts pane listing both alerts, each Active](https://raw.githubusercontent.com/TajiAI/Taji/main/docs/guide/examples/alerts/shot.png) ```json file="examples/alerts/watches.json" [ { "added_utc": 1796410717, "and": [], "bars": null, "calendar": null, "drawing": null, "expires_utc": null, "fire": null, "fired": null, "fires": [], "id": "01a2426c-336d-70a3-a261-83060b35322a", "interval": null, "level": null, "message": "SPY is through my level", "name": null, "next_utc": null, "node": "desk/01a2426c-2f23-712e-8c2a-605d3bde65f5/watches/01a2426c-336d-70a3-a261-83060b35322a", "notify": { "schedule": "24/7", "sound": true, "sound_secs": 0, "toast": true }, "of": null, "of_value": null, "price": 148.0, "refused": null, "schedule_tz": "America/New_York", "session": "regular", "shape": null, "source": "samplefeed", "spot": 142.31, "state": "active", "symbol": "equity:SPY", "trigger": "once", "upper": null, "value": null, "waiting": null, "when": "crosses_up" }, { "added_utc": 1796410717, "and": [], "bars": null, "calendar": null, "drawing": null, "expires_utc": null, "fire": null, "fired": null, "fires": [], "id": "01a2426c-351e-761c-b049-92ff9df551a0", "interval": "D", "level": 70.0, "message": "SPY's daily RSI crossed 70", "name": null, "next_utc": null, "node": "desk/01a2426c-2f23-712e-8c2a-605d3bde65f5/watches/01a2426c-351e-761c-b049-92ff9df551a0", "notify": { "schedule": "24/7", "sound": true, "sound_secs": 0, "toast": true }, "of": { "indicator": { "name": "rsi@1", "params": { "length": 14 }, "plot": "rsi" } }, "of_value": 75.89113346230138, "price": 70.0, "refused": null, "schedule_tz": "America/New_York", "session": "regular", "shape": null, "source": "samplefeed", "spot": 142.31, "state": "active", "symbol": "equity:SPY", "trigger": "every", "upper": null, "value": null, "waiting": null, "when": "crosses_up" } ] ``` *Captured 2026-12-04 on a headless kernel reading a made-up daily series and quote for SPY.* 1. **`state`** is `active` while the alert is polled, then `triggered` (a `once` alert that fired), `paused` or `expired`; only an edit re-arms the last three. `fired` is the last fire and `fires` every one. 2. **`spot`** is the last price the alert's `session` has seen, `regular` unless you name `extended` or `24h`. It is `null` until that session prints: the quote above says in `market_session` which one is open. 3. **`level` and `of_value`** belong to the indicator alert. `level` is the bound it waits for and `of_value` the plot's value now, so a reader sees how far it is. 4. **`waiting` and `refused`** say why an alert cannot be judged: `waiting` that its bars are not there yet, `refused` that no provider streams the symbol. `watches/edit` changes an alert and restarts it, `pause` stops one until an edit, `remove` deletes it, `read` marks its fires read, and `clone` is the only way to a second live alert on one trigger: `add` answers 409 `duplicate` for an active or paused alert that says the same. ## Where does a fire go? An alert is judged by the kernel on your machine, so it fires while Taji runs. A fire lands in four places: - **The Alerts pane's Log**, and the window's toast and sound, which the alert's `notify` sets and its `schedule` limits to hours you pick. - **A desk note**, `: `, written by `watch:`, so a fire is still on the desk after the toast is gone. - **A frame** on `desk//watches`, which your agent's `wait` blocks on, so it learns of a fire without polling. - **Every linked channel**, with each fill, exit, rejection and approval: [Discord](https://docs.taji.is/catalog/discord.md), [Slack](https://docs.taji.is/catalog/slack.md), [iMessage](https://docs.taji.is/catalog/imessage.md), [WhatsApp](https://docs.taji.is/catalog/whatsapp.md) or your own [Webhook](https://docs.taji.is/catalog/webhook.md) ([Reach your agent from your phone](https://docs.taji.is/ai/phone.md)). A crossing, an entry or an exit needs two polls: the first only records which side the price is on, so a price already past the level at the start does not fire it. `every` fires at most once a minute while its condition holds; an instant (`fire`, a time of day) and a vertical line fire once. ## If it fails - **`refused` names no provider.** Nothing linked streams that symbol, so the alert never fires. A brokerage or data provider that streams it, once linked, serves it: `source` then names that provider and `refused` reads `null` ([Coverage](https://docs.taji.is/reference/coverage.md) lists what each offers). The capture's made-up source streamed SPY, so it shows no `refused` row. - **`waiting` holds a reason.** The alert cannot be judged yet, for instance `the forming bar is past the trendline's end` or `no bars for 5m`. The row says which; a move waits until its bars reach back to the one before the forming bar. - **400 `bad_ask`.** The reason names the member: a `price` that is not positive, a `when` the drawing's kind does not take, a plot the indicator does not draw, a symbol that is not `kind:key`. - **409 `duplicate`.** An active or paused alert already says the same: `clone` it, or `edit` the one you have. ## Next - [Trade](https://docs.taji.is/guide/trading.md): orders, and the exits Taji works for you. - [Desks and panes](https://docs.taji.is/guide/desks.md): where the Alerts pane sits on a desk. - [Your first indicator](https://docs.taji.is/indicators/first-indicator.md): write the plot your next alert reads. - [Read bars over the wire](https://docs.taji.is/cookbook/wire-read-bars.md): the same wire from a script. > Every Taji docs page as Markdown: https://docs.taji.is/llms.txt # Plugins **A plugin is the deepest way to fit Taji to your workflow: a manifest and the code behind it that add a backend, panes and chart layers, or indicators of your own, served on the same wire as Taji's.** Everything Taji does beyond its core is a plugin: every data source, brokerage, messaging channel and pane, the chart included. A plugin declares what it adds in one file, `taji-plugin.toml`, and the kernel serves each addition on the same wire your window and your agent already use. - **A backend.** A plugin adds verbs your agent calls as tools, nodes it reads, data sources and data products of its own ([Your first plugin](https://docs.taji.is/plugins/first-plugin.md), [Add a data source](https://docs.taji.is/plugins/source.md)). - **Views.** It adds panes to Taji's window and layers drawn on the chart from its own products ([Write a pane](https://docs.taji.is/plugins/pane.md), [Draw a chart layer](https://docs.taji.is/plugins/layer.md)). - **Indicators of its own.** It ships script indicators that you draw on a chart like any other ([Your first plugin](https://docs.taji.is/plugins/first-plugin.md)). - **Published by you.** You pack a plugin into a registry you sign, and Taji installs it by its consent digest, then updates or removes it ([Publish a plugin](https://docs.taji.is/plugins/publish.md)). There is no hosted registry, and a release kernel holds no registry key: installing from a registry needs a debug kernel and your own signed registry. ## How it works 1. **Declare.** You list what the plugin adds in `taji-plugin.toml`: verbs, nodes, sources, products, indicators, panes and layers ([the manifest](https://docs.taji.is/plugins/manifest.md)). 2. **Serve.** A program answers what the manifest declares: a process in any language that speaks `taji-plugin/1`, or a Rust crate compiled into the kernel ([how one runs](#how-does-a-plugin-run-beside-the-kernel)). 3. **Use.** The kernel reads every plugin into one registry at boot, and the wire, your agent's tools and its skill all come from that registry, so a plugin's verb is callable from the window and from your agent the moment it loads. This page then tells you which kind of plugin you need and what a process plugin can and cannot do. ## What is a plugin? A plugin is a directory holding a manifest, `taji-plugin.toml`, and the code that serves what the manifest declares: routes your agent can call (verbs), values it can read (nodes), data sources, its own data products, script indicators, panes and chart layers. The [manifest reference](https://docs.taji.is/plugins/manifest.md) lists every table. The registry is what `GET /read/plugins` serves. The kernel never names a plugin: it knows only the seam every plugin is built on, `taji_plugin` ([0003](https://github.com/TajiAI/Taji/blob/main/docs/decisions/0003-plugin-on-sdk-alone.md)). What a plugin adds is its own API, not Taji's. A vendor's data, though, fills a platform product, such as `bars` or `quotes`, that a second provider could fill too, so no vendor's shape reaches your window or your agent ([0004](https://github.com/TajiAI/Taji/blob/main/docs/decisions/0004-capabilities-through-the-hub.md)). ## Which kind do I need? Pick the row that matches what you want Taji to do. Each kind is a set of manifest tables; one plugin can be more than one kind, as a feature that also draws a layer. | You want | Kind | Runs | Declares | Start with | |---|---|---|---|---| | Your agent to call your code and read its state | verb and node | a process | `[[kernel.verbs]]`, `[[kernel.nodes]]` | [Your first plugin](https://docs.taji.is/plugins/first-plugin.md) | | Bars, quotes or a product of your own from a vendor or a file | source | a process, in Python or Rust | `[[sources]]`, `[[products]]` | [Add a data source](https://docs.taji.is/plugins/source.md) | | A view of your own in Taji's window | pane | a framed page beside its process (a window-only plugin runs no process, so `TAJI_PLUGINS` refuses it: it loads only through a registry install) | `[[ui.panes]]` | [Write a pane](https://docs.taji.is/plugins/pane.md) | | A product computed from Taji's data, with a script and a chart layer | feature | a process; `taji plugin new --feature` scaffolds one in Rust | `[grants] reads`, `[[products]]`, `[[kernel.indicators]]` | [Build a feature plugin](https://docs.taji.is/plugins/feature.md) | | One of your products drawn on the chart | layer | the window, from a feature's rows | `[[ui.layers]]` | [Draw a chart layer](https://docs.taji.is/plugins/layer.md) | | A script of your own that ships with a plugin and reads `data.product` | indicator | the kernel compiles the script | `[[kernel.indicators]]` with `category`, `description` and `needs` | [The manifest](https://docs.taji.is/plugins/manifest.md#kernelindicators), [Inputs: `data.product`](https://docs.taji.is/indicators/inputs.md) | | Alerts and fills sent to a messaging app, and your replies heard | channel | compiled into the kernel | a `Channel` arm | [Write a channel](https://docs.taji.is/plugins/channel.md) | | A data source or brokerage built into Taji, with orders | provider | compiled into the kernel | `[[sources]]`, `[[link]]`, a venue arm | [Write a compiled-in provider](https://docs.taji.is/plugins/provider.md) | Once a process plugin works, [Publish a plugin](https://docs.taji.is/plugins/publish.md) packs it into a registry you sign so Taji installs it. ## How does a plugin run beside the kernel? A plugin runs in one of two tiers. Tier 1 is compiled in: a Rust crate composed into a kernel binary with `taji::Kernel::new().add(P::default).run()`, which builds inside Taji's tree only (`plugins/hello` is the smallest). Tier 2 is a process: a program in any language that speaks `taji-plugin/1`, one JSON object a line over its stdin and stdout ([the process protocol](https://docs.taji.is/plugins/protocol.md)). Tier 2 is the tier you can write outside the tree, for some kinds ([below](#which-kinds-can-you-build-outside-a-taji-checkout)). ```mermaid flowchart LR clients["Window and agent"] -->|"wire"| kernel["Kernel registry"] kernel --> tier1["Compiled-in plugins"] kernel -->|"stdio"| proc["Process plugin"] proc --- sandbox["OS sandbox"] proc -->|"CONNECT"| proxy["Its own proxy"] proxy --> hosts["Granted hosts"] kernel -->|"framed page"| pane["Pane in the window"] ``` Read it from the left. Your window and your agent reach the kernel over the wire, and the kernel's registry answers every plugin's routes. A compiled-in plugin runs inside the kernel's process. A process plugin runs as its own program in the OS sandbox and talks to the kernel over stdio alone; its only network is its own proxy, which reaches the hosts its manifest grants. A pane is a page the window draws in a sandboxed frame, which holds no token and reaches the kernel only through the window. The kernel starts a process plugin at its first call, under its sandbox. A call unanswered in `call_timeout_s` (30 s by default) answers `504 timeout` and the process keeps running. If the process exits, every call in flight answers `502 plugin_exited`, and the next call restarts it after 1, 2, 4, then 8 s. The fifth exit in 10 minutes turns it off until the next boot, so one broken plugin never takes the kernel down with it. ## What does a process plugin look like at work? `plugins/echo` is the smallest process plugin, written in Rust on `taji-sdk`. Its manifest declares one verb, `echo/say`, which takes `{"text"}`, and one node, `echo`, which reads the last text it was told. Staged in `TAJI_PLUGINS`, it loads beside the kernel's compiled-in plugins. Telling it `hello` with `POST /verb/echo/say` answered: ```json file="examples/overview/say.json" { "said": "hello" } ``` Then `GET /read/echo` read its node: ```json file="examples/overview/node.json" { "text": "hello" } ``` And `GET /describe/plugins` counted the registry: ```json file="examples/overview/plugins.json" { "line": "23 plugins, 23 enabled, 1 verbs" } ``` *Captured 2026-12-03 on a keyless headless kernel, with `plugins/echo` staged in `TAJI_PLUGINS`.* Follow the call through the outputs: - **Say.** The kernel matched `echo/say` to echo's row in the registry, started its process in the sandbox and sent it the call over stdio. The process answered `{"said": "hello"}`, and the kernel served that answer as the verb's. - **Read.** Having answered, the process sent the kernel a `set` of its node. The kernel holds the value, so `GET /read/echo` read `hello` without asking the process again. - **Count.** The registry holds 23 plugins: the 22 compiled into this build and echo. Echo's is the only plugin verb, and every one of them is enabled. ## What can a process plugin not do, and why? A process plugin is code you did not write running on your trading machine, so the kernel admits it with less than a compiled-in plugin gets. It cannot: - Hold a key, a token or any secret value. One that signs in declares `[sign_in]` of kind `key` or `oauth` and exactly one source; its process holds markers that its relay swaps for your key toward the declared hosts alone ([0005](https://github.com/TajiAI/Taji/blob/main/docs/decisions/0005-no-key-reaches-a-client.md)). - Reach the network except through `CONNECT` on its own proxy to a host in `[grants] net.hosts`, or through its relay. It cannot reach the wire, `localhost` or a port Taji listens on. - Place or read orders, or read an account: its `[grants] reads` names data products only, and venues are compiled in. - Draw in a browser, or in Taji's window outside its frame, except a `[[ui.layers]]` layer, which the window draws from the `Shapes` a stock renderer or your packed builder returns ([Draw a chart layer](https://docs.taji.is/plugins/layer.md)). - Declare `[[kernel.fields]]`, a `skill` other than `["SKILL.md"]`, a route under `{desk}`, a node with a bound path, or a native indicator: its `[[kernel.indicators]]` rows ship scripts. - Serve a core product other than `index_daily` (history), `bars` (history and live), `quotes` and `depth` (now and live), `chains` (history), `trades` (live) and `earnings` (history, `equity`). - Declare a plan, a cost, limits or a rank. A new source lands last; you reorder sources with `POST /verb/link/prefer`. - Take a first-party provider's id, or a source id other than its plugin's id or `-`. - Run on a kernel outside its manifest's `taji` range, or unconfined on a release kernel: only a debug build under `TAJI_UNSANDBOXED=1` skips the sandbox. Before any process starts, the kernel runs its own binary under a plugin's sandbox as a canary, and starts none if the sandbox lets the canary through. ## Which kinds can you build outside a Taji checkout? Taji publishes `taji-sdk` on crates.io and no other SDK, and `taji-open`, the crate that builds the `taji` binary (`taji plugin new`, `check` and `dev`), is not published: you build `taji` once from a checkout. Past that: | Kind | Outside a checkout | What needs one | |---|---|---| | A process in any language over [the protocol](https://docs.taji.is/plugins/protocol.md) | Yes: a manifest and a program | | | A Rust feature backend | Yes, on `taji-sdk`; its layers draw with a stock renderer | `check`'s `draw` step, which says `SKIP` | | A Python plugin | No | the Python SDK is not published, and the runtime is the checkout's `.python` | | A pane, or a custom layer builder | No | `ui/pack.ts` and `bun`; `@taji/plugin` is not published; `check`'s `pane` step says `SKIP` | | A provider or a channel | No | it is compiled into the kernel | ## Which source answers a read? A read that names no provider falls past every source that is unlinked, off (`data.=false`), down (the fifth exit), failing or missing the symbol. When none serves it, the answer is `404 not_listed` or `501 not_served`. A read pinned with `provider=` never falls. On an Arrow answer, the metadata's `provider` names the source of each item. ## What do you build against? Outside Taji's tree you hold this guide, `schema/taji.json` and an SDK, for the kinds [above](#which-kinds-can-you-build-outside-a-taji-checkout). `schema/taji.json` is the contract, version `0.7.0` (`taji_plugin::API`): the manifest and every message are its `$defs`, the only surface Taji promises, versioned by [the compatibility rules](https://docs.taji.is/reference/compatibility.md). The SDKs carry no promise while that version is `0.x`. | SDK | Serves | From | |---|---|---| | Rust, `taji-sdk` | verbs, nodes and products; reads the hub through `Cx::get` and `Cx::stream` | crates.io; source in `packages/taji-rs` | | Python, `taji` | verbs, nodes and data sources | this repository, `packages/taji-py/src/taji/__init__.py` | | Window, `@taji/plugin` | a pane's frame and its port to the window | this repository, `packages/plugin` ([a plugin's window half](https://docs.taji.is/plugins/window.md)) | | Compiled in, `taji-plugin` | every kind, inside the kernel | this repository, `engine/crates/taji-plugin` | Taji publishes none of the others to PyPI, npm or crates.io, and a package of those names there is not Taji's. Either process SDK refuses to start when what it registers differs from the manifest. `taji plugin new --feature` scaffolds a Rust feature plugin, and `--pane` a window-only one that draws a `Chart`. ## What is not built yet? - The author loop is boot discovery, `taji plugin new`, `taji plugin check` (fixtures, no kernel), `taji plugin dev` (a throwaway kernel playing the fixtures live) and a local registry. A change to the manifest or the program is not reloaded: stop `plugin dev` and run it again. The window half is the exception: `bun run ui/pack.ts --watch` repacks the pane's `/ui/index.js` and each custom layer builder on every save, and with `TAJI_PLUGINS=/..` and `taji ui`, reopening the pane loads the new bundle. There is no hosted registry, and a release kernel installs from none. - Rows cross the process protocol as JSON, bars as decimal strings, not as Arrow, which the wire's `get` answers. ## What plugins ship with Taji? To change or debug a vendor plugin, read its `plugins//ARCHITECTURE.md`: how the vendor works and how Taji is built on it, as [TradeStation's](https://docs.taji.is/catalog/tradestation/architecture.md). **Brokerages and data**: [Alpaca](https://docs.taji.is/catalog/alpaca.md), [Cboe](https://docs.taji.is/catalog/cboe-daily.md), [Databento](https://docs.taji.is/catalog/databento.md), [SEC EDGAR](https://docs.taji.is/catalog/edgar.md), [FRED](https://docs.taji.is/catalog/fred.md), [Interactive Brokers](https://docs.taji.is/catalog/ibkr.md), [Massive](https://docs.taji.is/catalog/massive.md), [Robinhood Agentic](https://docs.taji.is/catalog/robinhood-agentic.md), [Robinhood Web](https://docs.taji.is/catalog/robinhood-web.md), [Schwab](https://docs.taji.is/catalog/schwab.md), [SSGA](https://docs.taji.is/catalog/ssga.md), [TradeStation](https://docs.taji.is/catalog/tradestation.md), [Tradovate](https://docs.taji.is/catalog/tradovate.md), [Yahoo Finance](https://docs.taji.is/catalog/yahoo.md). **Channels** (each carries every alert and every fill, exit, rejection, approval and relink, to every linked channel, Webhook included): [Discord](https://docs.taji.is/catalog/discord.md), [iMessage](https://docs.taji.is/catalog/imessage.md), [Slack](https://docs.taji.is/catalog/slack.md), [Webhook](https://docs.taji.is/catalog/webhook.md), [WhatsApp](https://docs.taji.is/catalog/whatsapp.md). **Voice**: [Gemini](https://docs.taji.is/catalog/gemini.md), [OpenAI](https://docs.taji.is/catalog/openai.md). **Panes**: [Book](https://docs.taji.is/catalog/book.md), [Calendar](https://docs.taji.is/catalog/calendar.md), [Chart](https://docs.taji.is/catalog/chart.md), [Ladder](https://docs.taji.is/catalog/ladder.md), [Options](https://docs.taji.is/catalog/options.md), [Reference](https://docs.taji.is/catalog/reference.md), [Stock Screener](https://docs.taji.is/catalog/screener.md), [Watchlist](https://docs.taji.is/catalog/watchlist.md). **Indicators**: [Indicators](https://docs.taji.is/catalog/indicators.md). **Features**: [GEX](https://docs.taji.is/catalog/taji-gex.md), [Order flow](https://docs.taji.is/catalog/taji-orderflow.md), [Dark pool](https://docs.taji.is/catalog/taji-darkpool.md), [Sector heatmap](https://docs.taji.is/catalog/taji-sectors.md). None is compiled into `taji-open` or carried by the packaged app, and no registry serves them: you build one from a source checkout and stage it in a directory `TAJI_PLUGINS` names ([the GEX recipe](https://docs.taji.is/cookbook/gex-profile.md)). Sector heatmap has no backend, so a kernel refuses it under `TAJI_PLUGINS`; its page says how it installs. **Remote access**: [Tailscale](https://docs.taji.is/catalog/tailscale.md). The examples, fixtures and shared library the guides and gates use have no page: `plugins/hello`, `plugins/echo`, `plugins/pyecho`, `plugins/outsider`, `plugins/keyed`, `plugins/probe`, `plugins/pyfeed`, `plugins/gexfeed`, `plugins/samplefeed`, `plugins/pyvendor` and `plugins/robinhood-reads` (`NO_PAGE` in `engine/crates/taji/tests/docs.rs`). ## What proves these claims? Each claim on this page is held by a gate in `engine/crates/taji/scripts/` or a test: - `process_gate.sh`: verbs, nodes, MCP `describe`, restart, a refused range or claim, an indicator, `plugins/probe` and `plugins/echo`. - `python_gate.sh`: the Python runtime and `plugins/pyecho`; with `GATE_ONLINE=1`, `plugins/pyvendor`. - `outsider_gate.sh`: `index_daily`, `earnings`, a product of the plugin's own, `quotes`, the store across a restart, `plugins/pyfeed`, `plugins/keyed` and the fall-through. - `plugin_install_gate.sh`: the install lifecycle. `frame_gate.sh`: framed panes. `plugin_gate.sh`: `plugins/hello`. - `cargo test -p taji-open --test signs_in` and `cargo test -p taji-host --test relay`: sign-in and the relay. ## See also - [Your first plugin](https://docs.taji.is/plugins/first-plugin.md): a Python plugin of your own with a verb, a node and an indicator drawn on a chart. - [The manifest](https://docs.taji.is/plugins/manifest.md), [the process protocol](https://docs.taji.is/plugins/protocol.md) and [a plugin's window half](https://docs.taji.is/plugins/window.md): the contract, table by table. - [The plugin platform](https://docs.taji.is/architecture/plugins.md): the registry, the tiers and install, from the inside. - [Security](https://docs.taji.is/architecture/security.md): what the sandbox, the proxy and the relay hold back. > Every Taji docs page as Markdown: https://docs.taji.is/llms.txt # Build your first plugin and see it on a chart You will have a plugin of your own, `myplugin`, loaded in a headless kernel. It answers a verb, keeps a node and adds an indicator that draws under a chart. The plugin is three files: a manifest, a Python program and a TypeScript script. You need Taji built from source ([Build from source](https://docs.taji.is/guide/install.md)), `jq`, the network (the keyless kernel reads Yahoo's delayed bars), and Taji's Python, which runs the plugin: ```sh bash engine/crates/taji/scripts/python.sh .python cargo build -p taji-open ``` `.python` is Taji's interpreter with its SDK; `TAJI_PYTHON` names another. Every command runs from the repository root, in one shell. ## 1. Write the manifest A plugin is a directory holding `taji-plugin.toml` and its program. The manifest says what the plugin registers, and Taji checks the program against it: ```toml file="examples/first-plugin/myplugin/taji-plugin.toml" title="taji-plugin.toml" id = "myplugin" name = "My plugin" version = "0.1.0" taji = ">=0.7, <0.8" [process] run = ["myplugin.py"] python = {} [[kernel.verbs]] route = "myplugin/say" name = "myplugin_say" description = "Tell my plugin some text: it answers `{said}` and keeps it as its node `myplugin`." schema = { type = "object", properties = { text = { type = "string" } }, required = ["text"] } scopes = ["local", "agent", "page"] [[kernel.nodes]] path = "myplugin" description = "the last text my plugin was told" [[kernel.indicators]] name = "bar_range" source = "indicators/bar_range.ts" ``` 1. **`id`, `name`, `version`, `taji`** name the plugin and the contract range it speaks; this build's contract is `0.7.0`. 2. **`[process]`** makes it a process plugin: `run` is the program, and `python = {}` gives it the standard library and the SDK. `{ lock = "requirements.lock" }` instead adds exactly the hashed wheels a lock file lists. 3. **`[[kernel.verbs]]`** declares `myplugin/say`, a call with a JSON Schema for its arguments, open to the `local`, `agent` and `page` tokens. 4. **`[[kernel.nodes]]`** declares `myplugin`, state the plugin sets and anyone reads at `GET /read/myplugin`. 5. **`[[kernel.indicators]]`** adds a script indicator, `bar_range`, to the chart's catalog. `source` is a path inside the plugin's directory. The fields are all in [the manifest reference](https://docs.taji.is/plugins/manifest.md). ## 2. Write the program The program registers exactly the verbs the manifest declares; the SDK refuses to start otherwise: ```python file="examples/first-plugin/myplugin/myplugin.py" title="myplugin.py" import taji p = taji.plugin() @p.verb("myplugin/say") def say(args, bindings): text = args.get("text") if not isinstance(text, str): raise taji.Refused(400, "bad_args", "`text` is a string") p.set("myplugin", {"text": text}) return {"said": text} p.run() ``` 1. **`taji.plugin()`** reads the manifest beside the program. 2. **`@p.verb("myplugin/say")`** handles the verb. A plain function runs on a thread; an `async def` works too. 3. **`taji.Refused`** answers its own status and error. Any other exception answers `500 python`, its traceback in the plugin's log, except one whose class is named `RateLimited`, which answers `429 rate_limited`. 4. **`p.set`** sets the node, and the return value is the answer. 5. **`p.run()`** speaks `taji-plugin/1`, JSON lines on stdio, until the kernel stops it. `print` goes to the plugin's log, never to the protocol. - The SDK's API is documented in `packages/taji-py/src/taji/__init__.py`, including how to test a plugin with no kernel: `plugins/pyecho/test_pyecho.py` calls `p.handle` with one line the kernel would send. - `plugins/echo` is the same plugin in Rust: `plugins/echo/src/main.rs` calls `taji_sdk::serve` with its manifest. ## 3. Add the indicator The script is one module whose default export is `indicator({…})` from `@taji/indicators`, as in [your first indicator](https://docs.taji.is/indicators/first-indicator.md). Bar range plots each bar's high-to-low range as a percent of its close, and a 20-bar average of it: ```ts file="examples/first-plugin/myplugin/indicators/bar_range.ts" title="indicators/bar_range.ts" import { indicator, input, plot, ta } from "@taji/indicators"; export default indicator({ name: "Bar range", pane: "own", inputs: { length: input.int(20, { min: 2 }) }, plots: { range: plot.columns({ title: "Range %" }), avg: plot.line({ title: "Average", color: "#ff9800" }) }, setup: ({ inputs }) => ({ avg: ta.sma(inputs.length) }), next(bar, s) { const range = ((bar.high - bar.low) / bar.close) * 100; return { range, avg: s.avg.next(range) }; }, }); ``` 1. **`pane: "own"`** draws it in a pane under the price. 2. **`plots`** are a column per bar and an orange line. 3. **`next`** runs once per bar and returns one number per plot. - The kernel compiles and runs the script on its own lane, never in your plugin's process. - The manifest row's `name` is the catalog name, so a chart binds it as `bar_range`. ## 4. Boot a kernel with your plugin Copy the plugin into a plugins directory, then boot a headless kernel on throwaway state with `TAJI_PLUGINS` naming that directory. `TAJI_WIRE=0` takes a free port. `get` and `v` call the wire, which authenticates every request by `x-taji-token`: ```sh W=$(mktemp -d) mkdir -p "$W/plugins" && cp -R docs/plugins/examples/first-plugin/myplugin "$W/plugins/" boot() { mkdir -p "$W/state" "$W/store" "$W/home" export TAJI_NO_UPDATE_CHECK=1 TAJI_NO_REPORT=1 TAJI_STATE_DIR=$W/state TAJI_STORE_DIR=$W/store TAJI_HOME=$W/home TAJI_PLUGINS=$W/plugins TAJI_HEADLESS=1 TAJI_WIRE=0 target/debug/taji > "$W/boot.log" 2>&1 & until [ -s "$W/state/wire-token" ] && curl -sf -o /dev/null -H "x-taji-token: $(cat "$W/state/wire-token")" "localhost:$(cat "$W/state/wire-port")/"; do sleep 1; done PORT=$(cat "$W/state/wire-port"); TOKEN=$(cat "$W/state/wire-token") } get() { curl -s -H "x-taji-token: $TOKEN" "localhost:$PORT/$1"; echo; } v() { curl -s -H "x-taji-token: $TOKEN" -H 'content-type: application/json' -X POST "localhost:$PORT/verb/$1" --data-binary "$2"; echo; } boot get read/plugins | jq '.[] | select(.id == "myplugin") | {enabled, source, sandbox, indicators}' ``` You see your plugin's row: `enabled` is `true`, `source` is `dev` (a `TAJI_PLUGINS` plugin), `sandbox` names the confinement it runs under (`seatbelt` on macOS, `bubblewrap` on Linux, `processcontainer` on Windows), and `indicators` is `["bar_range"]`. - The kernel checked the manifest and compiled the script at boot. The program has not started yet: a process plugin starts at its first call. ## 5. Call the verb and read the node ```sh v myplugin/say '{"text":"hello"}' get read/myplugin ``` You see the verb's answer, then the node: ```json file="examples/first-plugin/say.json" { "said": "hello" } ``` ```json file="examples/first-plugin/node.json" { "text": "hello" } ``` *Captured 2026-12-04 on a headless kernel.* - Your program started, answered `{"said": "hello"}` and set its node. Its log is `$W/state/plugins/myplugin/log`. - Your agent finds the same verb over MCP through `describe`, and may call it because the manifest opens it to the `agent` token. ## 6. Draw the indicator on the chart The kernel opens a desk with a daily chart of `equity:SPY`; pane 1 is that chart. Bind `bar_range` to it: ```sh DESK=$(get "" | jq -r .active) v desk/$DESK/chart/1/add_indicator '{"pane_id":1,"definition":"bar_range","params":{}}' ``` You see the binding's node, whose last segment is its id, and `seq`, the number of the `/ws/live` frame that carries the change: ```json file="examples/first-plugin/bind.json" { "node": "desk/01a24253-67b5-70b2-b759-8b7f233f1e79/chart/indicators/01a24253-6a01-7702-b21e-26c8cac4b15f", "seq": 1796409091864211 } ``` The window, were it open, now draws Bar range in its own pane under SPY: ![A daily SPY chart with a Bar range pane under it: a blue column per bar for its range as a percent of the close, and an orange 20-bar average line](https://raw.githubusercontent.com/TajiAI/Taji/main/docs/plugins/examples/first-plugin/shot.png) *Captured 2026-12-04 on a headless kernel reading a made-up daily series for SPY.* - `params: {}` takes the defaults, so the legend reads `Bar range 20`. - The binding names the bare `bar_range`, so it follows your plugin's script. ## 7. Stop the kernel ```sh v ui/quit '{}' wait rm -rf "$W" ``` - The kernel stops your plugin's process with it. ## If something goes wrong - **`boot` never returns.** The kernel did not start: read `$W/boot.log`, and check that `target/debug/taji` exists. - **Your row reads `enabled: false`.** Taji refused the plugin, and `reason` says why: a `source` that is absolute, climbs out with `..` or is missing, a script that does not compile, or an indicator name another plugin registers. A manifest that does not parse gets no row at all; its error is in `$W/state/taji.log`. - **`reason` starts `no sandbox:`.** This machine lacks the confinement Taji needs. A debug kernel started with `TAJI_UNSANDBOXED=1` runs plugins unconfined; a release kernel ignores it. - **A verb answers `unknown_route`.** The kernel seated no plugin with that route: read the row's `reason`. - **A verb answers `500 python`.** Your program raised: the traceback is in `$W/state/plugins/myplugin/log`. ## Next - [Add a data source](https://docs.taji.is/plugins/source.md): a Python plugin that serves a product of its own. - [Write a pane](https://docs.taji.is/plugins/pane.md): a window pane that draws your node. - [Pack and install a plugin](https://docs.taji.is/plugins/publish.md) from a signed registry. - [The manifest reference](https://docs.taji.is/plugins/manifest.md): every field. > Every Taji docs page as Markdown: https://docs.taji.is/llms.txt # Add a data source You build `toyfeed`, a keyless data source in Python that serves its own product, `toyfeed.levels`, and read it from the wire as any other product. You need a checkout [built from source](https://docs.taji.is/guide/install.md), whose `make setup` lays Taji's Python in `.python`: it runs the plugin and, holding `pyarrow`, decodes the answer. A data source is a process plugin whose manifest has a `[[sources]]` row: each read it lists is a product, an instrument class and a span (`history`, `live` or `now`) it answers. Python is the SDK that serves one (`packages/taji-py/src/taji/__init__.py`); `taji plugin new` scaffolds a Rust [feature](https://docs.taji.is/plugins/feature.md), which computes its product from Taji's own data instead. ## 1. Declare the source and its product Make a directory named for the plugin's id and write its manifest: ```toml file="examples/source/toyfeed/taji-plugin.toml" title="taji-plugin.toml" id = "toyfeed" name = "Toy feed" version = "0.1.0" taji = ">=0.7, <0.8" [process] run = ["toyfeed.py"] python = {} [[sources]] id = "toyfeed" reads = [{ class = "index", product = "toyfeed.levels", span = "history" }] [[products]] name = "levels" description = "Levels." columns = [ { name = "ts_utc", type = "int" }, { name = "price", type = "decimal" }, { name = "size", type = "float", nullable = true }, ] ``` 1. **`[process]`** runs `toyfeed.py` on Taji's own interpreter; `python = {}` gives it the standard library and the `taji` SDK, nothing else. 2. **`[[sources]]`** says what it answers: `toyfeed.levels` of the class `index`, at `history`. Its `id` is the provider id a read pins with `provider=toyfeed`. 3. **`[[products]]`** declares `levels`, the product `toyfeed.levels`, and its columns. A product a source reads at `history` declares `ts_utc`, a non-nullable `int` of epoch seconds. A source may serve a core product instead (`index_daily`, `bars`, `quotes`, `depth`, `chains`, `trades`, `earnings`, each at the spans [the plugins overview](https://docs.taji.is/plugins.md#what-can-a-process-plugin-not-do-and-why) lists); `plugins/pyfeed/pyfeed.py` serves them. Every field: [the manifest reference](https://docs.taji.is/plugins/manifest.md). ## 2. Answer the read Write the program beside it: ```python file="examples/source/toyfeed/toyfeed.py" title="toyfeed.py" import taji p = taji.plugin() ROWS = [{"ts_utc": 1704153600, "price": "20.25", "size": 100.0}] @p.read("toyfeed.levels") def read(ask): if ask["asked"] != "$TOY": raise taji.Refused(404, "not_listed", f"no {ask['asked']}") lo, hi = ask["from"], ask["to"] rows = [r for r in ROWS if (lo is None or r["ts_utc"] >= lo) and (hi is None or r["ts_utc"] < hi)] return rows[: ask["limit"]] if ask["limit"] is not None else rows p.run() ``` 1. **`p = taji.plugin()`** reads `taji-plugin.toml` beside the script. 2. **`@p.read("toyfeed.levels")`** registers the handler for each read of the product. `ask` is a `ReadAsk`: `asked` is the item's canonical key (`$TOY`, for `index:TOY`), `from` and `to` are UTC seconds, `[from, to)`, and `limit` is the most rows asked; each is `null` when the reader leaves it open ([the protocol reference](https://docs.taji.is/plugins/protocol.md)). The rows it returns are the answer. 3. **`raise taji.Refused(404, "not_listed", …)`** refuses an item the source does not carry. An unpinned read then falls past this source to the next one serving the product. 4. **`p.run()`** says hello to the kernel and serves calls until the kernel closes stdin. It refuses to start when a product of `[[sources]]` has no `@p.read`. For a `live` read, add `@p.stream`: `async def stream(sub)` runs once per sub, the SDK cancels it when the sub leaves the set, and one that raises ends only its own sub. For a source that signs in, add `@p.check`. Both are in `plugins/pyfeed/pyfeed.py` and the SDK's docstring. ## 3. Load it Put `toyfeed/` in a directory of plugins and, at the checkout's root, boot a headless kernel on new state with `TAJI_PLUGINS` naming that directory. A debug kernel runs Python plugins on the checkout's `.python`; `TAJI_PYTHON` names another. ```sh mkdir -p my-plugins && cp -R toyfeed my-plugins/ export TAJI_STATE_DIR=$(mktemp -d) TAJI_STORE_DIR=$(mktemp -d) TAJI_HOME=$(mktemp -d) TAJI_WIRE=0 TAJI_PLUGINS=$PWD/my-plugins TAJI_HEADLESS=1 target/debug/taji & ``` The kernel writes its port to `$TAJI_STATE_DIR/wire-port` and its token to `$TAJI_STATE_DIR/wire-token` ([the wire reference](https://docs.taji.is/reference/wire.md)). To publish the plugin instead, [pack it into a signed registry](https://docs.taji.is/plugins/publish.md). ## 4. Read it Ask the wire for `toyfeed.levels` like any product. The answer is Arrow IPC, so decode it with `pyarrow`: ```sh PORT=$(cat $TAJI_STATE_DIR/wire-port) TOKEN=$(cat $TAJI_STATE_DIR/wire-token) curl -sf -H "x-taji-token: $TOKEN" "localhost:$PORT/get/toyfeed.levels?symbols=index:TOY&from=2024-01-01&to=2024-02-01" \ | .python/python -c "import sys, pyarrow as pa; t = pa.ipc.open_stream(sys.stdin.buffer).read_all(); print(t.schema.metadata, t.to_pylist())" target/debug/taji quit ``` The rows, with the schema's metadata beside them: ```json file="examples/source/levels.json" title="levels.json" { "metadata": { "computed_by": "{\"plugin\":\"toyfeed\",\"version\":\"0.1.0\"}", "provider": "{\"index:$TOY\":\"toyfeed\"}", "source": "{\"index:$TOY\":\"vendor\"}" }, "rows": [ { "ts_utc": 1704153600, "price": 20.25, "size": 100.0, "knowable_utc": 1796329342, "recorded": false, "version": "0.1.0" } ] } ``` The row is the plugin's, its `price` a decimal on the wire (`Decimal128(38, 10)`). The kernel adds three columns to every row of a plugin's product: `knowable_utc`, the second the row became known (here the moment of the read, since the plugin read no input), `recorded`, false for a row the source answered rather than Taji's store, and `version`, the plugin's. In the metadata, `provider` maps each item to the source that answered it and `computed_by` names the plugin. Any symbol but `index:TOY` answers `404 not_listed`. *Captured 2026-12-03 on a keyless headless kernel with `toyfeed` in its `TAJI_PLUGINS`.* ## If it fails - **The plugin exits at once, and its log, `$TAJI_STATE_DIR/plugins/toyfeed/log`, says `taji-plugin: its taji-plugin.toml needs a handler it does not register`:** a product of `[[sources]]` has no `@p.read`. Register one handler per declared product before `p.run()`. - **`GET /read/plugins` shows the plugin `enabled: false` with a `reason` starting `no sandbox:`:** the OS sandbox is not available here, and the reason names what it needs. On a debug kernel, `TAJI_UNSANDBOXED=1` runs plugins unconfined; a release kernel ignores it. ## Next - [Your CSV as a data source](https://docs.taji.is/cookbook/python-csv-source.md): the same shape, reading a file of your own. - [The process protocol](https://docs.taji.is/plugins/protocol.md): every call and row shape a source answers. - [Pack and install from a signed registry](https://docs.taji.is/plugins/publish.md). - [A provider](https://docs.taji.is/plugins/provider.md): a compiled-in source or brokerage. > Every Taji docs page as Markdown: https://docs.taji.is/llms.txt # Write a pane You build `memo`, a plugin whose pane shows a node its Python process writes, place the pane right of a desk's chart, and see it in Taji's window. You need a checkout [built from source](https://docs.taji.is/guide/install.md), whose `make setup` lays Taji's Python in `.python`, and the page, the window and the kernel built in this order (the kernel embeds `ui/dist`): ```sh pnpm --filter @taji/ui build pnpm --filter @taji/window build cargo build -p taji-open ``` A pane is a React component that a plugin's `/ui/plugin.tsx` default-exports through `definePlugin` from `@taji/plugin`. Taji's window draws it in a frame, a page of its own. What the package exports, the frame's rules and the theme's tokens are [the window reference](https://docs.taji.is/plugins/window.md). ## 1. Declare the pane Make a directory named for the plugin's id and write its manifest: ```toml file="examples/pane/memo/taji-plugin.toml" title="taji-plugin.toml" id = "memo" name = "Memo" version = "0.1.0" taji = ">=0.7, <0.8" [process] run = ["memo.py"] python = {} [[kernel.verbs]] route = "memo/write" name = "memo_write" description = "Write the memo the Memo pane shows." schema = { type = "object", properties = { text = { type = "string" } }, required = ["text"] } scopes = ["local", "agent", "page"] [[kernel.nodes]] path = "memo" description = "the memo the Memo pane shows" [[ui.panes]] kind = "memo.view" label = "Memo" reads = ["/read/memo"] ``` 1. **`[process]`** runs `memo.py` on Taji's Python ([Build your first plugin](https://docs.taji.is/plugins/first-plugin.md)). 2. **`[[kernel.verbs]]`** declares `memo/write`, which sets the memo. 3. **`[[kernel.nodes]]`** declares `memo`, which anyone reads at `GET /read/memo`. 4. **`[[ui.panes]]`** declares the pane: its `kind`, `.`, its title, and `reads`, the routes it reads. Every key: [the manifest reference](https://docs.taji.is/plugins/manifest.md). ## 2. Write the program ```python file="examples/pane/memo/memo.py" title="memo.py" import taji p = taji.plugin() @p.verb("memo/write") def write(args, bindings): p.set("memo", {"text": args["text"]}) return {"wrote": args["text"]} p.run() ``` 1. **`@p.verb("memo/write")`** handles the verb the manifest declares. 2. **`p.set("memo", …)`** sets the node the pane reads, and the return value is the verb's answer. ## 3. Write the pane Put it in the plugin's directory as `plugin.tsx` in a `ui/` of its own: ```tsx file="examples/pane/memo/ui/plugin.tsx" title="ui/plugin.tsx" import { definePlugin, useNode } from "@taji/plugin"; function Memo() { const memo = useNode<{ text: string }>("memo"); return

{memo.data?.text ?? "No memo yet"}

; } export default definePlugin({ id: "memo", panes: [{ kind: "memo.view", label: "Memo", Icon: () => , Body: Memo }] }); ``` 1. **`useNode("memo")`** reads `GET /read/memo`, and reads it again each time the node changes. Until the first answer, `data` is `undefined`. 2. **`definePlugin`** names the plugin and its panes. Its `id` and its panes say what `[ui]` of `taji-plugin.toml` says, or the window refuses the frame. ## 4. Pack the pane Copy the plugin into a plugins directory and pack its window half: ```sh W=$(mktemp -d) mkdir -p "$W/plugins" && cp -R docs/plugins/examples/pane/memo "$W/plugins/" bun run ui/pack.ts "$W/plugins/memo" ``` `index.js` appears beside `plugin.tsx`: `ui/pack.ts` bundles the pane with React and `@taji/plugin` into the one file the kernel serves the frame from. `--watch` repacks on each change, so reopening the pane loads the new bundle. A pane that imports `@taji/plugin/window` or `@taji/plugin/host` does not pack. ## 5. Write the memo and place the pane Define `boot`, `get` and `v` as in [Build your first plugin](https://docs.taji.is/plugins/first-plugin.md#4-boot-a-kernel-with-your-plugin), run `boot`, then write the memo: ```sh v memo/write '{"text":"hello from the wire"}' ``` ```json file="examples/pane/write.json" { "wrote": "hello from the wire" } ``` Place the pane right of the desk's chart: ```sh DESK=$(get "" | jq -r .active) CHART=$(get read/desk/$DESK/layout | jq .chart_pane_id) v desk/$DESK/layout/add_pane "{\"anchor_pane_id\": $CHART, \"position\": \"right\", \"kind\": \"memo.view\"}" ``` You see the new pane's id in `pane_ids`: ```json file="examples/pane/pane.json" { "node": "desk/01a23da4-24cb-755e-9414-21efcd6c19d6/layout", "pane_ids": [ 8 ] } ``` - `position` is `left`, `right` (the default), `above` or `below`, each halving the anchor's stack, or `tab`, joining it. - The kernel takes `memo.view` because an enabled plugin declares it. ## 6. Open the window ```sh TAJI_WIRE=$PORT target/debug/taji ui ``` A first run opens on the welcome: press Continue. The desk shows the Memo pane right of the chart: ![The Memo pane in Taji's window, headed Memo, saying hello from the wire](https://raw.githubusercontent.com/TajiAI/Taji/main/docs/plugins/examples/pane/shot.png) *Captured 2026-12-03 on a keyless headless kernel, in Taji's window.* - Write the memo again with `v memo/write`, and the pane redraws with the new text. - `engine/crates/taji/scripts/frame_gate.sh` holds installed panes' frames to the floor in Taji's window. Stop the kernel, which closes the window: ```sh v ui/quit '{}' wait rm -rf "$W" ``` ## Draw a chart with no backend A pane that draws rows Taji already serves needs no process. `plugin new --pane` writes a window-only plugin, and `plugin check` draws its pane from `fixtures/` with no kernel. Run these from your checkout, since `check`'s `pane` step says `SKIP` anywhere else: ```sh target/debug/taji plugin new toy --pane target/debug/taji plugin check toy --bless target/debug/taji plugin check toy ``` You see `PASS manifest` and `PASS pane (blessed map)`, then `PASS manifest` and `PASS pane`, each run exiting 0. `toy/golden/pane.map.png` is the pane as `check` drew it in a 960 by 600 window: open it before you commit it, since `--bless` accepts whatever the pane drew. `toy` holds `taji-plugin.toml`, `plugin.tsx` under `ui/`, `fixtures/screener.jsonl`, `AGENTS.md`, `README.md` and `.gitignore`, and no `[process]`: `taji plugin dev` refuses it, and a kernel refuses it under `TAJI_PLUGINS`, where a plugin runs as a process. The manifest grants the `screener` product and declares one pane that reads it: ```toml id = "toy" name = "toy" version = "0.1.0" taji = ">=0.7, <0.8" [grants] reads = ["screener"] [[ui.panes]] kind = "toy.map" label = "Map" reads = ["/get/screener"] ``` The pane reads the screener, turns its rows into columns and hands `Chart` a function that draws them as a treemap: ```tsx // `toy.map`: the screener's most active equities as a treemap, sized by volume and coloured by the day's change. import { useMemo } from "react"; import { definePlugin, useRows } from "@taji/plugin"; import { Chart, treemap, type Units } from "@taji/plugin/chart"; import { columnsOf } from "@taji/plugin/layer"; type Row = { symbol: string; volume: number; change_pct: number }; const UNITS: Units = { volume: "shares", change_pct: { unit: "percent", signed: true } }; function Map() { const { data, error } = useRows("screener", "class=equity&list=share_volume_leaders"); const rows = useMemo(() => columnsOf(data?.rows ?? [], ["volume", "change_pct"], [], ["symbol"]), [data]); if (error) return

{error.message}

; return ( treemap(rows, { size: "volume", colour: "change_pct", labels: ["symbol", "change_pct"] }, size, tokens)} tip={["symbol", "volume", "change_pct"]} units={UNITS} /> ); } export default definePlugin({ id: "toy", panes: [{ kind: "toy.map", label: "Map", Icon: () => , Body: Map }], }); ``` `fixtures/screener.jsonl` is what `check` serves in place of the screener: line 1 is `{"item": ":"}`, then a batch `{"knowable_utc", "rows"}` a line, the rows as `GET /get/` answers them. That route's columns are `paths./get/.get.x-taji.columns` in `schema/wire.json`; a Decimal cell is a string of digits and a List cell a JSON array. `check` draws the newest batch. What `Chart` draws and gives you, how `shapes`, `treemap`, `units` and `columnsOf` work: [Draw with `Chart`](https://docs.taji.is/plugins/window.md#draw-with-chart). ### What `check` says `FAIL pane: — ` names its fix. Each is one of these: - The pack failed: `packing ui/plugin.tsx failed: `. Run the `bun run ui/pack.ts` it prints and read the error. A pane that imports `@taji/plugin/window` or `@taji/plugin/host` does not pack. - `: the host refused its frame`: `definePlugin`'s `id`, `panes` or `items` disagree with `[ui]` of `taji-plugin.toml`. - `fixtures/.jsonl: …`: a product in `[grants] reads` has no fixture, or it is not in the form above. - `'s frame did not greet its host in 12 s`: the pane threw before it said hello, or the window compiles in a pane of this kind ([Compiled-in panes](#compiled-in-panes)) and drew it in the page, so no frame mounted. The saved picture may still look right. - `'s Chart states "rects": 0`: no row has a size above 0. Fix the fixture or `shapes`. - ` has no golden/pane..png`, or it differs: look at `target/check/pane/.png`, and if the picture is meant, run `check --bless` and commit `golden/`. `PASS pane` holds the pane's frame, its rects and its picture, not a run on a kernel. ## Compiled-in panes The window's own panes (`chart`, `ladder`, `book` and `watchlist`, and those of the options, reference, screener and calendar plugins) are compiled into its build instead: `ui/plugins.vite.ts` imports every `plugins/*/ui/plugin.tsx` with no `taji-plugin.toml` beside `ui/` (and each repo path `TAJI_UI_PLUGINS` names, colon-separated); a plugin with a manifest, in `plugins/` or not, draws in a frame. Such a pane draws in the page itself, with no frame and no floor, and may import `@taji/plugin/window` and `@taji/kit`. A compiled-in plugin adds a kind through its manifest: `[[ui.panes]]` rows of `kind` (`.`) and `label`, and a `Pane` of that kind in its `plugin.tsx`. Its row then carries no `ui` and no frame is served; an `icon`, `reads` or `[[ui.items]]` fails the boot, since the rest is compiled into the window. The kernel takes the kind while the plugin is enabled. A bare word is still the kernel's own (`PaneKindRecord` in `engine/crates/taji-pane-layout/src/persist.rs`). A `Page` with `pane` set opens that kind from the left bar ([the window reference](https://docs.taji.is/plugins/window.md#panes-and-slots)); `ui/mock/app/page.tsx` is the example, and `engine/crates/taji/scripts/plugin_gate.sh` builds `ui/walk/hello.tsx`, a page that is a view, with `TAJI_UI_PLUGINS`. ## On a phone A paired phone draws the one pane in front, as wide as the screen. An installed frame is told nothing more: size its targets under `@media (pointer: coarse)` at 44px and 8px apart, and its inputs at 16px or more, or Safari zooms in. A compiled-in pane reads the phone with `useCompact` (`packages/kit/shell/compact.ts`) and puts a menu of many acts, a form or a confirm in the kit's `PhoneSheet` (`packages/kit/ui/Sheet.tsx`); [the UI rules](https://docs.taji.is/contribute/ui.md) hold the touch rules. ## If it fails - **The plugin's row in `GET /read/plugins` says `its [ui] is declared and ui/index.js is missing`.** The pane is not packed: run the `bun run ui/pack.ts` it names, then boot again. - **`add_pane` answers `409` `declined`, `memo.view is not a pane kind of an enabled plugin`.** No enabled plugin declares the kind: read the plugin's row in `GET /read/plugins` for its `reason`. - **`add_pane` answers `404` `unknown_pane`.** The anchor is not a pane of that desk: read its `chart_pane_id` again. - **`add_pane` answers `409` `no_room`.** A half of the anchor's stack would fall under its panes' least size in the canvas's 24 lines: anchor on a larger pane, or use `tab`. ## Next - [The window reference](https://docs.taji.is/plugins/window.md): every export, the slots, the frame's floor and the theme's tokens. - [The manifest reference](https://docs.taji.is/plugins/manifest.md): `[ui]` and its rows. - [Pack and install a plugin](https://docs.taji.is/plugins/publish.md) from a signed registry. > Every Taji docs page as Markdown: https://docs.taji.is/llms.txt # Build a feature plugin You turn the scaffold `taji plugin new --feature` writes into a plugin that serves a product of its own from Taji's option chains, draws it as a chart layer, reads it in a script and passes `taji plugin check` with no `FAIL`. You need Rust 1.100 (`taji-sdk`'s minimum) and `taji` on your `PATH`: from a checkout, after `pnpm --filter @taji/ui build` (the kernel embeds the page), `cargo install --locked --path engine/crates/taji-open` installs its `taji` binary into `~/.cargo/bin`. The `draw` step also needs `bun` and Chrome, inside a Taji checkout; step 9 also needs `jq` and the checkout's `.python`. Every file below is what the scaffold writes, with `toy` as the id, and `docs/plugins/examples/feature/toy` is that scaffold built, checked and run: the page's fences are its files. A feature plugin is a process plugin that computes a product from data Taji already holds; [the plugins overview](https://docs.taji.is/plugins.md#which-kind-do-i-need) says when you want one. ## 1. Scaffold and build ```sh taji plugin new toy --feature cd toy cargo build ``` `new` makes `toy` here (`--dir ` makes `/toy`), refuses an existing one and writes `rust-toolchain.toml`, pinning Taji's Rust. An id is a lowercase letter, then up to 63 lowercase letters, digits or hyphens. `cargo build` makes `target/debug/toy`. `taji-sdk` comes from crates.io; commit the `Cargo.lock` the build writes. `check` does not build: build first and after each change to `src/` or `taji-plugin.toml`, which the binary holds. With `CARGO_TARGET_DIR` set, `check` looks there for the binary. ## 2. Set the product in the manifest `taji-plugin.toml` is the one contract: the SDK refuses to start when what `src/main.rs` registers differs from it, and `check` reads it first. The scaffold's: ```toml file="examples/feature/toy/taji-plugin.toml" title="taji-plugin.toml" id = "toy" name = "toy" version = "0.1.0" taji = ">=0.7, <0.8" skill = ["SKILL.md"] [process] run = ["toy"] [grants] reads = ["chains"] [[sources]] id = "toy" reads = [ { class = "index", product = "toy.levels", span = "live", delay_s = 0 }, { class = "equity", product = "toy.levels", span = "live", delay_s = 0 }, ] [[products]] name = "levels" description = "Call and put open-interest peak strikes and put/call OI ratio from option chains." shape = "values" store = true model = "From each chain snapshot's contracts with open interest at least min_oi: call_peak and put_peak are the strikes holding the most call and put open interest; put_call is total put open interest divided by total call open interest." words = [ { name = "min_oi", type = "int", default = 0, min = 0, doc = "Minimum contract open interest to include." }, ] columns = [ { name = "ts_utc", type = "int" }, { name = "spot", type = "decimal", unit = "price" }, { name = "call_peak", type = "decimal", unit = "price", nullable = true, doc = "Strike holding the most call open interest." }, { name = "put_peak", type = "decimal", unit = "price", nullable = true, doc = "Strike holding the most put open interest." }, { name = "put_call", type = "float", unit = "ratio", nullable = true, doc = "Total put open interest divided by total call open interest." }, ] [[ui.layers]] id = "toy.peaks" label = "OI peaks" product = "toy.levels" renderer = "taji.levels" slot = "above" style = [ { name = "columns", type = "string", default = "call_peak,put_peak", doc = "Which price columns draw, comma-separated." }, { name = "emphasis", type = "string", default = "call_peak", doc = "The column drawn solid in the accent." }, ] [[kernel.indicators]] name = "toy_ratio" source = "indicators/toy_ratio.ts" test = "indicators/toy_ratio.test.ts" ``` | Table | What it says | |---|---| | `[process] run` | the binary; `taji = ">=0.7, <0.8"` is the contract versions the plugin speaks | | `[grants] reads` | the hub products the plugin may `get` and `stream`; anything else is refused `403 not_granted` | | `[[sources]] reads` | what the hub may ask of it, a row per class, product and span; the scaffold serves `live` only, so a read answers from pushed rows | | `[[products]]` | the product `toy.levels`: `shape = "values"` makes a row one instant, `ts_utc` first; `store = true` has the kernel record each row; `words` are its query words, typed with defaults; `columns` are `nullable` where a row may hold none | | `[[ui.layers]]` | draws the product on the chart: [Draw a chart layer](https://docs.taji.is/plugins/layer.md) | | `[[kernel.indicators]]` | adds a script to the catalog, with its test | A figure the plugin estimates declares a `model`, which a read serves as `computed_by` and `estimated`. Every field is in [the manifest reference](https://docs.taji.is/plugins/manifest.md). ## 3. Compute the row `build.rs` runs `taji_sdk::build::products()`, which reads the manifest; `taji_sdk::products!()` then declares `Levels` and `LevelsWords` from it. The scaffold's `src/main.rs`: ```rust file="examples/feature/toy/src/main.rs" title="src/main.rs" use std::collections::BTreeMap; use std::time::Duration; use taji_sdk::hub::{Batch, Chains}; use taji_sdk::{Decimal, serve}; taji_sdk::products!(); fn main() { serve(include_str!("../taji-plugin.toml"), |p| { p.product::().live(|cx, sub| { for batch in cx.stream(Chains::of(sub.item()).every(Duration::from_secs(60)))? { if let Some(level) = row(sub.words(), &batch) && sub.push(level).is_err() { break; } } Ok(()) }); }); } fn row(words: &LevelsWords, batch: &Batch) -> Option { let spot = batch.rows.iter().find_map(|c| c.spot).or(batch.spot)?; let min_oi = Decimal::from(words.min_oi); let (mut calls, mut puts) = (BTreeMap::new(), BTreeMap::new()); for c in &batch.rows { let Some(oi) = c .open_interest .filter(|&oi| oi > Decimal::ZERO && oi >= min_oi) else { continue; }; match c.right.to_ascii_lowercase().as_str() { "call" => *calls.entry(c.strike).or_default() += oi, "put" => *puts.entry(c.strike).or_default() += oi, _ => {} } } let peak = |side: &BTreeMap| { side.iter() .max_by_key(|&(_, oi)| oi) .map(|(&strike, _)| strike) }; let call_oi: Decimal = calls.values().copied().sum(); let put_oi: Decimal = puts.values().copied().sum(); let put_call = (call_oi > Decimal::ZERO) .then(|| f64::try_from(put_oi).ok().zip(f64::try_from(call_oi).ok())) .flatten() .map(|(p, c)| p / c); Some(Levels { ts_utc: batch.knowable_utc, spot, call_peak: peak(&calls), put_peak: peak(&puts), put_call, }) } ``` `live` runs once a subscription. `Chains::of(sub.item()).every(Duration::from_secs(60))` is the hub's `chains` for the item, its newest snapshot at most once a minute; `cx.stream` yields each as a `Batch`. A failed push means the subscriber left, so the loop ends; returning `Ok(())` ends the subscription. To follow a book instead, stream `Depth::of(sub.item()).every(Duration::from_millis(250)).ticks(5)`: a `Batch` is one `symbol`'s book at `knowable_ms`, its `DepthLevel` rows carrying `peak` and `step`. A batch with `shut: Some(reason)` and no rows says that book lapsed and the feed goes on: push nothing and call `sub.shut(reason)`; the next `sub.push` resumes. `Trades::of(sub.item())` takes no `every`: a lossless product sends every row, and rows the feed dropped are counted on the next batch's `gap`. On an equity it reads the whole tape (`24h`) unless the query names a `session` (`.word("session", "regular")`). `row` holds what `check` tests: no clock, no randomness, nothing kept between calls. A row is one instant, `ts_utc`, the batch's `knowable_utc`. A `cells` row is stamped at the start of the interval it measures and pushed when the interval closes; `check` stamps it knowable at the newest batch handed before the push, as the `prefix` step holds. The SDK has no calendar: for a New York day or session use `jiff` with its bundled time zones, as GEX's `ny_date` does. The SDK's row types and fields are in `taji_sdk::hub` (`Trade`, `DepthLevel`, `Chain`, `Bar`, `Quote`, `Batch`, `Query`): `cargo doc -p taji-sdk --open` in the plugin lists them. A product named like a hub product (`depth`, `trades`) generates a type of the hub's name: import the hub's under another, `use taji_sdk::hub::{Depth as Books}`. ## 4. Plot it in a script `indicators/toy_ratio.ts` plots `put_call` from `data.product("toy.levels", ...)`, with `toy_ratio.test.ts` its test. [Indicators](https://docs.taji.is/indicators.md) teaches the language. ```ts file="examples/feature/toy/indicators/toy_ratio.ts" title="indicators/toy_ratio.ts" import { data, indicator, input, plot } from "@taji/indicators"; export default indicator({ name: "toy put/call", pane: "own", inputs: { min_oi: input.int(0, { min: 0 }), }, data: ({ inputs }) => ({ levels: data.product("toy.levels", { min_oi: inputs.min_oi }), }), plots: { put_call: plot.line({ title: "Put/call", unit: "ratio" }), even: plot.levels([1]), }, setup: () => ({}), next(_bar, _s, { data: feed }) { return { put_call: feed.levels.last.put_call }; }, }); ``` ```ts file="examples/feature/toy/indicators/toy_ratio.test.ts" title="indicators/toy_ratio.test.ts" // The test fixture holds no product rows, so these check the no-row end of the script. import type { T } from "@taji/indicators"; export default { "put_call is NaN on every bar while no row is knowable"(t: T) { const r = t.run(); t.assert(r.put_call.length === r.time.length && r.put_call.length > 0, "one row per bar"); t.assert(r.put_call.every((x: number) => Number.isNaN(x)), "no put_call before a row"); }, "min_oi word is accepted"(t: T) { const r = t.run({ min_oi: 100 }); t.assert(r.put_call.length === r.time.length, "one row per bar"); }, }; ``` `indicators/products.d.ts` types the product's columns for the script; `check` fails when it differs from the manifest's `[[products]]`, and `check . --bless` rewrites it. `SKILL.md` is what an agent reads: how to read the product and set an alert on it. ```md file="examples/feature/toy/SKILL.md" title="SKILL.md" --- name: toy description: "Option open-interest peaks and put/call ratio from recorded chain snapshots, and alerts when put/call crosses 1." --- ## toy Option open-interest peaks and put/call ratio: `read get/toy.levels?symbols=index:$SPX&min_oi=0` gives `spot`, `call_peak`, `put_peak` and `put_call` from recorded snapshots. Word: `min_oi` (minimum contract open interest, default 0). Alert when put/call crosses 1: `commit {route: "verb/desk//watches/add", body: {symbol: "index:$SPX", when: "crosses", of: {indicator: {name: "toy_ratio", params: {min_oi: 0}, plot: "put_call"}}, price: 1}}`. ``` A script is optional: without one `scripts` skips. ## 5. Write the fixture `fixtures/.jsonl` is the only data `check` serves; the scaffold writes `chains.jsonl`. A plugin serving other products rewrites or deletes everything the scaffold wrote for `toy.levels`: `fixtures/chains.jsonl`, `indicators/` (the script, its test, `products.d.ts`) and its `[[kernel.indicators]]` row, `SKILL.md`, and the product lines of `AGENTS.md` and `README.md`. A fixture for a product `[grants] reads` omits fails `rows`: delete the scaffold's when you read other products. A feature plugin declares no `about`, the line atop a vendor's Connections page: its `README.md`'s first paragraph says what it is. The README's H1 is the manifest's `name`, then a line saying what the plugin is and `## Use`. `AGENTS.md` is the page your own agent reads: the files, `cargo build`, `taji plugin check .`, the rules above, and `taji plugin dev . --headless` with how to read its output. Each fixture line is one JSON object of the fields below, and any other field is refused: | Line | Holds | |---|---| | 1 | `{"item": ":"}` | | a batch | `knowable_utc` (seconds, never descending; batches may share an instant, as live ones do) and `rows` (the product's rows as `live` receives them); optional `spot` (a decimal string) | | `scope` | on a `depth` batch: `{"levels", "venues"}`, as `GET /get/depth` states it | | `shut` | on a batch with `"rows": []`: a reason the book lapsed, framed as a live shut is | | `{"lost": n}` | `trades` only: the feed dropped `n` rows before the next batch, which carries a `gap`; `plugin dev` does not play it | `knowable_ms` is not a field: `check` hands the plugin `knowable_utc` times 1,000. A `depth` row holds `symbol`, `ts_event`, `ts_init`, `level` and optional `side`, `price`, `size`, `count`, `peak`, `step`; a `trades` row `symbol`, `ts_init`, `price`, `conditions` (`[]` for none) and optional `ts_event`, `size`, `exchange`, `delayed`, `aggressor` (`"buy"` or `"sell"`) and `off_exchange`. `side` (1, −1 or null) and `side_by` (`stated`, `quote` or `tick`) are the kernel's; `plugin dev` drops them and classes the rows as the kernel does live. The scaffold's four batches are a minute apart. Stamps have units: `ts_event` and `ts_init` are epoch nanoseconds, a hub `Timestamp` column (`Bar.start_dt`, `Quote.ts`, `Chain.snapshot_dt`) epoch microseconds, `knowable_ms` and `ts_ms` epoch milliseconds, `knowable_utc` and `ts_utc` seconds. Draw a fixture's sizes from the spread real ones have, a log-normal about a decade wide, not a narrow uniform band: a heatmap colours by percentiles of the sizes in view, so a book of uniform 20 to 90 lots beside a few walls draws in two colours whatever the ramp, and its golden proves nothing about the ramp. A Rust test of your own reads the same files: [`plugins/taji-orderflow/tests/flow.rs`](https://github.com/TajiAI/Taji/blob/main/plugins/taji-orderflow/tests/flow.rs)'s `fixture::

(name)` parses `fixtures/.jsonl` from `CARGO_MANIFEST_DIR` into `Batch

`s, folding each `lost` line into the next batch's `gap`. ## 6. Check ```sh taji plugin check . ``` `check` prints one line a step: `PASS `, `FAIL : — ` or `SKIP : `, then `not proven:` and the skipped steps. The exit code is the `FAIL` count. No kernel, key or network runs: the fixture is every answer. | Step | Passes when | |---|---| | `manifest` | `taji-plugin.toml` parses, validates and has `[process]` | | `shader` | each layer's `shader` compiles; skips where none is declared | | `hello` | the process starts and says `taji-plugin/1` | | `rows` | `live` plays the fixture and every row pushed fits its columns by name, type and `nullable` | | `determinism` | a second run pushes the same rows | | `prefix` | a run on each fixture's first half pushes the full run's first rows in order | | `read` | a product with a `history` source, read twice over the span it pushed, answers the same both times and equals the rows the kernel keeps; skips here, [GEX](https://docs.taji.is/catalog/taji-gex.md) has a `history` | | `scripts` | each script compiles, passes its test and its invariants, and draws something different with your rows than without | | `draw` | each layer renders alone in headless Chrome and matches `golden/.png` | | `budget` | a layer with a `shader` is redrawn 100 times in a 2560×1440 page at scale 2, the largest chart the window draws, and its median GPU time a frame stays under the window's 2 ms; a heatmap, bubbles or footprint layer prints `pan p95`, unjudged | `prefix` cuts each fixture at its first half's end, takes the earliest such instant, and holds the run to the full run's rows through at least the last one knowable by then, stamped as the kernel stamps a pushed row: the later of its instant and the newest batch handed to the plugin before it. `draw` builds 1-minute candles from the first fixture's batches, so they need a `spot`; a heatmap must change 2% of the plot, bubbles must draw a circle, and a footprint must change 2% of the plot and draw a number. It runs where a Taji source tree is above the plugin or your working directory, and skips elsewhere. [Draw a chart layer](https://docs.taji.is/plugins/layer.md) covers `shader` and `budget`. A new layer has no golden, so its first `check` FAILs `draw` until the next step. ## 7. Bless the golden ```sh taji plugin check . --bless ``` `golden/.png` is written for each layer, and `indicators/products.d.ts` is rewritten. Open each golden, look, then commit it. A later `draw` `FAIL` after an intended layer change is answered the same way; an unintended one is a bug to fix. Never edit a golden by hand. Run `taji plugin check .` once more: it ends with no `FAIL`, and the exit code is 0. ## 8. Run it on a kernel ```sh taji plugin dev . --headless & ``` A throwaway kernel under `target/dev/` plays `fixtures/` live, every other data source off, with the layers and scripts bound to one chart. Wait for `target/dev/dev.json` and read its `error` first; its `log` is `target/dev/state/taji.log`. `target/dev/rows.json` holds `{"toy.levels": [rows]}` as `check` writes them, now `recorded: true`, refreshed every 5 s; a refused product reads `{"refused": " : "}`. Fixtures loop on the wall clock, so a row can take one `period` (`dev.json`). After a change, stop it with Ctrl-C, build and rerun. | Fixture | Plays live as | |---|---| | `chains.jsonl` | the same chains, expiries re-dated to today | | `trades.jsonl`, `depth.jsonl` | the rows, with no `scope` and no `lost` | | any other | not played | One item serves every product. An `index` or `equity` plays live trades and candles in its session only: a fixture that must play at any hour names a future or a coin (`crypto:`). ## 9. Read the product With the kernel from step 8 running, ask the wire for `toy.levels` like any product. The answer is Arrow IPC, so decode it with `pyarrow` (a Taji checkout's `make setup` lays one at `.python`); `dev.json` names the URL and the token file: ```sh URL=$(jq -r .url target/dev/dev.json) TOKEN=$(cat "$(jq -r .token_file target/dev/dev.json)") curl -sf -H "x-taji-token: $TOKEN" "$URL/get/toy.levels?symbols=index:\$TOY" \ | .python/python -c "import sys, pyarrow as pa; t = pa.ipc.open_stream(sys.stdin.buffer).read_all(); print(t.schema.metadata, t.to_pylist())" ``` You see the newest row, with the schema's metadata beside it: ```json file="examples/feature/levels.json" title="levels.json" { "metadata": { "computed_by": "{\"plugin\":\"toy\",\"version\":\"0.1.0\"}", "model": "From each chain snapshot's contracts with open interest at least min_oi: call_peak and put_peak are the strikes holding the most call and put open interest; put_call is total put open interest divided by total call open interest.", "provider": "{\"index:$TOY\":\"toy\"}", "source": "{\"index:$TOY\":\"vendor\"}" }, "rows": [ { "ts_utc": 1796333048, "spot": 100, "call_peak": 102, "put_peak": 95, "put_call": 0.5, "knowable_utc": 1796333048, "recorded": true, "version": "0.1.0" } ] } ``` *Captured 2026-12-03 on `taji plugin dev` with `toy` playing its scaffolded fixture, on a keyless headless kernel.* - `spot`, `call_peak`, `put_peak` and `put_call` are `row`'s answer for the fixture batch playing at the read, with `min_oi` at its default of 0; the batches differ in these, so another read can show another row. - `ts_utc` and `knowable_utc` are the second `plugin dev` played the batch, not the fixture's own: it loops the fixture on the wall clock. - `recorded` is true because `store = true` has the kernel keep each row; `version` is the plugin's. - `computed_by` and `model` come from the manifest, and `provider` maps the item to `toy`. Stop the kernel with Ctrl-C. ## If it fails - **`FAIL hello`:** `[process] run` names no built binary, because `check` builds nothing. Run `cargo build`. - **`FAIL rows` naming a product, row and column:** a pushed row does not fit the manifest's column. It also fires on an ask refused `403 not_granted` (the product is not in `[grants] reads`), a `live` that ends refused, and a shaped product that pushes no row. - **`FAIL determinism`:** a clock, randomness or state kept across runs. Compute each row from its batch alone. - **`FAIL prefix`:** a row depends on a later batch. A `SKIP prefix` means nothing was compared: widen the fixture. - **`FAIL scripts`:** the script does not compile, fails its test or an invariant, or draws the same with your rows as without. When `products.d.ts` differs from the manifest, run `check . --bless`. - **`FAIL draw` on a new layer:** it has no golden: bless it (step 7). - **A row refused from a source you did not expect, under `plugin dev`:** read `target/dev/state/plugins//log`, then `target/dev/state/taji.log`. A plugin that failed to start makes the hub fall through to another source. ## Next - [Draw a chart layer](https://docs.taji.is/plugins/layer.md): the stock renderers, shaders and custom builders. - [GEX](https://docs.taji.is/catalog/taji-gex.md) is this plugin grown: its `src/main.rs` registers four products from one function, each with a `history`, so `check` runs `read`; its manifest adds `profile` products and scripts that draw a card. - [The manifest reference](https://docs.taji.is/plugins/manifest.md) and [the process protocol](https://docs.taji.is/plugins/protocol.md). - [Pack and install a plugin](https://docs.taji.is/plugins/publish.md). > Every Taji docs page as Markdown: https://docs.taji.is/llms.txt # Draw a chart layer You build `ladder`, a keyless Python plugin whose product is drawn on a chart as a profile in the dock at the price axis, recoloured by a shader you write, and read over the wire. You need a checkout [built from source](https://docs.taji.is/guide/install.md), `jq`, the network (the keyless kernel reads Yahoo's delayed bars) and Taji's Python from `make setup`, which runs the plugin and decodes the answers. A layer is one `[[ui.layers]]` row of a plugin's manifest: it names one of the plugin's products and a renderer, and the window draws that product's rows over the chart. The renderer is a stock one (`taji.levels`, `taji.profile`, `taji.heatmap`, `taji.bubbles`, `taji.footprint`) or a builder you write. [GEX](https://docs.taji.is/catalog/taji-gex.md), `plugins/taji-gex`, draws three layers this way from a Rust plugin; `ladder` is the smallest of the same shape. The row's fields are in [the manifest reference](https://docs.taji.is/plugins/manifest.md). ## 1. Declare the product and the layer Make a directory named for the plugin's id and write its manifest: ```toml file="examples/layer/ladder/taji-plugin.toml" title="taji-plugin.toml" id = "ladder" name = "Ladder" version = "0.1.0" taji = ">=0.7, <0.8" [process] run = ["ladder.py"] python = {} [[sources]] id = "ladder" reads = [ { class = "equity", product = "ladder.strikes", span = "history" }, { class = "equity", product = "ladder.strikes", span = "live", delay_s = 0 }, ] [[products]] name = "strikes" description = "A toy ladder: a bar at each whole price around a centre." shape = "profile" words = [{ name = "spot", type = "float", default = 100, min = 1, doc = "The price the ladder centres on." }] columns = [ { name = "ts_utc", type = "int" }, { name = "price", type = "list", unit = "price", doc = "The ladder's prices, ascending." }, { name = "value", type = "list", doc = "The bar at each price: positive above the centre, negative below." }, ] [[ui.layers]] id = "ladder.strikes" label = "Ladder" product = "ladder.strikes" renderer = "taji.profile" shader = "ui/ladder.wgsl" slot = "dock" style = [{ name = "opacity", type = "float", default = 0.8, min = 0, max = 1 }] ``` 1. **`[[sources]]`** serves `ladder.strikes` for `equity` items at `history` and `live`. The window reads a layer's product over the chart's view and streams it, so serve both; with `history` alone the layer's legend shows `!`. 2. **`[[products]]`** declares the product. Its `shape`, `profile`, says a row is a by-price distribution and requires the list columns `price` and `value`. `spot` is a word: the window puts each word of the product, at the binding's value or the default, on every read and stream of the layer. 3. **`[[ui.layers]]`** draws it. `product` is one of the plugin's own products that has a `shape`; `renderer` is the stock renderer of that shape; `slot = "dock"` puts it inside the plot at the price axis; `shader` recolours its bars; `style` rows declare what the user may change. [Pick a renderer and a slot](#pick-a-renderer-and-a-slot) lists the choices for each of those. ## 2. Serve the rows Write the program beside the manifest: ```python file="examples/layer/ladder/ladder.py" title="ladder.py" import asyncio import time import taji p = taji.plugin() HOUR = 3600 def row(ts, spot): steps = range(-10, 11) return { "ts_utc": ts, "price": [str(round(spot) + k) for k in steps], "value": [float(k * (11 - abs(k)) * 10) for k in steps], } @p.read("ladder.strikes") def read(ask): spot = float(ask["words"]["spot"]) hi = min(ask["to"] or 2**62, int(time.time()) + 1) lo = ask["from"] if ask["from"] is not None else hi - 24 * HOUR rows = [row(ts, spot) for ts in range((lo + HOUR - 1) // HOUR * HOUR, hi, HOUR)] return rows[: ask["limit"]] if ask["limit"] is not None else rows @p.stream async def stream(sub): spot = float(sub["words"]["spot"]) while True: p.push(sub["sub"], [row(int(time.time()), spot)]) await asyncio.sleep(60) p.run() ``` 1. **`row`** is one row: 21 prices around `spot`, a decimal string each, and a bar at each, growing from nothing at `spot` to 300 five prices out, then shrinking; positive above `spot`, negative below. 2. **`@p.read("ladder.strikes")`** answers `history`. A word reaches `ask["words"]` as a string, so `spot` is converted. It answers one row an hour in `[from, to)`, none after now, and at most `limit`. A shaped product has one row an instant (a second row at one instant is dropped), so each row has its own `ts_utc`. 3. **`@p.stream`** runs once per sub, the window's stream of the layer, and pushes a row stamped now every 60 s. The SDK cancels it when the sub leaves the set. 4. **`p.run()`** says hello to the kernel and serves calls until the kernel closes stdin. It refuses to start when a product of `[[sources]]` has no `@p.read`, or a `live` read has no `@p.stream`. `taji.profile` draws the newest row it holds, so a row an hour old is still the dock's. ## 3. Shade the layer A shader recolours the rects a renderer already draws; picking and tooltips are unchanged. Write the shader as `ladder.wgsl` in the plugin's `ui` directory: ```wgsl file="examples/layer/ladder/ui/ladder.wgsl" title="ui/ladder.wgsl" // A bar deepens with its size, from the muted ink at the smallest to the renderer's colour at the peak. fn shade(in: ShadeIn) -> vec4f { let rgb = mix(in.tokens.muted.rgb, in.base.rgb, 0.3 + 0.7 * in.t); return vec4f(rgb, in.base.a); } ``` 1. **`fn shade(in: ShadeIn) -> vec4f`** is the one function the file must hold. It returns the rect's colour as straight alpha. 2. **`in.t`** is the bar's size, `abs(row.value)` over the layer's largest, from 0 to 1. 3. **`in.base`** is the colour the renderer would draw: green for a positive bar, pink for a negative one. 4. **`mix(in.tokens.muted.rgb, in.base.rgb, …)`** runs each bar from the muted ink at the smallest to its own colour at the peak. Taji generates `ShadeIn`: | Field | Holds | |---|---| | `row` | an `f32` for each non-nullable number or list column of the rect's row except `ts_utc` and `ts_ms`, named for it; a list column gives the element at the rect's `cell`, 0 where none. At most 31 columns, and at least one | | `style` | `opacity` and each number or bool `style` word of the layer, as `f32`; a bool is 0 or 1 | | `tokens` | the theme's `up`, `down`, `ink`, `accent` and `muted`, each a `vec4f` | | `uv` | `uv.x` runs 0 at the rect's left edge on screen to 1 at its right, whichever of `x0` and `x1` is larger | | `size_px` | the rect's size in device pixels | | `t` | `abs(row.value)` over the largest `abs(value)` among the layer's drawn rects, 0 to 1; 0 where the product has no `value` column | | `base` | the colour the renderer would draw | The manifest refuses a shader on `taji.levels`, whose lines a shader does not recolour, and on `taji.heatmap`, `taji.bubbles` and `taji.footprint`. A WGSL keyword or a `__` name is refused as a column or style word. The module takes no loop, module `var`, binding, entry point, `override`, directive, texture or atomic, and at most 16 functions, 2,000 expressions and 64 KiB; `plugin check`'s `shader` step prints each refusal's sentence, led by `line N:`. The shader runs on WebGPU only; on WebGL2, or once turned off, the layer draws the renderer's colours. ## 4. Load it and bind it to a chart Copy the plugin into a plugins directory, then boot a headless kernel on throwaway state with `TAJI_PLUGINS` naming that directory, as [your first plugin](https://docs.taji.is/plugins/first-plugin.md#4-boot-a-kernel-with-your-plugin) does. A debug kernel runs Python plugins on the checkout's `.python`. Every command runs from the repository root, in one shell: ```sh W=$(mktemp -d) mkdir -p "$W/plugins" && cp -R docs/plugins/examples/layer/ladder "$W/plugins/" boot() { mkdir -p "$W/state" "$W/store" "$W/home" export TAJI_NO_UPDATE_CHECK=1 TAJI_NO_REPORT=1 TAJI_STATE_DIR=$W/state TAJI_STORE_DIR=$W/store TAJI_HOME=$W/home TAJI_PLUGINS=$W/plugins TAJI_HEADLESS=1 TAJI_WIRE=0 target/debug/taji > "$W/boot.log" 2>&1 & until [ -s "$W/state/wire-token" ] && curl -sf -o /dev/null -H "x-taji-token: $(cat "$W/state/wire-token")" "localhost:$(cat "$W/state/wire-port")/"; do sleep 1; done PORT=$(cat "$W/state/wire-port"); TOKEN=$(cat "$W/state/wire-token") } get() { curl -s -H "x-taji-token: $TOKEN" "localhost:$PORT/$1"; echo; } v() { curl -s -H "x-taji-token: $TOKEN" -H 'content-type: application/json' -X POST "localhost:$PORT/verb/$1" --data-binary "$2"; echo; } boot get read/plugins | jq '.[] | select(.id == "ladder") | {enabled, layers: [.layers[].id]}' ``` You see `enabled: true` and `layers: ["ladder.strikes"]`. A chart lists the layer as an indicator named for its id; `get read/catalog/ladder.strikes` shows it, `category` `Plugins`. Put chart 1 on SPY at 15 minutes, centre the ladder on SPY's last close and bind the layer. `spot` rides in the binding's `params`: ```sh DESK=$(get "" | jq -r .active) v desk/$DESK/chart/1/set_symbol '{"symbol":"equity:SPY"}' v desk/$DESK/chart/1/set_timeframe '{"timeframe":"15m"}' SPOT=$(curl -s -H "x-taji-token: $TOKEN" "localhost:$PORT/get/bars?symbols=equity:SPY&timeframe=15m&limit=1" \ | .python/python -c "import sys, pyarrow as pa; print(round(pa.ipc.open_stream(sys.stdin.buffer).read_all().column('close')[0].as_py()))") v desk/$DESK/chart/1/add_indicator "{\"pane_id\":1,\"definition\":\"ladder.strikes\",\"params\":{\"spot\":$SPOT}}" ``` You see the binding's node, whose last segment is its id, and `seq`: ```json file="examples/layer/bind.json" { "node": "desk/01a2426c-8518-7452-bf65-dcafdbf0d5d0/chart/indicators/01a2426c-8e2b-77fd-a767-07b907533ffc", "seq": 1796410737668982 } ``` A layer computes nothing in the kernel: its binding holds no rows, and the window reads the product and draws it. Read the same rows over the wire, the oldest hour of the last day (`limit=1`): ```sh curl -s -H "x-taji-token: $TOKEN" "localhost:$PORT/get/ladder.strikes?symbols=equity:SPY&spot=$SPOT&limit=1" \ | .python/python -c "import sys, pyarrow as pa; print(pa.ipc.open_stream(sys.stdin.buffer).read_all().to_pylist())" ``` The row is the plugin's, with the three columns the kernel adds to every plugin row: ```json file="examples/layer/strikes.json" [ { "ts_utc": 1796324400, "price": [ 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152 ], "value": [ -100.0, -180.0, -240.0, -280.0, -300.0, -300.0, -280.0, -240.0, -180.0, -100.0, 0.0, 100.0, 180.0, 240.0, 280.0, 300.0, 300.0, 280.0, 240.0, 180.0, 100.0 ], "knowable_utc": 1796410740, "recorded": false, "version": "0.1.0" } ] ``` *Captured 2026-12-04 on a headless kernel reading made-up 15-minute bars for SPY.* The window, were it open, now draws Ladder in the dock at the right edge of the chart: ![A 15-minute SPY chart with a Ladder profile in the dock at the price axis: green bars above 142 running off the top of the pane, pink bars below it running off the bottom, with a zero line down the dock's middle](https://raw.githubusercontent.com/TajiAI/Taji/main/docs/plugins/examples/layer/shot.png) *Captured 2026-12-04 on a headless kernel reading made-up 15-minute bars for SPY.* - The legend names the layer and its plugin, `Ladder` and `ladder`. - `taji.profile` draws one bar a price, green where `value` is positive and pink where it is negative, from the dock's middle line outward. The bars run off the pane's top and bottom: the price scale shows what the candles need. - Where the window can run the shader, the smallest bars draw in the muted ink and the largest in the full colour; elsewhere all draw in the renderer's colours. Stop the kernel: ```sh v ui/quit '{}' wait rm -rf "$W" ``` ## 5. Prove it with `plugin check` `taji plugin check

` holds a plugin to its manifest with no kernel state, key or network, answering its `get` and `stream` from `/fixtures/.jsonl`; `plugins/taji-gex/fixtures/` and `plugins/taji-gex/golden/` are a worked set. A layer is held in three steps: - `shader` writes the validated text to `target/check/shader/.wgsl`, `` being the layer id after its last dot. - `draw` draws each layer alone and compares it with `golden/.png`; a shaded layer must also draw on WebGPU, time its frames and differ from itself drawn with no shader. A heatmap must change at least 2% of the plot's pixels, bubbles must draw a circle, and a footprint must change at least 2% of the plot and draw a number; the fixture's first batches need a `spot`. A `main` layer is drawn over the fixture's bars alone, so its numbers have room at 960×600. - `budget` redraws each shaded layer 100 times in a 2560×1440 page at scale 2, the largest chart the window draws, and fails over 2 ms a frame, naming that size; it skips without `timestamp-query`. A heatmap, bubbles or footprint layer prints `pan p95` over 100 one-pixel pans at that size. `taji plugin check --bless` writes each layer's `golden/.png`, the first time and after a look you meant to change; open it, then commit it. ## Pick a renderer and a slot The product's `shape` fixes the stock renderer: | `shape` | `renderer` | One row is | |---|---|---| | `values` | `taji.levels` | an instant with price columns, drawn as horizontal levels | | `profile` | `taji.profile` | the strikes of one snapshot, list columns `price` and `value` | | `cells` | `taji.heatmap`, `taji.footprint` | one time column of a price grid, [below](#draw-a-heatmap-and-bubbles) and [the footprint](#draw-a-footprint) | | `marks` | `taji.bubbles` | one event, [below](#draw-a-heatmap-and-bubbles) | `taji-gex.walls` is a `taji.levels` layer and `taji-gex.profile` a `taji.profile` one. A stock renderer is a builder in `packages/plugin/layer/stock/`, listed in `STOCK` (`packages/plugin/layer/stock/index.ts`): a pure function from the served rows, the view and the colour tokens to `Shapes`. `build` runs when the rows, the style or the zoom change, never per frame. `slot` says where the layer draws; every layer is clipped to the plot: | `slot` | Draws | |---|---| | `behind` | under the candles | | `above` | over them (the default) | | `dock` | inside the plot at the price axis | | `main` | after the `behind` layers and under the candles, which narrow to a thin body; [the footprint](#draw-a-footprint) draws there | Declare `style` rows for what the user may change. A stock renderer reads these keys, and ignores a key it does not read: | Renderer | Keys | |---|---| | `taji.levels` | `columns` (which price columns draw), `emphasis` (which is solid in the accent) | | `taji.profile` | `buckets` (stack each strike by days to expiry), `opacity` (the bars' alpha), `anchor` (where the bars start: `center`, the default, the dock's middle, or `edge`, the dock's edge at the price axis with no zero line) | | `taji.heatmap` | `ramp`, `scale`, `lower`, `upper`, `opacity` | | `taji.bubbles` | `min_size`, `size_ref` | | `taji.footprint` | none | `taji.profile` draws the newest row; one older than the read's end by more than two of its own row intervals draws in `muted`, its note `as of