Contract validation
Schema/type checks for tool inputs and outputs.
Planning & system architecture document
ToolTruth introduces a verification boundary between an AI agent and external tools. Its purpose is to detect contradictions, stale values, invalid transitions, and other illegal states before a tool result is trusted by the agent.
| User | Function | Expected outcome |
|---|---|---|
| AI agent | Submit tool call + context | Receive verified / blocked result |
| Developer | Define tool schemas and constraints | Consistent validation rules |
| Project admin | Upload and publish deliverables | Auditable version history |
| Evaluator / reviewer | Browse project evidence | Clear, stable project trail |
Schema/type checks for tool inputs and outputs.
Detect stale, contradictory or illegal-state transitions.
Versioned metadata in PostgreSQL and files in S3.
The static frontend can operate in demo mode without the backend. When deployed, API_BASE_URL points to the FastAPI service.
Static first load should remain lightweight. API responses should be JSON and cacheable where appropriate.
JWT admin authentication, bcrypt password hashes, CORS allow-list, S3 private objects and short-lived pre-signed URLs.
Immutable published history, health endpoint, systemd restart policy and explicit error states.
Responsive public site, accessible navigation, clear upload states and useful feedback.
Separated routers, models, schemas, storage, frontend API client and design tokens.
Structured application logs and upload/publish records provide an audit trail.
| Risk | Impact | Mitigation |
|---|---|---|
| S3 credentials misconfigured | High | Use IAM role / least privilege and environment validation. |
| Stale tool data | High | Attach freshness constraints and reject expired facts. |
| JWT exposure | High | HTTPS, short expiry, sessionStorage and no secrets in frontend. |
| API unavailable | Medium | Public frontend falls back to static/demo data. |
| Version overwritten | Medium | Append-only publish records; never delete previous versions. |