Building your own
Build an agent from scratch. Start with the trade, write the playbook, state your limits in prose, plug in extra context only when you need it.
Building an agent is mostly an exercise in being precise about what you want.
Start by choosing whether the agent trades Spot or Perps. The builder asks for this before it generates a draft. Beyond that choice, there is no fixed indicator list or required playbook structure.
Start with the trade
Before you write a single file, write one sentence:
I want to fade extreme funding on liquid perps, except in vol spikes.
If you can't say what you're trying to do in one sentence, you're not ready to write the file. Once you have it, almost everything goes in one place.
- STRATEGY.md is the whole strategy — a short identity block at the top, then the playbook in prose. Like a Claude Skill.
- tools.yaml and endpoints.yaml are optional. Add them when your thesis depends on context the agent can't already see.
The playbook
The playbook is what the agent reads the way a junior trader reads a senior trader's notes. Be concrete; specifics beat generalities. The starter template Engine ships uses this scaffold — a strong default, not a requirement:
- Mandate. What the strategy does and doesn't do; its temperament.
- Universe. Which markets, and why they fit the edge.
- Entry setups. The conditions to engage, and the independent confirmations each one needs.
- Sizing and risk. How big, how many positions at once, when to stop adding, and leverage when relevant.
- Position management. Adds, trims, trails — the trade's lifecycle once it's on.
- Exit doctrine. What invalidates the thesis; when to take profit or cut.
- Time horizon. How long you expect to hold.
- Abstain when. The regimes and conditions where you sit out.
But the playbook is just prose. Write whatever you want, in whatever order — the agent reads the whole file and applies all of it. Be specific where specificity matters; lean on judgment where judgment matters. Lead with conditions, not opinions: "Skip during a volatility spike and reassess after an hour" is stronger than "don't trade choppy markets."
Identity
Identity lives in a small frontmatter block at the very top of STRATEGY.md — the same --- ... --- shape as a Claude Skill:
---
name: Funding Harvester
description: Fade crowded negative funding on liquid perps when OI confirms shorts are still piling in.
type: perps
---
name, description, and type are required. Type must be spot or perps, and the universe in the playbook must match it. You don't set an author or slug; Engine derives those when you publish.
Everything about how to trade — universe, risk limits, default exits, how selective to be — goes in the body of STRATEGY.md as prose, below the frontmatter. There's a reason for that:
Write every important rule plainly in the playbook. The strategy governs its universe, entries, sizing, management, and exits. If you want a hard ceiling on exposure, state it in the prose; it is not a required frontmatter field.
Extend the agent's world
The agent already sees price, liquidity, momentum, volume, account state, and the additional data relevant to its type. For many agents, that's all the input you need.
When your thesis depends on context Engine doesn't surface by default, you have three ways to plug it in.
Custom data sources are always-on. Declare HTTPS feeds in endpoints.yaml. Engine polls them on a schedule (you set the TTL, anywhere from one second to one hour) and merges the returned numeric identifiers into the agent's view of every market. Use this for signals the agent should always have available: a proprietary regime score, a custom sentiment index, an on-chain flow metric you've spent years building. Up to 6 feeds per agent, up to 4 identifiers each, bearer auth via env-var-named secret.
Tools are on-demand. Declare HTTPS endpoints in tools.yaml with a description, a JSON Schema for inputs, and an optional output schema. Engine registers them with the agent alongside its built-in tools. The agent calls them by name only when a setup is close enough to justify the latency. Use this for things you don't want to pay for every tick: news headlines, a deeper liquidity report, a custom analyst model, a private backtest service. Up to 16 tools, any HTTPS method (GET/POST/PUT/PATCH/DELETE), bearer auth.
References hold long-form depth. Drop markdown files into a references/ folder. The agent lazy-loads any of them on its own when a setup needs more than the main playbook covers. Use this for regime playbooks, market-specific tactics, sizing matrices, post-mortems — material that would bloat the everyday prompt if it were always loaded. Up to 64 reference files, 64KB each.
You can also organize the bundle with author-named subfolders for whatever else you want to ship alongside (notes, helper scripts, configuration JSON). Bundle limit is 64 files, 1MB total.
Secrets never live in the bundle. You reference an env-style name in endpoints.yaml or tools.yaml, and the actual value sits in Engine's secrets panel.
Each of these gets a full walkthrough, with examples and the exact request and response shapes, in Custom tools and data.
A complete example
A compact, single-file strategy — identity frontmatter on top, playbook below:
---
name: Funding Harvester
description: Fade crowded negative funding on liquid perps when OI confirms shorts are still piling in.
type: perps
tags: [funding, mean-reversion, crypto]
---
# Funding Harvester
Trade against extreme negative funding on liquid perps when open interest
confirms that shorts are still crowding in. When leveraged shorts are crowded,
the basis mean-reverts and we collect the unwind.
## Mandate
Selective and patient — most checks end in no trade. Act only when funding is
genuinely stretched and structure confirms the crowd, never on funding alone.
## Universe
BTC-PERP, ETH-PERP, SOL-PERP, and HYPE-PERP — the deepest perps, where the
crowding signal is clean and the unwind is tradable.
## Entry Setups
A crowded-short fade needs three things together:
- Funding deeply negative and sustained (below about -100bps/hr for 2+ hours).
- Open interest rising into the move, not falling.
- Realized volatility normal — not in cascade mode.
## Sizing and Risk
Size in margin: about 5% of NAV at 2x leverage, halved when one condition is
marginal. Stop ~1.2%, target ~2%, with the stop placed where the crowding
thesis is invalidated. Daily loss budget ~3%; step away once it's spent.
## Position Management
Hold while funding stays stretched and structure holds. Trail the stop only
after the trade has protected entry.
## Exit Doctrine
Take profit when funding mean-reverts toward zero or price squeezes into
resistance. Exit when the crowding thesis is gone — not on proximity to the stop.
## Time Horizon
Short — hours to a day or two. This is an event around positioning, not a
position to carry.
## Abstain When
- A volatility spike or a macro event window — reassess in an hour.
- Funding is extreme but realized vol is also extreme (directional flow, not crowding).
- The book is thin or signals conflict.
Best practices
Write to a trader, not a parser. The agent reads the playbook as prose. If a sentence wouldn't make sense to a human, it won't make sense to the agent.
Be specific where it counts. "Funding is extreme" is vague. "Funding below -100bps and falling for 2+ hours" is actionable.
Always have an abstain path. A strategy that doesn't say when to sit out will force trades in regimes it doesn't understand.
State your limits plainly. If a constraint matters, write it clearly and unambiguously in the playbook.
Iterate. First drafts are wrong in surprising ways. After a few days, look at the agent's decisions. Where did it abstain? Where did it size up? That tells you what to tighten or relax.
What's next
See How agents work for the model behind a bundle.