Metadata-Version: 2.4
Name: olav
Version: 0.14.5
Summary: OLAV — AI-native platform for autonomous operations with domain-aware agents, API-as-Tool, and Agent Harness
Project-URL: Homepage, https://github.com/olav-ai/olav
Project-URL: Repository, https://github.com/olav-ai/olav
Author: OLAV Team
License: BSL-1.1
License-File: LICENSE
Keywords: agent,agentic-platform,aiops,api-as-tool,deepagents,langgraph
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: System :: Networking :: Monitoring
Requires-Python: >=3.11
Requires-Dist: ddgs>=9.11.4
Requires-Dist: deepagents<1.0,>=0.5.0
Requires-Dist: duckdb-engine>=0.17.0
Requires-Dist: duckdb>=0.8.0
Requires-Dist: duckduckgo-search>=3.0.0
Requires-Dist: fastapi>=0.109.0
Requires-Dist: httpx>=0.24.0
Requires-Dist: lancedb>=0.29.2
Requires-Dist: langchain-community>=0.4.1
Requires-Dist: langchain-core>=0.1.0
Requires-Dist: langchain-ollama>=0.1.0
Requires-Dist: langchain-openai>=0.0.1
Requires-Dist: langchain>=0.1.0
Requires-Dist: langgraph-checkpoint-sqlite>=3.0.0
Requires-Dist: langgraph>=1.0.8
Requires-Dist: nest-asyncio>=1.5.0
Requires-Dist: netutils>=1.17.1
Requires-Dist: networkx>=3.6.1
Requires-Dist: ntc-templates>=9.0.0
Requires-Dist: numpy>=2.4.1
Requires-Dist: pandas>=3.0.1
Requires-Dist: pdfplumber>=0.11.9
Requires-Dist: prompt-toolkit>=3.0.0
Requires-Dist: pydantic-settings>=2.0
Requires-Dist: pydantic>=2.0
Requires-Dist: pypdf2>=3.0.0
Requires-Dist: python-crontab>=3.0.0
Requires-Dist: python-dateutil>=2.8.0
Requires-Dist: python-frontmatter>=1.1.0
Requires-Dist: pytz>=2024.1
Requires-Dist: pyyaml>=6.0
Requires-Dist: requests>=2.31.0
Requires-Dist: rich>=13.0
Requires-Dist: ruptures>=1.1.9
Requires-Dist: scikit-learn>=1.8.0
Requires-Dist: scipy>=1.17.1
Requires-Dist: sentence-transformers>=5.2.3
Requires-Dist: sqlalchemy>=2.0
Requires-Dist: tenacity>=8.0
Requires-Dist: textfsm>=1.1.3
Requires-Dist: typer>=0.9.0
Requires-Dist: uvicorn[standard]>=0.27.0
Provides-Extra: dev
Requires-Dist: black>=23.0; extra == 'dev'
Requires-Dist: mypy>=1.5.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
Requires-Dist: pytest-cov>=4.0; extra == 'dev'
Requires-Dist: pytest-timeout>=2.4.0; extra == 'dev'
Requires-Dist: pytest>=7.0; extra == 'dev'
Requires-Dist: ruff>=0.1.0; extra == 'dev'
Provides-Extra: enterprise
Requires-Dist: pyjwt>=2.8.0; extra == 'enterprise'
Requires-Dist: tink>=1.14.1; extra == 'enterprise'
Provides-Extra: gnmi
Requires-Dist: pygnmi>=0.8.0; extra == 'gnmi'
Provides-Extra: ldap
Requires-Dist: ldap3>=2.9; extra == 'ldap'
Provides-Extra: netops
Provides-Extra: tui
Requires-Dist: deepagents-cli==0.0.10; extra == 'tui'
Requires-Dist: markdownify>=0.13.0; extra == 'tui'
Requires-Dist: pyjwt>=2.12.1; extra == 'tui'
Requires-Dist: tavily-python>=0.3.0; extra == 'tui'
Description-Content-Type: text/markdown

<p align="center">
  <img src="src/olav_logo.png" alt="OLAV Logo" width="200">
</p>

<h1 align="center">OLAV 🐺</h1>

<p align="center">
  <strong>Online Analytical Vertex for Agentic Operations</strong><br>
  AI-native platform for autonomous infrastructure operations.
</p>

<p align="center">
  <a href="https://pypi.org/project/olav/">
    <img src="https://img.shields.io/badge/version-v0.13.0-blue" alt="Version">
  </a>
  <a href="">
    <img src="https://img.shields.io/badge/license-BSL--1.1-green" alt="License">
  </a>
  <a href="">
    <img src="https://img.shields.io/badge/python-3.11+-yellow" alt="Python">
  </a>
  <a href="https://docs.olavai.com">
    <img src="https://img.shields.io/badge/docs-docs.olavai.com-blue" alt="Docs">
  </a>
  <a href="https://olavai.com">
    <img src="https://img.shields.io/badge/website-olavai.com-blueviolet" alt="Website">
  </a>
</p>

<p align="center">
  <a href="src/README_ZH.md">中文文档</a>
</p>

> Control your infrastructure with natural language. Connect any REST API in one command, query it instantly, generate environment-aware automation scripts — no MCP servers, no code generation, no runtime complexity.

```bash
pip install olav
olav registry register http://netbox:8000      # connect any API
olav --agent infra "how many devices in NetBox?" # query immediately
olav --agent devops "write a backup script"      # generate real scripts
```

[Quick Start](#quick-start) | [Blog: v0.13 Release](https://olavai.com/blog/olav-v013) | [中文](src/README_ZH.md)

---

## Why OLAV?

### API-as-Service — Beyond MCP

MCP requires a server process per service, stdio/HTTP transport, and framework-specific adapters. OLAV takes a different approach:

```
MCP:   Service → MCP server process → stdio/HTTP → adapter → agent
OLAV:  Service → olav registry register → reference markdown → api_request → done
```

One command. No server processes. No generated code. No runtime overhead.

```bash
# Register once
olav registry register http://netbox:8000

# Query from any agent, forever
olav "how many devices are in NetBox?"
olav --agent infra "compare OLAV database vs NetBox — are they in sync?"
```

The `api_request` tool is **schema-aware** — it reads API reference docs generated at registration time, handles pagination (DRF/NetBox style), and manages auth (JWT/Bearer/API-key) automatically.

### Six Specialized Agents — Not One Omniscient Model

```
olav "quick question"                    → Quick Agent (80% of daily use)
olav --agent infra "query NetBox"        → Infra Agent (API read + write)
olav --agent devops "write a script"     → DevOps Agent (environment-aware)
olav --agent ops "simulate link failure" → Ops Agent (network operations)
olav --agent audit "run health check"    → Audit Agent (compliance reports)
```

Each agent has **only the tools it needs**. The analysis agent can't SSH to devices. The infra agent can't modify the network. Principle of least authority, enforced by the harness.

### DevOps Agent — Scripts for YOUR Infrastructure

The DevOps agent doesn't write templates. It queries your actual database first:

```bash
olav --agent devops "write a script to backup all router configs"
```

It discovers R1 (192.168.100.101, Juniper), R2-R4 (Cisco IOS), SW1-SW2, then generates a 158-line bash script with:
- Platform-specific commands (`show run` vs `show configuration`)
- `--dry-run` flag, error handling, dependency checks
- Exported to `exports/scripts/backup-configs.sh` — a real file, not chat text

### 7-Layer Write Security

AI agents that can write to production need more than HITL approval:

| Layer | Defense | Bypassable? |
|-------|---------|:-----------:|
| `--enable-api-write` | Write mode locked by default | No |
| `services.yaml readonly_only` | Per-service read/write control | Config only |
| Dry-run simulation | Must pass before approval offered | No |
| HITL approval | User sees diff, then confirms | **Not skippable** |
| `sandbox_guard hard_block` | HTTP writes in isolated sandbox | **Not skippable** |
| `unshare --net` | Kernel-level network isolation | **Not skippable** |
| Audit trail | Every api_request logged | — |

`--dangerously-skip-permissions` bypasses tool approval for testing — but **cannot** bypass API write approval. Network devices are always read-only.

### Agent Harness — The OS for AI Agents

Every agent decision passes through a mandatory execution control layer:

```
Layer 0: AAA        Token/LDAP/OIDC auth → RBAC → full audit trail
Layer 1: Middleware  HITL interception + memory injection
Layer 2: Sandbox    Pre-scan → DuckDB read-only → network namespace isolation
Layer 3: Output     Credential redaction + SSE encoding
```

### Self-Improving Loop

```
Use OLAV → audit log captures every tool call
    → failure patterns extracted → written to LanceDB memory
    → future runs recall constraints before acting
```

7,650+ audit messages captured. Export as SFT/trajectory training data: `olav log export sft`.

---

## Quick Start

```bash
# 1. Install
pip install olav

# 2. Initialize
olav init

# 3. Configure LLM
export OLAV_LLM_API_KEY="sk-..."

# 4. Connect a service
olav registry register http://netbox:8000

# 5. Query
olav "how many devices are in NetBox?"

# 6. Generate scripts
olav --agent devops "write a backup script for all routers"
```

### Network Operations (optional)

```bash
pip install olav-netops

olav --agent ops "/netops_init"                    # collect device data via SSH
olav --agent ops "simulate R2 link failure"        # What-If analysis
olav --agent ops-lab "deploy digital twin"         # ContainerLab validation
```

### Other Interfaces

```bash
olav                            # interactive TUI
olav service web start          # web UI at localhost:2280
olav --agent core "run: df -h"  # shell commands via Core Agent
```

---

## Architecture

```
olav v0.13 (pip install olav)
├── core     — Tools: api_request, execute_sql, sandbox, export
├── quick    — Fast queries (default agent)
├── infra    — API read + write (--enable-api-write)
├── devops   — Environment-aware script generation
├── audit    — Compliance profiles + health reports
└── config   — Platform management

olav-netops v0.13 (pip install olav-netops)
├── ops orchestrator
│   ├── analysis — Dijkstra + ECMP simulation (networkx)
│   ├── probe    — Parallel SSH with command whitelist (Nornir)
│   ├── diff     — Cross-snapshot drift detection
│   └── lab      — ContainerLab digital twin + commit-validate
└── netops.*     — DuckDB tables + TextFSM collection pipeline
```

**Tech Stack**: LangChain · LangGraph · DeepAgents · DuckDB · LanceDB · FastAPI · NetworkX

---

## By the Numbers

| Metric | Value |
|--------|:-----:|
| Tests | 1,358 passing |
| DDD Claims | 44 verified |
| Issues closed | 62+ |
| Doc pages | 28 (EN + ZH) |
| Audit messages | 7,650+ |

---

## Documentation

**Docs**: [docs.olavai.com](https://docs.olavai.com) · **Website**: [olavai.com](https://olavai.com) · **Blog**: [v0.13 Release](https://olavai.com/blog/olav-v013)

---

## License

[BSL-1.1](LICENSE) — Business Source License 1.1
