Agent Zero
0803969d31
ci: enable truth engine on deployed server
...
Adds OPENBRAIN__TRUTH__ENABLED=true to the .env upsert list in the
deploy bootstrap step so the background truth scoring worker runs
automatically after every deployment.
2026-04-04 15:10:04 +00:00
Agent Zero
666727cdcf
fix(tests): use correct parameter name "claim" for evaluate tool
2026-04-04 14:43:34 +00:00
Agent Zero
834c2e0981
fix(tests): rewrite e2e_truth to use correct MCP transport
...
- Use /mcp/message endpoint instead of /sse
- Use X-API-Key header instead of Authorization: Bearer
- Use .json() response parsing instead of SSE line parsing
- Match proven patterns from e2e_mcp.rs helpers
- Reduce from 552 to 391 lines while maintaining all 8 tests
2026-04-04 13:42:41 +00:00
Agent Zero
72912f1f2f
ci: add unit tests and e2e_truth to CI pipeline
...
- Run cargo test --lib in CI checks to execute PLN/ECAN/scorer unit tests
- Add e2e_truth test suite to VPS e2e test step
- Enable OPENBRAIN__TRUTH__ENABLED for e2e testing
2026-04-04 13:29:15 +00:00
07e7d51708
Merge pull request 'docs: add Truth Engine documentation ( #41 )' ( #53 ) from feature/truth-docs into main
...
Merge Truth Engine documentation and GPLv3 license (#41 )
2026-04-04 13:09:05 +00:00
140c651ed9
Merge pull request 'test: add E2E truth engine test suite ( #40 )' ( #52 ) from feature/truth-e2e-tests into main
...
Merge E2E truth engine test suite (#40 )
2026-04-04 13:08:58 +00:00
Agent Zero
af46cc4ae0
license: change from MIT to GPLv3
2026-04-04 12:42:52 +00:00
Agent Zero
7bec205366
test: add E2E truth engine test suite ( #40 )
2026-04-04 12:40:31 +00:00
Agent Zero
5bd80ffcfe
docs: add Truth Engine documentation ( #41 )
2026-04-04 12:36:38 +00:00
4f57eaf952
Merge pull request 'feat(tools): add truth_status MCP tool ( #38 )' ( #51 ) from feature/truth-status-tool into main
...
Merge truth_status MCP tool (#38 )
2026-04-04 10:03:26 +00:00
Agent Zero
770828f7e9
merge: resolve conflict with evaluate tool in mod.rs
2026-04-04 10:03:18 +00:00
02a9d74be9
Merge pull request 'feat(tools): add evaluate MCP tool ( #37 )' ( #50 ) from feature/truth-evaluate-tool into main
...
Merge evaluate MCP tool (#37 )
2026-04-04 10:02:27 +00:00
d826e2310a
Merge pull request 'feat(truth): add background truth scoring worker ( #36 )' ( #49 ) from feature/truth-worker into main
...
Merge background truth scoring worker (#36 )
2026-04-04 10:02:22 +00:00
Agent Zero
e181dad8c7
fix: add missing warn import, cast f64 similarity to f32
2026-04-04 09:47:10 +00:00
Agent Zero
8d0f944513
feat(truth): add background truth scoring worker ( #36 )
2026-04-04 04:07:58 +00:00
Agent Zero
40d5ab2595
feat(tools): add truth_status MCP tool ( #38 )
2026-04-04 04:07:28 +00:00
Agent Zero
38a621da55
feat(tools): add evaluate MCP tool ( #37 )
2026-04-04 04:05:11 +00:00
50d0a944b5
Merge pull request 'feat(truth): add scoring pipeline module ( #34 )' ( #48 ) from feature/truth-scorer into main
...
Merge truth scoring pipeline module (#34 )
2026-04-04 03:57:59 +00:00
075d06a2ec
Merge pull request 'feat(query): surface truth scoring fields in query responses ( #39 )' ( #47 ) from feature/truth-query into main
...
Merge enhanced query responses with truth fields (#39 )
2026-04-04 03:57:52 +00:00
f0bbe99ebf
Merge pull request 'feat(db): add truth scoring database helpers ( #35 )' ( #46 ) from feature/truth-db-helpers into main
...
Merge truth scoring database helpers (#35 )
2026-04-04 03:57:46 +00:00
Agent Zero
a7a070024a
feat(truth): add scoring pipeline module ( #34 )
...
Implement truth scoring orchestrator that ties PLN + ECAN together:
New types:
- TruthCategory: verified/plausible/unverified/contradicted enum
- ScorerConfig: pipeline configuration (thresholds, ECAN params)
- RelatedMemory: cross-reference result with similarity + existing scores
- ScoringResult: complete scoring output with TV, confidence, category, ECAN
Core functions:
- score_memory(): orchestrates evidence classification, PLN scoring,
ECAN computation, and categorization
- is_contradiction(): heuristic negation-asymmetry detection
- categorize(): rule-based category assignment
Scoring pipeline:
1. Classify related memories as confirmations or contradictions
2. Scale confidence by cosine similarity (closer = stronger evidence)
3. Apply PLN score_with_evidence for truth value computation
4. Run ECAN cycle (re-score) or initialize (first score)
5. Categorize based on TV, confirmations, and contradictions
13 unit tests covering all scoring paths, categories, contradiction
detection, ECAN initialization/cycling, and output bounds.
Part of #29
2026-04-04 03:15:17 +00:00
Agent Zero
6c280849c0
feat(query): surface truth scoring fields in query responses ( #39 )
2026-04-04 03:13:11 +00:00
Agent Zero
04f4809b7c
feat(db): add truth scoring database helpers ( #35 )
...
New structs:
- TruthScoreUpdate: parameters for updating truth scores
- TruthStats: aggregated truth scoring statistics
- ScoringCandidate: lightweight record for the scoring worker
New Database methods:
- get_unscored_memories(): fetch unscored memories FIFO
- get_stale_memories(): fetch memories due for re-evaluation
- update_truth_score(): update single memory truth fields
- batch_update_truth_scores(): transactional batch update
- get_truth_stats(): aggregate stats with category breakdown
Uses partial index idx_memories_truth_unevaluated for efficient
unscored memory queries.
Part of #29
2026-04-04 03:11:38 +00:00
2fe656a63f
Merge pull request 'feat(truth): add ECAN attention economy module ( #33 )' ( #44 ) from feature/truth-ecan into main
...
Merge ECAN attention economy module (#33 )
2026-04-04 03:09:59 +00:00
Agent Zero
b6ce2fdeda
merge: resolve conflict with main — combine PLN and ECAN in truth/mod.rs
2026-04-04 03:09:48 +00:00
cdbc8529a2
Merge pull request 'feat(truth): add PLN deduction engine ( #32 )' ( #45 ) from feature/truth-pln into main
...
Merge PLN deduction engine (#32 )
2026-04-04 03:09:04 +00:00
f0235d8e6e
Merge pull request 'feat(db): add truth scoring columns migration ( #31 )' ( #43 ) from feature/truth-migration into main
...
Merge truth scoring columns migration (#31 )
2026-04-04 03:08:58 +00:00
4f4d860f41
Merge pull request 'feat(config): add TruthConfig for truth scoring engine ( #30 )' ( #42 ) from feature/truth-config into main
...
Merge TruthConfig foundation (#30 )
2026-04-04 03:08:52 +00:00
Agent Zero
3f11f8f531
fix(config): close missing brace in Default impl for Config
2026-04-04 02:29:51 +00:00
Agent Zero
1672d5a145
feat(truth): add PLN deduction engine ( #32 )
...
Implement Probabilistic Logic Networks (PLN) inference rules:
- TruthValue struct with clamped strength/confidence
- deduction(): chain two implications A->B and B->C
- revision(): merge two independent truth estimates
- negation(): logical NOT (inverts strength, preserves confidence)
- conjunction(): logical AND (multiply strength, min confidence)
- score_with_evidence(): combine base score with confirmations and contradictions
10 unit tests covering basic operations, boundary cases,
symmetry, zero-confidence handling, and output bounds.
Part of #29
2026-04-04 02:14:01 +00:00
Agent Zero
5e746e4425
feat(truth): add ECAN attention economy module ( #33 )
...
Implement Economic Attention Network (ECAN) for memory importance management:
- EcanParams: decay_rate, beta, spread_factor, threshold
- decay_sti(): STI decay toward zero over time
- update_lti(): LTI accumulation weighted by STI, penalized below threshold
- spread(): boost STI for confirmed memories
- cycle(): full decay + LTI update weighted by truth value
- initialize(): compute initial STI/LTI from truth value and confidence
14 unit tests covering decay convergence, LTI growth/penalty,
spread clamping, cycle behavior, initialization, and bounds.
Part of #29
2026-04-04 02:12:47 +00:00
Agent Zero
5f9d884187
feat(db): add truth scoring columns migration ( #31 )
...
Add V5__truth_scoring.sql migration:
- truth_value (REAL): 0.0-1.0 truth score from PLN reasoning
- truth_confidence (REAL): 0.0-1.0 confidence in the score
- truth_category (TEXT): verified/plausible/unverified/contradicted
- truth_evaluated_at (TIMESTAMPTZ): when last scored
- ecan_sti (REAL): Short-Term Importance (recency-weighted)
- ecan_lti (REAL): Long-Term Importance (reliability)
Partial indexes for efficient unscored memory queries.
Update MemoryRecord struct with optional truth fields.
Part of #29
2026-04-04 02:10:15 +00:00
Agent Zero
38b1150838
feat(config): add TruthConfig for truth scoring engine ( #30 )
...
Add TruthConfig struct to config.rs with all truth engine parameters:
- enabled, scoring_interval_seconds, batch_size, rescore_after_seconds
- pln_base_confidence, ecan_decay_rate, ecan_spread_factor
- contradiction_threshold, verification_threshold, cross_ref_limit
All settings configurable via OPENBRAIN__TRUTH__* env vars with sensible defaults.
Update .env.example with full documentation of new variables.
Update Config::load() builder and Default impl.
Part of #29
2026-04-04 02:05:36 +00:00
b19f65dc0b
Merge pull request 'Scope memories by API token and add shared-token e2e coverage' ( #28 ) from codex/shared-token-memory into main
...
Reviewed-on: Ingwaz/openbrain-mcp#28
2026-04-02 04:01:39 +00:00
Agent Zero
026ae27366
Scope memories by API token and add shared-token e2e coverage
2026-04-01 23:30:58 -04:00
98baa27c90
docs: add Agent Identity & Source Tagging section to README
...
- Add source_agent directive to developer prompt code block
- Add full Agent Identity & Source Tagging section with setup guide
- Add source tagging rules, example payload, and multi-agent scenarios
2026-03-28 02:36:05 +00:00
cb28b99343
docs: fix AGENTS.md - replace broken include placeholder with actual content
...
- Add Agent Identity & Source Tagging section
- Define source_agent metadata requirement for fact traceability
- Add setup guide for agent identity via promptinclude files
- Add source tagging rules and example metadata payload
- Add multi-agent scenario guidance table
2026-03-28 02:30:19 +00:00
784aa2653f
docs: add Agent Identity & Source Tagging section to AGENTS.md
...
- Define source_agent metadata requirement for fact traceability
- Add setup guide for agent identity via promptinclude files
- Add source tagging rules and example metadata payload
- Add multi-agent scenario guidance table
2026-03-28 02:26:52 +00:00
Agent Zero
35e23c0af6
Anonymize README deployment details
2026-03-24 11:52:45 +00:00
88404e0f0f
Merge pull request 'Fix dedup threshold postgres type' ( #27 ) from codex/issue-14-dedup-ingest into main
...
Reviewed-on: Ingwaz/openbrain-mcp#27
2026-03-24 06:11:51 +00:00
Agent Zero
1d485ca5c9
Fix dedup threshold postgres type
2026-03-24 06:07:06 +00:00
60d45fea84
Merge pull request 'Add server-side deduplication on ingest' ( #26 ) from codex/issue-14-dedup-ingest into main
...
Reviewed-on: Ingwaz/openbrain-mcp#26
2026-03-24 05:55:41 +00:00
Agent Zero
9be138db94
Fix dedup database client trait import
2026-03-24 05:45:07 +00:00
Agent Zero
61d6448b44
Add server-side deduplication on ingest
2026-03-24 05:40:30 +00:00
8d003be33d
Merge pull request 'Add TTL expiry for transient facts' ( #25 ) from codex/issue-16-ttl-expiry into main
...
Reviewed-on: Ingwaz/openbrain-mcp#25
2026-03-24 03:29:16 +00:00
Agent Zero
5d5c042dd1
Add TTL expiry for transient facts
2026-03-24 03:20:10 +00:00
7a75e88eb0
Merge pull request 'Fix hybrid query float4 parameter bindings' ( #24 ) from codex/fix-query-float4-bindings into main
...
Reviewed-on: Ingwaz/openbrain-mcp#24
2026-03-24 02:24:02 +00:00
Agent Zero
1314015479
Fix hybrid query parameter types
2026-03-24 02:12:41 +00:00
4d6458f2d3
Merge pull request 'Use ephemeral API key for VPS e2e tests' ( #23 ) from codex/issue-e2e-vps into main
...
Reviewed-on: Ingwaz/openbrain-mcp#23
2026-03-24 01:18:48 +00:00
Agent Zero
1b4fc85ff2
Use ephemeral API key for VPS e2e tests
2026-03-23 23:54:53 +00:00