Skip to main content

A deterministic, pure Python Multi-Agent runtime architecture.

Project description

Nyra 🧠

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

Made by Somya Bhalani, Founder, Ananta Labs (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:

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.

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!

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

nyra-0.1.0.tar.gz (11.2 kB view details)

Uploaded Source

Built Distribution

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

nyra-0.1.0-py3-none-any.whl (13.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: nyra-0.1.0.tar.gz
  • Upload date:
  • Size: 11.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.8

File hashes

Hashes for nyra-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b89646fab8ad78a919fdb10fcfc61ae827e22479f3df830f53faf3b88d35125e
MD5 ebc2fff053d87ebaea5637f32c8f7f57
BLAKE2b-256 706c4535be6cb0241b95728786da0c966910ee3d0bc2194223579b3ff5708942

See more details on using hashes here.

File details

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

File metadata

  • Download URL: nyra-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 13.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.8

File hashes

Hashes for nyra-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3c21f184d2c767aad3e5b94b78537b9169f7d2d99175e7c368161b995e876e81
MD5 d527505b44b0ab4b8cfae550133fb7c0
BLAKE2b-256 3ae4320ae1e48baae0b4f418e8dbaf7f04c7721256a2ab6171f5628dbfb10ed9

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