@adonis-agora/agent
Version:
Governed, durable-backed AI agent (chat + tool-calling + governance) for AdonisJS — part of the Agora ecosystem.
12 lines • 544 B
JavaScript
/**
* What an agent turn's usage rows say about themselves beyond tokens: the feature (`agent:<agent name>`,
* or `agent` for a run that names none — what a cost-by-feature report groups agent spend under) and the actor's tenant.
*/
export function usageAttribution(input) {
const tenantRef = input.actor.tenantRef;
return {
feature: input.agentName === undefined ? 'agent' : `agent:${input.agentName}`,
...(typeof tenantRef === 'string' ? { tenantRef } : {}),
};
}
//# sourceMappingURL=usage-attribution.js.map