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. It's designed to be lightweight, easy to understand, and highly extensible.
Disclaimer: This is a preview release (version 0.0.2) of TinyAGI, which is currently under active development. This release is intended for testing, feedback, and early experimentation. Please be aware that the API is subject to change, and frequent updates are expected.
- π§© Features
- π¦ Installation
- π§ Setup Instructions
- π οΈ Usage
- π Documentation
- π§ͺ Testing
- π Contributing
- π‘ License
- π Contact
- πΊοΈ Roadmap
- π 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.
- π₯οΈ Dual Interface: Interact via a feature-rich interactive CLI or a RESTful API server.
- π Comprehensive Documentation: Easily accessible Markdown files for every component.
- π₯ Robust Error Handling: Advanced logging and error management for smooth operation.
The recommended way to install TinyAGI is by using the installation scripts, which automate the entire process from downloading the code to setting up the environment. The installation script will handle everything:
- Check for prerequisites (Git, Python).
- Clone the project to a fixed location (
C:\TinyAGIon Windows). - Create a dedicated virtual environment.
- Install all required dependencies.
- Create a default
.envfile for your API keys.
First, clone the repository to your local machine:
git clone https://github.com/SullyGreene/TinyAGI.git
cd TinyAGIFor Windows
Run the install.bat script. It will check for prerequisites (Git, Python), set up a virtual environment, install dependencies, and create a default .env file.
install.batThe script will install TinyAGI to C:\TinyAGI by default. You can customize this path by creating a config\windows_installation.ini file in the cloned directory before running the script, and setting custom_install_path=Your\Desired\Path.
The script will also offer to add an agi command alias to your system PATH for easy access to the CLI.
Note: Run this script from a temporary location after cloning, as it will move the project files to the designated installation directory.
For macOS / Linux
Run the shell script to set up the environment and install dependencies.
chmod +x install.sh
./install.shAfter the installation script completes, a .env file will be created in the root directory. Open this file and add your API keys (e.g., for OpenAI, Gemini) to enable the corresponding agents.
# .env
OPENAI_API_KEY="your-key-here"
GEMINI_API_KEY="your-key-here"You can easily integrate TinyAGI into your own Python projects. The core of the framework is the AgentSystem, which orchestrates agents, plugins, and tools to execute tasks defined in a configuration file.
Here is a basic example of how to run the agent system from a Python script:
import TinyAGI as agi
import os
def main():
# Ensure the config path is correct relative to your script
config_path = os.path.join(os.path.dirname(__file__), 'config', 'agent_config.json')
# Initialize and run the agent system
agent_system = agi.AgentSystem(config_files=config_path)
agent_system.run()
if __name__ == '__main__':
main()For Windows
cli.batFor macOS / Linux
poetry run cliThis will start the interactive CLI, where you can use the following commands:
generate: Generate text from a prompt.config: Display current configuration.exit: Exit the CLI.
For Windows
start_server.batFor macOS / Linux
poetry run start-
Chat Endpoint
Show command
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
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
curl -X POST http://localhost:5000/embed \ -H "Content-Type: application/json" \ -d '{"input": "Sample text for embedding."}'
Access comprehensive documentation in the README.md files in each directory.
Run TinyAGI tests to verify functionality.
Show command
python test_ollama_agent.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.
- Ensure the Ollama server is running at
Run the test suite to ensure all components are working correctly. Make sure you have installed the development dependencies with poetry install.
Show command
poetry run pytestJoin the TinyAGI community by contributing your code, ideas, or feedback!
-
Fork the Repository
Show commands
git checkout -b feature/YourFeatureName
-
Commit Your Changes
Show command
git commit -m "Add feature: YourFeatureName" -
Push to Your Fork
Show command
git push origin feature/YourFeatureName
-
Submit a Pull Request
This project is licensed under the MIT License.
π¬ Get in Touch
- X (formerly Twitter): @SullyGreene
- GitHub: SullyGreene
- PyPI: TinyAGI on PyPI
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.