This repo implements the same persistence / trust idea at four scales:
usage.persistence (mean/min/var of per-token \(\mathcal{R}\)).message.persistence) so the prediction market (or a future hook) can treat it as a prior.pot-core updates trust via a proper log score / KL margin.hai-core scores votes via sequential KL reduction.This page walks through wiring the loop end-to-end.
aion-llm.webui.server (so /v1/chat/completions works).loop, processor, machine, prediction_market).aion-core/data/pot-chain (or set POT_REPO).hai-api) and a JWT token for a bot user (HAI_API_TOKEN).Start the aion-llm dashboard server and load a checkpoint, then call:
curl -s http://localhost:8790/v1/chat/completions \
-H 'Content-Type: application/json' \
-d '{
"model":"checkpoint",
"stream": false,
"messages": [{"role":"user","content":"Explain persistence ratio in one paragraph."}],
"max_tokens": 128,
"temperature": 0.7
}' | jq '.usage'
You should see:
{
"prompt_tokens": ...,
"completion_tokens": ...,
"total_tokens": ...,
"persistence": {
"R_mean": ...,
"R_min": ...,
"R_var": ...,
"R_min_token_idx": ...
}
}
Point aion-core Loop at aion-llm:
export AION_OPENAI_BASEURL=http://aion-llm-webui:8790
export AION_OPENAI_API_KEY=dummy
export AION_MODEL_NAME=checkpoint
When the Loop posts the assistant message into the Processor, it attaches:
{
"role": "assistant",
"content": "...",
"persistence": {"R_mean": ..., "R_min": ...}
}
(See aion-core/loop/loop_engine.py.)
Start blockchain_bridge and ensure pot-mcp exists at POT_MCP_BIN.
Example calls:
curl -s http://localhost:9500/chain_status | jq
curl -s http://localhost:9500/list_voters | jq
To submit a market bet whose probability derives from a task persistence score \(\mathcal{R}_T\):
p = R_T / (1 + R_T)
probs = [p_success, p_failed] (or however the market outcomes are ordered)
Start social_bridge with HAI_API_URL + HAI_API_TOKEN.
Example calls:
curl -s http://localhost:9600/health | jq
curl -s http://localhost:9600/trust/<user_id> | jq
A task \(\mathcal{R}_T\) becomes a vote probability in HAI:
p = R_T / (1 + R_T)
The outward path above is only half the story. The other half is:
So the stack is not only aion-llm -> aion-core -> blockchain; it is also
reality -> blockchain/aion-core -> curated traces -> aion-llm weights.