Skip to content

feat: Route human-in-the-loop approval requests and responses #16

Description

@rdwj

Summary

Handle the routing for approval workflows — forward approval-needed notifications to the UI and route approve/deny/modify responses back to the agent's resume endpoint.

Requirements

  • Route POST /v1/sessions/{id}/resume to agent backend
  • Forward approval-request events from agent to connected UI clients
  • WebSocket support for real-time approval notifications (or SSE fallback)
  • Handle approval timeout at gateway level (configurable)

FIPS Considerations

No additional concerns — standard HTTPS/WSS routing. WSS uses system TLS.

Implementation Notes

The gateway acts as a relay for HITL events. When the agent emits an approval-request event (via SSE stream or webhook), the gateway forwards it to the appropriate UI client connection. The gateway should maintain a mapping of session IDs to active WebSocket/SSE connections for routing. Gateway-level timeout ensures stale approval requests don't block the agent indefinitely — if no response arrives within the configured window, the gateway sends a timeout signal to the agent's resume endpoint.

Companion Issues

Companion issues filed on fips-agents/agent-template, fips-agents/ui-template, fips-agents/fips-agents-cli, and fips-agents/examples.

Size

M

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions