Skip to content

acunningham-ship-it/trustlayer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TrustLayer AI

Trust scores for every AI response. Local-first. Model-agnostic.

PyPI Python License Stars


TrustLayer sits between your app and any LLM. It verifies outputs, catches hallucinations, tracks token costs, and gives every response a trust score -- all running locally on your machine.

Works with Ollama, Claude, GPT, Gemini out of the box.

Features

  • Trust Scoring -- confidence ratings on every AI response, so you know what to double-check
  • Hallucination Detection -- flags claims that contradict your source docs or prior context
  • Cost Tracking -- per-request and cumulative token spend across all providers
  • Local Proxy -- routes requests through a local server; your data never hits a third-party logging service
  • Multi-Model Support -- swap between Ollama, OpenAI, Anthropic, and Google models with one config change
  • Dashboard -- browser-based UI to inspect responses, trust history, and cost breakdowns

Install

pip install trustlayer-ai

Quick Start

from trustlayer import TrustLayer

tl = TrustLayer()

result = tl.verify(
    prompt="What is the capital of France?",
    model="ollama/llama3"
)

print(result.answer)        # "Paris"
print(result.trust_score)   # 0.97
print(result.cost_usd)      # 0.0 (local model)

Screenshots

Screenshots coming soon. Placeholders below.

Dashboard Trust History
Dashboard Trust History

Comparison

Feature TrustLayer Open WebUI LiteLLM PrivateGPT
Trust scoring per response Yes -- -- --
Hallucination detection Yes -- -- Partial
Cost tracking Yes -- Yes --
Local-first proxy Yes Yes Yes Yes
Multi-model routing Yes Yes Yes --
Python SDK Yes -- Yes --

Built For

  • Developers building AI features who need to know when the model is wrong
  • AI/ML teams tracking spend and reliability across providers
  • Self-hosters who want full control -- no cloud dependency, no telemetry

Contributing

Contributions welcome. Open an issue first for anything non-trivial.

git clone https://github.com/acunningham-ship-it/trustlayer.git
cd trustlayer
pip install -e ".[dev]"

License

MIT

About

Universal trust layer for any AI. Trust scores, hallucination detection, cost tracking, and model comparison — works with Ollama, Claude, GPT, Gemini, anything.

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors