Metadata-Version: 2.4
Name: infinexstudio
Version: 0.1.0
Summary: A lightweight, professional Agentic AI framework for multi-agent workflows.
Project-URL: Homepage, https://github.com/sanketghadge/InfinexaStudio
Author-email: Sanket Ghadge <sanket@example.com>
License: MIT
License-File: LICENSE
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.9
Requires-Dist: openai>=1.0.0
Requires-Dist: pydantic>=2.0.0
Description-Content-Type: text/markdown

# InfinexaStudio 🚀

[![PyPI Version](https://img.shields.io/pypi/v/infinexstudio.svg)](https://pypi.org/project/infinexstudio/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

**InfinexaStudio** is a lightweight, professional-grade Python framework for orchestrating role-playing AI agents. It simplifies building multi-agent workflows, enabling developers to build agent swarms that collaborate sequentially to solve complex tasks.

Similar to CrewAI, but optimized for minimal overhead, full transparency, and clean, type-safe structures.

---

## Key Features

- 🛠️ **Automatic Schema Generation**: Transform standard Python functions into AI-ready tools using a simple `@tool` decorator. No complex schemas required.
- 🔁 **Robust ReAct/Tool Loop**: Built-in tool calling cycle that handles function invocation, captures errors, and feeds context back to the LLM automatically.
- 🔗 **Sequential Workflows**: Coordinate multiple agents in a structured crew where each task feeds its findings into the next as context.
- 🔌 **OpenAI & Custom Backends**: Full support for OpenAI API models (like `gpt-4o-mini`) and local/custom endpoints (like Ollama, LiteLLM, or LocalAI).
- 📜 **Type Safety & Logging**: Fully type-hinted classes with detailed, color-coded execution logs for transparent debugging.

---

## Architecture at a Glance

```mermaid
graph TD
    A[Studio] --> B[Task 1: Researcher]
    A --> C[Task 2: Writer]
    B --> D[Agent: Analyst]
    C --> E[Agent: Writer]
    D --> F[LLM call]
    F --> G{Requires Tool?}
    G -- Yes --> H[Run @tool function]
    H --> F
    G -- No --> I[Task 1 Output]
    I -->|Passed as Context| C
```

---

## Installation

```bash
pip install infinexstudio
```

---

## Quickstart

Set up your OpenAI API key:
```bash
export OPENAI_API_KEY="your-api-key"
```

Create a python file `app.py`:

```python
from infinexstudio import Agent, Task, Studio, tool

# 1. Define tools from standard Python functions
@tool
def get_stock_price(ticker: str) -> str:
    """Retrieves current stock price for a company."""
    if ticker.upper() == "AAPL":
        return "$182.50"
    return "$100.00"

# 2. Define Agents with roles, goals, and backstories
analyst = Agent(
    role="Financial Analyst",
    goal="Provide accurate financial analysis of requested stocks.",
    backstory="You are a meticulous Wall Street analyst specializing in technology sector evaluations.",
    tools=[get_stock_price],
    verbose=True
)

writer = Agent(
    role="Financial Reporter",
    goal="Draft concise financial news snippets for retail investors.",
    backstory="You are a veteran financial news writer. You make complex finance numbers simple and fun.",
    verbose=True
)

# 3. Create Tasks
task_1 = Task(
    description="Research the price and performance of Apple stock (AAPL).",
    expected_output="A summary of stock stats.",
    agent=analyst
)

task_2 = Task(
    description="Write a short newsletter paragraph about the findings.",
    expected_output="An engaging news paragraph in markdown.",
    agent=writer
)

# 4. Initialize and Run the Studio
studio = Studio(
    agents=[analyst, writer],
    tasks=[task_1, task_2],
    verbose=True
)

result = studio.kickoff()
print(result)
```

---

## 🛠️ Developer Guide: How to Package & Publish to PyPI

One of the best ways to impress interviewers is to demonstrate your understanding of professional packaging pipelines. Here is the step-by-step workflow of how to publish **InfinexaStudio** to **PyPI**:

### 1. Requirements
Ensure you have the build tools installed:
```bash
pip install --upgrade build twine
```

### 2. Configure Build Metadata (`pyproject.toml`)
We use standard PEP 518/621 configuration. In your root `pyproject.toml`, you define metadata, entrypoints, and dependencies:
```toml
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "infinexstudio"
version = "0.1.0"
description = "A lightweight, professional Agentic AI framework for multi-agent workflows."
dependencies = [
    "openai>=1.0.0",
    "pydantic>=2.0.0"
]
```

### 3. Build Source and Wheel Distributions
Generate package distribution archives by running:
```bash
python -m build
```
This creates a `dist/` directory with two files:
- A source archive: `infinexstudio-0.1.0.tar.gz`
- A built wheel: `infinexstudio-0.1.0-py3-none-any.whl`

### 4. Test upload to TestPyPI
Before pushing to live PyPI, it's best practice to upload to TestPyPI to ensure the formatting and package are error-free:
```bash
python -m twine upload --repository testpypi dist/*
```
*You will need a TestPyPI account and API token for this step.*

### 5. Publish to live PyPI
Once tested, publish the package to PyPI:
```bash
python -m twine upload dist/*
```
*This requires a standard PyPI account and API token. Enter `__token__` as the username and paste your API key as the password.*

### 6. Install from PyPI
Anyone can now install your package globally:
```bash
pip install infinexstudio
```

---

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
