Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

truth-agent

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.

Design

  • No network calls in the runtime. Every HTTP-capable dependency is optional and behind an explicit --backend flag.
  • 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 0 unless overridden. Backends that cannot be deterministic are rejected with a clear error.
  • Auditor hook. If dd_ruleset.json is present, every inbound user message is scanned with the same 71-pattern lexical rules as the Android PatternAuditor app. Matches are logged to audit_log.jsonl and surfaced to the operator in a side panel, never silently in the response.

Layout

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

Quickstart

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 status

Config

Edit agent.toml. Every field is documented inline. The loader validates with Pydantic; a malformed file aborts startup with a precise error.

Non-negotiables (enforced in code)

  1. No outbound network from the runtime. Backends that need the network must declare it in agent.toml under [backends.<name>].network = true, and the CLI prints a warning on every invocation.
  2. 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.
  3. The agent never impersonates the operator. It signs its own output with the configured persona name.
  4. The agent never silently drops a tool result. Every tool call is either surfaced to the operator or appended to the audit log.
  5. The agent refuses any request that would write outside the operator-approved write_paths allowlist.

These rules are tests, not promises. See tests/test_rules.py.

License

Proprietary. Operator: Justin Barnett. Contact: truth.project.official@gmail.com

About

TRUTH AS A AI SERVICES HAHA

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages