Skip to content

Manager Intervention Controls #34

@mathaix

Description

@mathaix

User Story

As a manager
I want to intervene in live interviews when needed
So that I can guide conversations and ensure quality

Acceptance Criteria

Intervention Types

1. Redirect Topic

  • Manager types guidance: "Ask about data migration concerns"
  • Agent receives context injection
  • Agent naturally steers conversation to requested topic
  • Intervention invisible to interviewee (appears as natural flow)

2. Add Context

  • Manager adds background information
  • Example: "This person worked on the legacy CRM project"
  • Agent has access to context for better questions
  • Context logged in interview metadata

3. Pause Interview

  • Manager can temporarily pause
  • Interviewee sees "Please wait..." message
  • Manager reviews transcript or consults
  • Resume when ready

4. Force End

  • Manager can end interview early
  • Requires confirmation
  • Agent performs graceful wrap-up
  • Interview marked as "ended_by_manager"

5. Flag for Follow-up

  • Non-disruptive flag for later review
  • Add notes about what needs follow-up
  • Flagged interviews highlighted in dashboard

Intervention UI

  • Intervention panel in transcript viewer
  • Text input for redirect/context
  • Action buttons: Pause, Resume, End, Flag
  • Confirmation dialogs for destructive actions
  • Intervention history visible in timeline

State Management

  • Use AG-UI StateDeltaEvent to inject interventions
  • Interview state includes manager_interventions array
  • Agent receives interventions via state updates
  • Interventions logged for audit

Permissions

  • Only project owner and assigned managers can intervene
  • Intervention actions logged with user ID
  • Read-only observers cannot intervene

Notification to Agent

  • Agent system prompt includes handling manager guidance
  • Agent acknowledges redirects naturally
  • Agent uses added context without exposing source

Technical Notes

# AG-UI intervention event
intervention = StateDeltaEvent(
    type=EventType.STATE_DELTA,
    delta=[{
        "op": "add",
        "path": "/manager_interventions/-",
        "value": {
            "type": "redirect_topic",
            "content": "Ask about data migration",
            "timestamp": datetime.now(),
            "manager_id": current_user.id
        }
    }]
)

Agent receives intervention in state and adjusts behavior accordingly.

Definition of Done

  • All intervention types implemented
  • UI controls working
  • State injection working
  • Agent responds to interventions
  • Audit logging complete
  • Code reviewed and merged

Requirement ID

LM-04, LM-05, LM-06


🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions