Skip to content
View original post on X: kvro
Published
12/100

kvro explains a six-agent AI trading framework built on Grok Bot

AIkvro sets out a framework for six AI agents built on Grok Bot, each with one defined role, fixed permissions and a shared rulebook. The agents run continuously on Grok Bot's cloud computer, including when the user's device is off.
kvroVerified on X
@0xkvro
View on X

this is f*cking insane

How to build a 24/7 team of AI trading agents with Grok Bot.

6 Bots. One role each:
Guild Master, Ranger, Seer, Alchemist, Paladin, Rogue.

Full framework, prompts and code below. https://x.com/i/article/2120502546703769601

The Trading Guild: A Framework for Building a 24/7 Team of AI Trading Agents with Grok Bot

Most traders use AI as a question-and-answer tool: they ask whether to buy, receive a confident reply, and act on it. That approach has no process, no verification and no accountability.

This article describes a different approach. It sets out a framework for a trading guild: six AI agents built on Grok Bot, each with a single defined role, a fixed set of permissions and a shared rulebook. The agents run continuously on Grok Bot's cloud computer, including when your own device is switched off.

The roles are as follows. Ranger identifies opportunities. Seer analyzes the charts. Alchemist tests the strategy. Paladin enforces risk limits and holds a veto. Rogue executes approved orders. Guild Master coordinates the team and contacts you only when a decision requires your input.

All prompts in this article can be copied as written. All code is included in full. The limitations of the setup are listed at the end.

What this article covers

- The team structure: six Bots, their role prompts and the hand-off protocol

- Integration with TradingView through its official MCP server: charts, screener, watchlists and alerts

- A complete Pine Script v6 indicator, provided in full

- Integration with Alpaca for paper trading, followed by live trading with mandatory approval

- A kill switch, a trade ledger and a five-stage path from paper to live capital

- A clear statement of what the setup can and cannot do

Follow @0xkvro for further builds of this kind.

Part 1: Why Grok Bot is suited to a trading desk

A conventional chatbot works in a single cycle: you send a request, it replies, and it stops. This is sufficient to explain a trade, but not to monitor one.

Grok Bot provides the capabilities a trading desk actually requires:

- A persistent cloud computer. Bots operate on a cloud computer with a browser, file system and terminal. Work continues when your laptop is closed.

- Routines. A task defined once runs on a schedule or in response to an event. Each Bot supports up to 50 routines.

- Per-Bot memory. Each Bot retains its own memory and conversation history, so rules do not need to be restated.

- Group chats. Between two and six Bots can work in one chat and hand off tasks to one another. Six is precisely the size of this team.

- Approvals. Consequential actions generate an approval card, and "Ask first" rules always take precedence.

- Live X search. Bots can search X and read public posts without connecting an account.

The X search capability deserves particular attention. Earnings reactions, executive statements, analyst commentary and outage reports frequently appear on X before they reach news headlines. Ranger monitors this source throughout the trading day.

Part 2: Assembling the team

The most common mistake is to rely on a single Bot with a single instruction, such as "watch BTC and tell me what to do." This is not a system; it is a source of unverified opinions.

Professional desks separate responsibilities. Those who generate ideas do not execute orders, those who execute orders do not generate ideas, and an independent function holds the right of veto. The guild follows the same principle.

One principle governs the entire guild: every trade idea (referred to here as a "quest") must pass through every stage in sequence. A quest that bypasses any stage is void.

The coordinating-Bot pattern is well established among Grok Bot users: a dedicated Bot whose sole responsibility is to keep the other Bots on schedule and to escalate only when necessary.

Step 1: Install Grok Bot

Download Grok Bot from x.ai/bot. Desktop applications are available for macOS, Windows and Linux, and mobile applications for iPhone, iPad and Android. Access is included with eligible SuperGrok and Cursor plans and draws on a weekly usage allowance; confirm your plan's terms before you begin.

Step 2: Define the Guild Code

Before creating any Bots, write the rulebook. Every Bot reads it before every action, and it is the single document that ensures six agents operate as one desk.

Step 3: Create Guild Master

Create a new Bot and paste the following:

Step 4: Assign each role its prompt

Ranger identifies what is moving and why.

Seer converts catalysts into chart setups.

Alchemist converts setups into tested trade plans. Note the out-of-sample requirement: a backtest that performs only on the data used to build it has no predictive value.

Paladin is the only Bot with authority to reject any quest.

Rogue executes approved orders and performs no other function.

Step 5: Restrict permissions

A prompt is an instruction, not a control. Bots are proactive by design, so binding restrictions must be configured in the settings:

- Open each plugin's tool list and disable every action a role does not require. Only Rogue has access to order tools.

- In Permissions, set all order actions to "Ask first". Where an "Allow" rule and an "Ask first" rule both apply, "Ask first" takes precedence.

- Do not paste API keys into the chat. Request a secret card instead, which keeps the value out of the conversation and out of the model's context.

Part 3: Connecting the tools

Without tools, the team can only exchange messages. This section adds market data, order execution, a custom indicator and an auditable record.

Tool 1: TradingView MCP (market data for Seer)

TradingView launched an official MCP server in public beta on September 16, 2026. MCP is an open standard that allows an AI system to connect directly to external tools, so the Bots read your charts rather than merely discussing them.

Through this connection, Bots can retrieve quotes and price history, run the TradingView screener, access fundamentals, news, filings and calendars, and manage watchlists and alerts. A paid TradingView plan (Essential or higher) is required; trial plans do not include MCP access.

In any Grok Bot chat, enter:

Verify the URL, select Add, then Authorize and sign in to TradingView. To test the connection:

If a table is returned, the connection is working.

Note: during the beta, TradingView provides delayed market data and limits tool calls to approximately 100 per minute. This is adequate for swing trading but not for intraday scalping.

Tool 2: The Guild Signal indicator

Rather than relying on a prompt to generate an indicator, this article provides the complete code.

Guild Signal combines four components: an EMA ribbon (8/21/50/200) that is shaded green or red only when all four averages are aligned; breakout BUY/SELL labels confirmed by volume and RSI; shaded zones at the most recent confirmed swing high and swing low; and a volatility filter that suppresses signals when ATR is in the top 10% of the last 100 bars. Signals are generated on closed bars only and do not repaint.

Installation can be delegated to Seer, which has its own browser:

You approve the TradingView sign-in once; Seer completes the remaining steps.

Tool 3: Alpaca MCP (order execution for Rogue)

Alpaca offers an official MCP server and a free paper trading account. The server operates in paper mode by default, which is the correct starting point.

1. Create a free Alpaca account

1. Open the paper trading dashboard

1. Generate paper trading API keys

Then instruct Guild Master:

To test the connection:

The following code shows how an approved quest is executed: a bracket order sized according to the 1% risk rule, with the stop and target attached at submission. No position is ever opened without a stop.

Tool 4: The Guild Ledger

A Bot's memory cannot be inspected directly, so every Bot records its decisions in writing. Grok Bot connects natively to Google Sheets; instruct Guild Master to create a sheet named "Guild Ledger" with the following columns:

When an issue arises, the ledger shows which Bot made which decision, when, and on what basis.

Tool 5: Routines

Routines allow the team to operate without your involvement. Note that every routine run consumes usage, including runs that produce no result. A routine running every 15 minutes executes 96 times per day, so schedules should be set deliberately.

Rogue is the only Bot on a short interval, and only during market hours: approximately 26 runs per day rather than 96. All other roles run a few times per day. If your alerts can be routed to a channel the Bot monitors, Rogue's schedule can be replaced with an event trigger to reduce usage further.

A typical trading day

Over the course of the day, you read two reports and approved one order. You did not need to open a chart.

Part 4: Moving from paper to live trading

Most AI trading systems fail at the transition from paper to live capital. The framework therefore requires a staged progression rather than a single switch.

- Stage 1: Paper trading, two weeks. Every rule is triggered at least once and every quest is recorded in the ledger.

- Stage 2: Paper results match the backtest. Win rate and average R fall within Alchemist's expected range.

- Stage 3: Live trading at 10% size. Live keys with minimal size, to validate the infrastructure rather than the strategy.

- Stage 4: Live trading with mandatory approval. Rogue proposes each order and you confirm it.

- Stage 5: Live trading under full rules. Only after several weeks of consistent ledger records.

Switching to live trading

Create live API keys in Alpaca, have the Bot replace the paper keys through a new secret card, and set ALPACA_PAPER_TRADE = false. Then add the following instruction to Rogue:

Grok Bot supports this natively. Approval cards generated by a routine expire after 30 minutes, so an unanswered request is treated as a rejection.

The kill switch

In addition, configure restrictions within Alpaca itself that a prompt cannot provide: fund the live account only with capital you can afford to lose, keep the margin multiplier at 1 (no margin), disable short selling, and note that trading on the account can be suspended entirely. A prompt is a rule; a broker setting is an enforced limit.

Weekly review

Each Sunday, Guild Master compares paper or live results against Alchemist's backtest. Strategies performing below expectations are suspended, and rejected ideas remain in the ledger so they are not retested. This weekly review is how the system improves over time.

Six common failure modes

Capabilities and limitations

This setup can:

- research the market 24/7 while your device is switched off

- search and read X in real time for every ticker on your watchlist

- read TradingView quotes, screener results, fundamentals, news, filings, watchlists and alerts

- install a custom Pine Script indicator on your chart through its own browser

- backtest strategies in Python on its own cloud computer

- place paper trades through Alpaca, and live trades subject to your approval

- record every decision in an auditable spreadsheet

This setup cannot:

- trade at high frequency; routines run minutes apart, not milliseconds

- provide real-time TradingView data during the MCP beta; data is delayed

- allow you to choose the model; Grok Bot selects models automatically

- expose its memory directly; the ledger exists for this reason

- run free of charge or without limits; usage is a weekly allowance and empty runs still count

- turn a weak strategy into a profitable one, or guarantee any profit

These limitations are stated deliberately: they are what make the capabilities above credible.

Conclusion

For years, AI has been used for trading through a chat window, which was never the appropriate format.

A trading desk is not a single expert. It is a team, a process and a schedule that is followed without exception. Grok Bot provides all three.

Guild Master, five specialist roles, TradingView for market data, Alpaca for execution, a ledger for accountability and Paladin with the right of veto. Build it on paper, allow it to prove itself, and only then commit capital.

If you implement this framework, share your first week of ledger results, including losses. The most instructive setups will be featured.

Follow @0xkvro for the next build.

This article is not financial advice. Trading involves risk of loss. Always begin with paper trading.

Source details

kvro · x.comPublished · added here

Original title: this is f*cking insane