4 Commits
Author SHA1 Message Date
KaifAhmad1andClaude Sonnet 4.6 f8ec5ac010 test: cover add_decision kwargs form and VectorStore inmemory backend
- test_add_decision_kwargs_form: verifies add_decision() accepts kwargs
  directly (category, scenario, reasoning, outcome, confidence) without
  requiring a Decision object
- test_add_decision_kwargs_and_object_both_return_id: verifies both call
  forms return a non-empty string ID
- test_agent_context_inmemory_store_and_retrieve: verifies AgentContext
  with VectorStore(backend="inmemory") stores memories without faiss-cpu

Closes #433

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-02 20:25:34 +05:30
KaifAhmad1andClaude Sonnet 4.6 01ba7d113b feat(context): add temporal awareness to ContextGraph and AgentContext
- Add valid_from/valid_until fields to Decision dataclass and record_decision()
- Add include_superseded and as_of filters to find_precedents_by_scenario()
- Add _decision_matches_temporal_filters() and _normalize_temporal_input() helpers
- Add ContextGraph.state_at(timestamp) for point-in-time graph snapshots
- Stamp recorded_at on causal relationship edges
- Add CausalChainAnalyzer.trace_at_time() for transaction-time causal chain tracing
- Add AgentContext.checkpoint(), diff_checkpoints(), flush_checkpoint() for named context snapshots
- 93 tests passing (33 context_graph, 36 causal_analyzer, 24 agent_context)

Closes #399

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 12:18:25 +05:30
KaifAhmad1 33c90d8277 Fix Context Graph features - resolve method conflicts and integration issues
- Fix method name conflicts: add_decision -> add_decision_simple, find_precedents -> find_precedents_by_scenario
- Fix Decision ID handling: align tests with Decision model UUID generation behavior
- Fix AgentContext integration: proper handling of context_graph backend in get_causal_chain
- Fix Policy engine: remove invalid auto_generate_id parameter from deserialization
- Fix node type consistency: handle lowercase 'decision' type across all methods
- Fix timestamp handling: proper conversion for string and datetime objects
- Update documentation: correct method names and Decision model usage in examples
- All 62 Context Graph tests passing successfully
- Production ready with comprehensive verification
2026-02-17 13:43:08 +05:30
KaifAhmad1 7ad48df600 feat: Add comprehensive context engineering with decision tracking, KG algorithms, and context graphs
- Add decision tracking system with DecisionRecorder, DecisionQuery, CausalChainAnalyzer, PolicyEngine
- Implement KG algorithm integration with centrality, community detection, embeddings, path finding
- Add vector store integration with hybrid search and custom similarity weights
- Enhance context graphs with advanced analytics and decision support
- Update documentation with comprehensive context module reference
- Add production examples for banking and healthcare use cases
- Update README to highlight context graph framework capabilities
- Add comprehensive test suite for all new features
2026-02-12 23:04:29 +05:30