feature: webui, kobolcpp intergration memory, game module

This commit is contained in:
2026-04-30 02:43:23 -04:00
parent 9da4259df1
commit 00f1ac4bef
40 changed files with 5651 additions and 1 deletions
+39 -1
View File
@@ -1 +1,39 @@
asd
# LocalDiplomacy
LocalDiplomacy is a Bannerlord singleplayer mod experiment that keeps the AI roleplay and diplomacy loop outside the game process.
See [docs/LocalDiplomacy_PLAN.md](docs/LocalDiplomacy_PLAN.md) for the architecture.
## Agent Quick Start
From `src/LocalDiplomacy.Agent`:
```powershell
Copy-Item config.example.yaml config.yaml
# Put koboldcpp.exe and model.gguf in this directory.
uv sync --extra test
uv run uvicorn localdiplomacy_agent.app:app --host 127.0.0.1 --port 8766
```
The agent will launch `koboldcpp.exe --model .\model.gguf --port 5001 --contextsize 8192 --jinjatools` when `koboldcpp.autostart` is enabled.
## Mock Game Client
Use the mock connector to test the same commands the Bannerlord mod will send without launching the game:
```powershell
cd src\LocalDiplomacy.Agent
uv run python -m localdiplomacy_agent.mock_game --mock-agent say "Can we make peace with Battania?"
uv run python -m localdiplomacy_agent.mock_game --mock-agent tick --day 12.5
```
Drop `--mock-agent` to send the same requests to a running agent at `http://127.0.0.1:8766`.
## Bannerlord Build Notes
Install a .NET SDK that can target `net472`, then set `BANNERLORD_REFERENCES` to Bannerlord's `bin\Win64_Shipping_Client` directory before building:
```powershell
$env:BANNERLORD_REFERENCES="C:\Program Files (x86)\Steam\steamapps\common\Mount & Blade II Bannerlord\bin\Win64_Shipping_Client"
dotnet build src\LocalDiplomacy\LocalDiplomacy.csproj
```