ai-token-tracker

v0.2.5 suspicious
6.0
Medium Risk

Python SDK for capturing LLM traffic and ingesting envelopes into Ai Token Tracker

🤖 AI Analysis

Final verdict: SUSPICIOUS

The package exhibits a high network risk due to potential unauthorized data transmission, which raises concerns about its intended use. Additionally, the lack of a public repository and sole ownership of the package by the maintainer adds to the uncertainty.

  • High network risk (7/10) due to potential unauthorized data transmission.
  • No public git repository available, increasing suspicion.
Per-check LLM notes
  • Network: The observed network calls suggest potential unauthorized data transmission, possibly indicating an unexpected behavior for a package named 'ai-token-tracker'.
  • Shell: No shell execution patterns were detected.
  • Obfuscation: No obfuscation patterns detected, indicating low risk of malicious intent.
  • Credentials: No credential harvesting patterns detected, suggesting safe handling of secrets and credentials.
  • Metadata: The maintainer has only one package and the git repository is not found, raising suspicion but not conclusive evidence of malice.

📦 Package Quality Overall: Medium (5.6/10)

✦ High Test Suite 9.0

Test suite present — 5 test file(s) found

  • Test runner config found: pyproject.toml
  • 5 test file(s) detected (e.g. test_ingestion_client_integration.py)
◈ Medium Documentation 7.0

Some documentation present

  • Documentation URL: "Documentation" -> https://github.com/ai-token-tracker/ai-token-tracker/tree/ma
  • Detailed PyPI description (7060 chars)
○ Low Contributing Guide 4.0

No contributing guide or governance files found

  • Development Status classifier >= Beta
◈ Medium Type Annotations 7.0

Partial type annotation coverage

  • Classifier: Typing :: Typed
  • 63 type-annotated function signatures detected in source
○ Low Multiple Contributors 1.0

Could not retrieve contributor data from GitHub

  • GitHub API error: 404

🔬 Heuristic Checks

Outbound Network Calls score 6.0

Found 4 network call pattern(s)

  • nterception() response = requests.post( f"{base_url}/v1/responses", headers={"Autho
  • ) try: response = requests.post( f"{base_url}/v1/responses", headers
  • http_interception() with httpx.Client(timeout=5.0) as httpx_client: response = httpx_clien
  • () -> int: async with httpx.AsyncClient(timeout=5.0) as httpx_client: response = await h
Code Obfuscation

No obfuscation patterns detected

Shell / Subprocess Execution

No shell execution patterns detected

Credential Harvesting

No credential harvesting patterns detected

Typosquatting

No typosquatting candidates detected

Registered Email Domain

No author email provided

Suspicious Page Links

All external links appear legitimate

Git Repository History score 3.0

Repository not found (deleted or private)

  • Repository not found (deleted or private)
Maintainer History score 2.0

1 maintainer concern(s) found

  • Author "Ai Token Tracker" appears to have only 1 package on PyPI (new or inactive account)
Known CVE Vulnerabilities

No known vulnerabilities found in OSV database.

💡 AI App Starter Prompt

Use this prompt to build a project with ai-token-tracker
Create a real-time chat application that integrates with large language models (LLMs) and utilizes the 'ai-token-tracker' Python package to monitor and analyze the interaction between users and the AI. This application should allow users to engage in conversations with an AI-powered chatbot while simultaneously tracking the usage of tokens consumed during these interactions.

### Features:
- **User Interface**: A simple web interface where users can type messages and receive responses from the AI.
- **Token Tracking**: Utilize the 'ai-token-tracker' package to capture all the communication traffic between the user and the AI model. Track the number of tokens used for each request and response.
- **Usage Analytics**: Display analytics on the web interface showing the total number of tokens used by the user in the session, the average tokens per message, and other relevant metrics.
- **Real-Time Updates**: Ensure that token usage data is updated in real-time as users interact with the AI.
- **Security**: Implement basic security measures such as user authentication to protect user data.
- **Customizable Model**: Allow users to choose different LLMs for their conversations.

### Steps to Create the Application:
1. **Setup Environment**: Install necessary packages including 'ai-token-tracker', Flask for the web server, and any required LLM APIs.
2. **Design UI**: Design a clean and intuitive user interface using HTML/CSS/JavaScript.
3. **Integrate LLM API**: Set up integration with an LLM API to handle the chatbot responses.
4. **Implement Token Tracking**: Use the 'ai-token-tracker' package to capture and process the token usage data.
5. **Develop Analytics Module**: Develop a module to calculate and display analytics about token usage.
6. **Ensure Real-Time Updates**: Implement mechanisms to ensure that the analytics dashboard updates in real-time as the conversation progresses.
7. **Add Security Measures**: Implement user authentication to secure user data.
8. **Testing**: Thoroughly test the application to ensure all features work as expected.
9. **Deployment**: Deploy the application to a cloud platform like Heroku or AWS.