Skip to main content

AI Agent Generation Library — Agents Building Agents

Project description

logosai-forge

AI Agent Generation Library — Agents Building Agents

12 agentic AI agents collaborate to generate, improve, and enhance agent code autonomously.

Installation

pip install logosai-forge

Quick Start

import asyncio
from logosai_forge import ForgeClient

async def main():
    forge = ForgeClient()

    # Generate a new agent
    result = await forge.create_agent(
        "Calculate BMI from weight and height",
        test_cases=[{
            "input": {"weight_kg": 70, "height_m": 1.75},
            "expected": {"bmi": 22.9, "category": "normal"}
        }]
    )
    print(result.code)

    # Fix a broken agent
    result = await forge.improve_agent(broken_code, {
        "error_type": "logic_error",
        "error_message": "Expected approved but got denied",
        "test_input": {"score": 750},
        "expected_output": {"decision": "approved"},
        "actual_output": {"decision": "denied"},
    })
    print(result.diff)

    # Add missing functions
    result = await forge.enhance_agent(
        existing_code,
        "Add multiply and divide methods"
    )
    print(result.added_functions)  # ['_multiply', '_divide']

asyncio.run(main())

Features

Method Purpose Example
create_agent() Generate new agent from query "Calculate shipping cost"
improve_agent() Fix bugs from failure feedback Inverted condition, wrong formula
enhance_agent() Add missing logic/functions "Add caching", "Add error handling"

Setup

1. API Key 설정 (필수)

FORGE는 Gemini LLM을 사용합니다. Google API Key가 필요합니다.

# 환경 변수 설정
export GOOGLE_API_KEY="your-google-api-key-here"

# 또는 .env 파일
echo 'GOOGLE_API_KEY=your-google-api-key-here' >> .env

API Key 발급: https://aistudio.google.com/apikey

2. FORGE 소스 필요

이 패키지는 클라이언트 라이브러리입니다. FORGE 코어(core/)가 로컬에 설치되어 있어야 합니다.

# forge 디렉토리 위치 지정
forge = ForgeClient(forge_root="/path/to/forge")

# 또는 forge 디렉토리 안에서 실행하면 자동 감지
forge = ForgeClient()

Requirements

  • Python 3.10+
  • Google API Key (GOOGLE_API_KEY 환경 변수)
  • FORGE 소스 (core/ 디렉토리)
  • LogosAI framework (optional, 에이전트 실행 시)

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

logosai_forge-0.1.2-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file logosai_forge-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: logosai_forge-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.0

File hashes

Hashes for logosai_forge-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 379c2d6cd4c170cbff8155b29b5be68f294b3ba6eabcf677fb26c7448daed0cc
MD5 e30b7b21c092f410ff43f0390bb99db1
BLAKE2b-256 7f9c75faedbe46d9e94ea8576c22afa162b3c65a49282a76842b47fb2d5c83da

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