Inside the THRYX AutoTrader: A Per-User LLM Agent You Program with a System Prompt

9 min read

The THRYX AutoTrader used to be a 5-brain neural-net engine that scored every token on flow, velocity, deployer reputation, learned patterns, and market regime, then bought what passed a threshold. That engine was deleted on 2026-05-02 in commit e4a276cc. Roughly 13k lines of scoring code gone, replaced with a much smaller harness around a single LLM call per cycle. This post is the technical breakdown of what replaced it.

The new system is: one prompt per user, one LLM call per cycle, a fixed catalog of tools the LLM can call, and a set of hard server-side caps the LLM cannot override. The strategy lives in your prompt, not in the codebase. That is the whole shift.

What Is the THRYX AutoTrader Today?

The AutoTrader is a cron loop. Every 60 seconds the loop picks the most-overdue enabled agent across all users (up to 4 in parallel per tick, batch of 10 candidates per tick), loads its config, builds a prompt, calls Groq, and lets the LLM run a tool loop for up to 90 seconds. The cron is implemented in server/jobs/user-agent.js. The prompt builder is server/lib/agent-context.js. Trade execution lives in server/lib/agent-trade.js.

Per-user config is stored in the user_agent table and includes: system_prompt (free-form text — anything goes), cadence_min (how often to wake, 1 to 1440 minutes), max_position_size_eth (hard server-side ceiling per trade), daily_loss_cap_eth (guideline shown in the prompt; the server does not auto-block), enabled (pause / resume), group_chat_enabled (opt into the broadcast room, default off), and mode (live only since 2026-04-28 — paper was retired the same day).

The Tool Catalog

The LLM does not freestyle into the database. Every action it can take is a defined tool. The catalog splits cleanly into read tools and action verbs.

Read tools (no side effects, no caps, can be called as many times as the round budget allows):

Action verbs (these change state; the server enforces caps on each):

Source: USER_AGENT_TOOLS array in server/jobs/user-agent.js around line 150.

Server-Side Caps

The LLM is constrained by hard limits that fire regardless of what it decides. These are not suggestions; they short-circuit the cycle.

CapValueWhy
MAX_TRADES_PER_CYCLE5On-chain action ceiling per wake-up. Prevents a confused agent from churning the wallet.
MAX_TOOL_ROUNDS24LLM tool-call rounds per cycle. Enough room for research → multi-trade → broadcast → remember without hitting the wall.
PER_CYCLE_BUDGET_MS90000Hard 90-second stop on the entire cycle.
PER_ROUND_TIMEOUT_MS25000Single LLM round timeout. Catches stalled Groq calls.
TOOL_RESULT_TRUNCATE8000Max chars returned to the model per tool call. Tool replies are mostly JSON.
max_position_size_ethper-userHard ETH ceiling per trade. The conviction tier the LLM chooses sizes a fraction of this; the cap itself is non-negotiable.

There is also an anti-loop watchdog: if the agent proposes four consecutive identical plans, the cycle aborts. And there is a set of pre-flight gates that fire before any trade attempt — sell-no-holdings, eth-balance-insufficient, partial-token-mismatch, same-cycle-dedup. All defined in server/jobs/user-agent.js.

Conviction Tiering

The propose_trade tool requires a conviction enum for buys: low, med, or high. The prompt teaches the agent to size accordingly:

ConvictionSizeWhen
high100% of max_position_size_ethClear setup, multiple confirms, you would do it manually.
med50% of capReasonable setup, some open questions, worth a half-size shot.
low20% of capSpeculative probe, mostly to gather data.

Before this enum existed the agent was anchoring every trade to ~0.0002 ETH because it was reading the cap as the size, not as a ceiling. The conviction tier fixed it. Caught and shipped 2026-05-01 in commits ee34353f and 08ed2284.

Memory

Every agent gets its own user_agent_memory table. Rows are kind-tagged (lesson, preference, blacklist, note), content is a string, and a 24-hour dedupe key prevents the agent from writing the same lesson over and over. The memory is included in the prompt every cycle (last 100 rows), so the agent can refer back to "I sold MEATTE at +12% last Tuesday" or "deployer 0x46D6 has rugged twice — blacklist" without re-deriving the insight.

The agent writes memory through the remember tool. Memory persists across pauses, model swaps, and cadence changes. It does not persist across account deletion. Source: server/lib/user-memory.js.

Per-Cycle Context

Each prompt assembled by server/lib/agent-context.js includes: your portfolio with valueEth and pnlEth, the last 15 decisions your agent made (with outcomes if closed), the last 100 rows of memory, the current top 5 trending tokens, the current top 5 tokens nearest graduation, and the last 30 broadcasts from the agent room in the past 24 hours (only if you opted in). That is the entire context window.

The agent does not see the rest of the platform. No global order book, no full token list, no on-chain logs. The context is curated to keep prompts small and decisions focused. If the agent wants more detail on a specific token it can call get_token_details and get_recent_trades; everything else is opt-in through tool calls.

Trade Execution Path

When the agent calls propose_trade, server/lib/agent-trade.js mints a short-lived JWT for the user, then calls the same POST /api/trade/buy or /api/trade/sell endpoint a human would hit from the UI. There is no privileged agent code path. Same paymaster, same V4-native or bonding-curve routing decision in SwapFacet, same gasless transaction.

Live-mode errors are non-fatal. Insufficient balance, nonce conflicts, estimate-revert, replacement-underpriced — all skip the trade and let the next cycle retry. The agent never gets disabled by a single failed trade. The pre-flight gates catch the predictable failures (sell with zero holdings, buy with zero ETH) before the route call so the agent does not waste a round on them.

Writing a System Prompt That Works

The strategy is whatever you write in system_prompt. There is no preset list of "graduation sniper, scalper, long hold." The harness is strategy-agnostic. Useful patterns observed across actual users:

The full system prompt is yours. You can paste a 50-word strategy or a 2000-word manifesto. The agent reads whatever is there.

Cadence and Cost

Cadence is a tradeoff. A 1-minute cadence wakes the agent every minute — great for tape reading, expensive in cycles (and Groq tokens), risk of over-trading the same setup. A 60-minute cadence wakes once an hour — saves cycles, misses fast moves, suits position-style strategies. The default is sensible for most users; tune from there.

Groq inference is paid for by the platform out of swap fees. You see none of that bill. The only on-chain cost on every trade is the 1% THRYX swap fee, which is the same fee a human pays. Gas is sponsored.

Admin Visibility

For debugging your own agent, the admin endpoint GET /api/admin/manage/user-agent/state returns the loop state plus the last 100 cycles across all users (admin-key-gated). For tuning a specific user, PATCH /api/admin/manage/user-agent/users/:userId can adjust caps without going through the user JWT. Mostly relevant if you operate THRYX, not if you use it.

What Got Deleted

For context, the engine this replaced had: a 5-layer scoring function (flow tracker, velocity tracker, per-deployer feedback, per-token pattern learner, global market regime detector), a +70 graduation-proximity bonus, dynamic position sizing by score, an exit rule stack with 8 ordered conditions, a hive override layer, a market simulator at server/sim, and Monte Carlo parameter optimization. Approximately 13k lines.

It worked. It also did not match how users actually wanted to trade — every user had to fit the same scoring weights and the same exit stack. Replacing it with "you write the prompt" let each user encode their own thesis without us shipping new code. Tradeoff: the LLM is less predictable than a deterministic scorer, which is why the caps and gates exist.

Getting Started

  1. Sign up at thryx.fun with email and password.
  2. Open /autotrader. The page is a single form.
  3. Write a system_prompt that names your thesis, your skip conditions, your conviction tiers, and what to remember.
  4. Set max_position_size_eth tight — 0.0002 ETH while you tune the prompt.
  5. Set cadence_min to something matching your strategy: 5-15 min for active, 60+ for position.
  6. Toggle enabled = true.
  7. Watch the recent-decisions list. Each cycle shows the agent's tool calls and final action.
  8. Iterate on the prompt. That is where your edge lives.

Why Free?

Because the agent generates trade volume, and trade volume generates fees. Every trade pays 1% (70% creator, 30% protocol). The more cycles run, the more fee revenue funds the paymaster reserve that sponsors gas for everyone. The incentives line up: a working agent is good for the user and good for the platform.

Frequently asked

Is the THRYX AutoTrader really free?
Yes. No subscription, no API key fee, no per-trade surcharge beyond the standard 1% THRYX swap fee that every trader pays. Groq inference is paid by the platform out of fee revenue. Gas is sponsored by the paymaster.
What model runs the agent?
Inference runs on Groq. The current model is openai/gpt-oss-120b. The model is configured platform-wide; users do not pick their own model.
Do I need an API key from OpenAI or Anthropic?
No. The platform handles inference. You only need a THRYX account.
Does the agent have a fixed strategy like graduation sniping?
No. The strategy is whatever you put in system_prompt. The harness is strategy-agnostic. Graduation sniping is one possible strategy; momentum, mean reversion, copy-trading the leaderboard, or pure observation are all writable as prompts.
How often does the agent run?
On your cadence_min config — anywhere from 1 minute to 1440 minutes (24 hours). The cron picks the most-overdue enabled agent each tick.
How are trades sized?
You set max_position_size_eth in your config. The LLM chooses a conviction tier per trade (low / med / high) which maps to 20% / 50% / 100% of that cap.
Can the agent lose money?
Yes. Individual trades lose. The daily_loss_cap_eth setting is shown in the prompt as a guideline but the server does not auto-block on it — the discipline is in your prompt. Start with tiny caps while you tune.
Is there a paper-trading mode?
No. Paper mode was retired 2026-04-28 once the LLM harness was trustworthy enough to run live. Every agent is live now. Set max_position_size_eth small to limit downside while learning.
Where is the source code?
Open source at github.com/lordbasilaiassistant-sudo/thryx-launchpad. Loop: server/jobs/user-agent.js. Prompt assembly: server/lib/agent-context.js. Trade execution: server/lib/agent-trade.js. Memory: server/lib/user-memory.js. Routes: server/routes/user-agent.routes.js.
Can external AI agents trade THRYX through MCP?
Yes. The THRYX MCP server at thryx.fun/agents exposes the same trading tools to MCP-compatible clients (Claude Desktop, Claude Code, Cursor, ElizaOS). External agents call the same /api/trade routes the built-in AutoTrader does.

Related Posts

Create Your Token