A transparency engine for AI interactions.
Project description
InsightForge
AI without insight is blind ambition.
InsightForge is an open-source transparency engine for AI interactions. It wraps a model call or agent command, captures the prompt and execution context, scores the response for obvious risk signals, and renders a visual trace you can inspect instead of blindly trusting output.
This is not observability theater. It is the start of a forensic layer for AI:
- What did we ask?
- What came back?
- How confident should we be?
- Which parts look biased, weakly grounded, or potentially hallucinatory?
- What evidence would make this answer safer to trust?
Why this exists
The current AI stack optimizes for output volume and benchmark swagger. What it usually does not give you is the "why" layer:
- Developers cannot easily debug why an agent drifted off task.
- Teams cannot prove traceability during audits.
- Users are asked to trust answers without seeing grounding quality.
- Compliance pressure is increasing faster than transparency tooling.
InsightForge is the neutral inspector that sits around model interactions and makes them legible.
MVP Scope
This repository bootstraps the first local MVP:
insightforge wrap ...runs any shell command that represents an AI interaction.insightforge ask ...talks to supported providers directly.insightforge listshows indexed traces from the local registry.insightforge diff ...compares two traces and renders a visual report.insightforge schema-versionshows the current SQLite schema version.insightforge migrateupgrades local storage to the latest schema version.- Evaluates production policies such as minimum confidence, stderr failures, source requirements, and blocked absolute language.
- Redacts common secrets and emails before traces are persisted.
- Stores trace metadata and payloads in SQLite for durable retrieval.
- Captures prompt, stdout, stderr, exit status, and basic provenance hints.
- Applies heuristic checks for weak grounding and overgeneralized language.
- Emits both a machine-readable JSON trace and a polished HTML "insight map".
It is intentionally simple. The point is to prove the workflow before building provider adapters, policy packs, and team-grade compliance pipelines.
Quickstart
python3 -m venv .venv
source .venv/bin/activate
pip install -e .
cp .insightforge.toml.example .insightforge.toml
insightforge wrap claude "Explain why this migration failed" --cmd "python3 -c 'print(\"Maybe the issue is a missing foreign key\")'"
The command generates:
traces/latest.jsontraces/latest.html
Open the HTML file in a browser to inspect the visual trace.
Provider-native flow:
insightforge ask mock demo-model "Why did the recommendation change?" \
--system "Explain assumptions and mention missing evidence." \
--out traces/mock-provider
Supported providers today:
mockfor local demos and testsopenaiviaOPENAI_API_KEYanthropicviaANTHROPIC_API_KEY
The provider adapters use only the Python standard library so the project stays dependency-light.
CLI install options for other developers:
pipx install git+https://github.com/<your-org>/InsightForge.git
Or from a published package:
pipx install insightforge
That gives developers a global insightforge command without needing a project-local virtualenv.
Users are automatically notified in the CLI when PyPI has a newer InsightForge release. They can also check manually with:
insightforge version --check-updates
Comparison workflow:
insightforge list
insightforge diff trace_id_one trace_id_two --out traces/compare.html
Every captured trace is indexed in .insightforge/registry.json so you can compare runs by path or by trace id.
The primary production store is SQLite at .insightforge/traces.db, with the JSON registry kept as a convenience export.
Storage maintenance:
insightforge schema-version --expected
insightforge migrate
CI/CD automation:
.github/workflows/ci.ymlruns compile, tests, and package builds on every push and pull request..github/workflows/release.ymlruns onmain, re-tests the package, compares the local version to PyPI, and publishes only when the version is newer.- Users then see the update prompt in the CLI and can upgrade with
pipx upgrade insightforge.
Trusted Publishing setup:
- Push this repository to GitHub.
- In GitHub, keep Actions enabled for the repository.
- In PyPI, add a Trusted Publisher for this project with:
- Owner: your GitHub user or org
- Repository:
InsightForge - Workflow name:
release.yml - Environment name:
pypi
- In GitHub, no
PYPI_API_TOKENsecret is needed for publishing. - Bump the version in
pyproject.toml, merge/push tomain, and the release workflow will publish automatically if tests pass and the version is newer than PyPI.
If you want a dry run before real publishing, point the same workflow model at TestPyPI first and use a separate trusted publisher there.
Policy and redaction config:
cp .insightforge.toml.example .insightforge.toml
The checked-in defaults are intentionally strict for factual audit demos:
policy.min_confidence = 0.85policy.require_sources = truepolicy.fail_on_stderr = truepolicy.block_absolute_language = true
Other knobs:
policy.max_output_charsredaction.enabledstorage.sqlite_pathupdates.enabledupdates.check_interval_hours
Example
insightforge wrap local-llm "Review this answer for risk" \
--cmd "python3 -c 'print(\"This obviously always works\")'" \
--out traces/risky-demo
Expected outcome:
- Confidence score drops.
- The report flags overgeneralized language.
- The insight map shows prompt, execution, heuristic analysis, and captured output.
Product Direction
The wedge is developer trust. The moat is structured forensic data.
Short term:
- Wrap local CLIs and SDK calls.
- Add richer provider-specific adapters for OpenAI, Anthropic, and local models.
- Expand bias, hallucination, and provenance checks.
- Ship a VS Code extension and diff view for prompt iterations.
Long term:
- Team dashboards for audit review.
- Queryable trace stores.
- Policy enforcement before outputs reach end users.
- Explainability primitives for enterprise compliance.
90-Day Build Narrative
Weeks 1-2:
- Ship crude but usable.
- Publish the manifesto and demo.
- Capture raw traces and get developers trying it immediately.
Weeks 3-4:
- Talk to users who already complain about hallucinations and opacity.
- Turn every legitimate complaint into a fast release.
Weeks 5-8:
- Add richer visual maps and editor integrations.
- Make "gotcha" demos trivially shareable.
Weeks 9-12:
- Launch a hosted audit workflow for teams.
- Use real usage, not pitch decks, to pull in platform partners.
Current Constraints
This MVP does not capture hidden chain-of-thought or privileged model internals. It captures the observable trail around the interaction and turns that into a usable audit artifact. That distinction matters.
It also uses heuristic analysis for confidence and risk flags. Those signals are useful for audit triage, but they are not a claim of true model introspection.
If you want trustworthy AI systems, you need tooling that treats every answer as inspectable infrastructure.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file insightforge-0.1.0.tar.gz.
File metadata
- Download URL: insightforge-0.1.0.tar.gz
- Upload date:
- Size: 23.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e4854a7e0000241cc0307552d28322529c05ab31818935171fd24986e62eae28
|
|
| MD5 |
94526539cdd04329689d2d65bfaf3080
|
|
| BLAKE2b-256 |
9a90084b8a2918cce859e56e227f87ffd0a782605c63a76dd463746afae3ca89
|
Provenance
The following attestation bundles were made for insightforge-0.1.0.tar.gz:
Publisher:
release.yml on naveenrjr/InsightForge
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
insightforge-0.1.0.tar.gz -
Subject digest:
e4854a7e0000241cc0307552d28322529c05ab31818935171fd24986e62eae28 - Sigstore transparency entry: 1106450958
- Sigstore integration time:
-
Permalink:
naveenrjr/InsightForge@6105380bc45d71fe36b15a56f6efb96a03cb376a -
Branch / Tag:
refs/heads/main - Owner: https://github.com/naveenrjr
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6105380bc45d71fe36b15a56f6efb96a03cb376a -
Trigger Event:
push
-
Statement type:
File details
Details for the file insightforge-0.1.0-py3-none-any.whl.
File metadata
- Download URL: insightforge-0.1.0-py3-none-any.whl
- Upload date:
- Size: 23.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
30dbe5a7b066e860d447447d696a8395a218b9519638bd578908665f4b5565d8
|
|
| MD5 |
5c2009e37dc34c96e91c885569c9c878
|
|
| BLAKE2b-256 |
e4a31b9a946f47fb2cceaf6672ce63a43cf4da52b0097f2e9f7b6bc34f0fc381
|
Provenance
The following attestation bundles were made for insightforge-0.1.0-py3-none-any.whl:
Publisher:
release.yml on naveenrjr/InsightForge
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
insightforge-0.1.0-py3-none-any.whl -
Subject digest:
30dbe5a7b066e860d447447d696a8395a218b9519638bd578908665f4b5565d8 - Sigstore transparency entry: 1106450991
- Sigstore integration time:
-
Permalink:
naveenrjr/InsightForge@6105380bc45d71fe36b15a56f6efb96a03cb376a -
Branch / Tag:
refs/heads/main - Owner: https://github.com/naveenrjr
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6105380bc45d71fe36b15a56f6efb96a03cb376a -
Trigger Event:
push
-
Statement type: