
Usage
once brainz is live—doesn’t matter if you spun it up by hand or dropped it into docker—it’s all one stack. web ui, cli, and api share the same brain: one model state, one memory layer, one log stream. no silos, no bs.
1. web ui – talk to it, watch it think
fire it up: http://localhost (backend 8000 + frontend 3000 need to be running or containerized, obviously)
what you can mess with:
throw prompts at the model, get live answers
peek inside the memory layer (vector traces of past prompts)
watch agents do their thing in real time (logs + metrics)
trigger agents manually, force autotrain runs
fine-tune directly in-browser without restarting anything
built for people who want to see what’s happening, not guess.
2. cli tools – for devs who hate clicking
lives here: backend/cli/
query.py – terminal inference
python cli/query.py --prompt "what is solana?"
output:
solana is a high-performance blockchain built for speed and scale...
train.py – fine-tune from the terminal
python cli/train.py \
--prompt "describe lsts" \
--completion "lsts are liquid staking tokens..."
why cli? because scripts > dashboards. easy to wrap in cronjobs, pipe data, or bulk-train from files.
3. api endpoints – automate everything
base url: http://localhost:8000 docs: http://localhost/api/docs (swagger ui for lazy days)
query the llm
POST /api/llm/query
{
"prompt": "explain mev in ethereum"
}
response:
{ "response": "mev = maximal extractable value..." }
train live
POST /api/llm/train
{
"texts": [
"describe validator slashing in proof-of-stake systems."
]
}
stream logs
GET /api/system/logs?level=INFO&limit=100
returns every move the system makes, raw.
end-to-end flow – how it actually plays out
you push a prompt (cli, ui, or api – doesn’t matter)
agent checks the answer, flags it if trash
autotrain fires up, runs a quick fine-tune loop
prompt embedding gets stored in vector memory
next time a similar prompt hits → brainz recalls context instantly
you watch all this go down live in the ui logs
your workflow, your rules
monitor in the ui, script in the cli, integrate via api – all wired into the same runtime. agents retrain automatically, memory keeps evolving. you want to rewrite agent logic or hack the memory scoring? go ahead, it’s all yours.
Last updated