Stevenic / agentm-py

A library of "Micro Agents" that make it easy to add reliable intelligence to any application.
MIT License
8 stars 3 forks source link

Core Utilities Migration for AgentM Python #24

Closed debuggerone closed 2 months ago

debuggerone commented 2 months ago

Overview

This issue focuses on migrating core utility functions from the JavaScript version of AgentM to Python. These utilities are fundamental to the library's operations, including token counting, error handling, concurrency management, and dynamic prompt generation.

Tasks

Subtasks Overview

  1. Token Counter: Migrate the tokenCounter utility to Python using tiktoken to handle token counting and model compatibility.
  2. Error Handling: Implement a robust error logging mechanism in Python to capture and store errors with proper access control.
  3. Concurrency Management: Adapt the JavaScript concurrency mechanisms to Python using asyncio, ensuring all asynchronous tasks are correctly managed.
  4. Dynamic Prompt Generation: Convert the JavaScript utility for dynamic prompt generation to Python, ensuring compatibility with the Python string formatting methods.