Metadata-Version: 2.4
Name: nyra
Version: 0.1.0
Summary: A deterministic, pure Python Multi-Agent runtime architecture.
Author-email: Somya Bhalani <founder@anantalabs.app>
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Developers
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# Nyra 🧠

> *"Nyra: Because AI should reason, not just respond."*

**Made by Somya Bhalani, Founder, Ananta Labs ([www.anantalabs.app](https://www.anantalabs.app))**

Nyra is a deterministic, highly structured Multi-Agent Cognitive Architecture built purely in Python with **zero external dependencies**. It is not just another chatbot wrapper; it is a profound execution engine that models the reasoning, reflection, and delegation required for autonomous AI.

## Architecture Highlights
Nyra breaks down autonomous task execution into distinct, strictly typed cognitive modules:
- **Pre-Frontal Cortex (Planner)**: Deconstructs complex goals into a DAG of sequential tasks.
- **Reasoner**: Selects the absolute best exact action (Tool execution or Delegation).
- **Reflection Engine (Critic)**: Analyzes the results of actions. If a tool fails, it forces the Reasoner to try again or delegate.
- **Multi-Agent Orchestrator**: Dynamically routes sub-tasks to specialized Agent profiles.
- **3-Tiered Memory**: Fully isolates `WorkingMemory`, `EpisodicMemory`, and `SemanticMemory`.

## Installation

Because Nyra is purely built on standard Python libraries, installation is incredibly lightweight:
```bash
pip install nyra
```

## Quick Start (Bring Your Own API)

Nyra is 100% LLM agnostic. You plug in your own API connection (OpenAI, Gemini, NVIDIA, Claude, etc.) by subclassing the `LLM` object. 

```python
from nyra import Agent
from nyra.llm import LLM
import urllib.request
import json

# 1. Write your custom Provider
class MyCustomLLM(LLM):
    def __init__(self, api_key: str):
        super().__init__(provider="custom")
        self.api_key = api_key

    def generate(self, prompt: str) -> str:
        # Put your API connection logic here!
        return "I am thinking..."

# 2. Boot up the brain
agent = Agent()
agent.llm = MyCustomLLM(api_key="your-key")

# 3. Add tools with Type Hinting (Nyra automatically extracts signatures!)
def calculate_gravity(mass: float) -> float:
    """Calculates gravitational force."""
    return mass * 9.8

agent.add_tool("gravity_calc", calculate_gravity)

# 4. Run the deterministic loop
agent.run("Calculate the gravity for a 50kg object.")
```

## Contributing
Built with passion by Ananta Labs. We believe the future of AI is deterministic, modular, and open. PRs are welcome!
