Metadata-Version: 2.4
Name: infinexastudio
Version: 0.1.2
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/infinexastudio.svg)](https://pypi.org/project/infinexastudio/)
[![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 infinexastudio
```

---

## Quickstart

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

Create a python file `app.py`:

```python
from infinexastudio 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)
```

---

## License

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