graphify
GRGraphify-Labs/graphify156k2,564 new stars in the last 7 days
Paper-trading sandbox over workspace sessions: record live market data and agent decisions inside a session window, replay and score it later.
A session ties a market recorder and the workspace's paper account to one window. Live prices stream in and get recorded as the session's tape, paper orders fill against those prices on the shared account journal, and every decision is logged, so the window can be replayed and analyzed later. No real order is ever placed inside a paper workspace.
Use this skill for:
kraken playground is the fastest way in: it creates (or reuses, never re-funding) a paper workspace named playground with 10,000 USD, prints how to watch it, and starts a recorded, self-stopping demo session:
kraken playground --symbols BTC/USD --for 1h 2>/dev/null &
export KRAKEN_WORKSPACE=playground
Everything it makes is a plain workspace plus a session — the commands below drive it like any other scope.
A session is a recorded window over the active scope's account journal. One session id (s1, s2, …) binds three things: the recorder (live market data to sessions/s<n>/tape.*), the window markers on the account journal (which trades belong to the session), and the session's decision log (the "why" behind each action). There is no daemon and no shared memory between rounds. State lives on disk, and each round reads what it needs.
The CLI has no scheduler and runs no strategy. It records, fills paper orders, and logs. The agent decides, and something external holds the pace (see Pacing).
Work inside a paper workspace (create one once with kraken workspace create <name> --capital 10000 --mode paper), then:
export KRAKEN_WORKSPACE=<name>
kraken session start \
--symbols BTC/USD --channels ticker,trade --to duckdb,jsonl \
--label my-hypothesis-r1 \
-o json 2>/dev/null &
The session_started JSON line on stdout carries the session id ("session":"s<n>"). Print it to the user as soon as the session starts, and again in the final report. It is the handle for everything after: kraken session show --session s<n>, resuming a /loop, and locating the artifacts under sessions/s<n>/.
--symbols: instruments to record and trade against--channels: which feeds to record (e.g., ticker,trade, add book for depth)--to: recording sinks (duckdb for query, jsonl for raw replay)--label: a human handle, usable anywhere a --session ref is--strategy / --strategy-params: name and JSON knobs of the driver, recorded in session.json so two sessions compare knob-for-knob--for: auto-stop after a window (e.g. 1h) — the session closes itself cleanly--from tape:<name> --speed 10: replay a recorded tape instead of the live marketBuy or sell against recorded prices — the order verbs are mode-routed, so inside a paper workspace they fill on the paper account. Name the workspace on every order: an exported KRAKEN_WORKSPACE does not reach a later shell, such as a /loop fire, and without a workspace kraken order buy trades the real account. Always pass a reason; it lands in the active session's decision log:
kraken --workspace <name> order buy BTC/USD <volume> --type market --reason "<why>" -o json 2>/dev/null
kraken --workspace <name> order sell BTC/USD <volume> --type market --reason "<why>" -o json 2>/dev/null
Log a non-trade decision (a skip, a gate, an alert) so the log records rounds where nothing traded:
kraken session note --kind skip --symbol BTC/USD --reason "<why>" -o json 2>/dev/null
Data lands under the session directory of the active scope:
# Read the decision log (evidence) and the typed state cell (the loop's
# cursor: round, legs_done, zone, last_action_at) through the CLI —
# no layout knowledge needed:
kraken session decisions --session s<n> -o json
kraken session state get --session s<n> -o json
session.json: the session's contract — window, opening equity anchor, strategy, experimentdecisions.jsonl: one line per decision (kind, symbol, reason, timestamp, order id)tape.duckdb / tape.jsonl: the raw tape for replay and P&LPacing is external to the CLI. Two mechanisms, one per hypothesis shape:
/loop owns the schedule. Set its interval to the decision spacing and it fires one round per interval.kraken-ws-streaming).For time-gated runs, the interval is a floor. A round may start late (the scheduler adds jitter), never early. Do not add a second pacing gate inside the round; /loop already enforces spacing.
The scheduler floor is 60 seconds. /loop, cron, and ScheduleWakeup all clamp to a one-minute minimum, so interval_s must be >= 60 and a sub-minute cadence is impossible. If the user asks for "every 30 seconds", clamp to 60s and say so — never set a sub-minute interval_s, and never let the report claim a cadence the harness cannot run.
A session over many rounds is interventional: one visit per interval, paced from outside. Pick the mechanism by what triggers a decision.
/loop N fires the round, each round takes one REST snapshot (kraken ticker, kraken ohlc), decides, acts. See recipe-playground-dca.recipe-playground-dca-triggered.Time-gated misses conditions that appear and resolve between visits. Event-gated catches them but runs as a long-lived process and is blind during reconnect gaps. Choose per hypothesis.
A driver is a recipe that turns a hypothesis into recorded rounds. The shape of every round:
--strategy-params.order buy / order sell on a trigger, session note on a skip, always with a numeric reason.Keep every number that gates a buy or skip in --strategy-params, not only in prose reasons. That is what makes two sessions comparable. Keep the arithmetic deterministic (compute in jq/bc, do not eyeball it) so a rerun on the same tape reaches the same decisions.
kraken session show -o json 2>/dev/null | jq '.window, .valuation'
kraken session stop -o json 2>/dev/null
kraken explain pnl --session latest -o json 2>/dev/null
kraken lab score --session latest -o json 2>/dev/null
--session accepts latest (the default everywhere), an ordinal (s3), or a label.
--workspace <name> and kraken workspace show <name> -o json reports "mode": "paper".kraken-paper-strategy)./loop for time-gated, a stream's event rate for event-gated. Never add a redundant pacing gate inside a round. The scheduler floor is 60s — no sub-minute cadence.session.json, decisions.jsonl, and the tape sinks) is owned by the CLI recorder. The agent only reads it, and only for status and the stop-time summary. Never write, edit, mkdir, or append inside it — every decision goes through kraken order buy / kraken session note, so the recorder stays the single writer.kraken feedback.GRGraphify-Labs/graphify156k2,564 new stars in the last 7 days
PApaperclipai/paperclip119k1,966 new stars in the last 7 days
NEnexu-io/open-design111k1,277 new stars in the last 7 days
HEheygen-com/hyperframes94k4,558 new stars in the last 7 days
BYbytedance/deer-flow86k276 new stars in the last 7 days
BYbytedance/deer-flow86k276 new stars in the last 7 days