Metadata-Version: 2.4
Name: nexos-agents
Version: 1.0.0
Summary: Universal Multi-Agent Orchestration Engine, Swarm Fabric & MCP Runtime
Author-email: Nexos Core Architecture Group <core@nexosagents.com>
License: Apache-2.0
Project-URL: Homepage, https://nexosagents.com
Project-URL: Documentation, https://nexosagents.com/docs
Project-URL: Repository, https://github.com/socrates6969/nexos-agents
Keywords: agents,multi-agent,swarm,hive-mind,mcp,orchestration,crdt,langgraph-alternative
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: pydantic>=2.6.0
Requires-Dist: httpx>=0.27.0
Requires-Dist: tree-sitter>=0.21.3; platform_system != "Windows"
Requires-Dist: pytest>=8.0.0
Provides-Extra: dev
Requires-Dist: pytest>=8.0.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.23.0; extra == "dev"
Requires-Dist: uvicorn>=0.27.0; extra == "dev"
Requires-Dist: fastapi>=0.110.0; extra == "dev"

# NEXOS AGENTS

[![PyPI version](https://img.shields.io/pypi/v/nexos-agents?style=flat-square&color=10B981)](https://pypi.org/project/nexos-agents)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg?style=flat-square)](https://github.com/socrates6969/nexos-agents/blob/main/LICENSE)
[![GitHub](https://img.shields.io/badge/GitHub-socrates6969%2Fnexos--agents-10B981?style=flat-square&logo=github)](https://github.com/socrates6969/nexos-agents)

**NEXOS AGENTS** is an enterprise-grade, model-agnostic multi-agent operating system and runtime.

- **Cyclic Directed State Graphs (`NexosGraph`)**: State machine execution with zero-overhead durable checkpointing and time-travel debugging.
- **Decentralized Peer-to-Peer Swarms (`NexosSwarm`)**: Powered by Conflict-Free Replicated Data Types (CRDTs) and work-stealing gossip.
- **Hierarchical Hive-Mind Clusters (`NexosHive`)**: Queen-governed task decomposition with quadratic consensus voting and unified vector memory.
- **Sub-Millisecond Distributed Telemetry (`NexosTrace`)**: Trace waterfalls and token accounting.
- **Repo-Harness Self-Trainer (`nexos train --repo`)**: AST call-graph extraction and DSPy MIPRO-style test optimization.

## Installation

```bash
pip install nexos-agents
```

## Quickstart

```python
from nexos.runtime import StateGraph

graph = StateGraph()

def research_step(state: dict) -> dict:
    state["findings"] = ["Vector consensus confirmed"]
    return state

def synthesize_step(state: dict) -> dict:
    state["output"] = "Pipeline executed deterministically."
    return state

graph.add_node("researcher", research_step)
graph.add_node("synthesizer", synthesize_step)
graph.set_entry_point("researcher")
graph.add_edge("researcher", "synthesizer")
graph.add_edge("synthesizer", "__END__")

result = graph.execute({"task": "Analyze telemetry anomalies"})
print("Execution Result:", result)
```

## Decentralized Swarm (CRDT)

```python
from nexos.swarm import SwarmCluster, SwarmNode, SwarmTask

cluster = SwarmCluster()
node_a = SwarmNode("node-a", "analyst", ["compute"])
node_b = SwarmNode("node-b", "synthesizer", ["compute"])
cluster.add_node(node_a)
cluster.add_node(node_b)

task = SwarmTask(title="Process data stream", payload={"items": [1, 2, 3]})
cluster.broadcast_task(task)

summary = cluster.run_until_idle()
print("Swarm converged:", summary)
```

## Links

- **GitHub Repository**: https://github.com/socrates6969/nexos-agents
- **Production Web Studio**: https://nexos-agents.vercel.app
- **License**: Apache 2.0
