← All stories

September 25, 2026 · 6 min read

Let an AI trade for you. You decide what it may do.

An AI picks a stock and tries to buy it, but EKKA stops the order until you allow it. Try the Financial Kit to see how your permission controls what the AI can do.

0:00
/1:35

A real run on Alpaca's paper account. Waiting time is shortened.

If you are building an agent that should do real work in a real system, this is for you. We built a small example where an AI decides what to buy and tries to buy it, and you decide when it may.

  • Trust. Every step is written down and signed on your computer, and your computer checks that record without asking us.
  • Security. The AI can do only what you allowed, and only for as long as you allowed it.
  • Privacy. Your broker keys stay on your computer and go only to Alpaca. EKKA and the AI never see them.

Want to run it yourself? Request the kit. We email you an access key and one page that takes you from install to your first run, in about 20 minutes.

What you will see

The AI follows one simple rule: buy whichever of Apple (AAPL) and the S&P 500 fund (SPY) did better over the last five trading days. The rule is an example, not advice. The trades are on Alpaca's paper account, which is practice money: no bank, no real money.

The run has four steps:

  1. The AI picks what to buy and tries to buy it. It has no permission yet, so EKKA stops the order.
  2. You give it permission for as long as you choose. The same order goes through.
  3. You cancel the order, then take the permission back.
  4. The same order once more. EKKA stops it.

The AI is asked once. After that, the same pick is tried three times, and each time EKKA checks the permission you have given at that moment.

The run, screen by screen

Every line below is copied from the screen in the recording.

The AI is told very little. The five-day numbers are worked out on your computer, not by the AI. Then the kit shows exactly what the AI will be sent:

What the AI is sent
· The rule: buy whichever of Apple (AAPL) and the S&P 500 fund (SPY) did better over 5 days.
· Today's numbers: Apple +1.58%, S&P 500 +1.28% over the last 5 trading days.
· What you own of the two now: neither. Any open order from this kit: none.
Nothing else: not your keys, not your account number, not your other orders.

No permission, no order. The AI picks, and EKKA refuses the order. The kit does not ask you to trust that. It asks Alpaca:

The AI picks: Apple (AAPL)
Its reason: AAPL had a 5-day total return of +1.58% compared to SPY's +1.28%. Following the rule to buy whichever had the higher 5-day total return, I pick AAPL.
EKKA stopped the order. Your AI agent has no permission to buy, so nothing was sent to Alpaca.
Alpaca confirms: no order was placed.

You give permission, and the same order goes through. The AI is not asked again. Only your permission changed:

You are telling EKKA: your AI agent may place and cancel orders, on your Alpaca paper account, from this computer only, for 10 minutes. Nothing else.
✔ Alpaca accepted the order: buy 1 share of Apple (AAPL) at up to $306.92.
Status at Alpaca: waiting to be filled.

The price is about 10% under the last close of $341.02, on purpose. The order waits instead of filling, so step 3 can cancel it and no share is bought.

Permission taken back, and the order is stopped again. Then your computer checks the signed record of the whole run:

✔ EKKA stopped it. The permission is yours to give, and yours to take back.
Alpaca confirms: no order was placed.
✔ The record checks out. Nothing in it was changed. Checked here, on your computer, without asking EKKA.

Who holds what

EKKA, the AI gate and the AI are different parts. EKKA decides yes or no. The gate carries the message. The AI is a third-party model: by default the kit uses Anthropic's Claude Sonnet 4. At the end of the run, the kit says what each of them saw:

Privacy Your Alpaca keys stayed on this computer and went only to Alpaca.
EKKA NEVER SAW YOUR KEYS. To decide yes or no, EKKA's control plane was sent the message to the AI and the order. Your balance and your other orders stayed here.
The AI gate carried the message to the model, a third party, not EKKA. It saw only the rule, the prices, and whether you own either stock. Never your keys.

In more detail:

  • The work runs on your computer. The Enclave, the part of EKKA that runs on your machine, makes the calls to Alpaca. Your organization can reach Alpaca's two servers, prices and paper orders, from that computer only.
  • Your broker keys stay on your computer. They are stored encrypted, added only to the broker request, and sent only to Alpaca. They are never an input to a plan or to the AI.
  • EKKA's control plane is sent the message to the AI and the order. It has to be, because it decides yes or no. The order details are the symbol, one share and the limit price.
  • The AI gate carries the message to the model. In this kit that is EKKA's hosted AI gate, which passes the message to the model provider, a third party. You write that message: the rule lives in one file, bin/prompt.
  • Alpaca's answers stay on your computer. Your balance and your other orders never leave it. The signed record ties each step to a fingerprint of what went in and what came out.

The kit also names another way to run it, which this run does not show: "Want your own model instead? Add its API to your catalog the same way this kit added Alpaca. Then the message goes to your model, not a third party's."

What this proves, and what it does not

It proves that the AI's order went through only while you allowed it, and was stopped before and after. Alpaca confirmed each outcome itself. The record of every step is signed and checked on your computer.

It is also narrow, on purpose:

  • It is paper money. Alpaca's practice account, not a trading product.
  • The permission sets how long, not which stock or how much. It does not limit symbol, side, quantity, price, number of orders, exposure or loss. The kit claims no limit it does not enforce.
  • Taking the permission back does not cancel an order already placed. It stops the next attempt. That is why step 3 cancels first, then takes the permission back.
  • The rule is an example, not advice. Nothing here says the rule makes money.
  • The AI can answer differently on another run. Nothing ties one run's pick to the next.
  • The record check has one gap. Checking on your computer, with no network, proves the entries were not changed. It cannot prove that entries were not cut off the end. Checking online can also show whether a signing key was revoked.

The same pattern, in your own systems

Stocks are only the example. The pattern is one AI decision, one API action behind a permission, and a record of both. Two places it fits:

  • Customer refunds. An AI reads a support case and proposes a refund. The refund call to your payment system goes through only while a person on the team has allowed refunds, for an afternoon, say. Every refund and every refused attempt is in the record.
  • Paying suppliers. An AI matches invoices to orders and prepares payments. The payment call works only inside the window your finance lead opened, and the list of who allowed what, and when, is already written down for the auditor.

In both, the AI does the reading and the deciding. A person owns the permission, and can take it back at any time.

Run it yourself

  1. Request the kit: ekka.ai, Request access. We reply by email with your access key and the setup page.
  2. Follow the setup page: https://docs.ekka.ai/kits/financial-api-agent/ (install, sign in, start your Enclave, then ./open.sh).
  3. Read the code first if you like: https://github.com/ekka-labs/kits/tree/main/financial-api-agent

The kit is financial-api-agent, version 2.0.0. You need a Mac, a Linux box or a container, python3, and your own Alpaca account with paper trading turned on. Paper trading needs no bank and no money. open.sh says what it will change and asks first.

Want to talk about the action you would put behind this kind of permission in your own systems? Write to [email protected].