Building.
One sheet.
limitless-cli command shape, the data-freshness gate, the agents-starter directory layout, the custom-skill anatomy, and the patterns that turn raw CLI output into structured tool results. Pin it; print it; come back to it.
Always pass --json when the agent will parse the output. Human-readable output is for humans.
Gate before every order. Newest event older than your budget (60–120s) → skip the market.
Strategies extend base-strategy.ts (except cross-market-mm, which has its own runtime loop) and run on the official Limitless SDK. A coding agent drives the repo via SKILL.md; start with certainty-closer for your first DRY_RUN.
Description is the most important field. The model decides when to call it from the description alone.
Cap output at ~4kB. Anything bigger consumes context, drowns attention, and slows the loop. Truncate large lists; emit a follow-up tool to fetch detail on demand.
Every state-changing tool needs a client-side nonce.
place_limit_order({ slug: "…", outcome: "yes", side: "buy", size: 100, price: 0.55, nonce: "uuid-v4" })Retry with the same nonce is safe (server dedupes). New intent → new nonce.
Building tier pitfalls
Cross-module- Parsing CLI human output. Always use
--json. Human output reformats with version bumps and breaks parsers silently. - Skill namespace collisions. Two skills named
place_limit_orderin different files → the model picks at random. Use one name, one impl. - Tool-result truncation hidden from the model. When you cut a list, return
truncated: trueso the model can ask for more, not silently work on a partial view. - agents-starter overfit. The starter is a starting point. Don’t treat its structure as canon for every agent, deviate as the trading style demands.
- Env vars in tool input. The model can hallucinate API keys into a tool call. Tools read env vars themselves; don’t accept them as arguments.
- No timeout on tool calls. A hung tool blocks the loop forever. Cap at 30s per tool; abort and return error.
Build flow
Cross-module- Step 1. Wire
limitless-clias a read-only tool. Verify the agent can browse markets without errors. - Step 2. Add the
orderbook eventsfreshness gate; skip any market whose newest trade is stale. - Step 3. Drop in agents-starter; replace its sample skill with one of yours.
- Step 4. Add
risk_check+cost_estimateas required pre-conditions forplace_limit_order. - Step 5. Run on testnet / mock for 24h. Confirm zero hallucinated tool calls, zero state corruption, zero secret leaks.