Metadata-Version: 2.4
Name: enaya-agent
Version: 0.1.0
Summary: Task-delegation AI agent with multi-agent orchestration, research pipeline, and planning engine
Author-email: tnvmac <tnvmac@web.com>
Maintainer-email: tnvmac <tnvmac@web.com>
License: MIT
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Operating System :: Microsoft :: Windows :: Windows 10
Classifier: Operating System :: Microsoft :: Windows :: Windows 11
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: pydantic>=2.7
Requires-Dist: pyyaml>=6.0
Requires-Dist: rich>=13.7
Requires-Dist: click>=8.1
Requires-Dist: chromadb>=0.5
Requires-Dist: networkx>=3.2
Requires-Dist: watchdog>=3.0
Requires-Dist: openai>=1.30
Requires-Dist: anthropic>=0.25
Requires-Dist: httpx>=0.27
Requires-Dist: requests>=2.31
Requires-Dist: arxiv>=2.0
Requires-Dist: beautifulsoup4>=4.12
Requires-Dist: lxml>=5.0
Requires-Dist: jsonlines>=4.0
Requires-Dist: tenacity>=8.2
Requires-Dist: tiktoken>=0.7
Provides-Extra: dev
Requires-Dist: pytest>=8.2; extra == "dev"
Requires-Dist: pytest-asyncio>=0.23; extra == "dev"
Requires-Dist: pytest-cov>=4.0; extra == "dev"
Requires-Dist: ruff>=0.4; extra == "dev"
Requires-Dist: mypy>=1.10; extra == "dev"
Requires-Dist: playwright>=1.40; extra == "dev"
Provides-Extra: cli
Requires-Dist: nodeenv>=1.9; extra == "cli"
Provides-Extra: browser
Requires-Dist: playwright>=1.40; extra == "browser"
Provides-Extra: docker
Requires-Dist: docker>=7.0; extra == "docker"
Provides-Extra: local-embeddings
Requires-Dist: sentence-transformers>=3.0; extra == "local-embeddings"
Provides-Extra: tui
Requires-Dist: textual>=0.70; extra == "tui"
Requires-Dist: textual-dev; extra == "tui"
Provides-Extra: dashboard
Requires-Dist: fastapi>=0.100; extra == "dashboard"
Requires-Dist: uvicorn>=0.23; extra == "dashboard"
Requires-Dist: websockets>=11; extra == "dashboard"
Provides-Extra: api
Requires-Dist: fastapi>=0.100; extra == "api"
Requires-Dist: uvicorn>=0.23; extra == "api"
Provides-Extra: acp
Requires-Dist: pydantic>=2.7; extra == "acp"
Provides-Extra: gateway
Requires-Dist: python-telegram-bot>=20; extra == "gateway"
Requires-Dist: discord.py>=2.3; extra == "gateway"
Requires-Dist: slack-sdk>=3; extra == "gateway"
Requires-Dist: matrix-nio>=0.20; extra == "gateway"
Requires-Dist: aiohttp>=3.8; extra == "gateway"
Provides-Extra: voice
Requires-Dist: faster-whisper>=1.0; extra == "voice"
Requires-Dist: groq>=0.4; extra == "voice"
Requires-Dist: elevenlabs>=0.3; extra == "voice"
Requires-Dist: mistral>=0.3; extra == "voice"
Requires-Dist: xai>=0.1; extra == "voice"
Requires-Dist: openai-tts>=0.1; extra == "voice"
Provides-Extra: image-gen
Requires-Dist: fal-client>=0.1; extra == "image-gen"
Provides-Extra: mcp
Requires-Dist: mcp>=0.1; extra == "mcp"
Requires-Dist: anyio>=4; extra == "mcp"

# Enaya Agent

**Task-delegation AI agent with multi-agent orchestration, deep research, and structured planning.**

Built on Hermes Agent architecture principles — local-first, multi-provider, extensible.

## Quick Install

```bash
# From source
git clone https://github.com/tnvmac-web/Enaya-Agent.git
cd Enaya-Agent
pip install -e ".[dev]"

# Or install directly (when published)
pip install enaya-agent
```

## Quick Start

```bash
# Interactive chat
enaya chat

# Single query
enaya chat -q "Research the latest LLM agent architectures"

# Delegate a complex task
enaya delegate "Build a REST API with authentication and tests"

# Deep research
enaya research "Current state of distributed caching" --depth deep

# Create a plan
enaya plan "Implement user authentication system" --complexity moderate

# Switch model
enaya model openrouter:anthropic/claude-3.5-sonnet

# Setup wizard
enaya setup
```

## Core Capabilities

| Capability | Description |
|------------|-------------|
| **Delegation** | Spawn specialized subagents for parallel task execution |
| **Research** | Web search, academic papers, source validation, synthesis |
| **Planning** | Hierarchical task decomposition, phased execution plans |
| **Memory** | 5-layer persistent memory (Session, Episodic, Semantic, Procedural, Project) |
| **Codebase** | Code search, analysis, modification, testing |

## Architecture

```
┌─────────────────────────────────────────────────────────────┐
│                     Enaya Agent                             │
├─────────────────────────────────────────────────────────────┤
│  AIAgent (run_agent.py) — Single class, all entry points   │
├─────────────────────────────────────────────────────────────┤
│  Agent Loop          │  Prompt System      │  Provider Res  │
│  conversation_loop   │  prompt_builder     │  runtime_      │
│  context_compressor  │  anthropic_adapter  │  provider      │
├─────────────────────────────────────────────────────────────┤
│  Tools (50+)         │  Delegation         │  Memory        │
│  registry            │  orchestrator       │  5-layer       │
│  file/web/delegation │  task_queue         │  SQLite+Chroma │
│  research/planning   │  result_aggregator  │  project_index │
│  synthesis           │  policies           │                │
├─────────────────────────────────────────────────────────────┤
│  Interfaces: CLI • ACP (VS Code/Zed) • API Server • Gateway │
└─────────────────────────────────────────────────────────────┘
```

## Configuration

```yaml
# ~/.enaya/config.yaml
model: "openrouter:anthropic/claude-3.5-sonnet"
provider: "openrouter"
max_turns: 500
temperature: 0.7
toolsets: ["core", "research", "planning", "delegation", "synthesis"]
fallback_providers: []
compression_threshold: 0.50
prompt_caching: true
```

```bash
# ~/.enaya/.env
OPENROUTER_API_KEY=sk-...
ANTHROPIC_TOKEN=sk-ant-...
OPENAI_API_KEY=sk-...
NVIDIA_API_KEY=...
```

## Providers Supported

| Provider | Models | API Mode |
|----------|--------|----------|
| OpenRouter | Claude, GPT, Gemini, Llama, Nemotron | chat_completions |
| Anthropic | Claude 3.5 Sonnet/Haiku/Opus | anthropic_messages |
| OpenAI | GPT-4o, GPT-4o-mini, o1 | chat_completions |
| NVIDIA | Nemotron 3 Ultra, Llama 3.1 | chat_completions |
| Google | Gemini 1.5 Pro/Flash | chat_completions |
| Ollama | Local models | chat_completions |
| LM Studio | Local models | chat_completions |

## Skills (Bundled)

| Skill | Purpose |
|-------|---------|
| `enaya-research` | Deep research workflow |
| `enaya-planning` | Task decomposition & plan creation |
| `enaya-delegation` | Multi-agent orchestration |
| `enaya-code-review` | Automated code review |
| `enaya-doc-audit` | Documentation drift detection |

## Programmatic Integration

### ACP (VS Code, Zed, JetBrains)
```bash
enaya acp  # Starts JSON-RPC stdio server
```

### API Server (OpenAI-compatible)
```bash
enaya api-server  # Starts HTTP + SSE server
```

### Python Embedding
```python
from enaya.run_agent import create_agent

agent = create_agent(model="openrouter:anthropic/claude-3.5-sonnet")
result = agent.run_conversation("Research quantum computing advances")
```

## Development

```bash
# Setup
python -m venv venv
source venv/bin/activate
pip install -e ".[dev]"

# Test
pytest tests/ -n0 -q

# Lint
ruff check src/

# Type check
mypy src/enaya/

# Coverage
pytest --cov=enaya --cov-fail-under=60
```

## Project Structure

```
enaya-agent/
├── src/enaya/              # Core package
│   ├── agent/              # Agent loop & prompts
│   ├── cli/                # CLI commands
│   ├── tools/              # 50+ built-in tools
│   ├── delegation/         # Multi-agent orchestration
│   ├── research/           # Research pipeline
│   ├── planning/           # Planning engine
│   ├── memory/             # 5-layer memory
│   ├── gateway/            # Messaging gateway
│   ├── acp_adapter/        # ACP server
│   └── plugins/            # Plugin system
├── skills/                 # Bundled skills
├── tests/                  # Unit/integration/e2e
├── docs/                   # Documentation
├── pyproject.toml
├── AGENTS.md               # Development guide
├── HERMES.md               # Project context
└── README.md
```

## Design Principles

- **Platform-Agnostic Core**: One `AIAgent` serves CLI, gateway, ACP, API server
- **Observable Execution**: Every tool call visible via callbacks
- **Interruptible**: API calls and tools cancellable mid-flight
- **Loose Coupling**: Optional subsystems use registry patterns
- **Profile Isolation**: Multiple concurrent instances via `enaya -p <name>`

## License

MIT License — see LICENSE file.

## References

- Hermes Agent Architecture: https://hermes-agent.nousresearch.com/docs/developer-guide/architecture
- Original Hermes: https://github.com/NousResearch/hermes-agent
