Agentic tradingMCPRisk managementDevelopers

How running a trading agent from an AI editor differs from manual execution

How an AI editor running a trading agent differs from manual execution through one API, and why guardrails, budget caps, and kill switches matter.

By the Felix team11 min read
Key takeaways
  • 01Running a trading agent from an AI code editor replaces manual execution with an autonomous loop that plans and trades within hardcoded guardrails.
  • 02Non-custodial controls mean an agent can spend an approved budget but can never withdraw funds to its own addresses.
  • 03Risk management must shift from human discretion to programmatic limits, including budget caps, position limits, and a kill switch.
  • 04A single API normalizes order sizing in plain dollars across stocks, crypto, perps, options, and prediction markets, but the agent still needs market-specific logic.
  • 05Paper trading and explicit owner authorization of scoped keys are required before an AI agent can deploy live capital.

Running a trading agent from an AI code editor through a single API replaces manual clicking and scripting with an autonomous loop that reads, plans, and executes within owner-defined guardrails. The agent still sends orders through the same normalized interface, but the source of intent shifts from human reaction to model-generated decisions that are scoped by budget caps, position limits, and non-custodial controls. This changes where responsibility sits, how fast feedback loops run, and what safety mechanisms must be in place before live capital is deployed.

What does manual trading through a single API actually require?

Manual trading through a single API means a human writes a script, opens a dashboard, or calls HTTP endpoints directly to place orders. The trader must translate every decision into venue-specific parameters, handling contract sizes, margin math, symbol conventions, and settlement rules across stocks, crypto, perpetual futures, options, and prediction markets. When the strategy spans more than one asset class, the trader becomes the normalization layer, converting intended dollar exposure into the correct number of shares, contracts, or tokens for each venue. This process is deliberate and puts the human in the center of every feedback loop.

The trader sees the position, feels the drawdown, and decides whether to cut losses or add exposure. Manual execution is slow because the bottleneck is human attention, but that slowness also acts as a natural brake on runaway errors. A manual trader can misread a screen, mistype a size, or forget to adjust for leverage, but the error typically stops at the next human review step. There is no hidden loop executing trades while the trader sleeps. The cost of this safety is scalability. A human cannot watch twenty markets simultaneously, cannot react to every tick, and cannot rewrite strategy code in real time. Manual trading works best for focused strategies, small portfolios, or discretionary decisions where context matters more than speed. The trader must also manage authentication and credentials for each venue. A single API abstracts this, but the manual trader still needs to know whether a key is read-only or trade-enabled, whether it supports withdrawal, and how to rotate it if compromised. The human is the security layer as well as the execution layer.

What happens when an AI code editor controls the agent?

When an AI code editor connects through MCP tools, the loop changes from human reaction to model-driven planning. The editor maintains context across your codebase, reads market data, reasons about strategy in natural language, and can write the code that sends orders through the same normalized API. The agent does not click buttons. It generates intent, converts that intent into a structured request, and dispatches it within milliseconds. This compresses the time between observation and execution by orders of magnitude, which means small errors can compound before a human notices. A model might hallucinate a symbol, invert a side, or misinterpret a prompt about hedging. Without hard limits, the agent would continue executing in the only direction it knows.

The AI editor is not a trading expert. It is a general reasoning engine that relies on the API to hide venue complexity. That abstraction is useful, but it also means the agent may lack intuition about liquidity gaps, settlement timing, or how options Greeks shift near expiration. The owner must supply the market logic and enforce boundaries because the agent will not pause to ask for permission in the middle of a fast-moving session. Another subtle shift is that the strategy now lives in a conversation as much as it lives in code. The human edits prompts, reviews generated logic, and approves changes. The agent then executes the current version of that logic. This creates a versioning problem. If the human edits the prompt while the agent is running, the behavior may change mid-session without a formal deployment step. Manual trading does not have this problem because the human is the execution layer.

How does risk control differ between manual and agentic execution?

In manual trading, risk control is often a mix of discipline and adrenaline. The human trader sees a loss, feels discomfort, and stops. An agent feels nothing. It will keep executing a flawed strategy until it hits a programmatic boundary or runs out of allocated budget. This means risk management must be encoded before the first order is sent. The controls include scoped keys that can trade but cannot withdraw, budget caps that limit total loss, position limits that prevent concentration, and exit plans that trigger automatically. A panic or kill switch is essential. It must flatten positions and revoke the agent's access in a single action.

The architecture is non-custodial, so the agent can never move funds to its own wallet, but it can still lose money within the approved budget. That distinction is critical. Non-custodial does not mean risk-free. It means the owner retains custody while accepting that the agent may spend the budget it has been authorized to spend. Manual traders often rely on mental stop losses. Those are not available to an agent. Every stop must be a hard limit enforced by the system. If the owner forgets to set a cap, the agent has no natural point at which it will choose to stop. It will continue to execute the last instruction it was given, even if that instruction is destroying value. This is why anyone moving from manual to agentic execution should review the practical steps in our guide on running an AI trading agent safely.

What does the integration look like in practice?

Developers connect agents through MCP tools inside their AI editor, or they call the REST API directly from custom code. The MCP path is the one that changes the experience most dramatically. The editor discovers available tools, the agent decides which tool to call based on its reasoning, and the API normalizes the request into plain dollar sizing regardless of whether the underlying market is a stock, a perp, an option, or a prediction market. The exact request schema is in the docs; the shape looks like this:

{
  "market_type": "perps",
  "symbol": "ETH",
  "side": "buy",
  "dollar_notional": "500.00"
}

This is only illustrative. The actual fields and endpoints are documented at /docs. The key point is that the developer no longer needs to calculate contract multipliers or tick sizes by hand. The API handles venue-specific math. However, the developer still owns error handling, retry logic, and idempotency. An AI editor can generate the request, but it is the owner's responsibility to ensure the agent does not double-send orders or retry aggressively after a timeout. The editor may generate code that looks correct but lacks proper error handling for network partitions or partial fills. In manual trading, the human sees the error message and decides what to do. In agentic trading, the agent must have code that decides what to do, and that code must be tested in paper trading before it touches live markets. Before the agent is authorized for live trading, the same integration path supports paper trading. This lets the owner observe how the agent interprets prompts, handles errors, and sizes positions without risking capital. The transition from paper to live is gated by explicit owner authorization of a key. This step is manual by design. No agent can upgrade itself from simulation to real money without human approval.

Why does non-custodial architecture matter more with an agent?

Giving an automated agent access to trading capital raises a custody question that manual traders rarely face in the same way. When you trade manually through a traditional broker or exchange, you often deposit funds into an account controlled by that platform. With an agent, you do not want to hand custody to a piece of software that reasons in natural language and may behave unpredictably. The non-custodial model means funds remain in a wallet the owner controls. The agent receives a scoped key that authorizes spending within limits, but withdrawal addresses are owner-approved only and the agent cannot add new ones.

If the agent is compromised or the model generates a harmful plan, the attacker can trade within the pre-set budget but cannot drain the wallet. This design is especially important for algorithmic traders who want to automate execution without surrendering control. The owner can revoke the key at any time, and the kill switch can flatten positions instantly. Manual traders rarely need this architecture because they initiate every action themselves. The presence of an autonomous agent makes non-custodial design a necessity, not a feature. The mechanics of how this works with MCP agents are covered in our article on how algorithmic traders keep self-custody while using MCP agents.

What are the common mistakes when switching from manual to agentic trading?

Traders often assume that a single API for every market implies a single strategy can run everywhere without modification. That is not true. Stocks, crypto, perpetual futures, options, and prediction markets each have distinct liquidity profiles, volatility regimes, and settlement mechanics. An agent that works in one market may fail in another because the reasoning layer was not given market-specific logic. Another common mistake is letting the LLM handle position sizing without hard numeric caps. Natural language is not a substitute for risk math. A prompt that says "invest a reasonable amount" is not a guardrail. It is a liability. Another error is conflating the API's normalization of order sizing with normalization of risk. The API may accept a plain dollar size for a stock and a perp, but the volatility and leverage of those two instruments are wildly different. A five hundred dollar position in a low beta stock is not the same risk as a five hundred dollar position in a perpetual future with twenty times leverage. The agent does not automatically adjust for this unless the strategy explicitly tells it to.

Some traders also skip paper trading because the AI editor's output looks correct. Code that compiles is not the same as code that trades correctly. The agent may pass all static checks but fail when it encounters a real order book or a margin call. Finally, many owners neglect the kill switch because they plan to watch the agent closely. Continuous monitoring is good, but you cannot guarantee you will be present when a tail event occurs. The agent does not sleep, and neither does the market. These patterns are part of the broader set of common mistakes when using one API for every market and align with what most people get wrong about LLM trading with real money.

When is manual execution still the better choice?

Agentic execution is not always superior. There are situations where human judgment remains the better tool. Low liquidity markets are one example. A large order moved by an agent without regard for market impact can cost more than the expected edge. The human can read the depth of book and decide whether to split an order or wait. An agent may simply fire the request into a thin book and accept a terrible fill. Complex multi-leg options structures that require dynamic fill quality assessment are another poor fit for full automation. A human can read the Greeks and decide whether the quoted spread is fair. An agent may lack that nuance unless the strategy is explicitly coded to evaluate every leg.

Discretionary strategies that rely on non-codifiable intuition, such as reading the tone of a live earnings call or interpreting ambiguous macro commentary, are also poor fits for autonomous loops. If you cannot define the strategy in code and wrap it in hard numeric limits, you should probably keep the human in the loop. Manual trading is also the right mode for experimental one-off trades or when testing a new feature on the API before you trust an agent to use it repeatedly. The goal is not to remove the human. The goal is to let the human focus on strategy while the agent handles execution, but only when the strategy is ready for automation.

Moving from manual trading to an AI code editor running an agent is not simply a speed upgrade. It is a shift in who holds responsibility for intent, execution, and risk management. The API normalizes mechanics across asset classes, but the owner must normalize controls. Paper trading, scoped keys, budget caps, and a kill switch are not optional extras. They are the baseline for letting an autonomous loop anywhere near real money. Trading can lose money, including everything. Build the guardrails first, test in paper trading second, authorize live keys third, and monitor continuously. The agent will not thank you for the boundaries, but your capital will survive because of them.

Frequently asked questions

Can the AI editor withdraw my funds?

No. The architecture is non-custodial by construction. The agent can place orders within your budget, but withdrawal addresses are owner-approved only and the agent cannot add new ones.

What happens if the agent makes a bad trade?

The agent operates within scoped keys and budget caps you set before it starts. A panic switch can flatten positions and revoke access instantly. Trading can lose money, including everything within the approved budget.

Do I need to know how to code to use this?

The AI editor helps write and iterate on strategy code, but you should still understand the guardrails, risk limits, and authorization steps. The editor does not remove the need to review what is being deployed. You remain responsible for the capital.

How is this different from a webhook or traditional bot?

The AI editor maintains context across your codebase, can iterate on strategy logic in natural language, and sends orders through the same normalized API. Traditional webhooks and bots typically execute fixed rules without the same planning loop. The editor can adapt the strategy based on new information, which adds flexibility and risk.

Can I test before using real money?

Yes. Paper trading exists for testing strategies and verifying that the agent interprets instructions correctly. Live trading requires explicit owner authorization of a key. The transition from simulation to real money is manual by design.

Which markets can the agent trade?

The API supports stocks, crypto, perpetual futures, options, and prediction markets. Orders are sized in plain US dollars, but you must still supply market-specific logic and risk rules for each asset class. A strategy that works in one market may fail in another without adjustment.

Give your agent a key.

One key to trade stocks, crypto, perps, options, and prediction markets. Live after owner authorization.

Keep reading

Not a brokerage, exchange, or investment adviser. Not investment advice. Trading involves risk, including total loss.