How To Connect An AI Agent To AlphaInsider (In Minutes)

Learn how to connect Alpaca to AlphaInsider and generate your API keys for paper or live automated trading in just a few minutes.

Share
How To Connect An AI Agent To AlphaInsider (In Minutes)
Connect an AI agent to AlphaInsider.

Want to connect an AI agent to AlphaInsider so it can read your strategies, gather data, and even place trades for you? If you already have an account that gives you access to an AI agent, you have everything you need. There's no extra subscription and no code to write yourself.

In this guide, you'll learn exactly how to connect an AI agent to AlphaInsider using a coding assistant like OpenAI's Codex. We'll walk through installing the AlphaInsider skill, adding your API key, optionally pinning the agent to a specific strategy or bot, and running your first real query — all in just a few minutes.

By the end, your agent will be able to list your strategies, show your positions, pull live data, and answer questions for you instead of you hunting through the site manually.

Table of Contents

Key Takeaways

  • No code or extra subscription required — if you have access to an AI agent, you can connect it to AlphaInsider.
  • The agent installs an AlphaInsider skill that lets it read strategies, positions, orders, and more.
  • You add a private API key yourself (the one step the agent can't do for you) through AlphaInsider's developer settings.
  • Start with read-only permissions until you're comfortable letting the agent place trades.
  • You can optionally pin the agent to a specific strategy or trading bot using a strategy ID or bot ID.
  • Once connected, the agent can pull live data — including the Congress tracker — and answer questions on demand.

Prerequisites: What You'll Need

Before you connect an AI agent to AlphaInsider, make sure you have the following ready:

  • An AlphaInsider account — you'll need to be logged in to access the resources and developer settings.
  • Access to an AI agent — any AI assistant that lets you install skills and edit local files will work. This walkthrough uses OpenAI's Codex app (downloaded from developers.openai.com) with a ChatGPT account.
  • A few minutes of time — the entire setup takes only a few minutes.
  • Beginner-friendly skill level — no coding experience is required. You'll mostly be copying and pasting prompts the agent gives you.

Note: You can use any AI of your choice that allows skill installation and file editing. Codex is simply the example used here.

Step-by-Step Guide

Follow these steps in order. The agent handles most of the heavy lifting — the only part it can't do for you is creating and pasting your API key.

Step 1: Open the Connect AI Agent Page

Log in to the AlphaInsider website and navigate to the Resources section, then click Connect AI Agent. This page contains the official step-by-step instructions and the prompts you'll feed to your agent.

A smart shortcut: take a screenshot of this page so you can paste it directly into your AI agent. This lets the agent read the steps and guide you through the process with as few mistakes as possible.

Step 2: Download Your AI Agent App

Choose the AI agent you want to use and download its app. In this example, we use OpenAI's Codex, downloaded from developers.openai.com using a ChatGPT account.

Once Codex is installed and set up, paste in the screenshot of the Connect AI Agent page. The agent will read it and prepare to follow the steps with you.

Step 3: Install the AlphaInsider Skill

Copy the first prompt from the Connect AI Agent page and send it to your agent. This single prompt does several things:

  • Creates the folder you want the skill connected to.
  • Installs the AlphaInsider skill from the parent folder you provided.
  • Adds a private.env file where you'll later paste your API key.

When the agent asks for permission to run the skill installer, click Yes, allow. The agent runs the installer and installs the AlphaInsider skill onto your computer. Once it's done, copy the next prompt back in so the agent can create the private.env file, ready for your key.

Step 4: Create Your API Key

This is the one step your agent cannot do for you. Head to AlphaInsider's Developer Settings page (there's a link at Step 2 of the on-page instructions).

Create a new API key and give it a recognizable name — for example, codex one. Next, choose the permissions you want to grant:

  • For read-only access (recommended to start): select only the read permissions so the agent can view, but not change, anything.
  • For trading agents: you can include permissions like get strategies, get positions, get orders, get order size, new order, and new order allocations.

Best practice: Start with read-only permissions until you're comfortable with the agent placing trades on your behalf. You can select everything, but that doesn't mean you should.

Enter your AlphaInsider password and create the key. Save it somewhere safe — you'll need to paste it into the env file next.

Step 5: Add the API Key to the Env File

Open a new terminal (your agent can give you the exact command to do this) and open the private.env file. You'll see a line where the API key belongs.

  • Delete any placeholder text after the equals sign.
  • Paste in your API key with no spaces.
  • Save and close the file. In a terminal editor like nano, that's Control + O to save, then Control + X to exit.

Because the env file is hidden (its name starts with a dot), you won't see it in a normal Finder window. To reveal hidden files on Mac, press Command + Shift + Period (.). You can also ask your agent to give you the exact path to navigate there.

Step 6: Restart and Test the Connection

Copy the final confirmation message, then close out of your agent. Give it a moment to settle, then reopen it fresh.

In the new session, paste in a test prompt such as:

"Using the AlphaInsider skill, list my strategies and show my current positions."

The agent will find the AlphaInsider skill and return your data — for example, all the strategies you've created on AlphaInsider, the assets each one holds (stock or crypto), the strategy names, and how much money is allocated to each. If you see your strategies and positions, the connection is working.

Optional: Pin Your Agent to a Strategy or Bot

When adding your API key, there's an optional step to pin your agent to a single trading strategy or a specific trading bot. This is useful if you want the agent focused on one thing.

Finding your Strategy ID:

  • Open any strategy on AlphaInsider (for example, a Telegram trading bot strategy).
  • Look at the URL: alphainsider.com/strategy/...
  • The text after the last slash is your strategy ID.
  • If a time frame is in the URL (like a 1-month, 1-week, 1-day, or 5-year view), you'll see a question mark followed by the time frame. Copy everything between the last slash and just before the question mark — that's your strategy ID.

Finding your Bot ID:

  • Navigate to your trading bot (for example, a paper trading bot running on Alpaca).
  • Look at the URL: alphainsider.com/bot/...
  • Start copying after /bot/ and continue up to the last slash before "allocations." That string of characters is your bot ID.

Open your env file and paste the strategy ID or bot ID into the matching line (no spaces needed). Because these IDs aren't sensitive like your API key, you can also simply ask your agent to add them for you — it can handle that part on your behalf.

Putting Your Agent to Work

Once connected, the AlphaInsider skill unlocks far more than just listing positions. You can ask the agent natural-language questions and let it pull the data for you.

For example, you can ask:

"Use the AlphaInsider skill and find the top three members of Congress by performance in the last week and tell me what they hold."

This taps into the Congress tracker, which tracks every member of Congress on AlphaInsider. Notably, you don't even need to tell the agent the feature is called the Congress tracker — it can figure out where to find that performance data on its own.

In the example, the agent returned three members of Congress with their one-week performance, what they're holding, and how much of their portfolio is allocated to each holding. Instead of searching the site yourself, you simply ask the agent and it finds the information for you.

Tips and Best Practices

  • Screenshot the instructions page and paste it into your agent so it can follow along and minimize mistakes.
  • Use read-only permissions first. Only grant trade-placing permissions once you trust the agent's behavior.
  • Name your API keys clearly (like codex one) so you can manage and revoke them later.
  • Let the agent handle non-sensitive IDs. Strategy IDs and bot IDs can be added by the agent — but always paste the API key yourself.
  • Use natural language. The agent can interpret requests and locate the right AlphaInsider feature even if you don't name it exactly.

Common Mistakes to Avoid

  • Including the time frame in your strategy ID. Stop at the character right before the question mark in the URL — don't copy the ? or anything after it.
  • Expecting the agent to create your API key. That's the one step you must do yourself in AlphaInsider's developer settings.
  • Forgetting to reveal hidden files. The private.env file starts with a dot, so it's hidden by default. Use Command + Shift + Period on Mac to see it.
  • Granting full permissions too soon. Selecting "everything" is possible, but it's safer to begin with read-only access.
  • Adding spaces around your keys or IDs. Paste values cleanly with no extra spaces.

Keeping the Skill Updated

AlphaInsider's API rules and endpoints can change over time. To keep the skill current, there's a final update prompt on the Connect AI Agent page. Simply copy that prompt and paste it into your agent, and it will update the AlphaInsider skill so your connection keeps working smoothly.

Frequently Asked Questions

Do I need to know how to code to connect an AI agent to AlphaInsider?
No. There's no code you need to write yourself. You mostly copy and paste prompts the agent provides, and the agent handles the installation.

Do I need an extra subscription?
No. If you already have an account that gives you access to an AI agent, you have everything you need to connect it to AlphaInsider.

Which AI agent should I use?
You can use any AI of your choice that allows skill installation and file editing. This guide uses OpenAI's Codex app with a ChatGPT account as the example.

What's the one step the agent can't do for me?
Creating and pasting your API key. You generate it in AlphaInsider's developer settings and paste it into the private.env file yourself.

Should I let the agent place trades right away?
It's best to start with read-only permissions until you're comfortable. Once you trust the agent, you can grant trading permissions like new order and new order allocations.

How do I find my strategy ID?
Open a strategy and look at the URL after alphainsider.com/strategy/. The text after the last slash — up to just before any question mark — is your strategy ID.

How do I find my bot ID?
Go to your trading bot's page. After alphainsider.com/bot/, copy everything up to the last slash before "allocations." That's your bot ID.

Can the agent pull data beyond my own positions?
Yes. Once connected, it can access features like the Congress tracker to report on members of Congress, their performance, and their holdings — plus much more.

What happens when AlphaInsider's API changes?
Copy the update prompt from the Connect AI Agent page into your agent, and it will refresh the skill to match the latest API rules and endpoints.

Conclusion

Connecting an AI agent to AlphaInsider is fast, free of extra subscriptions, and requires no coding. Once you've installed the AlphaInsider skill, added your API key, and (optionally) pinned a strategy or bot, your agent can pull live data, monitor your strategies, surface insights like the Congress tracker, and even place trades when you're ready.

Instead of searching the site manually, you simply ask — and your agent finds, gathers, and acts on the information for you.

Ready to give your AI agent superpowers? Log in to AlphaInsider, head to Resources → Connect AI Agent, and set up your connection today. Have questions? Drop them in the comments or reach out to AlphaInsider support — we're happy to help.