Skip to content

feat: implement e2e HITL messaging with dapr and message gateway #5

Open
bsalsingh wants to merge 14 commits intomainfrom
004-hitl-context-streaming
Open

feat: implement e2e HITL messaging with dapr and message gateway #5
bsalsingh wants to merge 14 commits intomainfrom
004-hitl-context-streaming

Conversation

@bsalsingh
Copy link
Collaborator

PR: End-to-End HITL Messaging + Dapr Integration + Spec & Gateway Foundation

Description

This PR introduces a complete foundation for an agentic messaging system with Human-in-the-Loop (HITL) support, along with Dapr-based communication and formalized specifications.

Key Highlights

  • Message Gateway Module

    • Introduced a dedicated message gateway to handle routing and orchestration of messages across the system.
  • Dapr Integration

    • Added specs defining Dapr-based architecture.
    • Implemented pub/sub messaging using Dapr for decoupled communication.
  • End-to-End Messaging Flows

    • Implemented basic non-HITL flow for automated message processing.
    • Added full HITL-enabled messaging flow, enabling human intervention in the loop.
    • Fixed issues related to threaded replies to ensure correct message chaining.
  • Specification & Documentation

    • Created initial spec draft and iterated with review summaries.
    • Updated constitution and related specs for consistency.
    • Added plan.md to outline system direction.
    • Updated C1, C2, C3 chart documentation.

Motivation

This PR lays the groundwork for a scalable, event-driven agentic system by:

  • Enabling modular communication via Dapr
  • Supporting human-in-the-loop workflows
  • Establishing clear architectural specifications
  • Introducing a gateway abstraction for future extensibility

Dependencies

  • Dapr runtime (pub/sub component configured)
  • Redis (or configured pub/sub backend)
  • Node.js environment for gateway and agents

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

How Has This Been Tested?

Test Coverage

  • End-to-end non-HITL messaging flow
  • End-to-end HITL-enabled messaging flow
  • Dapr pub/sub message propagation
  • Thread reply handling validation

Test Instructions

  1. Start Dapr with pub/sub component configured
  2. Run message gateway service
  3. Trigger:
    • Non-HITL flow → verify automatic processing
    • HITL flow → verify pause, human input, and resume
  4. Validate message routing and thread continuity

Test Configuration:

  • SDK: Node.js
  • Toolchain: Dapr 1.17.x
  • OS / Environment: Local development (Docker/Kubernetes optional)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have added comments, especially in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix or feature works (integration-level tested)
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@bsalsingh bsalsingh requested a review from lkkande-BB March 27, 2026 07:55
@bsalsingh bsalsingh self-assigned this Mar 27, 2026
@bsalsingh bsalsingh added documentation Improvements or additions to documentation enhancement New feature or request labels Mar 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant