Skip to main content

AI agents for trading: How to use a trading bot

In this article, we'll separate truth from fiction to show you where and how AI agents will fit into the future of trading

Can AI trading agents make you rich?

Over the last decade, algorithmic trading bots have taken stock and crypto markets by storm. These bots represent the last generation of hardcoded trading strategies. Developers, analysts and traders of today are all curious about AI trading agents and what they have to offer.

In this piece, we’ll separate truth from fiction to show you where and how AI agents will fit into the future of trading. If you’re expecting some sort of get-rich-quick miracle of an AI agent, prepare to be disappointed. By the time you’ve finished reading, you’ll be able to answer the following questions.

  • What is an AI agent?
  • What is algorithmic trading?
  • What problems did traditional trading bots solve?
  • Why do AI agents reintroduce these points of failure?
  • How can AI agents actually help with automated trading?
  • What does a trading bot of the future actually look like?

What is an AI agent?

An AI agent is a model used to accomplish a task rather than generate output. There are numerous frameworks around the web for building them. Most AI agents are hooked to external tools using a framework called Model Context Protocol.

At the heart of MCP is a server. The LLM then uses JSON-RPC to communicate with the server and perform actions, much like how we often access software tools using a Representational State Transfer (REST) API. This allows us to pipe input and output directly to AI models.

Think of the following user prompt. This prompt requires the model to complete a task before responding.

What's 1+1?

  • The model realizes the user wants to perform math.
  • The model then takes the math problem from the input: 1+1.
  • The AI model then passes this math problem into an external calculator.
  • The calculator outputs our answer: 2.
  • The model takes that answer and formats it into the output given to the user.

AI agents provide a strong abstraction layer. Rather than writing code, humans give agents tasks via Natural Language Processing (NLP) and the AI agent handles the technical side.

What is a trading bot?

A trading bot refers to any software program designed for automated execution in online stock and crypto markets. Since archaic AI models appeared in the 1990s, developers have been trying to integrate AI models into these trading markets. AI models are great at learning. They’re faster than us humans and they lack our emotions that feed into hesitation and poor decision making.

As time has unfolded, there are two major architectures when it comes to trading bots.

  • Algorithmic trading bots: These are the most common trading bots of our time. They execute with unmatched speed and precision. They’ve been battle-tested over the decades to eliminate almost every challenge experienced in high-frequency trading.
  • AI trading agents: These have long been a fantasy of both developers and traders. They think like a human but with more accuracy and precision. These bots utilize reason and semantic understanding to produce their outputs.

Algorithmic trading: past and present

Algorithmic trading workflow
Algorithmic trading workflow

As mentioned earlier, algorithmic trading bots have solved the core problems of high-frequency trading. They’re fast, emotionless and purely logical — no thinking whatsoever.

  • Architecture: A script runs on one machine — either locally or in the cloud. It makes a single server call to an exchange. Then, it runs a condition check. If the precise conditions are met, it executes a trade. If not, the bot does nothing. This process repeats until the bot shuts down.
  • Implementation: Amateurs and hobbyists write these bots using Python. Production-grade bots tend to run using a compiled language like Rust, C or C++.

These bots are deadly efficient. The process from call to execution is between 0.001 seconds for a compiled bot and as long as 3 seconds for a Python bot. In production trading, even a three second lag can mark the difference between gain or loss.

These bots have been honed for years. Their architecture is sound. Their speed and efficiency are unmatched when operating on a micro-scale. However, they fail to see things at the macro-level. An algorithmic bot cannot read news or check Initial Public Offerings (IPOs) with reasonable efficiency or semantic understanding.

AI agents: The future?

Potential trading workflow for an AI agent
Potential trading workflow for an AI agent

AI agents have long been a trader’s dream. However, agentic architectures actually represent a significant downgrade at the execution level. For an AI agent to trade directly, the agent first needs to review market data and financial news. Then, it needs to look at orderbooks. Finally, it needs to decide whether or not to trade.

  • Architecture: Agents are hooked into multiple tools. Each tool requires a call to an external server. Each step takes several seconds and requires reasoning.
  • Implementation: AI agents are mostly handled using Python. AI toolsets are overwhelmingly written in Python. These agents excel at writing and running code on the fly, not bleeding edge performance.

AI agents operate very similarly to humans. They are faster and more precise than us but they don’t come close to algorithmic trading bots in terms of speed or precision. However, AI agents can analyze huge inputs very quickly. Agentic AI can drastically improve the orchestration layer when the markets are changing on a macro-level.

Hooking an AI agent to the internet

Now that we know what AI agents are capable of, let’s take a look at how to actually hook one up. We’ll go through how to connect your AI agent using a Python script and the OpenAI API Python SDK. We’ll also show you how to connect using Claude.

Python and OpenAI

from openai import OpenAI
from datetime import datetime

client = OpenAI(api_key="your-openai-api-key")

API_TOKEN = "your-bright-data-api-token"

def chat_interface(prompt: str):
    resp = client.responses.create(
    model="gpt-4o",
    tools=[
      {
        "type": "mcp",
        "server_label": "BrightData",
        "server_url": f"https://mcp.brightdata.com/sse?token={API_TOKEN}",
        "require_approval": "never",
      },
    ],
    input=prompt,)
    return resp.output_text

current_time = datetime.now()

prompt = f"""
        Using your tooling with the Bright Data MCP, please identify some highly volatile stock and crypto assets as of our current date and time: {current_time}. Then, choose a 24 hour strategy for each individual asset such as arbitrage, DCA or other methods.
        """

print(chat_interface(prompt))

Claude

Make sure you’ve got the Claude Desktop App installed. Once you’re up and running, go to Settings -> Developer -> Edit Config.

Open up your config file and paste the following snippet. Remember to add your own Bright Data API key to the configuration.

{
  "mcpServers": {
    "Bright Data": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://mcp.brightdata.com/mcp?token=YOUR_API_TOKEN_HERE"
      ]
    }
  }
}

Then, simply start Claude and ask it if it’s connected.

Starting Claude and checking the connection

Once that’s ready, you can ask Claude to perform a search for live data.

Using your tooling with the Bright Data MCP, please identify some highly volatile stock and crypto assets as of our current date and time.

Then, choose a 24 hour strategy for each individual asset such as arbitrage, DCA or other methods.

Claude should perform a live search to identify assets and recommend a trading strategy for each one. Here’s the full output that Claude gave us. As you can see, it identified ten separate assets and recommendeds a unique trading strategy for each one.

# Highly Volatile Assets & 24-Hour Trading Strategies
**Analysis Date: September 30, 2025**

---

## 🔴 VOLATILE STOCKS

### 1. **Helmerich and Payne Inc (HP)**
- **Market Cap:** $1.99B
- **Beta:** 1.08
- **Sector:** Energy Equipment & Services
- **24-Hour Strategy:** **Mean Reversion Trading**
  - **Rationale:** Energy sector volatility driven by commodity price swings
  - **Entry Points:** Buy when stock drops 2-3% below daily opening price
  - **Exit Points:** Take profit at 1.5-2% gains
  - **Stop Loss:** Set at 1.5% below entry
  - **Key Factors:** Monitor crude oil futures and drilling activity reports

---

### 2. **Seadrill Ltd (SDRL)**
- **Market Cap:** $1.99B
- **Beta:** 1.23 (Highest beta in list)
- **Sector:** Offshore Drilling
- **24-Hour Strategy:** **Momentum Scalping**
  - **Rationale:** High beta indicates strong trend-following potential
  - **Entry Points:** Enter on breakout above previous 4-hour high with volume confirmation
  - **Exit Points:** Trail stop at 2.5% below peak
  - **Position Sizing:** Reduce to 50% of normal due to high risk
  - **Key Factors:** Oil rig utilization rates, energy sector news

---

### 3. **Kulicke and Soffa Industries Inc (KLIC)**
- **Market Cap:** $1.98B
- **Beta:** 1.30 (Highest overall)
- **Sector:** Semiconductor Equipment
- **24-Hour Strategy:** **News-Driven Arbitrage**
  - **Rationale:** Semiconductor stocks react strongly to industry news
  - **Entry Points:** Quick entry within 5 minutes of semiconductor sector announcements
  - **Exit Points:** Take profits within 2-4 hours, target 2-3%
  - **Risk Management:** Limit exposure to 3% of portfolio
  - **Key Factors:** Semiconductor orders, Taiwan/Asia market sentiment

---

### 4. **O-I Glass Inc (OI)**
- **Market Cap:** $1.99B
- **Beta:** 1.15
- **Sector:** Containers & Packaging
- **24-Hour Strategy:** **Pairs Trading**
  - **Rationale:** Compare against packaging sector ETF
  - **Entry Points:** When divergence exceeds 1.5 standard deviations
  - **Exit Points:** When correlation normalizes
  - **Hedge:** Short packaging ETF simultaneously
  - **Key Factors:** Consumer goods demand, raw material costs

---

## 🟡 VOLATILE CRYPTOCURRENCIES

### 5. **ApeX Protocol (APEX)**
- **Volatility Index:** 117.39% (EXTREMELY HIGH)
- **24H Change:** -32.74%
- **7D Change:** +329.36%
- **24-Hour Strategy:** **High-Frequency Scalping with Tight Risk Controls**
  - **Rationale:** Extreme volatility creates multiple 5-10% intraday swings
  - **Trading Window:** Focus on 15-minute candles
  - **Entry Points:** Buy on 8-10% dips from intraday high
  - **Exit Points:** Take 5-7% profits quickly; don't be greedy
  - **Stop Loss:** Extremely tight at 4-5%
  - **Position Size:** Maximum 1% of portfolio due to extreme risk
  - **Key Factors:** Social media sentiment, DeFi protocol announcements

---

### 6. **Concordium (CCD)**
- **Volatility Index:** 59.83%
- **24H Change:** -8.47%
- **7D Change:** +118.09%
- **24-Hour Strategy:** **Swing Trading with Technical Indicators**
  - **Rationale:** High weekly gains suggest momentum can continue
  - **Entry Points:** RSI oversold (below 30) + MACD bullish crossover
  - **Exit Points:** RSI overbought (above 70)
  - **Hold Time:** 4-8 hours
  - **Risk/Reward:** Target 2:1 ratio minimum
  - **Key Factors:** Privacy coin sector trends, regulatory news

---

### 7. **Worldcoin (WLD)**
- **Market Cap:** $2.60B
- **Volatility Index:** 22.62%
- **24H Change:** -5.22%
- **24-Hour Strategy:** **Dollar-Cost Averaging (DCA) with Momentum Exits**
  - **Rationale:** Larger cap provides slightly more stability than micro-caps
  - **Entry Strategy:** Split capital into 4 equal parts
    - Buy 25% every 6 hours during downtrends
  - **Exit Strategy:** Sell 50% at +8% gain, let 50% run with trailing stop
  - **Stop Loss:** 6% on total position
  - **Key Factors:** AI/identity verification sector news, Sam Altman announcements

---

### 8. **Synthetix (SNX)**
- **Volatility Index:** 18.50%
- **24H Change:** +3.56%
- **7D Change:** +72.09% (Strong momentum)
- **24-Hour Strategy:** **Momentum Continuation Trading**
  - **Rationale:** Strong 7-day performance suggests trend continuation
  - **Entry Points:** Pullbacks to 50-period EMA on 1-hour chart
  - **Exit Points:** When momentum indicator (ROC) turns negative
  - **Position Management:** Scale in 33% at a time
  - **Profit Targets:** 8-12% over 24 hours
  - **Key Factors:** DeFi TVL growth, Ethereum gas fees, derivatives volume

---

### 9. **Dogecoin (DOGE)**
- **Market Cap:** $34.68B
- **Volatility Index:** 9.59%
- **Volume:** $4.67B
- **24-Hour Strategy:** **High-Volume Breakout Trading**
  - **Rationale:** Massive liquidity allows for large position sizes
  - **Entry Points:** Volume spike (2x average) + price breakout above 4-hour resistance
  - **Exit Points:** When volume drops below average + reversal candle
  - **Position Size:** Can use up to 5% of portfolio due to liquidity
  - **Profit Target:** 3-5% within 8-12 hours
  - **Key Factors:** Elon Musk tweets, meme coin sector sentiment

---

### 10. **Ethena (ENA)**
- **Market Cap:** $3.79B
- **Volatility Index:** 10.39%
- **Volume:** $837.48M
- **24-Hour Strategy:** **Arbitrage Between Spot and Derivatives**
  - **Rationale:** DeFi protocols often show price discrepancies
  - **Strategy:** Monitor funding rates on perpetual contracts
  - **Entry:** When spot/futures spread exceeds 0.5%
  - **Exit:** When spread normalizes
  - **Alternative:** Delta-neutral stablecoin yield farming during low volatility periods
  - **Key Factors:** Stablecoin yields, DeFi protocol TVL

---

## 📊 GENERAL 24-HOUR RISK MANAGEMENT RULES

### Portfolio Allocation
- **Stocks:** Maximum 15% of total portfolio in volatile stocks
- **Crypto:** Maximum 10% of total portfolio in volatile crypto
- **Single Asset:** Never exceed 3% in any one volatile asset

### Time-Based Rules
- **Active Monitoring:** Check positions every 2-4 hours minimum
- **Sleep Protection:** Set guaranteed stop losses before end of day
- **Weekend Gaps:** Close crypto positions Sunday evening (stocks Friday)

### Emotional Discipline
- **Never chase:** If you miss an entry, wait for next setup
- **Take profits:** Don't let winners turn into losers
- **Cut losses fast:** Accept small losses to prevent large ones
- **Journal everything:** Track what works and what doesn't

---

## ⚠️ CRITICAL WARNINGS

1. **Extreme Volatility Risk:** These assets can move 10-50% in hours
2. **Liquidity Risk:** During flash crashes, stops may not execute at expected prices
3. **Gap Risk:** Crypto trades 24/7; weekend gaps can be severe
4. **Regulatory Risk:** Sudden announcements can cause 20%+ moves
5. **Leverage Warning:** NEVER use leverage with these volatile assets

---

## 🎯 RECOMMENDED STRATEGY MIX

For a balanced 24-hour volatile portfolio:
- **40%** - Mean reversion strategies (HP, OI)
- **30%** - Momentum/breakout strategies (SDRL, DOGE, SNX)
- **20%** - Scalping strategies (APEX, KLIC)
- **10%** - DCA/arbitrage strategies (WLD, ENA)

**Remember:** The goal is consistent small gains, not home runs. These strategies prioritize capital preservation while capitalizing on volatility.

Bright Data’s MCP server gives Claude access to their scrape_as_markdown feature from the Unlocker API and also their SERP API for real-time search engine results. These tools are free to use for anyone on the Free tier. Anyone can upgrade their MCP plan for access to a host of Bright Data tooling like automated scrapers and full browser automation.

With the Bright Data MCP server, AI agents can access external information for informed decision-making.

The cold hard truth: MCP tooling isn’t there yet

When it comes to executing live trades, MCP tooling simply isn’t there yet. Just like SDKs and REST APIs, MCP trading tools are going to take time to develop — they’re an API layer for LLMs.

In the meantime, if you’re deadset on integrating AI into your trading platform, write algorithmic trading bots. In an ideal architecture, algo trading allows you the sheer precision and execution speed we see in production trading bots today — without the challenges like added latency due to server calls and dynamic code execution.

There are many frameworks you can use to give your AI agent start and stop permissions for any executable program, this includes your algorithmic trading bots. AI agents simply aren’t built to match the speed and precision of compiled code at your execution layer.

Your AI agent can use the tools below to orchestrate individual trading bots.

  • LangChain: One of the biggest names in AI software right now. With LangChain, you can wrap Python functions tools to be called by an AI agent.
  • LlamaIndex: Made specifically for document workflows and data stores, it also allows you to define tools for your AI agents to call.
  • Model Context Protocol: The actual MCP website offers a step-by-step tutorial for building your own MCP server. Like other software tutorials, they teach you to build a simple weather server.

When designing an AI trading agent, it needs permission to start and stop production-grade bots. You should never give an LLM full acess to the command line. Shell access needs to be abstracted away from the agent itself.

Never give AI agents full access to your operating system.

Conclusion: Build now, execute when the time is right

AI agents absolutely have a future in trading but their future lies in the orchestration layer, not in execution. Yes, they are faster and more precise than humans. However, a single five second reasoning step is exponentially slower than the millisecond execution loops of production-grade trading bots. In API-powered trading, especially volatile markets like futures and options, this is the difference between life changing profit and crippling loss.

AI agents are built to analyze massive amounts of data quicker than people. They simply don’t hold the architecture for the execution level. However, algorithmic bots can’t see things on a macro scale. They can’t zoom out to identify bull and bear markets. This is where AI agents can truly shine. An AI agent can identify macro trends and adjust the execution layer as needed.