Skip to content

feat: add record_task_outcome() API to RewardEngine #396

@imran-siddique

Description

@imran-siddique

Summary

RewardEngine provides multi-dimensional trust scoring but no API for recording task outcomes. Consumers must reimplement success/failure scoring math (severity-based penalties, diminishing returns, time-based recovery).

Proposal

Add task recording to RewardEngine:

  • record_task(agent_id, outcome: success|failure, severity: float, metadata: dict)
  • Built-in scoring: success = +boost with diminishing returns; failure = -10x severity
  • Time-based trust recovery for idle agents (configurable rate)
  • Threshold-based tier transitions (revoked/probationary/standard/trusted/verified)
  • Persistent state via existing AuditChain

Why This Matters

Every toolkit consumer tracking agent trust needs to record task outcomes. The scoring math (diminishing returns, severity weighting, idle recovery) is universal — it shouldn't be reimplemented per consumer.

Real-World Evidence

ai-native-team daemon trust.py implements exactly this as a wrapper around RewardEngine. The wrapper adds ~150 lines of scoring logic that should be in the engine itself.

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