Best Practices
Follow these best practices to get the most out of Paygent.
1. Use Descriptive Names
Choose clear, descriptive names for agents and indicators that make your data easy to understand.
✓ Good
customer-support-chatbotticket-resolved✗ Avoid
agent1action2. Track at the Right Granularity
Track each significant AI operation, but don't over-track minor steps.
- ✓ Track: Each chat completion, content generation, embedding creation
- ✗ Don't track: Token counting operations, validation checks, internal processing
3. Use Environment Variables
Never hardcode API keys. Always use environment variables.
typescript
1// ✓ Good
2const client = PaygentClient.newClient(process.env.PAYGENT_API_KEY);
3
4// ✗ Never do this
5const client = PaygentClient.newClient('pk_live_abc123...');4. Monitor Your Usage
Regularly check your Paygent dashboard to understand usage patterns, identify anomalies, and optimize costs.
Was this page helpful?
Need help? Contact us at support@withpaygent.com