Metadata-Version: 2.4
Name: jarvis-runtime
Version: 0.1.0a5
Summary: Jarvis Agent Runtime for executing ARP-style flows with planning support.
Author: Agent Runtime Protocol
License: MIT License
        
        Copyright (c) 2025 AgentRuntimeProtocol
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Repository, https://github.com/AgentRuntimeProtocol/JARVIS_Runtime
Project-URL: Issues, https://github.com/AgentRuntimeProtocol/JARVIS_Runtime/issues
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: jarvis-model==0.1.0a5
Provides-Extra: inproc
Requires-Dist: jarvis-tool-registry>=0.1.0a5; extra == "inproc"
Provides-Extra: openai
Requires-Dist: openai>=1.0.0; extra == "openai"
Provides-Extra: dev
Requires-Dist: pyright>=1.1.0; extra == "dev"
Requires-Dist: pytest>=7; extra == "dev"
Requires-Dist: pytest-cov>=4; extra == "dev"
Dynamic: license-file

# JARVIS Runtime

This repo contains the **Jarvis Agent Runtime**: a Python runtime for executing Agent Runtime Protocol-style agent flows using the 3-role loop:

Planner → Tool Executor (arg-gen + invoke) → Chat

It is designed to run against the `Tool_Registry` service and share contracts via `jarvis-model`.

## Quickstart

See:

- `docs/quickstart.md`
- `docs/trace.md`

## Install

From PyPI (once published):

```bash
pipx install jarvis-runtime
```

Pre-release (e.g. `0.1.0a1`):

```bash
pipx install --pip-args="--pre" jarvis-runtime
```

Or in a virtualenv:

```bash
pip install jarvis-runtime
```

For `--tool-registry inproc`, install Tool Registry too:

```bash
pip install jarvis-tool-registry
```

Or install the extra:

```bash
pip install "jarvis-runtime[inproc]"
```

## Run against a real Tool Registry service

Terminal A (Tool Registry):

```bash
tool-registry
```

Terminal B (Runtime):

```bash
jarvis-runtime demo --tool-registry http --tool-registry-url http://127.0.0.1:8000
```

## OpenAI mode (optional)

This runtime uses the OpenAI Python SDK for Responses parsing + structured outputs. To enable it:

```bash
pip install -e ".[openai]"
export OPENAI_API_KEY=...
jarvis-runtime demo --mode openai --tool-registry inproc
```

Optional model overrides:

- `JARVIS_MODEL_PLANNER`
- `JARVIS_MODEL_TOOL_ARGS`
- `JARVIS_MODEL_CHAT`
- `JARVIS_MODEL_DEFAULT`

## Validation

Unit tests:

```bash
python -m unittest discover -v
```

Or (if you have `pytest` installed):

```bash
pytest -q
```

Typecheck (pyright):

```bash
pyright -p pyrightconfig.json
```

## Design docs

- `docs/intro.md`
- `docs/design/overview.md`

## Repo boundaries

- This repo: flow execution, LLM role orchestration, runtime packaging.
- `Tool_Registry` (separate repo): tool discovery + schemas + invocation routing (+ MCP aggregation).
- `JARVIS/Model` (separate repo): shared schemas / data model (and eventually the ARP wire protocol spec).

## MVP capabilities + known gaps

Capabilities:

- Stub-mode 3-role loop (Planner → Tool → Chat) with trace JSONL.
- Tool Registry integration via HTTP (and `inproc` for tests/sandboxed environments).
- Trace replay: rerun Chat from recorded tool results.

Known gaps:

- No production hardening (auth, multi-tenancy, concurrency controls, streaming, persistence).
- Prompt packs and planning heuristics are MVP-grade; no memory/scheduler/control plane yet.
