Skip to main content

ForgeOAgent - An AI agent framework

Project description

ForgeOAgent

Python License: MIT

Intelligent automation for everyone:
Use Gemini and custom agents to improve prompts, enhance text, refine code, generate emails, and automate tasks.

ForgeOAgent is a modular Python framework for building, managing, and running AI agents with advanced code processing capabilities. It automates code improvement, agent management, and client integration using Google Gemini and other APIs.


🚀 Key Features

  • Cross-platform shell support: Works on Windows & Linux.
  • Flexible agent modes:
    • Inquirer Mode: Use system prompts for quick tasks.
    • Executor Mode: Advanced workflows, agent management, and context-aware automation.
  • Customizable prompts: Easily add your own system instructions for new agent behaviors in mcp/system_prompts/
  • Persistent chat history: Optionally load recent conversations for better context and accuracy.
  • Automatic tool integration: Place Python classes in mcp/tools to auto-expose new agent capabilities.
  • Comprehensive logging: All agent activities and improvements are logged for review.

📁 Project Structure

  • start.py — GUI entry point for the agent system.
  • main.py — Command-line entry point for running agents and workflows.
  • agents/ — Agent modules and metadata.
  • clients/ — API clients for external services (e.g., Gemini).
  • core/ — Core utilities for agent management, API keys, configuration, and more.
  • logs/ — JSONL logs of agent activities and improvements.
  • shell/ — Shell scripts for Linux and Windows environments.
  • mcp/ — System prompts, agent context, and tools for modular extension.

UseFul :

  • GeminiAPIClient().generate_content
  • GeminiAPIClient().search_content
  • from forgeoagent.controller.executor_controller import create_master_executor

use :

  • from forgeoagent.controller.executor_controller import print_available_executors , save_last_executor
  • from forgeoagent.controller.inquirer_controller import inquirer_using_selected_system_instructions , print_available_inquirers , auto_import_inquirers

🛠️ Getting Started

  1. Clone the repository

    git clone https://github.com/ANGELKORADIYA/ForgeOAgent.git
    cd ForgeOAgent
    
  2. Install dependencies

    pip install -r requirements.txt
    
  3. Configure API keys

    • Copy .env.production to .env and add your Gemini API keys.
  4. Run the agent system

    python main.py
    
    • List available system prompts:
      python main.py -l
    • Run with a specific prompt:
      python main.py -p <prompt_type> "your prompt here"
    • Use main mode (with agent context):
      python main.py "your prompt here" --main
  5. Assign a shortcut for quick access

    • Linux:
      Add a keyboard shortcut to run shell/linux/start.sh.
    • Windows:
      Create a desktop shortcut to shell/windows/start.vbs.

💡 Usage Examples

  • Quick prompt improvement:
    Use Inquirer Mode to enhance text, code, or emails with a single command.
  • Context-aware automation:
    Use Executor Mode to leverage previous conversations and agent context for more complex tasks.

⚙️ Customization

  • Add new system prompts:
    Place your custom prompt as a Python constant in mcp/system_prompts/ (naming: *_SYSTEM_INSTRUCTION).
  • Integrate new clients:
    Add API clients in clients/.
  • Review logs:
    Check logs/ for detailed agent activity and improvements.
  • Main Agent Reuse: Save Result

🧩 Creating Custom Agents & Shortcuts

  1. Add your prompt:
    Create a new file in mcp/system_prompts/ and define a constant ending with _SYSTEM_INSTRUCTION.
  2. Create a shortcut script:
    Use .sh (Linux) or .vbs (Windows) to call the agent with your prompt type.

Now you can trigger your custom agent instantly via your shortcut.


📝 Example: Improving Code Files

  • Recursively process files in a directory (skipping .git).
  • Use Gemini agents to improve code or text based on file extension.
  • Improved files are saved in the current directory.
  • See agents/temp_3/main_agent.jsonl for a sample agent log and code.

🤝 Contributing

Contributions are welcome! Please submit issues or pull requests for improvements or new features.


📄 License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

forgeoagent-0.1.0.tar.gz (1.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

forgeoagent-0.1.0-py3-none-any.whl (1.2 MB view details)

Uploaded Python 3

File details

Details for the file forgeoagent-0.1.0.tar.gz.

File metadata

  • Download URL: forgeoagent-0.1.0.tar.gz
  • Upload date:
  • Size: 1.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for forgeoagent-0.1.0.tar.gz
Algorithm Hash digest
SHA256 65466e06337bb5d4e89bc5dd55b8abdffa655fde07ceda651fe2dfee9316d5ab
MD5 9d229dcd19c6363ded112b046195ce61
BLAKE2b-256 cf7633f84b9542fc9f4c4d29ecbb1bde60a5a1457a6e3fa760f738bdc6c3dda5

See more details on using hashes here.

File details

Details for the file forgeoagent-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: forgeoagent-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for forgeoagent-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1b61fd37bd6b77ba11dbdbc07fe105c65bbe47f8793fdfe5af3aea21de05bae8
MD5 d8daa81f9e37b258ebe95c703f8694c6
BLAKE2b-256 deed37b2f61a9c15a3fc5d4ab14134e2460032c34327b46f456ae6dfe3db3e6e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page