Metadata-Version: 2.4
Name: elidia-agent-cli
Version: 0.6.2
Summary: Elidia Agent CLI — Universal AI Agent for your terminal
Author-email: Elidia Technology Pvt Ltd <support@aiutils.io>
License-Expression: LicenseRef-Proprietary
Project-URL: Homepage, https://elidia.dev
Project-URL: Repository, https://github.com/Elidia-Technology/elidia-agent-cli
Project-URL: Documentation, https://docs.elidia.dev
Project-URL: Issues, https://github.com/Elidia-Technology/elidia-agent-cli/issues
Project-URL: Changelog, https://github.com/Elidia-Technology/elidia-agent-cli/blob/main/CHANGELOG.md
Keywords: ai,agent,cli,llm,mcp,coding-assistant,terminal
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Code Generators
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: click>=8.1
Requires-Dist: rich>=13.0
Requires-Dist: prompt-toolkit>=3.0
Requires-Dist: httpx[http2]>=0.27
Requires-Dist: keyring>=25.0
Requires-Dist: sqlite-vec>=0.1.9
Requires-Dist: pyyaml>=6.0
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.24; extra == "dev"
Requires-Dist: pytest-cov>=5.0; extra == "dev"
Requires-Dist: ruff>=0.5; extra == "dev"
Requires-Dist: aiosmtpd>=1.4; extra == "dev"
Provides-Extra: local
Requires-Dist: torch>=2.0; extra == "local"
Requires-Dist: diffusers>=0.27; extra == "local"
Requires-Dist: Pillow>=10.0; extra == "local"
Provides-Extra: rag
Requires-Dist: pymupdf>=1.24; extra == "rag"
Requires-Dist: python-docx>=1.1; extra == "rag"
Requires-Dist: openpyxl>=3.1; extra == "rag"
Requires-Dist: python-pptx>=0.6; extra == "rag"
Provides-Extra: pdf
Requires-Dist: playwright>=1.45; extra == "pdf"
Provides-Extra: database
Requires-Dist: sqlalchemy>=2.0; extra == "database"
Requires-Dist: sqlparse>=0.5; extra == "database"
Provides-Extra: calendar
Requires-Dist: icalendar>=5.0; extra == "calendar"
Provides-Extra: docs
Requires-Dist: mkdocs>=1.6; extra == "docs"
Requires-Dist: mkdocs-material>=9.5; extra == "docs"
Requires-Dist: mkdocstrings[python]>=0.25; extra == "docs"
Dynamic: license-file

<p align="center">
  <h1 align="center">Elidia Agent CLI</h1>
  <p align="center"><strong>Universal AI Agent for your terminal</strong></p>
  <p align="center">
    Code, research, create, orchestrate — with 50 LLMs, 36+ tools, and 5 execution modes.
  </p>
  <p align="center">
    <a href="https://pypi.org/project/elidia-agent-cli/"><img src="https://img.shields.io/pypi/v/elidia-agent-cli?color=blue" alt="PyPI"></a>
    <a href="https://pypi.org/project/elidia-agent-cli/"><img src="https://img.shields.io/pypi/pyversions/elidia-agent-cli" alt="Python"></a>
    <a href="LICENSE"><img src="https://img.shields.io/badge/license-Proprietary-red" alt="License"></a>
  </p>
</p>

---

## What is Elidia Agent CLI?

Elidia Agent CLI is a powerful terminal-based AI agent connecting you to **50 language models** through a single interface. It goes beyond chat — execute tools, run multi-model consensus, conduct deep research, generate images/video/audio, orchestrate complex workflows, and spawn parallel sub-agents (SWARM mode) — all from your terminal.

Powered by the [AiUtils Developer API](https://developer.aiutils.io), Elidia Agent CLI gives you access to models from OpenAI, Anthropic, Google, DeepSeek, Meta, Alibaba, and more — with a single API key.

## Key Features

### 🎨 Hermes-Style Terminal UI *(v0.6.0)*
- **ASCII art logo** — "ELIDIA AGENT" in ANSI Shadow at launch
- **Styled prompt bar** — model, mode, context usage, timing, and cost before each input
- **Rich welcome panel** — tools, MCP servers, execution modes, personas at a glance
- **Theme support** — 6 built-in themes (default, dark, light, ocean, sunset, minimal)

### 🤖 5 Execution Modes
- **DIRECT** — fast single-model answers for simple questions
- **CONSENSUS** — 2-3 models vote, synthesize the best response
- **HARNESS** — multi-step agent loop with planning, tool use, self-correction
- **DEEP** — extended reasoning with DeepEvaluator (8-dimension quality scoring)
- **SWARM** — parallel sub-agents with full tool access for complex tasks

### 🧠 Self-Learning System
- **OutcomeTracker** — records every task execution (model, success/failure, tokens, cost)
- **PatternLearner** — cross-session analysis for model optimization
- **KnowledgeGraph** — LLM-powered entity + relation extraction from conversations
- **Adaptive routing** — learned preferences influence model selection (30% weight)

### 📋 Project Orchestrator
- **SCRUM-style planning** — EPIC → Story → Ticket decomposition
- **SprintExecutor** — multi-agent parallel execution with dependency ordering
- **Iterative refinement** — 1-3 passes (small jobs) or 1-5 passes (large jobs)

### 🌐 Portal AI Tools (141+ from AiUtils.io)
- **Seamless access** to all 141+ AI tools from the [AiUtils.io](https://aiutils.io) production portal
- **19 genres**: image_generation, video_generation, text_generation, audio_generation, code_generation, data_analysis, pdf_tools, image_editing, voiceover, content_writing, seo_tools, email_tools, social_media, chatbot, translation, research, automation, finance, legal
- **Auto-routing** — just describe your task naturally, the agent finds the right tool
- **Direct call** — `/call tool_slug --key=value` to invoke any portal tool directly
- **Discovery** — `/tools` shows compact count per category, `/tools <category>` lists tools, `/tools --full` shows all

### 🔧 Built-in Local Tools (12)
- **File system** — read, write, search, manage files
- **Git** — status, diff, log, commit
- **Terminal** — shell commands with permission controls
- **Web search** — multi-provider (Tavily, DuckDuckGo)
- **Browser** — Playwright-based web automation
- **Database** — read-only SQL with permission controls
- **Email** — SMTP send + IMAP search/read
- **Calendar** — local .ics read/write, conflict detection
- **Office** — PDF, DOCX, PPTX, XLSX read/write
- **File upload** — PDF, DOC/DOCX, PPT/PPTX, CSV, TXT, XLS/XLSX, images, code (max 10 files, 50MB each)
- **RAG** — local vector search with bge-m3 1024-dim embeddings
- **MCP support** — connect any MCP-compatible server (5 built-in defaults included)

### 🔬 Research Pipeline
- **5-stage pipeline** — Decompose → Search → Analyze → Synthesize → Verify
- **Cross-reference verification** — claims checked against search sources (not circular self-check)
- **Export** — Markdown or HTML reports with citations

### 🎨 Creative Generation
- **Images** — FLUX, DALL-E, Stable Diffusion (500+ models)
- **Video** — Kling, Minimax (500+ models)
- **Speech** — ElevenLabs, OpenAI TTS (100+ models)
- **Music** — Suno text-to-music

### 🧩 Memory & RAG
- **4-tier memory** — SYSTEM, USER, PROJECT, SESSION
- **AutoMemory** — detects corrections, preferences, confirmations
- **Vector search** — sqlite-vec with bge-m3 1024-dim embeddings
- **Auto-compaction** — summarizes sessions into persistent memory
- **Knowledge graph** — entities and relations extracted from conversations

### 🆕 v0.6.0 — Adopted from Hermes Agent (222K★) + OpenCode (190K★)
- **MoA Loop** — Mixture of Agents: 2-3 models run in PARALLEL with independent tool access, then synthesize
- **Context Compressor** — auto-summarizes long conversations using cheap model, detects overflow from 25+ providers
- **Tool Guardrails** — pre-execution safety: blocks destructive commands, path traversal, SSRF, DB drops
- **Skill Bundles** — 6 built-in skills + YAML-composed bundles (`/skill code-review`, `/bundle backend-dev`)
- **Provider Profiles** — 6 declarative provider configs (OpenAI, Anthropic, DeepSeek, Google, Ollama, AiUtils)
- **Credential Pool** — multi-API-key failover per provider with usage tracking
- **System Prompt Tiers** — stable/context/volatile architecture, cached for performance
- **Gateway Server** — WebSocket + REST API for remote agent access with DT enforcement + rate limiting
- **Voice Tools** — speech-to-text, text-to-speech, wake word detection
- **Per-Project Config** — auto-loads `.elidia/`, `AGENTS.md`, `CLAUDE.md` from project root
- **Feature Flags** — 10+ env-var gated features for safe experimental rollout
- **DT Billing** — usage bars, balance display, purchase integration with developer console

### 🔐 Security & Permissions
- **4-tier system** — AUTO, SESSION, EVERY_TIME, NEVER
- **Pre-execution guardrails** — blocks destructive commands, path traversal, SSRF attacks
- **Progressive trust** — auto-promotes trusted actions
- **Audit logging** — every tool execution logged
- **Keychain storage** — API keys via OS keychain, never plaintext
- **Message sanitization** — Unicode/surrogate cleanup before API calls

---

## Installation

### From PyPI (recommended)

```bash
pip install elidia-agent-cli
elidia auth login          # enter your AiUtils API key
elidia ask "Hello!"        # send your first message
```

**If `elidia` command not found**, add pip's bin directory to PATH:

```bash
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
```

### Requirements

- Python 3.11 or higher
- An AiUtils Developer API key ([get one here](https://developer.aiutils.io))
- macOS 12+, Ubuntu 22.04+, or Windows 10+

---

## Quick Start

```bash
# 1. Authenticate
elidia auth login

# 2. One-shot message
elidia ask "Write a Python function to reverse a string"

# 3. Interactive REPL (Hermes-style UI)
elidia

# 4. With file context
elidia ask --file report.pdf "Summarize this document"

# 5. With image analysis
elidia ask --image photo.jpg "What's in this image?"

# 6. Research mode
elidia ask --mode research "Compare PostgreSQL vs MongoDB for time-series data"

# 7. Specific model
elidia ask --model claude-sonnet-4-6 "Review this code for bugs"
```

## Using Portal AI Tools (141+)

All 141+ AI tools from [AiUtils.io](https://aiutils.io) are available through the CLI, Desktop, Mobile, and VS Code variants.

### How to call a portal tool

**Auto-routing** — type your request naturally, the agent finds the right tool:
```
> Generate a professional headshot from my photo
> Create a logo for my startup called "NovaTech"  
> Transcribe this video and translate to Spanish
> Analyze sentiment of these customer reviews
```

**Direct call** — use `/call` to invoke a specific tool by its slug:
```
/call image_generator --prompt="sunset over mountains" --style="realistic"
/call pdf_summarizer --url="https://example.com/report.pdf"
/call voiceover_generator --text="Hello world" --voice="en-US-female"
/call logo_designer --brand_name="NovaTech" --industry="technology"
```

### Discover available tools
```
/tools                     # compact summary: counts per category
/tools image_generation     # detailed list for one category  
/tools --full               # all 141+ tools with descriptions
```

### Portal tool categories

| Genre | Count | Example tools |
|---|---|---|
| image_generation | 20+ | image_generator, logo_designer, background_remover, face_swap |
| video_generation | 10+ | video_creator, video_mixer, video_translator |
| audio_generation | 15+ | text_to_speech, voice_cloner, podcast_generator, music_composer |
| content_writing | 12+ | article_writer, blog_generator, ad_copy_creator, product_description |
| code_generation | 8+ | code_generator, code_reviewer, api_designer, test_writer |
| data_analysis | 10+ | data_visualizer, sentiment_analyzer, report_generator |
| pdf_tools | 8+ | pdf_merger, pdf_converter, pdf_summarizer, pdf_editor |
| image_editing | 8+ | image_resizer, photo_enhancer, color_corrector, watermark_remover |
| voiceover | 6+ | voiceover_generator, voice_cloner, dubbing_tool |
| seo_tools | 6+ | keyword_researcher, seo_auditor, meta_tag_generator |
| email_tools | 5+ | email_template_generator, email_campaign_designer |
| social_media | 5+ | social_post_generator, hashtag_researcher, carousel_designer |
| translation | 4+ | document_translator, website_translator, subtitle_translator |
| chatbot | 4+ | chatbot_builder, intent_classifier, response_generator |
| research | 4+ | research_assistant, paper_summarizer, citation_generator |
| finance | 4+ | invoice_generator, financial_report, expense_analyzer |
| legal | 4+ | contract_reviewer, legal_document_generator, compliance_checker |
| automation | 4+ | workflow_automator, data_pipeline, api_connector |
| text_generation | 3+ | text_summarizer, paraphraser, grammar_checker |

### Same tools across all variants

| Variant | How to access |
|---|---|
| **CLI** | Chat naturally or `/call <tool> --key=value` |
| **Desktop** | Chat naturally or `/call <tool>` in the chat input |
| **Mobile** | Chat naturally or `/call <tool>` in the chat input |
| **VS Code** | Open Elidia sidebar, chat or `/call <tool>` |

### Developer API (programmatic access)

```python
import httpx
# List all tools by genre
r = httpx.get("https://developer.aiutils.io/v1/tools/genres",
    headers={"Authorization": "Bearer ak-dev-YOUR_KEY"})
print(r.json())  # { "genres": {...}, "tools": [...] }

# Execute a specific tool
r = httpx.post("https://developer.aiutils.io/v1/tools/image_generator/execute",
    json={"inputs": {"prompt": "a cat sitting on a cloud", "style": "digital art"}},
    headers={"Authorization": "Bearer ak-dev-YOUR_KEY"})
print(r.json())  # { "task_id": "...", "result": "..." }
```

---

## All Commands

| Command | Description |
|---|---|
| `elidia` | Interactive REPL with Hermes-style UI and 29 slash commands |
| `elidia ask <msg>` | One-shot message (supports `--model`, `--mode`, `--file`, `--image`) |
| `elidia auth login/logout/status` | Manage API key |
| `elidia auth email-login/email-logout/email-status` | Email credentials |
| `elidia config show` | View configuration |
| `elidia config set <section.field> <value>` | Persist preferences |
| `elidia daemon start/stop/restart/status/init` | Background daemon |
| `elidia mcp list/health` | MCP server management |
| `elidia models` | List all 50 LLMs |
| `elidia models --local` | List local Ollama models |
| `elidia rag ingest/search/list/clear` | Local RAG document store |
| `elidia session list/new/delete` | Session management |
| `elidia version` | Show version |
| `elidia workflow run <file>` | Execute YAML workflow |

---

## REPL Commands (29 total)

| Command | Description |
|---|---|
| `/model [name]` | Switch model or show current |
| `/mode [mode]` | Switch mode (chat/code/research/think/create) |
| `/think [level]` | Set thinking depth (minimal/low/medium/high/max) |
| `/persona [slug]` | Switch domain persona (developer, doctor, lawyer, etc.) |
| `/research <query>` | 5-stage deep research pipeline |
| `/create image\|video\|speech\|music <prompt>` | AI media generation |
| `/workflow <file.yaml>` | Execute YAML workflow |
| `/tools [category]` | List available tools grouped by category |
| `/mcp [disconnect]` | MCP server status |
| `/image <path> [message]` | Attach image for vision analysis |
| `/rag ingest\|search\|list\|clear` | Manage RAG document store |
| `/memory search\|save\|forget\|list` | Persistent memory management |
| `/history [query]` | Search chat history |
| `/sessions` | List sessions |
| `/outcomes [best\|failures]` | Model performance rankings, failure patterns |
| `/analyze` | Full learning report (trends, preferences, routing hints) |
| `/knowledge [query]` | Search knowledge graph for entities and relations |
| `/balance` | Check DT balance |
| `/cost` | Session cost breakdown |
| `/budget` | Budget governor status |
| `/daemon status\|start\|stop` | Background daemon control |
| `/theme [name]` | Switch UI theme (default/dark/light/ocean/sunset/minimal) |
| `/cache [on\|off\|clear]` | Response cache control |
| `/pager [on\|off]` | Auto-pager for long responses |
| `/new` | Start new session (compacts current) |
| `/clear` | Clear conversation |
| `/rules` | Show project rules (.elidia/rules.md) |
| `/trust` | Show trust engine promotions |
| `/help [command]` | Show help |

---

## Available Models

### Language Models (LLMs) — 50 total
Claude (Opus, Sonnet, Haiku), GPT (4o, 4.5, 5.5, o3, o4-mini), Gemini (2.5 Pro/Flash), DeepSeek (V4, Reasoner), Llama (4 Scout/Maverick, 3.3 70B), Qwen (3, 2.5 72B), Mistral (Large, Codestral), and more across 6 vendors (OpenAI, Anthropic, DeepSeek, PIAPI/Elidia-1, Local/Ollama, Aiutils).

### Creative Models — available through `/create` and chat
| Category | Count | Examples |
|---|---|---|
| Image Generation | 500+ | FLUX, SDXL, DALL-E, Midjourney |
| Video Generation | 500+ | Runway, Pika, Kling, Sora |
| Audio/Music | 100+ | ElevenLabs, MusicGen, Whisper |
| 3D Generation | 50+ | TripoSR, Zero123++, Stable3D |

### Local Models — `elidia models --local`
Ollama models running on your machine. Zero API cost, works offline.
```bash
ollama pull llama3.2:3b
elidia models --local
```

---

## Configuration

`~/.elidia/config.toml`:

```toml
[api]
base_url = "https://developer.aiutils.io/v1"
timeout_seconds = 120

[models]
default = "claude-sonnet-4-6"
code = "claude-sonnet-4-6"
reasoning = "deepseek-reasoner"
creative = "auto"

[permissions]
default_level = "session"

[budget]
session_limit_dt = 50000.0

[theme]
name = "default"
```

---

## MCP Integration

Connect any MCP-compatible server:

```json
// ~/.elidia/mcp.json
{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": { "GITHUB_TOKEN": "ghp_..." }
    },
    "filesystem": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/dir"]
    }
  }
}
```

---

## Workflow Example

```yaml
# research.yaml
name: competitor-analysis
steps:
  - name: research
    type: llm
    prompt: "List top 5 AI coding assistants with key features"
    output: findings

  - name: analyze
    type: llm
    prompt: "Create a comparison table:\n{{findings}}"
    output: analysis

  - name: save
    type: shell
    command: "echo '{{analysis}}' > competitor-report.md"
```

```bash
elidia workflow run research.yaml
```

---

## Support

- **PyPI:** [pypi.org/project/elidia-agent-cli](https://pypi.org/project/elidia-agent-cli/)
- **GitHub:** [github.com/Elidia-Technology/elidia-agent-cli](https://github.com/Elidia-Technology/elidia-agent-cli)
- **Email:** support@aiutils.io

---

## License

Proprietary software. Copyright 2026 Elidia Technology Pvt Ltd. All Rights Reserved.
See [LICENSE](LICENSE) for full terms.
