# Interface IOutcomeFeedback

Interface for outcome feedback collector.

interface IOutcomeFeedback {
recordRoutingDecision(decision: FeedbackRoutingDecision): void;
recordOutcome(outcome: TaskOutcome): void;
processOutcome(
traceId: string,
outcome: Omit<TaskOutcome, "routingDecisionId">,
): void;
computeReward(outcome: TaskOutcome): ComputedReward;
getStats(): FeedbackLoopStats;
getPendingDecisions(): readonly FeedbackRoutingDecision[];
clearExpiredDecisions(): number;
reset(): void;
}

#### Implemented by

- OutcomeFeedbackCollector

- Defined in packages/nexus-agents/src/learning/outcome-feedback-types.ts:253

##### Index

### Methods

recordRoutingDecision
recordOutcome
processOutcome
computeReward
getStats
getPendingDecisions
clearExpiredDecisions
reset

## Methods

### recordRoutingDecision

- recordRoutingDecision(decision: FeedbackRoutingDecision): void

  Record a routing decision for tracking.

  #### Parameters

  - decision: FeedbackRoutingDecision

  #### Returns void

  - Defined in packages/nexus-agents/src/learning/outcome-feedback-types.ts:257

### recordOutcome

- recordOutcome(outcome: TaskOutcome): void

  Record an outcome for a routing decision.

  #### Parameters

  - outcome: TaskOutcome

  #### Returns void

  - Defined in packages/nexus-agents/src/learning/outcome-feedback-types.ts:262

### processOutcome

- processOutcome(
  traceId: string,
  outcome: Omit<TaskOutcome, "routingDecisionId">,
  ): void

  Process outcome for a trace ID (finds matching decision and computes reward).

  #### Parameters

  - traceId: string
  - outcome: Omit<TaskOutcome, "routingDecisionId">

  #### Returns void

  - Defined in packages/nexus-agents/src/learning/outcome-feedback-types.ts:267

### computeReward

- computeReward(outcome: TaskOutcome): ComputedReward

  Compute reward from an outcome.

  #### Parameters

  - outcome: TaskOutcome

  #### Returns ComputedReward

  - Defined in packages/nexus-agents/src/learning/outcome-feedback-types.ts:272

### getStats

- getStats(): FeedbackLoopStats

  Get feedback loop statistics.

  #### Returns FeedbackLoopStats

  - Defined in packages/nexus-agents/src/learning/outcome-feedback-types.ts:277

### getPendingDecisions

- getPendingDecisions(): readonly FeedbackRoutingDecision[]

  Get pending decisions (waiting for outcomes).

  #### Returns readonly FeedbackRoutingDecision[]

  - Defined in packages/nexus-agents/src/learning/outcome-feedback-types.ts:282

### clearExpiredDecisions

- clearExpiredDecisions(): number

  Clear expired pending decisions.

  #### Returns number

  - Defined in packages/nexus-agents/src/learning/outcome-feedback-types.ts:287

### reset

- reset(): void

  Reset all state.

  #### Returns void

  - Defined in packages/nexus-agents/src/learning/outcome-feedback-types.ts:292