Skip to content
DashhhhhhhhPublic

About

Lightweight, task-specific autonomous agent framework.

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

9 Commits

Folders and files

Repository files navigation

MicroGPT

Python Version License PyPI version

A lightweight, modular framework for building composable AI agents.

Overview

MicroGPT is a Python framework designed for creating small, focused AI agents that can work independently or together. It provides the building blocks for creating sophisticated AI applications through simple, composable components.

Key features:

  • 🧩 Modular Design: Build specialized agents for specific tasks
  • 🔄 Composability: Chain agents together in pipelines and networks
  • 💾 Memory Management: Flexible memory options for storing state and context
  • 🌐 Web Integration: Built-in web capabilities for fetching and processing content
  • 📊 Token Tracking: Monitor and manage LLM token usage
  • 🛠️ Utility Decorators: Enhance agent functionality with logging, caching, and retry mechanisms

Installation

pip install microgpt

Or install directly from the repository:

git clone https://github.com/username/microgpt.git
cd microgpt
pip install -e .

Quick Start

from microgpt import LLMAgent, OpenAIProvider
from dotenv import load_dotenv
import os

# Load environment variables from .env file
load_dotenv()

# Create an LLM provider using your API key
provider = OpenAIProvider(api_key=os.getenv("OPENAI_API_KEY"))

# Create a simple agent
agent = LLMAgent(
    name="Helpdesk",
    description="I provide helpful responses to user questions",
    llm_provider=provider
)

# Ask a question
response = agent.run("What are some ways to improve productivity?")
print(response)

Examples

Check out the /examples directory for complete working examples:

Environment Setup

Copy the .env.example file to .env and add your API keys:

cp .env.example .env
# Edit .env to add your API keys

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Lightweight, task-specific autonomous agent framework.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages