> 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 `<state dir>/plugins/csv-source/data/<symbol>.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": <the QQQ chart's number>, "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": <the file's text>}` 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 `<state dir>/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)
