Skip to navigation

Agents & Indicators

Understanding agents and indicators is fundamental to using Paygent effectively. They’re the building blocks of how Paygent tracks and bills for AI usage.

Scenario: Meet Sarah, who runs an e-commerce AI platform. Her system has a customer support chatbot, a product recommendation engine, and an email generator. Each of these does different things, costs different amounts, and provides different value. How does she track them separately?

Solution: With Paygent, Sarah defines each AI component as an Agent and each action as an Indicator:

Tracking Agents and Indicators
// Customer Support Chatbot (Agent)
await paygentClient.sendUsage(
'customer-support-bot', // Agent ID
'customer-123', // Customer ID
'message-sent', // Indicator (action performed)
usageData
);
// Product Recommendation Engine (Agent)
await paygentClient.sendUsage(
'recommendation-engine', // Different Agent
'customer-123',
'recommendations-generated', // Different Indicator
usageData
);
// Email Generator (Agent)
await paygentClient.sendUsage(
'email-generator', // Another Agent
'customer-123',
'email-composed', // Another Indicator
usageData
);

Now Sarah can see exactly how much each AI component costs and which actions her customers use most.

Result: Sarah can now track that her chatbot handles 10,000 messages/month, recommendations generate 50,000 suggestions, and the email tool creates 2,000 emails. She bills customers accurately based on what they actually use.


🤖 What is an Agent?

An Agent is a distinct AI component or workflow in your application. Think of it as “who is doing the work.”

Examples:

  • Customer support chatbot
  • Code review assistant
  • Content generator
  • Data analyzer

⚡ What is an Indicator?

An Indicator is a specific action performed by an agent. Think of it as “what work was done.”

Examples:

  • message-sent
  • article-generated
  • code-reviewed
  • report-created

Best Practice: Choose descriptive agent names and indicator names that clearly describe what’s happening. This makes your usage data easy to understand and analyze later.

Good: customer-support-bot + message-sent

Avoid: agent1 + action