Skip to content

feat(chat/synapse): multi-turn memory (#129), hub-spoke delegation (#262), and agent cards (#272) - #290

Merged
sbharatjoshi merged 6 commits into
mainfrom
feature/129-reflector-summarizer-integration
Jul 15, 2026
Merged

feat(chat/synapse): multi-turn memory (#129), hub-spoke delegation (#262), and agent cards (#272)#290
sbharatjoshi merged 6 commits into
mainfrom
feature/129-reflector-summarizer-integration

Conversation

@sbharatjoshi

@sbharatjoshi sbharatjoshi commented Jul 15, 2026

Copy link
Copy Markdown
Member

This PR implements the ConversationReflector and ConversationSummarizer integration, resolving multi-turn chat history bugs, porting the companion prompt, resolving build flakiness in KeyedSynapticTagEncoderTest, implementing the multi-agent coordinator hub-spoke delegation, and exposing Agent Cards capability discovery manifests and REST endpoints.

Changes Included:

1. Multi-Turn Session Integration (#129)

  • Companion Prompt: Ported companion-system.txt prompt template from spector-enterprise to spector core repository (spector-synapse module resources).
  • Graph Multi-Turn Seeding: Updated AgenticChatGraph.java to support an overloaded chat method that accepts conversation history as a list of ChatMessage objects, prepending it to the state graph's messages channel.
  • ChatService Wiring: Updated ChatService.java to load session history (supporting both database loading and client-passed arrays), run compaction via ConversationSummarizer when exceeding the token budget, map history to LangChain4j message types, and execute the graph with the fully reconstructed history.
  • Test Hardening: Fixed a bug in the integration test in-memory mock InMemoryChatMemoryPort in ChatServiceLiveIT.java and DeepConversationLiveIT.java where excludeSessionId was ignored (which was masking bugs by leaking active session turns as cross-session semantic recalls).
  • Flaky Test Resolution: Resolved build flakiness in KeyedSynapticTagEncoderTest.differentKeysProduceDifferentFilters where two different keys could randomly collide in the 64-bit Bloom filter space for a single tag. It now asserts over multiple tags to ensure a 0% collision probability.

2. Multi-Agent Hub-Spoke Delegation (#262)

  • AgentSelector: Created capability-based agent selector component that matches sub-tasks to the best available child agent by matching keyword and capability heuristics.
  • AgentDelegationNode: Created node action that executes specialized child agents via AgenticChatGraph.chat inside the compiled plan subgraph.
  • State Channels: Upgraded both CognitiveState and CoordinatorState schemas with child_results appender channels.
  • Dynamic Compilation: Updated DynamicGraphBuilder to use the AgentSelector and wire AgentDelegationNode when compiling AGENT nodes in subgraphs.
  • Planner Priming: Modified PlannerNode and coordinator-planner-system.txt to automatically list and inject all available child agent metadata into the planner's context prompt.
  • Result Aggregation: Updated SubgraphExecutorNode to fetch child execution results from completed subgraphs and bubble them up to the coordinator state.
  • CoordinatorGraphTest: Added a comprehensive integration test verifying the entire planner-executor-evaluator lifecycle and child results propagation.

3. Agent Cards: JSON Capability Discovery Manifest (#272)

  • AgentCard: Created the capability discovery manifest record model.
  • REST Endpoints: Exposed GET /api/v1/agents/soul/card, GET /api/v1/agents/{id}/card, and POST /api/v1/agents/{id}/invoke in AgentController.
  • Well-Known Discovery: Created WellKnownController to expose the active default agent card at the standard A2A path GET /.well-known/agent.json.
  • AgentCardApiTest: Added integration test suite verifying the REST API mappings and JSON structure outputs.

Resolves #129
Resolves #262
Resolves #272

@sbharatjoshi sbharatjoshi changed the title feat(chat): integrate ConversationReflector and ConversationSummarizer (#129) feat(chat/synapse): multi-turn chat memory (#129) and hub-spoke delegation (#262) Jul 15, 2026
@sbharatjoshi sbharatjoshi changed the title feat(chat/synapse): multi-turn chat memory (#129) and hub-spoke delegation (#262) feat(chat/synapse): multi-turn memory (#129), hub-spoke delegation (#262), and agent cards (#272) Jul 15, 2026
@github-actions

github-actions Bot commented Jul 15, 2026

Copy link
Copy Markdown

All contributors have signed the CLA. ✅
Posted by the CLA Assistant Lite bot.

@sbharatjoshi

Copy link
Copy Markdown
Member Author

I have read the CLA Document and I hereby sign the CLA

@sbharatjoshi

Copy link
Copy Markdown
Member Author

recheck

@jarvispectrayan

Copy link
Copy Markdown
Member

I have read the CLA Document and I hereby sign the CLA

@jarvispectrayan

Copy link
Copy Markdown
Member

recheck

github-actions Bot added a commit that referenced this pull request Jul 15, 2026
@sbharatjoshi
sbharatjoshi force-pushed the feature/129-reflector-summarizer-integration branch from 93d30a8 to 783c725 Compare July 15, 2026 02:01
@sbharatjoshi
sbharatjoshi merged commit ebaba3e into main Jul 15, 2026
18 of 20 checks passed
@sbharatjoshi
sbharatjoshi deleted the feature/129-reflector-summarizer-integration branch July 15, 2026 02:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants