The Living Agent
Autonomous Chess-Grid research engine powered by a local LLM (KoboldCPP + Qwen).
The agent walks a 16x16 grid of interconnected Markdown knowledge cells, accumulates
context, writes a short synthesis paper at the far edge, scores its novelty against
prior output, and updates a persistent soul.md identity file. One cycle in, one
cycle out, forever.
Prerequisites
The agent does not ship a model. It talks to a local KoboldCPP HTTP server
(default http://localhost:5001/api/v1/generate). You must bring your own runtime
and weights:
- KoboldCPP — download the latest release from LostRuins/koboldcpp.
- A GGUF model. The project was developed against
unsloth/Qwen3.5-9B-GGUF(theUD-Q3_K_XLquant, ~5 GB). Any Kobold-compatible GGUF with a decent context window will work.
Launch KoboldCPP, load the model, expose it on port 5001.
Install
pip install living-agent
Or from source:
git clone https://github.com/Agnuxo1/The-Living-Agent
cd The-Living-Agent
pip install -e ".[dev]"
Quickstart (3 commands)
living-agent init --grid-dir . # generates knowledge/grid + knowledge/grid_index.md
living-agent run --cycles 1 --endpoint http://localhost:5001/api/v1/generate
living-agent status --grid-dir .
run reads soul.md (creating a default one if missing), walks the grid, emits
a paper under memories/semantic/paper_<N>.md, appends an episodic record under
memories/episodic/cycle_<N>.md, and atomically updates soul.md.
How the Chess-Grid works
- 256 cells, each a Markdown file
cell_R<row>_C<col>.md. - 8 directions per cell (N, NE, E, SE, S, SW, W, NW); edges and corners get fewer links.
- Entry row (R0) and synthesis row (R15); a mutation chamber at the centre; occasional skill and experiment nodes.
- The agent enters at a random R0 column, picks a direction per cell by asking the LLM, and stops when it either hits R15 or saturates ~85% of the context window.
- Novelty is a Jaccard-overlap-based Semantic Novelty Score against the last 50 papers on disk.
Python API
from living_agent import LivingAgent, KoboldClient, generate_grid
generate_grid("knowledge", rows=16, cols=16, seed=0)
agent = LivingAgent(base_dir=".", client=KoboldClient("http://localhost:5001/api/v1/generate"))
result = agent.run_cycle()
print(result["cycle"], result["sns"], result["paper_bytes"])
Honest limitations
- Paper output is short. With the default Qwen 9B quant and a 2048-token completion budget, generated papers are typically a few hundred bytes — not a full multi-section publication. No post-processing is applied to inflate them.
- Context window is bounded by the server. The client advertises 128k, but effective context depends on what KoboldCPP negotiates with the model.
- Synchronous only. One cycle at a time; no asyncio, no batching, no multi-agent orchestration.
- No automatic model download. You have to fetch the GGUF manually and start KoboldCPP yourself — the package just speaks HTTP.
- No network in tests. The test suite mocks KoboldCPP with an in-process
http.server; running the real agent still requires a live endpoint.
Development
pip install -e ".[dev]"
pytest # 23 tests
python -m build # wheel + sdist into dist/
Layout:
src/living_agent/
__init__.py # version, re-exports
grid.py # 16x16 grid generator, cell topology
llm_client.py # KoboldCPP HTTP client
agent.py # reasoning loop, soul.md state, SNS scoring
cli.py # `living-agent {init,run,status}`
tests/
test_grid.py # 10 tests
test_agent.py # 8 tests (in-process fake HTTP server)
test_cli.py # 5 tests
License & credits
Apache-2.0. Created by Francisco Angulo de Lafuente as the Silicon Layer of P2PCLAW. Inspired by Karpathy's autoresearch.
Metadata
Release files for living-agent 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| living_agent-1.0.0.tar.gz | 21.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| living_agent-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 39.4 kB
Release files / living_agent-1.0.0.tar.gz
| Download URL | living_agent-1.0.0.tar.gz |
|---|---|
| Size | 21.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
19ba7eed89143f41aee651a1e9fd1677cbc0154956c7c339da1d04beceeb64b0
|
|
BLAKE2b-256 checksum How to use checksums |
0e305a0038ea6c92383249d7fbe56e1f8decac5d48d35ca2399f22ed16e3fabc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Release files / living_agent-1.0.0-py3-none-any.whl
| Download URL | living_agent-1.0.0-py3-none-any.whl |
|---|---|
| Size | 17.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5f04d6a0b6beacf1bc513a7486026625860c66747cd0e603d9d095d9c9a1caba
|
|
BLAKE2b-256 checksum How to use checksums |
7ac6cc509345aa91189f7fdebe66f5fae28a4b62d3ee18ad81d2295a8868493e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Security for living-agent 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.