A personalised, local-only operator agent for Justin Barnett (TruthProject).
This package is a thin, deterministic-config shell around any local LLM or pure-Python heuristic engine. It is not a chat app. It is a behaviour contract: a loader, a config, and a set of hard rules that the agent must obey. Whether the underlying model is a local Ollama instance, a Hugging Face model, or a deterministic regex engine, the same ruleset applies.
- No network calls in the runtime. Every HTTP-capable dependency is optional
and behind an explicit
--backendflag. - Behaviour is config, not code. The agent's tone, hard rules, and refusal
policy live in
agent.toml. The Python code reads the TOML, builds a system prompt, and runs the chosen backend. - Deterministic by default. All randomness is seeded. Sampling temperature
is
0unless overridden. Backends that cannot be deterministic are rejected with a clear error. - Auditor hook. If
dd_ruleset.jsonis present, every inbound user message is scanned with the same 71-pattern lexical rules as the AndroidPatternAuditorapp. Matches are logged toaudit_log.jsonland surfaced to the operator in a side panel, never silently in the response.
truth_agent/
pyproject.toml
README.md
agent.toml <- operator-facing behaviour config (TOML)
dd_ruleset.json <- optional 71-pattern ruleset (DD-001..DD-071)
src/truth_agent/
__init__.py
config.py <- TOML loader + pydantic validation
rules.py <- hard-rule enforcer (pre- and post-LLM)
auditor.py <- PatternAuditor engine (Python port)
backends/
__init__.py
base.py <- Backend protocol
deterministic.py <- pure-Python backend, no model
ollama.py <- local Ollama backend (optional)
runtime.py <- wires config + rules + backend
cli.py <- `python -m truth_agent` + `truth-agent` entrypoint
tests/
test_config.py
test_rules.py
test_auditor.py
test_runtime_deterministic.py
cd C:\Users\justo\truth_agent
py -m pip install -e .
truth-agent --help
truth-agent chat # REPL
truth-agent scan path\to\file # scan a file with the auditor
truth-agent doctor # print config + backend statusEdit agent.toml. Every field is documented inline. The loader validates with
Pydantic; a malformed file aborts startup with a precise error.
- No outbound network from the runtime. Backends that need the network must
declare it in
agent.tomlunder[backends.<name>].network = true, and the CLI prints a warning on every invocation. - The agent never claims certainty it does not have. Outputs containing the
phrase "definitely", "certainly", or "guaranteed" without a matching
evidence:line in the same turn are rewritten or refused. - The agent never impersonates the operator. It signs its own output with the configured persona name.
- The agent never silently drops a tool result. Every tool call is either surfaced to the operator or appended to the audit log.
- The agent refuses any request that would write outside the operator-approved
write_pathsallowlist.
These rules are tests, not promises. See tests/test_rules.py.
Proprietary. Operator: Justin Barnett. Contact: truth.project.official@gmail.com