Metadata-Version: 2.4
Name: digitorn
Version: 1.0.1
Summary: Declarative AI agent framework - build agent applications in YAML
License: Apache-2.0
License-File: LICENSE
Keywords: ai,agent,llm,framework,yaml,multi-agent,mcp
Author: Paul Mbathe
Author-email: mbathepaul@gmail.com
Requires-Python: >=3.12,<4.0
Classifier: Development Status :: 4 - Beta
Classifier: Framework :: FastAPI
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Provides-Extra: all
Provides-Extra: browser
Provides-Extra: chromadb
Provides-Extra: datascience
Provides-Extra: desktop
Provides-Extra: elasticsearch
Provides-Extra: lancedb
Provides-Extra: ldap
Provides-Extra: mongo
Provides-Extra: pdf
Provides-Extra: pinecone
Provides-Extra: postgres
Provides-Extra: redis
Provides-Extra: rss
Provides-Extra: transcribe
Provides-Extra: voice
Requires-Dist: Pillow (>=10.0,<11.0)
Requires-Dist: PyJWT (>=2.9,<3.0)
Requires-Dist: PyYAML (>=6.0,<7.0)
Requires-Dist: aiohttp (>=3.9,<4.0)
Requires-Dist: aiosqlite (>=0.20,<0.21)
Requires-Dist: alembic (>=1.13,<2.0)
Requires-Dist: anthropic (>=0.40)
Requires-Dist: asyncpg (>=0.31.0,<0.32.0) ; extra == "postgres" or extra == "all"
Requires-Dist: bcrypt (>=5.0,<6.0)
Requires-Dist: beautifulsoup4 (>=4.12,<5.0)
Requires-Dist: chromadb (>=0.5,<0.6) ; extra == "chromadb" or extra == "all"
Requires-Dist: croniter (>=2.0,<3.0)
Requires-Dist: cryptography (>=43.0,<48.0)
Requires-Dist: diskcache (>=5.6.3,<6.0.0)
Requires-Dist: edge-tts (>=7.0,<8.0) ; extra == "voice" or extra == "all"
Requires-Dist: elasticsearch (>=8.0,<9.0) ; extra == "elasticsearch" or extra == "all"
Requires-Dist: fastapi (>=0.115,<0.116)
Requires-Dist: fastembed (>=0.5,<0.6)
Requires-Dist: faster-whisper (>=1.0,<2.0) ; extra == "transcribe" or extra == "all"
Requires-Dist: feedparser (>=6.0,<7.0) ; extra == "rss" or extra == "all"
Requires-Dist: html2text (>=2024.2,<2025.0)
Requires-Dist: httpx (>=0.28,<0.29)
Requires-Dist: lancedb (>=0.6,<0.7) ; extra == "lancedb" or extra == "all"
Requires-Dist: ldap3 (>=2.9,<3.0) ; extra == "ldap" or extra == "all"
Requires-Dist: litellm (>=1.83)
Requires-Dist: lxml (>=5.0,<6.0)
Requires-Dist: markdown (>=3.5,<4.0) ; extra == "pdf" or extra == "all"
Requires-Dist: matplotlib (>=3.8,<4.0) ; extra == "datascience" or extra == "all"
Requires-Dist: mcp (>=1.26,<2.0)
Requires-Dist: motor (>=3.3,<4.0) ; extra == "mongo" or extra == "all"
Requires-Dist: mss (>=9.0,<10.0) ; extra == "desktop" or extra == "all"
Requires-Dist: numpy (>=1.26,<3.0) ; extra == "datascience" or extra == "all"
Requires-Dist: odfpy (>=1.4,<2.0)
Requires-Dist: openai (>=1.0,<3.0)
Requires-Dist: openpyxl (>=3.1,<4.0)
Requires-Dist: pinecone-client (>=3.0,<4.0) ; extra == "pinecone" or extra == "all"
Requires-Dist: platformdirs (>=4.0,<5.0)
Requires-Dist: playwright (>=1.50,<2.0) ; extra == "browser" or extra == "all"
Requires-Dist: prompt-toolkit (>=3.0.52,<4.0.0)
Requires-Dist: psutil (>=6.0,<7.0)
Requires-Dist: psycopg[binary] (>=3.3,<4.0) ; extra == "postgres"
Requires-Dist: pyarrow (>=15.0,<22.0) ; extra == "datascience" or extra == "all"
Requires-Dist: pyautogui (>=0.9,<0.10) ; extra == "desktop" or extra == "all"
Requires-Dist: pydantic (>=2.0,<3.0)
Requires-Dist: pydantic-settings (>=2.0,<3.0)
Requires-Dist: pygments (>=2.17,<3.0)
Requires-Dist: pymupdf (>=1.24,<2.0)
Requires-Dist: pyreadline3 (>=3.4,<4.0) ; sys_platform == "win32"
Requires-Dist: python-docx (>=1.1,<2.0)
Requires-Dist: python-multipart (>=0.0.22,<0.0.23)
Requires-Dist: python-pptx (>=1.0,<2.0)
Requires-Dist: python-socketio[asyncio] (>=5.16,<6.0)
Requires-Dist: pywin32 (>=306) ; sys_platform == "win32"
Requires-Dist: qdrant-client (>=1.12,<2.0)
Requires-Dist: redis[hiredis] (>=5.0,<6.0) ; extra == "redis" or extra == "all"
Requires-Dist: rich (>=14.0,<15.0)
Requires-Dist: sqlalchemy[asyncio] (>=2.0,<3.0)
Requires-Dist: striprtf (>=0.0.27,<0.0.28)
Requires-Dist: structlog (>=24.0,<25.0)
Requires-Dist: textual (>=8.1.1,<9.0.0)
Requires-Dist: tomli (>=2.0,<3.0) ; python_version < "3.12"
Requires-Dist: typer (>=0.15,<0.16)
Requires-Dist: tzdata (>=2024.1) ; sys_platform == "win32"
Requires-Dist: uvicorn[standard] (>=0.35,<1.0)
Requires-Dist: watchfiles (>=1.0,<2.0)
Requires-Dist: weasyprint (>=64.0,<65.0) ; extra == "pdf" or extra == "all"
Requires-Dist: winloop (>=0.6.3,<0.7.0) ; sys_platform == "win32"
Requires-Dist: xlsxwriter (>=3.1,<4.0)
Project-URL: Documentation, https://docs.digitorn.ai
Project-URL: Homepage, https://digitorn.ai
Project-URL: Repository, https://github.com/mbathe/digitorn-bridge
Description-Content-Type: text/markdown

# Digitorn

Digitorn is an interpreter for AI agents. Install it once, write a
YAML manifest, run it. Same model as `python` for `.py` or `node`
for `.js`.

```yaml
app:
  app_id: hello

agents:
  - id: main
    role: assistant
    brain:
      provider: deepseek
      model: deepseek-chat
      backend: openai_compat
      config:
        api_key: "{{env.DEEPSEEK_API_KEY}}"
        base_url: "https://api.deepseek.com/v1"
    system_prompt: "Reply with one short sentence."
```

```bash
digitorn dev deploy hello.yaml --scope user
digitorn dev chat hello -m "ping"
# pong
```

That YAML is the entire app. No Python loop to wire up. No SDK
glue code. No context-window bookkeeping. No tool dispatcher to
implement. The interpreter handles all of it.

## Why declarative

Every layer of the stack has moved from imperative to declarative
because the declarative version scales better, audits cleaner,
and removes glue code:

- Bash scripts → Terraform
- `docker run` → Kubernetes manifests
- jQuery → React
- Manual SQL → ORM and migration specs

AI agents are the next layer. Writing the orchestration loop,
the tool dispatcher, the retry policy, the sandbox, and the cost
cap by hand is the bash-scripts-for-infra of the agent era.
Digitorn makes the manifest the source of truth and runs
everything from it.

## What the interpreter handles

A single `digitorn start` brings every primitive a production
agent needs:

- 23 modules: filesystem, shell, web, http, RAG, vector,
  database, LSP, MCP, channels (webhook / cron / email / slack /
  discord / voice / ...), memory, workspace, widgets, ...
- 16 middleware: secret masking, content filter, RAG injection,
  retry, circuit breaker, dedup, audit, ...
- Multi-agent orchestration with sub-agent spawning
- OS-level sandbox (Landlock / seccomp / Job Objects)
- Credentials vault (OAuth2, API key, mTLS, ...)
- Real-time event stream over Socket.IO
- Behavior engine with declarative rules

Adding a new capability to your agent is one YAML key, not a
`pip install` plus integration code.

## Install

### Windows

```powershell
irm https://digitorn.ai/install.ps1 | iex
```

### macOS / Linux

```bash
curl -fsSL https://digitorn.ai/install.sh | sh
```

The installer fetches Python 3.12 via [uv](https://docs.astral.sh/uv/),
installs the `digitorn` CLI, registers a background service
(Windows Service / launchd / systemd), and starts the
interpreter on `http://127.0.0.1:8000`.

Already have Python 3.12?

```bash
pip install digitorn         # or: uv tool install digitorn
digitorn service install
digitorn service start
```

## First steps

```bash
digitorn doctor                       # check the environment
digitorn init my-app && cd my-app     # scaffold a project
digitorn dev deploy app.yaml          # push to the local interpreter
digitorn dev chat my-app              # interactive chat
```

Full reference: [docs.digitorn.ai](https://docs.digitorn.ai).

## Requirements

- Windows 10+, macOS 12+, or a recent Linux distro
- Python 3.12 (the installer fetches it via uv if missing)
- 2 GB free disk space for the model cache (embeddings, ONNX runtimes)
- Outbound HTTPS for LLM providers and MCP servers you choose to use

## Operating the interpreter

```bash
digitorn service status               # is it running?
digitorn service logs                 # last 50 lines
digitorn service stop                 # stop until next boot
digitorn service start                # start again
digitorn service uninstall            # remove the service
```

Logs:

- Windows: Event Viewer (`Applications and Services Logs > DigitornDaemon`)
- macOS: `~/Library/Logs/digitorn/`
- Linux: `journalctl --user -u digitorn`

The interpreter also writes structured logs to `~/.digitorn/logs/`.

## Development

```bash
git clone https://github.com/mbathe/digitorn-bridge
cd digitorn-bridge
uv sync                               # or: poetry install
uv run digitorn start                 # foreground, with the venv's deps
```

## License

Apache 2.0. See [LICENSE](LICENSE).

