Counsel and Language Models
DiscussFrom the Sovereign Realms Encyclopedia
Counsel is the name for the optional link between a Sovereign Realms server and outside language models. With it on, townspeople can answer in their own words instead of the game's written lines, foreign rulers can weigh proposals and write letters, and your Your Steward can carry out requests given in plain language. With it off, everything still works, using the game's own rules and words.
The line the game holds to is that the simulation decides and counsel only speaks and weighs. A model never acts in the world on its own. What a person says is a fact the game already has, put into words; a ruler's move is chosen from moves the world already found open to it; a steward acts only through the same sheets and rights you have.
What counsel adds
| Where | Without counsel | With counsel |
|---|---|---|
| Talking with townspeople | The game's written lines, chosen by who they are and what is between you. | The facts of the answer are put into the person's own words by a language model, which is told to add nothing. |
| Words you say aloud | A line you type in chat to someone near is taken by the words in it as one of the things people say: a question, a greeting, thanks, praise, an insult, a threat. | A decision model reads what you meant, choosing among those same things and never anything else. |
| Foreign rulers | A ruler of a realm the world runs follows the rules of the realm's temper. | The ruler weighs the open moves with the decision model (the realm's temper, what the neighbour has done to it, the balance of strength, its allies' quarrels) and makes one drawn by the odds it gives. A grave move such as war needs high odds. If no answer comes, the rule's move stands. |
| Envoys and councils | The realm answers an envoy's proposal by its custom. | An envoy waits in the hall while the council weighs the proposal. If the council is slow, the realm answers by custom. A court that has a voice writes back. What no council could agree to (aid it has not got, war on its own ally) is refused either way. |
| Your steward | Runs the errands on their page and, asked "What needs me?", names up to three things that need you, the most urgent first, each a click from where it is dealt with. Orders in words are not taken. | The steward acts as an agent, finding their way through the realm's sheets and doing what you ask with your rights. |
/ask and ? | The Companion answers from its book. | A language model writes the answer from the same book, in a moment, and can answer in the language you asked in. |
| Lines and memories | Lines are the ones written. | Where a line has few ways of being said, the voice model may write more in the same voice, each checked before it is kept. The notebooks of people who matter to a player are tidied, keeping every promise, favour, debt and secret. |
See Talking with People, Diplomacy and Envoys and The Sovereign's Companion.
Your steward
With counsel on, tell your steward in plain words what you want: "we need a granary and a barracks", "lower the head tax", "who is idle? set one to work as a builder". They find their way through the sheets and tell you what came of it. Grave things (war, disbanding, banishing) they put to you first and do only when you say yes.
Without counsel, or with the day's budget spent, a steward takes no orders in words, but is still of use. Their page reads "I can run errands and tell you what needs you". The errands on it need no model: Fetch…, Buy at market… with the purse, Ask the price at market…, and, for a realm's sovereign or marshal, Recruit…, which has them raise one of its companies to a number, seen to each morning. Under Speak, What needs me? (or anything you type to them there) puts at most three short lines at the top of the page in the steward's own words, the most urgent first, each with its detail on hover and a link to where it is dealt with: for a ruler the most pressing cards of the Command Table's Attention tab, and for anyone their businesses that need them, what they owe, taxes, trouble with the law, and a homestead that outlaws have found. Spoken to in chat, or by /steward, they answer in one row, with the things on its hover and their page a click away. See Your Steward.

Counsel on a hosted server
Each plan of Hosted Servers includes a monthly allowance of language-model use, shown as credits (1,000 credits is one US dollar of use at the provider's price). What the allowance covers differs by plan: the smallest covers your steward and your questions to townspeople; the middle one adds townspeople and foreign rulers and councils; the largest covers everything, including townspeople's own words in conversation. When the allowance runs out, everything keeps going on the game's own rules until the next month. Hosted servers are already linked and need no setup.
Counsel on your own server
If you run your own server (see Installing Sovereign Realms) the mod works fully without counsel. To add it you have two routes.
With the default settings the mod sends counsel's questions, the link below and players' /feedback notes to the site's own address (its /api), so nothing needs setting but the key. If the server config names the gateway's former address, as configs written by earlier versions of the mod do, the server rewrites it to the site's address once, as it loads the config, and says so in a line of its log; an address you have set yourself is left alone.
Linking with a code
The easy way is /realm counsel link, typed in the server's console, or in game by an operator with admin permission.
- A counsel subscription is needed for the server. It is $14 a month and includes 3,000 credits of use; it covers one server and works with any server. The site offers it on its Hosted servers page.
- Type
/realm counsel link. The server asks the site for a link code and tells you: "Visit ... and enter" that link code. - Open the site's link page, sign in with the email your counsel subscription is under, and enter the link code. The page shows the server and version it was asked for and how long it has left (about 15 minutes). Approve it only if you started the link yourself, from a server you run.
- Within a few seconds the server says "Counsel linked: this server's key is in its config, and counsel is on." The key is written to the server's config and is never shown in chat or written to the log.
If the link code is refused or runs out, the server says so and nothing is linked; run the command again for a new code. Only one link can be waiting at a time.
Setting a key by hand
The server config's [counsel] section holds the settings. The key can be left blank and read from an environment variable instead: SR_COUNSEL_KEY for the project's gateway, OPENROUTER_API_KEY for OpenRouter, OPENAI_API_KEY for OpenAI directly. Each key is only ever sent to the provider it is for.
| Setting | Default | Meaning |
|---|---|---|
enabled | true | Counsel on. It is used only when a key is present. |
playerOnly | false | Use the provider only for /ask questions and players' stewards, keeping townspeople's voices, rulers and notebooks off. |
apiKey | blank | The key for the base URL below. |
baseUrl | the project's gateway, on the site | Where questions go. The gateway is sent this server's id and the mod's version. OpenRouter and OpenAI are also supported. |
decisionModel | typesafe/jev-1.13 | The decision model: typed questions in, calibrated probabilities out. |
voiceModel | openai/gpt-6-luna | The language model that voices people and writes rulers' letters. If empty, people speak in the world's own words. |
voiceEffort | none | How much reasoning is asked of the voice model. |
speech | true | Whether what players say to people is understood by the decision model and answered in the voice model's words. |
councils | true | Whether councils of the world's realms weigh envoys' proposals with the decision model. |
rulers | true | Whether rulers of the world's realms choose among their foreign moves with the decision model. |
dailyBudgetUsd | 10.0 | The most US dollars spent in a real day, counted by the clock in UTC. Past it, the world decides alone until tomorrow. |
timeoutMs | 6000 | How long an answer is waited for before the world's own is taken. |
steward | true | Whether players' stewards act as agents. |
stewardModel | blank | The model a steward thinks with. If blank, the voice model. |
stewardEffort | low | How much reasoning is asked of the steward model. |
stewardTimeoutMs | 45000 | How long a single step of the steward is waited for. |
stewardSteps | 12 | The most steps a steward takes over one errand before reporting back. |
maxInFlight | 8 | The most questions out at once. |
The facts sent with each question are the few that question needs.
Checking it
An operator can type /realm counsel to see whether counsel is on, which models it uses, whether the day's budget is spent, and what it has cost. It also says why counsel is not working: off, no key (with the command to run), or budget spent. /realm counsel try sends one test question to each model. See Commands.
Language models and the game's rules
Counsel does not invent facts or open new moves. A ruler's move, a council's answer and an envoy's reception are still weighed from the realm's temper, strength and memory (see Diplomacy and Envoys and Realms); counsel only varies the draw among moves the world already found open. What townspeople say still comes from what they know and feel (see Townspeople); the voice model is given only the facts to say and told to say nothing past them.
See also
Hosted Servers, Installing Sovereign Realms, Your Steward, Getting Started.