civ-v-llm-harness
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| how_to_playA | How to play through these tools, from the playbook shipped with this server; needs no game and works at
any time. With no topic: the index of topics and the introduction (what you are, what you see, |
| referenceA | The rule book, as Markdown: what every unit, building, wonder, project, process, promotion, social
policy and ideology tenet, technology, belief, resource, terrain, feature, improvement, specialist and
unit action does, read once from this game's own database (mods and DLC included) and cached. No other
answer repeats this text (since runtime v216): chooser rows carry the enum, the name and live numbers,
and a resource tile carries its resource name. Sections, one per call with |
| turn_statusA | Whose turn it is, current turn number, whether it is my turn, what blocks ending it, and whether a
greeting / discussion / tech / great-person screen is up (those are not in pending_popups).
|
| briefingA | My turn in one compact read, for deciding and for recovering after a context reset: what I must do, what
changed, and what the board looks like. |
| set_seatA | Change which player this server plays, or re-detect it (player_id omitted). Needed when every tool
answers "this seat is not active" although the game is waiting for a human: the server was started
with --seat auto before the game was up, or a hotseat save was loaded and auto's default (seat 1) is not
the seat on screen. Only a seat the engine considers human can be chosen; the answer lists |
| wait_for_my_turnA | Block until it is my turn (hotseat: dismisses the hand-off screen; LAN/solo: waits for the AIs to finish), then return turn_status. On timeout it returns the current status with my_turn=false -- call it again. A progress notification goes out every few seconds while waiting, so with a client that honours progress timeout_seconds can be as long as an AI round needs (600-1800); otherwise keep it under the client's tool-call limit. Also sweeps informational popups. finish_turn does end_turn + this + turn_digest in one call. Returns early with discussion_pending=true when an AI leader wants an answer mid-turn: discussion()
shows what they said and the buttons, respond_discussion(button_id) answers; for a trade offer on the
table incoming_deal() reads the terms and accept_deal()/refuse_deal() resolve it; dismiss_discussion()
leaves without agreeing. Then call this again.
Returns early with tech_popup_pending=true when a technology must be chosen (research still unset).
Every answer carries |
| playersA | HUMAN seats only (network/hotseat games): whether each is connected, has an active turn, and has ended
their turn. Like the in-game player list, a seat I have not met shows its name but not its civ. In a solo game this is just me. For the AI civs and city-states I have met -- their ids,
scores, war state -- use |
| overviewB | My empire at a glance: gold, science, culture, happiness, research, era, counts, turn/year.
|
| notification_logA | The Notification Log: every notification the game still holds for me, newest first, including
ones already dismissed -- which is what the screen is for. |
| turn_digestA | Everything recorded since my last call: combats, cities founded/lost, wars, chat, notifications, alerts.
Notes: a caravan / cargo ship shows up as |
| quick_saveA | Save the game right now (same as the in-game Quick Save / F5). Cheap -- call it after anything costly (founding a city, a policy/research choice, before combat), not just periodically, since a crash loses everything back to the engine's last autosave otherwise. |
| end_turnA | End my turn. If something blocks it (unit needs orders, research/production choice), turn_status shows it.
Auto-quicksaves first by default (single-player only) -- cheap insurance against this game's frequent
ambient crashes; pass autosave=False to skip. Refused with |
| finish_turnA | The turn boundary as one call: end my turn, wait until it is my turn again, and return the new turn --
|
| doA | Carry out a list of orders in one call, in order: [{"tool": "unit_mission", "args": {"unit_id": 7,
"mission": "MISSION_FORTIFY"}}, {"tool": "set_production", "args": {...}}, ...]. Each order is the named
tool with its own arguments and comes back with its own result under |
| rememberA | Write a note to my notebook for this game: the plan, a promise, a threat, why I did something
("Tradition then Rationalism", "Askia denounced me t140: expect a DoW", "keep 2 archers in Moson Kahni").
Notes survive session restarts and context loss: they live beside the game (one notebook per game and
seat, keyed by leader/civ/map/capital), and the latest ones ride along in every finish_turn result.
tag groups notes (plan, threat, diplomacy, todo...). replace_id rewrites an existing note in place, so a
living plan stays one note instead of a trail of superseded ones; the result carries |
| recallA | Read my notebook for this game (see remember): every note with its id, the turn it was written on
and its tag; tag filters, |
| forgetB | Delete one note from my notebook by id (recall lists them). |
| assignA | Give units or cities a structured assignment in my notebook: what they are for, where, when it is done and when to look again. A prose note (remember) says why; an assignment lets a later me -- after a context reset, in a new session -- see at once what each unit is doing and whether that still holds. role: a short word (escort, settle, improve, defend, explore, diplomacy...). purpose: one sentence. unit_ids / city_ids: mine, now; each is fingerprinted (type and creation turn; name and founding turn), so if an id later names a different unit the assignment says the assigned one is gone instead of following it. target: {x, y} a plot (a city site, a tile to improve, a city to take or hold), {unit_id, owner} a foreign unit, or {player} a civ or city-state. done_when (checked on every read; default "manual"): {kind: "unit_at"|"city_at"|"improvement", x, y} (x, y default to the target plot; unit_at takes unit_id, improvement takes improvement e.g. "FARM"), {kind: "building", city_id, building}, {kind: "tech", tech}. review (optional): {turn: N, hostile_within: plots, hp_below: percent} -- look again at turn N, when a visible hostile comes that close to an assigned unit or city, when an assigned unit's hp drops below. replace_id: this replaces that assignment, which is closed as replaced (the two never compete). The answer is the stored assignment reconciled right away (see assignments). One game read. |
| assignmentsA | My assignments (see assign), each reconciled against what I can see now, in one game read. An active row:
id, role, purpose, since_turn, |
| amend_assignmentA | Change an active assignment in place: only the fields given change (role, purpose, done_when and review
as in assign; unit_ids / city_ids replace the list; target={} clears the target; review={} clears the triggers). Use it when a unit was upgraded (new id), a
site moved, or the review turn passed and the plan still holds. note is kept in the assignment's history.
The answer is the amended assignment reconciled now, with |
| close_assignmentA | Close an active assignment: outcome "completed" or "cancelled", with an optional note (why). Closed ones leave the briefing and stay readable with assignments(status="closed"). Usable while it is not my turn. |
| give_orderA | Give one of my units a short sequence of steps the harness carries out over the coming turns, so a plan
already chosen does not cost a call every turn. steps (at most 6, in order): {kind: "move", x, y} walk
there (multi-turn); {kind: "build", build: "FARM"} build it where the previous move ends (x, y name
another plot); {kind: "heal", hp: 80} heal to at least that percent (default 100); {kind: "hold", mission:
"fortify"|"sleep"|"alert"} as the last step. Example: move to (12,8) then build FARM; or heal to 80, move
to (30,14), hold. purpose is a free-text label for the order.
It runs now (start=true) as far as it can, then at the start of each of my turns (finish_turn /
wait_for_my_turn carry |
| ordersA | My conditional orders (see give_order) as stored, without reading the game: id, unit, status (active /
paused; completed, cancelled, replaced, failed once closed), step N of M and |
| resume_orderA | Hand a paused order its unit back and run it now (an active one just runs now). What paused it -- the hostiles in sight, the hp now -- is taken as seen, so only something new pauses it again. Every step is re-checked against the board first: a step completed meanwhile is not issued again. To change the plan instead, give_order with replace_id. |
| cancel_orderB | Close an open order as cancelled (note: why). The standing move it had issued is dropped, so the unit stops where it is; a build or fortify already under way is left alone. Usable while it is not my turn. |
| unit_home_optionsA | Where a trade unit or a Great Admiral could re-home (the Change Home City / Change Port
chooser). Both need the unit to be standing in one of my cities; outside one there is no button,
and the answer says so. |
| unitsB | My units with position, moves left, hp, strength, current promotions, XP toward the next
promotion ( |
| maya_optionsB | Pending Maya Long Count rewards, including unavailable types and the baktun when chosen. |
| choose_maya_bonusC | Choose an available UNIT_* from maya_options (unit="UNIT_PROPHET", ...) and verify the reward was consumed. |
| archaeology_optionsC | Completed dig: artifact origins/era, available art/writing slots, artifact vs landmark or writing vs culture choices. Unmet artifact origins are masked. |
| choose_archaeologyC | Confirm a choice ID at the completed dig's x,y from archaeology_options. Verifies resolution. |
| unit_mission_targetsA | Legal visible targets for an air strike/sweep, nuke, paradrop, rebase or airlift mission
listed in available_unit_actions. Paginated: |
| map_windowA | Revealed plots within |
| explore_frontierA | Where the known map ends for this unit: revealed, passable plots of its domain (sea for a ship, land otherwise) that border unrevealed plots, nearest first. Each has unrevealed_neighbors (how much stepping there reveals), distance (hex distance, not path length), reachable (true when a route exists through the already-revealed map; false = behind land or an unknown strait, listed last), terrain t (a Trireme cannot enter OCEAN), and map_edge=true on the polar rows (mostly ice beyond). move_unit refuses unrevealed targets, so an explorer picks its next stop from here. frontier_total / unrevealed_plots say how much is left; note explains an empty list. |
| tactical_viewA | One unit's surroundings in one read, for choosing its move or attack. |
| known_worldA | Everything this seat knows: empire, own units/cities, met civs and city-states, notifications, and every revealed plot. Fogged plots have vis=false and omit live occupants; unrevealed tiles are absent. |
| map_indexA | Compact map scan: revealed luxuries/strategics, barb camps, ruins, met foreign cities,
visible natural wonders, and in-sight world wonders. A camp with a city-state kill-camp quest
carries |
| revealed_mapA | The whole revealed map at a glance, as character grids: one string per row (north first), one
character per plot, one grid per layer. Layers: vis ('#' in sight now, '~' revealed but fogged:
what you see there is what was last seen and may be stale until a unit gets eyes back on it, ' '
unrevealed), terrain, elevation (hills/mountain), river, owner (borders), feature, improvement,
resource, route. Each reply carries its own legend (letters are assigned per reply). Fog rules are
the human's: a fogged plot shows remembered feature/improvement/route/owner, never live units or
pillage. Pass |
| generic_popupA | Read the open yes/no confirmation (the game's generic popup): its text and numbered buttons. These are BUTTONPOPUP_RETURN_CIVILIAN (keep a captured civilian or return it: returning to a city-state gives +30 influence, to an AI a diplomatic bonus), ANNEX_CITY / PUPPET_CITY after a conquest, BARBARIAN_RANSOM, MINOR_CIV_ENTER_TERRITORY, CONFIRM_COMMAND and the like. Nothing else moves while one is open ("popup needs a decision"). Answer with answer_popup(button). |
| answer_popupA | Press one button (1-based id from generic_popup) of the open generic confirmation. Runs the button's
real handler (e.g. Network.SendReturnCivilian) and closes the window. Returns |
| goody_hut_optionsA | When turn_status.pending_popups shows BUTTONPOPUP_CHOOSE_GOODY_HUT_REWARD (a Shoshone Pathfinder entered ancient ruins): the rewards on offer, each with the popup's own description. |
| choose_goody_hutB | Take one ruins reward from goody_hut_options, e.g. goody="GOODY_CULTURE". |
| available_unit_actionsA | Legal unit-panel actions for this unit right now (missions, tile builds on ITS plot, commands,
promotions). Call this before unit_mission. Move-to is a separate tool (move_unit). Does not select
the unit or pan the camera. For Workers/Work Boats also returns |
| todo_actionsA | Legal actions for many units in one call. With no |
| choose_promotionC | Choose an earned promotion, using its PROMOTION_ name. |
| upgrade_unitA | Upgrade a unit for gold along its upgrade path (e.g. Warrior -> Swordsman). Needs full moves,
own/allied territory, the gold and any strategic resource. The engine replaces the unit: use the
returned |
| disband_unitA | Disband (delete) one of my units -- the unit panel's Disband button. Irreversible. Frees its gold
maintenance and any strategic resource it consumes (e.g. an obsolete Swordsman holding Iron). Returns
|
| move_unitA | Order one of my units to move to plot (x, y) (multi-turn paths allowed, like a right-click).
Selects the unit like the unit panel does (orders go through the game's network path).
A unit on a conditional order (give_order) is taken back: the order pauses ( |
| unit_missionA | Give a unit a mission: MISSION_FOUND (settle here), MISSION_FORTIFY, MISSION_SLEEP, MISSION_SKIP, MISSION_HEAL,
MISSION_ALERT, MISSION_RANGE_ATTACK (x,y), MISSION_PILLAGE (result includes gold_gained), MISSION_EMBARK/DISEMBARK...
An air strike is MISSION_MOVE_TO onto the target plot (that is how the game issues it); like a
melee move onto an enemy, the result then carries |
| citiesA | My cities: population, yields, current production and turns left, growth, happiness.
|
| city_screenA | The city screen for one of my cities: buildings, specialists and their Great Person meters,
which tiles are being worked, the full production queue, citizen focus, avoid-growth, and plots
that can be bought ( |
| great_person_progressA | Great Person overview: each city's specialist progress, class-specific threshold and rate; national General/Admiral XP meters and next Prophet faith threshold. |
| culture_worksB | Culture Overview works tab: own buildings' occupied/empty Great Work slots, work tooltips,
theming rules/bonuses, city tourism breakdowns and tourism modifiers toward met rivals. |
| set_swappable_great_workB | Swap tab pull-down: put one of our works of |
| swap_great_worksA | Swap tab's Swap button: exchange the work we have put up for one another civ offers
( |
| change_specialistA | Add (add=true) or remove (false) one specialist in a BUILDING_* from city_screen. Disables automatic specialist assignment, like clicking a slot. Verifies the resulting count. |
| set_auto_specialistsB | Enable or disable automatic specialist assignment in an owned, non-puppet city. |
| set_city_focusA | Set citizen focus on one of my (non-puppet) cities. focus is one of: balanced, food, production, gold, science, culture, great_people, faith. Same as the city-screen focus buttons. |
| set_avoid_growthB | Toggle avoid-growth on one of my (non-puppet) cities (the city-screen checkbox). |
| change_working_plotA | Toggle whether this city works plot (x, y). Same as clicking the tile in the city screen. Forced-worked tiles stay locked until clicked again. Puppets refuse. |
| buy_city_plotB | Buy plot (x, y) for this city for gold. city_screen lists buyable plots with buy_gold. |
| city_taskB | City-screen tasks: annex (a puppet), raze, or unraze. Annexed cities get resistance; raze burns one population per turn. cities()/city_screen already flag puppet/razing state. |
| sell_buildingA | Sell one building in one of my non-puppet cities (the city-screen click-to-sell).
city_screen lists |
| compareA | Your candidates side by side in one read, for a decision you are weighing; the facts, never a pick.
kind="production": city_id + candidates (up to 8 UNIT_/BUILDING_/PROJECT_/PROCESS_ types): can_produce or
|
| city_ranged_attackA | Ranged attack from a city onto plot (x, y). See available_city_strikes first. Does not select the city or pan/flip the camera. |
| available_city_strikesA | Plots this city can bombard right now. Empty if it has no ranged strike this turn. |
| available_productionA | What this city can produce right now: units, buildings, projects, processes, with |
| set_productionA | Set a city's production. item like UNIT_WARRIOR, UNIT_SETTLER, BUILDING_MONUMENT, PROJECT_..., PROCESS_WEALTH.
append=true queues it behind the current build (the production screen's shift-click) instead of replacing
it; the reply lists the whole |
| remove_from_queueA | Drop one item from a city's production queue (the city screen's click on a queued item). position is
1-based as set_production's |
| purchase_costA | Read-only: cost to rush-buy item (UNIT_.../BUILDING_...) with gold or faith right now, and whether
it's actually purchasable. yield_type is "GOLD" (default) or "FAITH". Wonders (built via a BUILDING_* item
too) are never purchasable in vanilla BNW -- can_purchase will read false. Check this before purchase_production.
A refusal carries |
| purchase_productionA | Rush-buy a unit or building (item like UNIT_WARRIOR, BUILDING_MARKET) with gold or faith (yield_type "GOLD", the default, or "FAITH"). See purchase_cost for price/affordability first. Wonders can never be purchased this way. |
| available_policiesA | Social policies: what is adopted, what can be adopted right now (enum + name; the effect text is in reference("policies")), which branches are unlocked / unlockable, culture vs next cost. Use before choose_policy / unlock_policy_branch. |
| choose_policyB | Adopt a social policy, e.g. POLICY_TRADITION, within an already-unlocked branch. |
| unlock_policy_branchA | Unlock a policy branch/tree, e.g. POLICY_BRANCH_TRADITION, spending a culture policy slot. |
| choose_ideologyA | Choose the empire's ideology when ENDTURN_BLOCKING_CHOOSE_IDEOLOGY is up (3 Factories or the Modern
era): branch is POLICY_BRANCH_FREEDOM, POLICY_BRANCH_ORDER or POLICY_BRANCH_AUTOCRACY. Irreversible
short of a revolution. Other civs' ideologies are public (their choice matters for ideological
pressure/unhappiness). Returns |
| free_great_person_optionsB | When turn_status shows ENDTURN_BLOCKING_FREE_ITEMS: how many free Great People are owed and which unit types (UNIT_SCIENTIST, UNIT_ENGINEER, UNIT_MERCHANT, UNIT_ARTIST, UNIT_WRITER, UNIT_MUSICIAN, ...) qualify. |
| choose_free_great_personA | Claim a free Great Person, e.g. unit="UNIT_SCIENTIST". Only valid while turn_status shows ENDTURN_BLOCKING_FREE_ITEMS (e.g. right after completing the Liberty policy tree). |
| religion_overviewA | Religion Overview screen: faith, next Great Prophet threshold, my pantheon/religion and beliefs, all founded
religions with their beliefs and city counts, per own city the followers and pressure of each religion, and
|
| set_faith_purchaseA | The Religion Overview's automatic faith purchase pull-down. |
| change_ideologyA | The policy screen's Switch Ideology button: adopt the preferred ideology public opinion pushes toward, at the cost overview().public_opinion.switch_cost shows (anarchy turns, tenets kept). Refused while the button is grey (no public-opinion unhappiness). |
| faith_great_person_optionsA | When turn_status shows ENDTURN_BLOCKING_FAITH_GREAT_PERSON: the Great People the faith can buy now. |
| choose_faith_great_personC | Take one unit type from faith_great_person_options (it appears in the capital or holy city). |
| available_beliefsA | Beliefs still available for one slot (enum + name; what each does is in reference("beliefs")). kind: pantheon | founder | follower | enhancer | bonus | reformation. Founding a religion takes pantheon(if none yet)/founder/follower(/bonus for Byzantium); enhancing takes follower + enhancer. kind=founder also lists the religions nobody has founded. |
| add_reformation_beliefA | When turn_status shows ENDTURN_BLOCKING_ADD_REFORMATION_BELIEF (Piety's Reformation policy): pick one from available_beliefs(kind="reformation"). |
| found_pantheonA | Found a pantheon with the given belief, e.g. BELIEF_GOD_OF_THE_SEA. Check turn_status first: only valid when blocking_name is ENDTURN_BLOCKING_FOUND_PANTHEON. |
| found_religionA | Found a religion (RELIGION_..., see available_beliefs(kind="founder").religions) in the city at
(city_x, city_y) = data1, data2 of the pending BUTTONPOPUP_FOUND_RELIGION. |
| enhance_religionA | Enhance my founded religion: belief4 = a follower belief, belief5 = an enhancer belief (available_beliefs), in the city at (city_x, city_y) = data1, data2 of the pending BUTTONPOPUP_FOUND_RELIGION (the holy city, where the Great Prophet stands); custom_name is ignored unless the game asks for one. Only valid when blocking_name is ENDTURN_BLOCKING_ENHANCE_RELIGION. |
| available_researchA | Techs I can research right now (prereqs met). |
| tech_treeA | The tech tree: |
| steal_tech_optionsA | When a spy finished stealing: which civs I can take a tech from and the techs available from each.
Each victim carries |
| steal_techA | Take a stolen tech (TECH_...) from |
| set_researchA | Choose current research, e.g. TECH_POTTERY, TECH_MINING, TECH_BRONZE_WORKING. Also the way to claim a
free technology (blocking_name ENDTURN_BLOCKING_FREE_TECH, e.g. Oxford University): the named tech is
granted outright ( |
| dismiss_discussionA | Leave an AI leader's negotiation/demand/trade-offer screen (see wait_for_my_turn's discussion_pending)
without agreeing to anything. For a trade already on the table, prefer incoming_deal + refuse_deal.
Also closes a plain leader greeting (first meeting, echo of a war/peace just made), and every greeting
queued behind it ( |
| discussionA | What the open leader screen says: the leader, their mood, their speech, the response buttons (id + text) and, on a trade screen, the deal on the table; screen="greeting" is a plain first-meeting / war / peace message with nothing to decide. Call this whenever turn_status or wait_for_my_turn reports discussion_pending, then answer with respond_discussion(button_id), accept_deal / refuse_deal (trade screen), or dismiss_discussion (plain acknowledgement, no buttons). |
| respond_discussionA | Press one of the response buttons listed by discussion() (1-4). Use this for AI demands,
warnings, requests and post-deal remarks that offer choices such as apologise / dismiss / threaten.
expect: optional words the button's text must contain (e.g. "no interest"); if it does not, nothing is
pressed and the real buttons come back -- guards against pressing a remembered id on a different screen. When another leader is queued behind this one (several can wait at a turn start), the answer carries
|
| incoming_dealA | Read the current trade table (scratch deal): items already offered, who they are from. A
VOTE_COMMITMENT row names the resolution, the pledged choice and the number of votes ( |
| current_dealsA | Diplomacy Overview current deals: who, items, turns remaining until each expires. Refuses if a trade is already on the scratch table (answer incoming_deal first). Does not construct or propose anything. |
| accept_dealA | Accept an incoming trade already on the table (see incoming_deal). Does not construct a new deal.
To make an offer of my own use propose_deal. The answer carries the AI's |
| refuse_dealA | Refuse an incoming trade already on the table (see incoming_deal). Does not construct a new deal. When another leader is queued behind this one (several can wait at a turn start), the answer carries
|
| trade_catalogA | What can currently go on a trade table with this major civ (gold, GPT, embassy, open borders, pacts,
resources, cities as name + |
| city_state_giftsA | Gold gift tiers and friendship for a met city-state. See minor_gold_gift to actually gift.
|
| city_capture_optionsA | When pending_popups shows BUTTONPOPUP_CITY_CAPTURED: the plunder, and each choice the popup offers (liberate / annex / puppet / raze) with its unhappiness change and the warmonger warning from the button tooltip. |
| choose_city_captureB | Decide a captured city: choice = liberate | annex | puppet | raze (only those city_capture_options lists). |
| war_consequencesA | Read before declare_war (or city_state_action declare_war): what the game's confirmation screen warns about -- a Declaration of Friendship being broken, denouncements, city-states allied to the target that join the war, majors protecting a targeted city-state, and trade routes that would be cancelled. |
| city_state_actionsC | The city-state screen beyond gifts: influence, |
| city_state_actionB | Press one city-state screen button. action: pledge | revoke_pledge | bully_gold | bully_unit | declare_war | make_peace. Refused with the current state when the screen would not offer it. |
| gift_tile_improvement_optionsA | The city-state screen's "Gift Improvement" button, and the hexes it would highlight. |
| gift_tile_improvementA | Buy a city-state an improvement on one of its tiles (clicking a highlighted hex). |
| minor_gold_giftA | Gift gold to a city-state. |
| demographicsB | Demographics: our value/rank and public best, average and worst for population, food, production, gold, land, soldiers, approval and literacy. Unmet best/worst identities are masked. |
| domination_progressB | Original capitals of met civilizations and their current holders; unrevealed coordinates and unmet holders are masked. Includes whether our team controls each capital. |
| wonder_overviewB | World wonders held by met civilizations (Global Relations). Locations and captured/builder details only for cities in sight. |
| city_state_bonusesC | Met city-state's trait/bonus and personality tooltips, current food/culture/faith/happiness/ science benefits, unit gift estimate, unique military unit and exported resources. |
| gift_unit_optionsA | Units that can currently be gifted to this met city-state (the Gift Unit button), with the
button's figures: |
| gift_unitA | Gift one of my units to a met city-state (Network.SendGiftUnit). Verifies the unit left
our army; |
| diplomacyB | Civs and city-states I have met: at war, score (majors), ally/friends (city-states). Unmet players are omitted. |
| relationshipB | Our standing with one civ or city-state: their visible approach toward us, friendship /
denouncements / embassies / open borders / research agreement / defensive pact, the opinion lines
the game shows, their public relations with every civ we have met (wars, friendships,
denouncements, city-state alliances) and the recent messages they sent us. |
| declare_warA | Declare war on a civ I have met. Irreversible for a while (can't make peace again immediately). Bypasses the leader-head screen entirely. |
| make_peaceA | Offer peace to a civ I'm at war with, through the real trade screen: the treaty goes on both sides and
|
| denounceB | Publicly denounce another civ. Worsens relations with them and their friends; cannot be undone. |
| spaceship_statusA | Science-victory progress: whether the Apollo Program is done, for each spaceship part how many are needed,
already in the ship, built but not yet delivered to the capital, and which tech unlocks it; plus met rivals
that finished Apollo and how many parts they have (the Victory Progress screen's space race). |
| culture_overviewA | Culture-victory race (the Culture Overview screen): for each met major civ, how many civs it is Influential on out of how many it needs, its tourism, and its influence on every other major civ -- level (exotic .. dominant), percent, tourism per turn, trend, and turns_to_influential while rising. A civ you have not met appears as "unknown". Use it when a "Culture Victory Contender" alert names a rival. |
| propose_friendshipA | Ask an AI civ for a Declaration of Friendship (the leader screen's "work together"). Refused when already friends, asked too recently, at war or unmet. The reply says whether they accepted. Declarations expire after their term (a "Declaration of Friendship Has Expired" notification) -- this is how to renew one. |
| accept_friendshipA | Accept a pending Declaration of Friendship proposal (turn_digest's leader_message with state
DISCUSS_WORK_WITH_US). Works even if the discussion dialog was already dismissed/declined -- the
request stays acceptable server-side. Check diplomacy() or |
| diplo_eventA | Escape hatch for any other diplomatic action not covered above (accept/decline a coop-war offer,
respond to a denounce request, agree to work with someone, etc). |
| propose_dealA | Offer a trade to another civ. With an AI: drives the game's real leader / trade screens, proposes, reads
the reply, closes them and reports measured |
| demandA | The leader screen's Demand button: tell an AI leader to hand over |
| negotiate_dealA | Ask an AI civ about a deal without committing to it (the trade screen's helper buttons), then close
the screen. mode="equalize": put a draft on the table and ask what would make it acceptable;
"what_will_ai_give": list only my items (from_us=true) and see what the AI offers for them;
"what_does_ai_want": list only their items (from_us=false) and see what the AI asks in return.
|
| espionage_intrigueB | The Espionage Overview intrigue log: turn, spy, discoverer and the player-visible message. |
| available_trade_routesA | Valid trade-route destinations for a specific trade unit (caravan/cargo ship) right now, with the
trade_type to pass into establish_trade_route. Yields are PER TURN: gold/science/food/production are
what my end receives, *_them what the destination receives (an internal food/production route delivers
to the destination city, so read food_them/production_them for those). Religious pressure, when the
chooser would print it, is |
| trade_routesB | Trade Route Overview: |
| establish_trade_routeA | Send a caravan/cargo ship to establish a trade route. Either pass dest_x/dest_y/trade_type from
available_trade_routes(unit_id), or just |
| plunder_trade_routeB | Order a military unit standing on an enemy trade route to plunder it. |
| spiesA | My spies: agent_id, name, rank, state, where stationed, and can_stage_coup. In a city-state the
row carries the coup button's hover: |
| available_spy_citiesA | Cities a given spy (agent_id, from spies()) could be sent to right now -- my own cities (counter-intel)
and others' (steal tech / set up a future coup). Feeds move_spy. |
| move_spyB | Assign/relocate a spy (see available_spy_cities). Recall home instead with target_player_id=-1, target_city_id=-1. as_diplomat only applies when the target is another major civ's capital at peace. |
| stage_coupB | Attempt a coup against a city-state's current ally with a spy that has established surveillance
there (spies()'s can_stage_coup). Returns the |
| league_statusA | Read-only: World Congress state -- resolutions I can propose (between sessions) or vote on (during a
session), each with the tooltip the League Overview shows ( |
| league_propose_enactA | Propose enacting a World Congress resolution, e.g. RESOLUTION_SCIENCES_FUNDING (see league_status()
for what's currently proposable and any required |
| league_propose_repealA | Propose repealing an active World Congress resolution (see league_status()'s proposable_repeal). |
| league_cast_votesA | Vote on this session's World Congress proposals (see league_status()'s votable while in_session).
votes: [{"resolution_id": id, "direction": "enact"|"repeal", "num_votes": n, "choice": id (optional)}].
For a plain yes/no proposal (every repeal; enacts with no |
| load_saveA | Load a save from the main menu by its bare name, no path or .Civ5Save extension (e.g. "QuickSave",
or "Sejong_0180 AD-1200" for a manual save). Only works from a fresh main-menu state, not mid-game:
exit_to_main_menu first. The answer carries |
| load_latestA | Crash-recovery: load whichever save (quicksave OR autosave) has the newest filesystem mtime,
regardless of name. Prefer this over load_save("QuickSave") when resuming after a crash -- an
autosave made during play can be newer than the last explicit quicksave, and load_save only checks
quick/manual saves before ever considering autosaves. Only works from a fresh main-menu state:
exit_to_main_menu first. The answer carries |
| exit_to_main_menuA | Leave the loaded game for the main menu, so load_save / load_latest can open another save. Quick-saves first when it is my turn in a solo game (save=false skips that); in a game with other people ask the human before leaving, as it ends the game for them too. Waits until the main menu is on screen. Usable while it is not my turn. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| play_turn | Play one turn of Civilization V through the civ5 tools. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| reference | The rule book: what every unit, building, tech, policy, promotion, belief, resource, terrain, improvement and unit action does, from this game's database. Markdown. |
| playbook | How to play through this harness: the turn loop, the blocker table, verification habits. |
TDQS
Scored across 144 tools
Many tools have distinct, well-documented purposes, but the set contains numerous overlapping read tools for map state (known_world, map_window, revealed_map, map_index, tactical_view, explore_frontier) and status (turn_status, briefing, overview, turn_digest). An agent must carefully read descriptions to choose the right one, and some choices (e.g., available_unit_actions vs todo_actions vs units vs unit_mission_targets) could be confused.
Names are uniformly snake_case with predictable prefixes: read-only tools are nouns (units, cities, overview), actions are verbs (move_unit, set_production, choose_policy), option lists use available_* or *_options, and choosers use choose_*. A few generic names like do and noun-only reads deviate slightly from a strict verb_noun pattern, but the overall convention is clear and consistent.
144 tools is far beyond the 3–15 range considered well-scoped, and the rubric explicitly flags 50+ as an extreme mismatch. Even for a complex game like Civilization V, this volume imposes a heavy selection burden on the agent and suggests many niche or overlapping tools could be consolidated.
The surface covers nearly every game subsystem: units, combat, cities, production, research, policies, religion, espionage, diplomacy, trade, map reading, save/load, notebook, and conditional orders. There are no obvious gaps in CRUD or lifecycle coverage for the domain, and dead ends are explicitly handled with blocker-clearing tools.