Class: HumanInteractionManager
Defined in: packages/agentos/src/core/hitl/HumanInteractionManager.ts:78
Implementation of the Human-in-the-Loop Manager.
Features:
- Approval requests with severity levels
- Clarification requests with options
- Output review and editing
- Escalation handling
- Workflow checkpoints
- Feedback collection for learning
Implements
Implements
Constructors
Constructor
new HumanInteractionManager(
config?):HumanInteractionManager
Defined in: packages/agentos/src/core/hitl/HumanInteractionManager.ts:124
Creates a new HumanInteractionManager instance.
Parameters
config?
HumanInteractionManagerConfig = {}
Configuration options
Returns
HumanInteractionManager
Methods
cancelRequest()
cancelRequest(
requestId,reason):Promise<void>
Defined in: packages/agentos/src/core/hitl/HumanInteractionManager.ts:556
Cancels a pending request.
Parameters
requestId
string
reason
string
Returns
Promise<void>
Implementation of
IHumanInteractionManager.cancelRequest
checkpoint()
checkpoint(
checkpoint):Promise<CheckpointDecision>
Defined in: packages/agentos/src/core/hitl/HumanInteractionManager.ts:435
Creates a checkpoint for human review.
Parameters
checkpoint
Returns
Promise<CheckpointDecision>
Implementation of
IHumanInteractionManager.checkpoint
escalate()
escalate(
context):Promise<EscalationDecision>
Defined in: packages/agentos/src/core/hitl/HumanInteractionManager.ts:373
Escalates a situation to human control.
Parameters
context
Returns
Promise<EscalationDecision>
Implementation of
IHumanInteractionManager.escalate
getFeedbackHistory()
getFeedbackHistory(
agentId,options?):Promise<HumanFeedback[]>
Defined in: packages/agentos/src/core/hitl/HumanInteractionManager.ts:505
Gets feedback history for an agent.
Parameters
agentId
string
options?
limit?
number
since?
Date
type?
"preference" | "correction" | "praise" | "guidance" | "complaint"
Returns
Promise<HumanFeedback[]>
Implementation of
IHumanInteractionManager.getFeedbackHistory
getPendingRequests()
getPendingRequests():
Promise<{approvals:PendingAction[];checkpoints:WorkflowCheckpoint[];clarifications:ClarificationRequest[];edits:DraftOutput[];escalations:EscalationContext[]; }>
Defined in: packages/agentos/src/core/hitl/HumanInteractionManager.ts:537
Gets all pending requests awaiting human response.
Returns
Promise<{ approvals: PendingAction[]; checkpoints: WorkflowCheckpoint[]; clarifications: ClarificationRequest[]; edits: DraftOutput[]; escalations: EscalationContext[]; }>
Implementation of
IHumanInteractionManager.getPendingRequests
getStatistics()
getStatistics():
HITLStatistics
Defined in: packages/agentos/src/core/hitl/HumanInteractionManager.ts:602
Gets HITL interaction statistics.
Returns
Implementation of
IHumanInteractionManager.getStatistics
recordFeedback()
recordFeedback(
feedback):Promise<void>
Defined in: packages/agentos/src/core/hitl/HumanInteractionManager.ts:487
Records human feedback for agent improvement.
Parameters
feedback
Returns
Promise<void>
Implementation of
IHumanInteractionManager.recordFeedback
requestApproval()
requestApproval(
action):Promise<ApprovalDecision>
Defined in: packages/agentos/src/core/hitl/HumanInteractionManager.ts:141
Requests human approval before executing an action.
Parameters
action
Returns
Promise<ApprovalDecision>
Implementation of
IHumanInteractionManager.requestApproval
requestClarification()
requestClarification(
request):Promise<ClarificationResponse>
Defined in: packages/agentos/src/core/hitl/HumanInteractionManager.ts:232
Requests clarification from a human.
Parameters
request
Returns
Promise<ClarificationResponse>
Implementation of
IHumanInteractionManager.requestClarification
requestEdit()
requestEdit(
draft):Promise<EditedOutput>
Defined in: packages/agentos/src/core/hitl/HumanInteractionManager.ts:298
Requests human review and potential editing of agent output.
Parameters
draft
Returns
Promise<EditedOutput>
Implementation of
IHumanInteractionManager.requestEdit
setNotificationHandler()
setNotificationHandler(
handler):void
Defined in: packages/agentos/src/core/hitl/HumanInteractionManager.ts:609
Sets the notification handler.
Parameters
handler
Returns
void
Implementation of
IHumanInteractionManager.setNotificationHandler
submitApprovalDecision()
submitApprovalDecision(
decision):Promise<void>
Defined in: packages/agentos/src/core/hitl/HumanInteractionManager.ts:196
Submits an approval decision.
Parameters
decision
Returns
Promise<void>
Implementation of
IHumanInteractionManager.submitApprovalDecision
submitCheckpointDecision()
submitCheckpointDecision(
decision):Promise<void>
Defined in: packages/agentos/src/core/hitl/HumanInteractionManager.ts:466
Submits a checkpoint decision.
Parameters
decision
Returns
Promise<void>
Implementation of
IHumanInteractionManager.submitCheckpointDecision
submitClarification()
submitClarification(
response):Promise<void>
Defined in: packages/agentos/src/core/hitl/HumanInteractionManager.ts:273
Submits a clarification response.
Parameters
response
Returns
Promise<void>
Implementation of
IHumanInteractionManager.submitClarification
submitEdit()
submitEdit(
edited):Promise<void>
Defined in: packages/agentos/src/core/hitl/HumanInteractionManager.ts:348
Submits an edited output.
Parameters
edited
Returns
Promise<void>
Implementation of
IHumanInteractionManager.submitEdit
submitEscalationDecision()
submitEscalationDecision(
escalationId,decision):Promise<void>
Defined in: packages/agentos/src/core/hitl/HumanInteractionManager.ts:409
Submits an escalation decision.
Parameters
escalationId
string
decision
Returns
Promise<void>