
TRA
io.github.BijectiveLabsPublished by GitHub account BijectiveLabsv0.13.0Updated Nov 7, 2026
Read-only gates of autonomous trading agents with deterministic execution: cost, data, validation.
Overview
Exposes the read-only gates of an autonomous trading agent system — cost, data and validation checks — as MCP tools for any host.
- What you can do
- Run the desk's read-only gates as tools: cost, data and validation checks over a trading cycle
- Inspect what the system computed and decided, with each refusal naming the figure behind it
- Read the records a desk writes: cycles, screens, positions, round trips and usage
- No tool is listed in the manifest, so the exact tool set is not documented here
- When to use it
- Useful when you want an assistant to inspect or explain a TRA trading desk's decisions and refusals without giving it any ability to size, price or send orders.
- Requirements
- Runs locally over stdio as the PyPI package bitra, launched with uvx; the README's install path needs Python 3.11 or newer. A desk folder with settings and a model provider key in .env is needed for the desk itself; the manifest declares no authentication, environment variables or headers.
Installation
In SourceWeft
- Open TRA in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
TRA
Autonomous trading agents with deterministic execution. The agents propose; the system decides.
[CI] [PyPI] [Python versions] [License: MIT] [Status: alpha]
[Managed with uv] [Linted and formatted with Ruff] [Type checked with mypy] [Venues through ccxt] [Tested on Linux and Windows]
[Website] [Documentation] [Insights] [Changelog] [Security policy]
TRA (trading research agents) is published as bitra on PyPI and runs as tra. Before
0.10.1 the package was called trading-research-agents, and the same package is still
published under that name.
Language models are good at reading a market and saying what they think. They are bad at arithmetic, they don't know what a trade costs, and they will happily overrule a limit you set. This project uses them for the first part only. The system itself, fixed rules with no model involved, fetches the data and works out every figure. The agents read those figures and give an opinion. Then the system prices the trade, applies your limits, sizes it, and either writes it down or sends one order with the stop attached. Every decision and every refusal is kept on disk with its reason, so you can check afterwards what happened and why.
It's an early release, so expect settings to change between versions. What works today: linear perpetuals, spot pairs (stock perpetuals and tokenized stocks among them) and prediction market outcomes through one order path, a universe of perpetuals found and measured by the system and ordered by the room its own paths expect, the full autonomous cycle on live data, a structure lead that proposes, three readings of your own series computed by the system, up to three reviewers, stops and targets the lead names inside bounds you set, the gates that decide, sizing from your own rules, real orders on a venue's practice environment behind a mandate you sign and a signed risk gate, and two auditors that read the records. Under it, a market data plane records order flow, the order book, liquidations, derivatives and news minute by minute into a verified archive, and an arena replays any policy over that archive beside baselines built to be beaten, net of the desk's own costs.
Contents
- What it solves
- How it is built
- Get started
- What you see, in order
- How one cycle decides
- Venues
- Models and providers
- Toward real orders
- Your money, your orders, your positions
- Watching a desk, and what is kept
- Command line
- What it guarantees, and what is not built yet
- Where it is going
- Documentation
What it solves
None of these is hypothetical. Why it is built this way lists the documented failures behind each one, with their sources.
How it is built
Three kinds of work, kept apart because they fail differently. The system is in control; Jev, TypeSafe's typed judge, is the fast System One model that perceives and verifies; the reasoning seats deliberate only inside what the system computed, and their answers are checked before anything counts.
The shipped cycle reads its own live snapshot; the archive feeds the arena today and the decision path as the work below lands. Where it is going, in the order it is being built:
Each step is measured in the arena before it is trusted, and the four guarantees at the end of this page hold through all of it.
Get started
A few minutes and one model key. Every setting has a working default, so a new desk runs before you change anything; the table under step 6 says what those defaults are.
1. Install. You need Python 3.11 or newer. uv is the quickest way:
That brings every model provider and every exchange in. Without uv, run
pip install 'bitra[ccxt,openai,anthropic,google,data]' inside a virtual
environment. To move to the newest release later:
That is the release, and the version to run. The develop branch on GitHub is where the next
one is built; a commit there is not a release (more).
2. Make a desk. A desk is a folder holding your settings and everything the agents decide. Name the provider you have a key for:
Add --venue okx (or any ccxt id) to trade somewhere other than Bybit.
3. Add your key. Copy the example file and put your key in it. Every command reads the .env
next to strategy.toml on its own.
4. Check. tra check reads every setting against the others and names the one thing to fix
next. A desk that is ready ends with:
5. Run. tra run decides once on live market data, in the sandbox: nothing leaves your
machine. tra run --every 15m keeps deciding, once per fifteen-minute bar, on the clock. Or type
tra on its own for the console, which takes the same commands.
6. When you want real orders. Start on the exchange's demo or testnet API. Make the desk for that exchange from the start, and the rest is three commands:
--venue writes what that exchange needs into [execution]: its demo or testnet API, 3x isolated
leverage, at most 200 per order, and how its stop and take profit are placed. Change any of it.
How to make the key on each exchange is in
Exchange accounts and keys, and
Toward real orders has the whole path.
What a new desk does before you change anything
Working on the code itself? See Development.
What you see, in order
1. The console. Run tra inside your desk and it opens the console: what is ready, what isn't,
and the next command to run. Under it is a prompt that takes every command and draws it right
there. Arrow keys go back through what you typed, tab completes, help lists the commands and
exit leaves. For scripts and cron, tra -c "run --now" runs one command and exits.
2. The pass over your instruments. Type run --every 15m and the desk first refreshes any data
series that are due, one line each. Then it looks at every instrument on your list, one data pull
apiece, and measures it. The screen steps through them live:
3. One cycle per instrument it takes. The system found the candidates, measured them and ordered them by the room their own paths expect over the spread; no model chooses. The instruments taken get a full cycle. The terminal shows the whole pipeline from the start and updates it as each step begins and ends. Steps that run at the same time spin at the same time, each with its own clock, and the line underneath says who is working right now:
4. The result. When the cycle finishes, the table gives way to the pass over the universe: what the system took, what waited and what was held, and why. Then the cycle itself: what the analyst proposed and from which figures, and every refusal with the number behind it. Here an ETH short in a ranging market stopped at its exits: with its own stop and target and the round trip, more than half of trades like it would have had to win just to break even (the break-even bound of the time, an experiment since 0.13):
Then the data the cycle used and how old it was, the series the readings read, the stop and take profit it would have placed, and which agents answered. A cycle that goes further adds what each reviewer argued, how conviction weighed the voices, the risk at the stop and the targets:
[data, series, exits and agents]
5. Between cycles. The desk says when the next pass is, on the clock and in minutes, for
example next pass at 14:30:00 UTC, in 10m 57s, and counts down to it. An auditor woken by an alarm
gets a spinner of its own.
The same cycle as plain text (--plain, a pipe or a log): the figures of a real run on live data
(2026-09-29), printed by this release with the template's conviction weights, shortened:
That trade was refused. It cleared the cost gate and still died, because this desk asks for an edge of twice the cost and got 1.94 times. A refusal names the figure behind it, every time.
How one cycle decides
Who does what:
The macro, on-chain and sentiment readings are the system's arithmetic over dated series you declare under
sources/, and ask no model: until 0.11 each was an analyst whose model labelled the same figures,
no decision ever rested on that label, and the calls were retired. Each series
is either a file you keep or a feed the desk refreshes itself (FRED, the Crypto Fear & Greed Index,
or any paid vendor that answers JSON over https). tra sources show lists every series with where it
came from and how old its last value is, and a value older than its max_age is shown as stale and
never counted. Data sources has the details.
Which reviewers run is yours to declare. A vote never decides on its own: it moves conviction by
the weight you give it ([conviction].reviewer_weight), and a stance counts for what it says beyond
its assignment, since a pro that supports is expected to.
Voices are allowed to disagree. Each reading becomes a score between -1 and 1, computed from its own figures against the lines you drew, so a macro reading barely past its line counts as a small voice and one far past it counts as a big one. Conviction adds them up: agreement grows the size, opposition shrinks it in proportion, and only opposition that outweighs the case stops the trade. A short at 0.70 confidence against a barely bullish macro and sentiment scores 0.56 and trades at half size; against a strongly bullish context it scores 0 and doesn't trade.
The structure lead knows what kind of market it is working in before it decides. The system measures
the regime on its timeframe (trending up, trending down, ranging or mixed) and on the higher
timeframes you list in [run].context_intervals, and it hands over what your macro thresholds say
this cycle as well. A setup that doesn't fit the regime, such as a trend trade in a sideways
market, is refused by name; [regime] holds the lines.
Everything after the models answer is arithmetic over numbers you declared. No model can place, cancel or resize an order, read a file outside the project, or edit your configuration. Agents has the full table of what an agent can reach, and The cycle walks through every step.
Venues
A cycle reaches venues through ccxt, so every exchange ccxt supports is already integrated: the same order path, the same gates and the same checks, with nothing in the core naming a venue. What differs from one venue to the next is what ccxt reports it can do, the second column, and how far it has been tested, the last:
"Everything" means ccxt reports the five things a safe order needs: send it, attach the exits, read the position, read the open orders, cancel. "Run end to end" is the stronger claim, a full run with real orders on the venue's demo or testnet API, and Bybit, OKX, Bitget, BingX, Binance and Gate have had it so far. How to make a key on each is in Exchange accounts and keys. Any other venue that takes orders can have that run at any time: start on its practice environment, watch a few cycles and read what it sends. Each report moves a venue into the last column.
Adding the venue you trade on is four steps, and one command writes most of it:
Your fees are filled in from your account when it reports them, and from the venue's standard tier until then, labelled as such; a fee you write yourself is kept and checked against the account. Venues has the full table, the keys each venue needs, and the four steps.
Models and providers
You choose the provider and the model; nothing is hard-coded. Each provider reads its key from the
environment (or the .env beside your config) and nowhere else.
TypeSafe is not in this table because Jev is not a model for [agents]: it is the typed judge,
declared in data.toml under [judge] with TYPESAFE_API_KEY (a key from
https://console.typesafe.ai/keys) and a pinned version such as jev-1.14.0. tra models typesafe
lists the versions your key may use; tra keys --probe proves the key without asking a question.
Whatever the provider, every answer is parsed against a closed schema by the system before anyone reads it, so a model that only offers JSON mode is held to the same shape as one with strict schemas.
fallback is tried in order when a provider is rate limited or down, with the same brief. A vendor's
free tier meters each model on its own, so roles can share a provider across two models and each
model keeps its own allowance; tra check judges the load per model and says when one is too much. Every
call is a line in usage.jsonl with its tokens and latency, and nothing caps spend unless you
declare a ceiling. tra keys --probe proves each key works without sending a prompt. A vendor of
your own is about thirty lines (Model providers).
Toward real orders
What it trades today, through one order path and the same gates:
- Linear perpetuals (USDT- or USDC-margined swaps) on any venue ccxt reaches, long and short, with the leverage and margin mode you declare. The default, run end to end on six exchanges.
- Spot pairs, long only and paid in full, for a desk that lists
spotin[execution].markets. - Stock perpetuals and tokenized stocks, which are a perpetual and a spot pair to the venue, with the underlying exchange's hours respected.
- Prediction market outcomes, for a desk that lists
prediction, decided on a probability by their own analyst and priced to resolution.
That is where the project started, not where it stops. For spot, Venues says how to set a desk up. Spot, a stock perpetual and a tokenized stock have been run on the Bybit and OKX demos; prediction outcomes have run in sandbox on live data, and their order path is tested against ccxt's shapes until a practice venue is run. Dated futures, inverse contracts and options are on the way, each with its own cost model, exit rules and tests. Until a market type has those, venue mode checks the type on every order and refuses it, because a market the system cannot yet price and protect is not one it should send to. Boundaries says what each one takes.
An agent desk goes through three steps, and you can stay at any of them as long as you like:
Steps 1 and 2 have been run end to end on the demo or testnet APIs of Bybit, OKX, Bitget, BingX, Binance and Gate. Step 3 has not been run by us; treat it as yours to verify, small, first.
If you bring a scripted strategy of your own instead of the agents, it has a research path of its
own before any of this: tra data get BTCUSDT 2025-01-01 and tra backtest replay a day of the
exchange's archive net of every cost, tra paper --minutes 30 runs it on the live feed with
nothing sent, and tra live is a small canary session behind hard caps. The example core is there
to show the path, not to make money, and the replay prints its net as it comes out, loss or gain.
The live tier has the details.
Venue mode is the only mode that can lose money, so it has a door in front of it. Read the
mandate with tra mandate; when you accept it, tra mandate --sign "Your Name" keeps it in the
project as MANDATE.md and signs [execution] with your name and today's date, in one step.
Signing alone does not switch anything on; --venue-mode signs and turns orders on together.
tra check names whatever else is missing.
Your money, your orders, your positions
Once orders flow, three things look after the money, all of them the system's own rules and none of them a model:
Who decides what, in one line each: the analyst proposes the direction, your risk rule sets the size, you choose the leverage, and no model touches the last two. Leverage never makes a trade bigger. It only decides how much margin the trade ties up and how far away liquidation sits.
Underneath, on every venue: the order goes only to the environment you declared (demo, testnet or
mainnet); an open position or a working order refuses a second entry; a size off the venue's step is
refused rather than rounded; a clock more than a second off the venue's refuses before anything is
signed; and Ctrl-C or a service stop cancels a resting order before the process leaves. Every close
goes to positions.jsonl and every finished trade to round_trips.jsonl. Capital, orders and positions has
every setting, every refusal and the arithmetic behind each one.
One thing to know before you rely on it: the position checks run at the start of each pass of
tra run --every. With no desk running, an open position has its venue-side stop and take profit
and nothing else, so a desk meant to run unattended belongs under a supervisor.
Orders cross the book by default (taker-taker): they always fill, which is how most desks trade.
Point [run].venue_key at a maker-taker channel and entries rest on the book as post-only orders
instead - a lower fee, fewer fills, since a resting order can be left behind by the market. Either
way the cost gate prices the fee of the channel you chose.
Watching a desk, and what is kept
The console runs commands in its own process, so closing it ends what it was running. A desk that
should keep running belongs under a supervisor (systemd, a service manager, tmux), and then you
look at it from anywhere with:
tra watch opens no connection, holds no key and takes no lock, so opening and closing it does
nothing to the desk.
What is kept, and where:
Command line
Every command says what it did. Exit code 0 means cleared, 1 means a gate said no, 2 is a usage
error. --json gives machine-readable output and --plain gives text instead of panels.
Getting started
Running
Data
The ladder, research and hosts
What it guarantees, and what is not built yet
Some rules are guarantees, enforced by the system and tests, and every change has to keep them:
- No model touches an order or a key. Models read figures and answer; the system sizes, prices, limits and sends.
- No model can loosen a control. A model can tighten a limit, step the ladder down or arm the kill switch; never widen, promote or disarm.
- One decision, at most one order. A venue error is recorded and the next cycle decides again; nothing is retried around real capital.
- Stale or missing data is refused, never read as zero or as current.
Other things are simply not built yet, and contributions are welcome: inverse, dated futures and options; on-chain venues outside ccxt; more than one account; transfers and treasury; routing and execution algorithms; portfolio accounting. Boundaries lists each one with what it does today and what a contribution would need. The example strategy cores are examples: your edge is yours to declare.
Liability says plainly where responsibility sits when real capital is involved.
Where it is going
The project is in active development, and what this page describes is where it stands today, not where it stops.
- More market types. Spot, stock perpetuals, tokenized stocks and prediction markets are built; inverse and dated futures and options follow, each added with its own cost model, exit rules, sizing and tests before venue mode accepts it.
- More venues run end to end. Every venue ccxt supports already goes through the same order path and gates. Each one joins the six already in the last column of the venues table after a full run on its demo or testnet API, ours or yours.
- The rest of the not-built-yet list, one piece at a time, without weakening a guarantee.
Use the release. What PyPI installs is the latest release, and it is the version to run.
Releases come from master. The develop branch is where the next release is built: it moves
often, a commit there is not a release, and it can carry work that is unfinished or changed again
before it ships. A set of changes becomes a release when it is merged into master, tagged and
published, and CHANGELOG.md says what each one brought.
Documentation
The full documentation is at docs.bijectivelabs.dev. Its source is in
docs/, so a change in behaviour and the page that describes it go in the same pull request.
Development
CONTRIBUTING.md has the branch flow and the standards the code is held to.
Where it comes from
This repository opened to the public in October 2026. Its history starts on 12 September 2026, when the code was separated from Bijective's internal work, and every commit, tag and contributor since then is here. The ideas it is built on are older: the falsification chain, the cost model and the controls in front of every order come from Bijective's research and from the trading platform it was building before this repository existed. The language-model agents came later and sit on top of those gates, which is why they can propose but never size, price or send.
License
MIT. See LICENSE; NOTICE lists the third-party software this package builds on.
Built by Bijective Labs.
Source: README.md at commit aa2ada4
Tools
0Version history
4- v0.13.0LatestNov 7, 2026
- v0.12.2Oct 31, 2026
- v0.12.1Oct 29, 2026
- v0.10.2Oct 25, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts