https://github.com/sullygreene/tinyagi
TinyAGI is a lightweight, modular, and extensible Python-based AGI framework designed to create and manage AI agents seamlessly. It supports various model backends like OpenAI, Llama.cpp, Ollama, AlpacaX, and Tabitha, along with dynamic plugin loading for enhanced flexibility.
https://github.com/sullygreene/tinyagi
agents agi ai api artificial-intelligence cli developer-tools extensible framework llama-cpp machine-learning modular ollama openai plugins python task-automation
Last synced: 5 months ago
JSON representation
TinyAGI is a lightweight, modular, and extensible Python-based AGI framework designed to create and manage AI agents seamlessly. It supports various model backends like OpenAI, Llama.cpp, Ollama, AlpacaX, and Tabitha, along with dynamic plugin loading for enhanced flexibility.
- Host: GitHub
- URL: https://github.com/sullygreene/tinyagi
- Owner: SullyGreene
- License: mit
- Created: 2024-10-31T13:35:29.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-11-08T12:41:55.000Z (8 months ago)
- Last Synced: 2025-01-14T12:23:08.043Z (5 months ago)
- Topics: agents, agi, ai, api, artificial-intelligence, cli, developer-tools, extensible, framework, llama-cpp, machine-learning, modular, ollama, openai, plugins, python, task-automation
- Language: Python
- Homepage:
- Size: 234 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
**Disclaimer:** This is a **preview release** (version 0.0.2). TinyAGI is currently under active development, and this version is intended for testing, feedback, and early experimentation. Expect frequent updates and potential changes to the API.
![]()
# π§ TinyAGI
**TinyAGI** is a powerful, modular Artificial General Intelligence (AGI) framework crafted for seamless integration and management of AI agents, plugins, and tools. With its adaptable and extensible architecture, TinyAGI enables dynamic loading of components from local and GitHub-hosted sources, empowering you to customize and scale for a multitude of use cases.
[](https://pypi.org/project/TinyAGI/) [](https://github.com/SullyGreene/TinyAGI/blob/main/LICENSE) [](https://github.com/SullyGreene/TinyAGI/stargazers) [](https://twitter.com/SullyGreene)
---
## π **Table of Contents**
- [π§© Features](#-features)
- [π¦ Installation](#-installation)
- [π§ Setup Instructions](#-setup-instructions)
- [π Usage](#-usage)
- [π Documentation](#-documentation)
- [π§ͺ Testing](#-testing)
- [π Contributing](#-contributing)
- [π‘ License](#-license)
- [π Contact](#-contact)
- [πΊοΈ Roadmap](#-roadmap)---
## π§© Features
- π **Agent System**: Manage various AI agents, from OpenAI to Ollama and LLaMA.
- π **Plugin Manager**: Seamlessly expand functionality with versatile plugins.
- π **Tool Integration**: Use tools like the Wikipedia API to enhance capabilities.
- π **Dynamic Loading**: Load components locally or clone from GitHub repositories on the fly.
- π **Task Automation**: Orchestrate agents, plugins, and tools to define and execute complex tasks.
- π **Comprehensive Documentation**: Easily accessible Markdown files for every component.
- π₯ **Robust Error Handling**: Advanced logging and error management for smooth operation.---
## π¦ Installation
### **From PyPI**
Get the latest TinyAGI in seconds with `pip`:
Show command
```bash
pip install TinyAGI
```### **From GitHub**
Clone and set up dependencies:
Show commands
```bash
git clone https://github.com/SullyGreene/TinyAGI.git
cd TinyAGI
python setup_env.py
```> **Note:** `setup_env.py` creates a `venv` environment, installs dependencies, and downloads necessary NLTK data.
---
## π§ **Setup Instructions**
1. **Clone the Repository**
Show commands```bash
git clone https://github.com/SullyGreene/TinyAGI.git
cd TinyAGI
```
2. **Set Up the Virtual Environment**
Ensure Python 3.8+ is installed.
Show command```bash
python setup_env.py
```
3. **Configure Environment Variables**
Copy the example `.env` file and add your API keys.
Show commands```bash
cp .env.example .env
```
4. **Run the Server**
Show command```bash
python run.py
```The server will be accessible at `http://localhost:5000`.
---
## π **Usage**
### **Using the CLI**
Interact with TinyAGI through the command-line interface.
- **Generate Text**
Show command```bash
python -m TinyAGI.services.cli_manager generate --prompt "Tell me a joke."
```- **Options:**
- `--prompt` or `-p`: The text prompt.
- `--config` or `-c`: Path to a custom configuration file.
- `--stream` or `-s`: Enable streaming output.
### **Accessing the API**
- **Chat Endpoint**
Show command```bash
curl -X POST http://localhost:5000/chat \
-H "Content-Type: application/json" \
-d '{"messages": [{"role": "user", "content": "Hello!"}], "stream": false}'
```
- **Generate Text Endpoint**
Show command```bash
curl -X POST http://localhost:5000/generate \
-H "Content-Type: application/json" \
-d '{"prompt": "Write a short story about a dragon.", "stream": false}'
```
- **Embed Endpoint**
Show command```bash
curl -X POST http://localhost:5000/embed \
-H "Content-Type: application/json" \
-d '{"input": "Sample text for embedding."}'
```
---
## π **Documentation**
Access comprehensive documentation in the [`Documents/`](https://github.com/SullyGreene/TinyAGI/tree/main/Documents) directory.
---
## π§ͺ **Testing**
Run TinyAGI tests to verify functionality.
### **Testing Ollama**
Show command```bash
python test_ollama.py
```- **Expected Output**:
```
Response from OllamaAgent:
The capital of France is Paris.
```- **Troubleshooting Tips**:
- Ensure the Ollama server is running at `http://localhost:11434`.
- Confirm correct API keys and authentication.
---
## π **Contributing**
Join the TinyAGI community by contributing your code, ideas, or feedback!
1. **Fork the Repository**
Show commands```bash
git checkout -b feature/YourFeatureName
```
2. **Commit Your Changes**
Show command```bash
git commit -m "Add feature: YourFeatureName"
```
3. **Push to Your Fork**
Show command```bash
git push origin feature/YourFeatureName
```
4. **Submit a Pull Request**
---
## π‘ **License**
This project is licensed under the [MIT License](https://opensource.org/licenses/MIT).
---
## π **Contact**
π¬ **Get in Touch**
- **X (formerly Twitter)**: [@SullyGreene](https://twitter.com/SullyGreene)
- **GitHub**: [SullyGreene](https://github.com/SullyGreene)
- **PyPI**: [TinyAGI on PyPI](https://pypi.org/project/TinyAGI/)---
## πΊοΈ **Roadmap**
TinyAGIβs vision includes scaling to meet diverse AI needs. Hereβs whatβs planned:
Phase 1: Core Enhancements π
- **Agent Expansion**: Support additional agents and tools for specific domains.
- **Plugin Ecosystem**: Expand with plugins for data analysis, visual generation, and task-specific fine-tuning.
- **Advanced Error Handling**: Improve diagnostic logs and error handling.Phase 2: Advanced Task Orchestration π€
- **Multi-Agent Collaboration**: Enable agents to collaborate on complex tasks.
- **Task Scheduling & Automation**: Automate recurring actions and analysis.
- **Smart Prompting**: Dynamic prompt optimization for better task performance.Phase 3: Enhanced API and Developer Experience π οΈ
- **API V2**: Improve task queueing, agent behavior management, and access controls.
- **Interactive Documentation**: Launch an interactive portal with live code examples.
- **CLI Improvements**: Add user-friendly CLI commands.Phase 4: Ecosystem & Community Growth π
- **Plugin Marketplace**: Set up a community-driven marketplace for plugins.
- **TinyAGI Hub**: A central hub for resources, tutorials, and community feedback.Phase 5: Scalability and Enterprise-Readiness π’
- **Distributed Agent Management**: Support for multi-server deployments.
- **Performance Optimization**: Improve resource use for concurrent agent management.
- **Enterprise Security**: Enhanced data encryption and access control.
---