kestrel.markets
Version:
A typed, token-efficient language + runtime for agentic trading: agents author bounded plans, the runtime fires them at the tick. CLI + typed library + MCP server.
26 lines (21 loc) • 1.62 kB
Markdown
# The pod is the unit of autonomy — and pods compose recursively
Kestrel's org model is in the language, not around it. The **Pod** is the recursive
organizational node: {an allocating role (PM) + a risk envelope + children}, where each
child is a **Book** (the leaf — the only place positions and orders live) or another
Pod. Depth is unbounded — pods in pods, like modules importing modules — because the
org is **data** (a standing Kestrel document the PM revises, even intraday: spawning
five traders for the day is authoring five leaves), not a fixed structure. PM and
Trader are *roles at a node*, not job titles; one agent may hold both (a solo book is a
pod of one). Humans always sit above the root: a pod is the largest thing that executes
autonomously.
We chose recursive composition over a fixed PM→Traders hierarchy because fixed depth
mirrors human meeting bandwidth, which agents don't have — and because the invariants
that actually matter are depth-independent:
1. **Budgets nest** — a child's envelope ⊆ its parent's, enforced at every node.
2. **Authority only narrows downward** — at every edge (the provenance ceiling).
3. **Positions live at leaves only** — clean per-unit P&L attribution.
4. **Risk (L0) outranks every node, including the root.**
Consequences: org facts are **path-scoped series** resolved lexically like ESM (`pnl`
= my scope; `dram.pnl` = my child; quantifiers like `children(any).drawdown` at any
node); a PM's View/Wake and a Trader's View/Wake are the same language over different
scopes; Grade can grade any node (a leaf's trading or a PM's allocation).