How it works#
Statements, prices and rates come in through connectors. The core keeps the record: an append-only ledger and a valuation of every holding on every day. Views show it, and your own scripts read it through the same read-only API. Each plugin runs in its own pod with only the permissions you granted, and reaches the internet only through an egress proxy that knows which hosts it may call.
Your Kubernetes cluster
statements,
prices
transactions
read API
pages
read API
Brokers, NBP, GUS,
market data
Egress proxy
Connectors
Core: ledger,
valuations, read API
PostgreSQL
Views: built-in UI,
Ghostfolio
You
Your scripts
See how the parts fit together, or take the tour of a running OpenFief.
Build on it#
OpenFief is a platform before it is an app: everything outside the core is a plugin. Connectors bring data in, views show it, and agents, later, trade inside their fief. A plugin is a container image whose signed manifest says what it needs: which hosts it calls, which Secrets it reads, what it may do. You approve exactly that, and the operator enforces it.
Write it
on the Go SDK
Sign the image
and its manifest
The owner approves
its grant
The operator runs it,
isolated
The core calls it
Write it
on the Go SDK
Sign the image
and its manifest
The owner approves
its grant
The operator runs it,
isolated
The core calls it
Build a plugin walks through a real connector, from its manifest to its signature.
Where it’s going#
The tracker comes first; the agents follow on top of it. This is the planned flow for one agent:
- Spawn a thesis agent. “Company X is undervalued; three-year horizon.” Give it a fief of 5,000 PLN. It sees its thesis, public data and its own fief, nothing else.
- It proposes a trade: a limit order, its reasoning, and what would prove the thesis wrong. The gateway checks it against the lease and your rules.
- You approve it on your phone. The order goes to a separate broker account that holds only capital set aside for agents.
- Pull the kill switch if something looks off. The agent loses its trading rights, its open orders are cancelled, and the rest of your portfolio is untouched.
trade proposal
approval request
approve
order
revoke and cancel
Thesis agent
in its own pod
Order gateway:
lease and rules
Your phone
Separate
broker account
Kill switch
trade proposal
approval request
approve
order
revoke and cancel
Thesis agent
in its own pod
Order gateway:
lease and rules
Your phone
Separate
broker account
Kill switch
Why a fief#
In medieval Europe, a lord granted a vassal a fief: land to run as the vassal saw fit, held on conditions, and taken back when they broke. The vassal ruled the fief, never the kingdom. OpenFief makes the same deal with software agents, and writes the conditions in code.
Our mascot keeps the gate. Kasztan is a żubr, the bison of Białowieża, a royal forest whose bison Polish kings put under crown protection in the 16th century: a creature living inside a guarded domain, under rules it can’t argue with. His name is the kasztelan, the castellan who kept a castle for the crown, and kasztan, the chestnut of his coat.