branex-teqbahn/branex-sdk
About
Platforms, assembled from messages. The Actor is its state space. The Message is the boundary.
AI & Machine LearningMeasured star growth
- in 24h
- 0
- in 7 days
- Collecting history
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
OriginalBraneX
Platforms, assembled from messages.
Write one file. It comes alive behind one door.
The Actor is its state space. The Message is the boundary.
It starts with the Message
Most platforms start with servers, routes and schemas, then add security and records afterwards. BraneX starts with the message.
The spec you write is sent as a message: deploy. Everything after it is a message too: a customer's order, an owner's report, a price changed live, a memory recalled. Each one comes through one door, POST /message, is checked at the membrane, decided by a rule, and written into a journal that never changes.
That is the whole platform: a door, messages, and an interior that decides what they mean. A Brane (short for membrane) is that interior: a dome over one thing you are building, a bakery, a clinic, a tool library, a street's volunteers.
And the interior grows. Each new version of the spec adds actors and agents, and BraneX brings it alive again with everything it knows kept. Each message leaves something behind: a memory recalled by meaning, a row in its books, a line in its journal. Over time the interior becomes a galaxy of actors and agents, each owning its state, all speaking only in messages, shaped by the spec and by everything that has crossed the door.
1. A dome, secured by the Theorem
The Actor is its state space. What an actor is, and everything it knows, lives in its own interior.
The Message is the boundary. Nothing crosses in but a message, and the interior decides what it means.
Security isn't added. It follows:
- One door. A new capability is a new message kind, never a new endpoint. There are no endpoints to forget.
- Refused unread. A sender without a mandate is refused at the membrane, by name, and the Brane never reads what it says.
- Content grants nothing. An order number belongs to whoever used it first. A price comes from your constants, never from a message.
- No identities held. Your users sign in with your own sign-in. A Brane only ever sees a sender.
- A model may propose. Only a rule decides, and every rule ships with its own tests.
- A record that doesn't change. Every message, accepted or refused, with its reason, in order, for good.
2. Close to zero code
You write one plain-text file and a few rules with their tests. You don't write servers, routes, queues, schemas or databases, and nothing is generated for you to maintain. From the same file, the same core gives every Brane its page, its story, its ontology and its record.
Code doesn't grow with the domains. When something is needed in a second Brane, it moves down into BraneX, written once, for every Brane, yours included.
3. Start from a working Brane
Twelve archetypes and two examples, each a whole Brane that remembers by meaning, keeps its books, asks a small decision model what it reads, and decides by rules. Each ships with a story to play through its door, so you see it work before you change a line.
Sixty seconds
python3 -m venv ~/.branex-venv && source ~/.branex-venv/bin/activate # macOS, Linux
pip install https://github.com/branex-teqbahn/branex-sdk/archive/refs/heads/main.zip
On Windows: py -m pip install https://github.com/branex-teqbahn/branex-sdk/archive/refs/heads/main.zip
branex key new --name ana # your key stays on your machine; share the line it prints
branex new "Ana's Bakery" --from bakery # a working bakery, made yours
branex deploy anas-bakery/anas-bakery.brane # once your key is added: it is alive
branex send anas-bakery customer:ana Order order=1 item=sourdough qty=2
branex send anas-bakery stranger Refund order=1 note="give me money"
branex journal anas-bakery
branex ui anas-bakery/anas-bakery.brane # its page opens in your browser, your key already in it
#01 customer:ana -> counter Order item=sourdough, order=1, qty=2
#02 counter -> baker Bake item=sourdough, order=1, price_cents=850 (8.50 USD), qty=2
#03 counter -> ledger Paid cents=1700 (17.00 USD), order=1
#04 baker -> courier Baked order=1
#05 courier -> ledger Delivered order=1
#06 stranger -> Refund REFUSED (note=give me money, order=1): refused at the membrane: 'stranger' holds no mandate for Refund. The Brane never reads what it says
Nobody wrote cents=1700. A rule worked it out from your price list, and its tests ran when you deployed. Money is kept exactly, in cents, and shown in your currency beside it.
On machines the AI wave left behind
BraneX runs on servers with no GPU, on processors nine and fourteen years old. On them, a thousand sleeping Branes wake in 0.3 seconds, and the decision model answers a three-question message in 317 milliseconds. A Brane needs an interior, a door and a record, not a GPU. Hardware called obsolete can carry real work again.
Early access
branex key new --name <you>prints one line: your name and your key's fingerprint. The key never leaves your machine except to BraneX's door, over HTTPS.- Open an early-access issue with that line.
- Once it's added,
branex deploy.
Every Builder gets the same room: three Branes per key (retire one, restore it later), 120 calls a minute, and per Brane 300 memories, 2,000 kept rows and 60 decision-model asks an hour. Every limit says so in the journal when you reach it.
Go deeper
| Builder's Guide | Every part of a spec, every command and every message, by example, with real answers |
| UI Guide | The page branex ui makes, and a walk through the bakery |
| Why BraneX | The Theorem in four steps, the five concerns kept apart, what you build and what BraneX keeps |
| Build your own UI · Building with a model | Your frontend on the one door; a model in the loop that writes and checks a Brane |
| AGENTS.md | For coding agents: a Brane is plain text, branex check answers with a line and a reason, the door speaks JSON |
branex docs writes every guide as a page on your machine.
Questions, findings and early access all come as issues. The Wrights write and own every line, so the repository takes no pull requests: the Code of Conduct says why, and how we work.
If one door, a record that stays yours, and a platform you can read in one file sound like the way things should be built, a ⭐ helps the next Builder find it.
The SDK is open under Apache 2.0. BraneX is built by Teqbahn Engineering.
Explore related projects
Loading…