Skip to main content

The AI agents page

AI agents in the app sidebar (app.optalgo.com/ai-agents) is where you connect an AI app to your OptAlgo account and control what it may do. Every plan can connect: Free gets backtests and paper trading, Plus and Pro add live trading (Plans and limits).

You useConnect withLive trading
Claude.ai, the Claude desktop or mobile app, ChatGPTThe connector URL https://mcp.optalgo.com/mcp, no keyNever, on any plan
Claude Code, Codex, or your own scriptsAn API key, saved on your computer by a login you approvePlus and Pro, only with the Trade permission

Claude Code can use either one. The connector is simpler when backtests and paper bots are all you need.

Connect Claude Code or Codex​

Under Connect your agent:

  1. Copy the prompt and paste it into Claude Code or Codex, started in a terminal.
  2. Approve the link. The agent shows a link and a short code. Open the link (or enter the code on the approval page), check that the code matches, choose the key's permissions, autonomy and limits, and click Approve.
  3. Done. The key is saved in ~/.config/optalgo/credentials.env on your machine. It never appears in the chat.

The login code is valid for 10 minutes. On a server where you cannot open the agent's link, create a claim code instead and give it to the agent. It works once and expires after 10 minutes. Details: API keys.

Quick start shows the same for Claude Code, Codex, curl and Python. Your own scripts read the key from the same credentials file.

Connect Claude.ai or ChatGPT​

Under Use in Claude.ai / ChatGPT, copy the connector URL and add it to your chat app as a custom connector. The chat app sends you back to OptAlgo to approve it once. Step-by-step for each app: Chat app connector.

Your connected chats are listed with the date each one was last used. Disconnect removes a chat's access at once; you can connect it again later. A connection made for Research only (backtests, no bots) is marked as such.

Your API keys​

The Your API keys section lists every key with what it may do and when it was last used. For each key you can:

  • turn its permissions on or off: Read (always on), Backtests, Bots and Live trading (Plus and Pro, off by default);
  • set its autonomy: ask before live trades, or trade alone inside limits you set (maximum allocation per bot, maximum leverage, allowed exchanges, a daily loss limit). Full autonomy needs Plus or Pro;
  • resume a key that the daily loss limit paused;
  • revoke it. A revoked key stops working immediately.

You can have up to 5 active keys. To create a key by hand for your own code, see Create a key by hand.

What your agent can do​

Each capability needs a permission on the key:

CapabilityWhat it covers
Backtest strategiesWrite, check and run strategies; read the honesty grade first
Manage My BotsCreate and tune bots, pause tickers, trade on paper
Live tradingLive signals and closes. Needs the Trade permission, off by default
Track resultsTrades, PnL, equity curves and CSV export
Exchange viewOpen positions and balances on your exchange
Connect Binance from the terminalBinance's own consent screen; no API key typed anywhere
Report issuesFile bug reports and requests, and read the replies

Once a key is connected, the page links to what the agent did: your paper bots and trades in My Bots, its runs on the Backtest page and strategies it runs on OptAlgo (Run on OptAlgo).

Usage​

The usage panel shows the last days of agent activity: calls per day, failed calls, the typical response time, and a list of recent actions, such as "Ran a backtest" or "Sent a signal to a bot". Every call is also logged with the key or chat that made it.

Safety​

  • Permissions you choose. Read is always on. Real money needs the Trade permission, which is off by default.
  • Autonomy with limits. The agent asks first, or acts alone within the limits you set. OptAlgo's servers enforce the limits.
  • You see what it does. Money-moving actions reach you on Telegram, and every call is logged.
  • Revoke in one click. A revoked key or disconnected chat stops working at once.
  • Never paste a key into a chat. If you did, revoke it here and connect again with the login.

After 3 strikes for forbidden strategy code, the account's API access is suspended for every key and chat until support restores it (strikes).