Metadata-Version: 2.4
Name: chakra-marina
Version: 0.5.0
Summary: A framework for evaluating and optimizing agents and models using sandboxed environments.
Author: Chakra Labs
Author-email: Chakra Labs <info@chakra-labs.com>
License-Expression: Apache-2.0
License-File: LICENSE
Requires-Dist: pydantic>=2.11.7
Requires-Dist: shortuuid>=1.0.13
Requires-Dist: typer>=0.16.0
Requires-Dist: requests>=2.32.4
Requires-Dist: pyyaml>=6.0.2
Requires-Dist: rich>=14.1.0
Requires-Dist: toml>=0.10.2
Requires-Dist: tenacity>=9.1.2
Requires-Dist: python-dotenv>=1.1.1
Requires-Dist: litellm>=1.92.0
Requires-Dist: jinja2>=3.1.6
Requires-Dist: dirhash>=0.5.0
Requires-Dist: packaging>=25.0
Requires-Dist: fastapi>=0.128.0
Requires-Dist: uvicorn>=0.38.0
Requires-Dist: pathspec>=1.0.3
Requires-Dist: supabase>=2.28.2
Requires-Dist: httpx>=0.27.0
Requires-Dist: filelock>=3.29.4
Requires-Dist: platformdirs>=4.10.0
Requires-Dist: pyjwt>=2.10.1
Requires-Dist: claude-agent-sdk>=0.1.17 ; extra == 'adapter'
Requires-Dist: chakra-marina[cloud] ; extra == 'all'
Requires-Dist: chakra-marina[tinker] ; extra == 'all'
Requires-Dist: chakra-marina[computer-1] ; extra == 'all'
Requires-Dist: chakra-marina[dspy] ; extra == 'all'
Requires-Dist: chakra-marina[adapter] ; extra == 'all'
Requires-Dist: beam-client>=0.2.197 ; extra == 'beam'
Requires-Dist: dockerfile-parse>=2.0.1 ; extra == 'beam'
Requires-Dist: blaxel>=0.2.52 ; extra == 'blaxel'
Requires-Dist: dockerfile-parse>=2.0.1 ; extra == 'blaxel'
Requires-Dist: chakra-marina[cwsandbox] ; extra == 'cloud'
Requires-Dist: chakra-marina[wandb] ; extra == 'cloud'
Requires-Dist: chakra-marina[e2b] ; extra == 'cloud'
Requires-Dist: chakra-marina[daytona] ; extra == 'cloud'
Requires-Dist: chakra-marina[islo] ; extra == 'cloud'
Requires-Dist: chakra-marina[modal] ; extra == 'cloud'
Requires-Dist: chakra-marina[runloop] ; extra == 'cloud'
Requires-Dist: chakra-marina[langsmith] ; extra == 'cloud'
Requires-Dist: chakra-marina[gke] ; extra == 'cloud'
Requires-Dist: chakra-marina[ec2] ; extra == 'cloud'
Requires-Dist: chakra-marina[tensorlake] ; extra == 'cloud'
Requires-Dist: chakra-marina[novita] ; extra == 'cloud'
Requires-Dist: chakra-marina[use-computer] ; extra == 'cloud'
Requires-Dist: chakra-marina[blaxel] ; extra == 'cloud'
Requires-Dist: chakra-marina[cua] ; extra == 'cloud'
Requires-Dist: chakra-marina[opensandbox] ; extra == 'cloud'
Requires-Dist: chakra-marina[beam] ; extra == 'cloud'
Requires-Dist: chakra-marina[hyperbrowser] ; extra == 'cloud'
Requires-Dist: chakra-marina[hf-sandbox] ; extra == 'cloud'
Requires-Dist: openai>=2.0 ; extra == 'computer-1'
Requires-Dist: anthropic[bedrock]>=0.102.0 ; extra == 'computer-1'
Requires-Dist: google-genai>=2.3.0 ; extra == 'computer-1'
Requires-Dist: cua-train>=0.1.0 ; extra == 'cua'
Requires-Dist: cwsandbox>=0.23.3 ; extra == 'cwsandbox'
Requires-Dist: daytona>=0.192.0 ; extra == 'daytona'
Requires-Dist: dspy>=2.6.0 ; extra == 'dspy'
Requires-Dist: e2b>=2.25.0 ; extra == 'e2b'
Requires-Dist: dockerfile-parse>=2.0.1 ; extra == 'e2b'
Requires-Dist: boto3>=1.41.5 ; extra == 'ec2'
Requires-Dist: kubernetes>=32.0.0 ; extra == 'gke'
Requires-Dist: huggingface-hub>=1.22.0 ; extra == 'hf-sandbox'
Requires-Dist: datasets>=4.4.1 ; extra == 'huggingface'
Requires-Dist: hyperbrowser>=0.93.1 ; extra == 'hyperbrowser'
Requires-Dist: dockerfile-parse>=2.0.1 ; extra == 'hyperbrowser'
Requires-Dist: islo>=0.3.3 ; extra == 'islo'
Requires-Dist: dockerfile-parse>=2.0.1 ; extra == 'islo'
Requires-Dist: harbor-langsmith ; extra == 'langsmith'
Requires-Dist: langsmith[sandbox]>=0.8.8 ; extra == 'langsmith'
Requires-Dist: modal>=1.5.1 ; extra == 'modal'
Requires-Dist: dockerfile-parse>=2.0.1 ; extra == 'modal'
Requires-Dist: novita-sandbox>=2.0.6 ; extra == 'novita'
Requires-Dist: dockerfile-parse>=2.0.1 ; extra == 'novita'
Requires-Dist: opensandbox>=0.1.7 ; extra == 'opensandbox'
Requires-Dist: runloop-api-client>=1.23.2 ; extra == 'runloop'
Requires-Dist: dockerfile-parse>=2.0.1 ; extra == 'runloop'
Requires-Dist: skypilot-nightly>=0.10.0 ; extra == 'skypilot'
Requires-Dist: dockerfile-parse>=2.0.1 ; extra == 'skypilot'
Requires-Dist: tensorlake>=0.5.97 ; extra == 'tensorlake'
Requires-Dist: tinker>=0.14.0 ; extra == 'tinker'
Requires-Dist: tinker-cookbook>=0.1.0 ; extra == 'tinker'
Requires-Dist: transformers>=5.3.0,<=5.5.3 ; extra == 'tinker'
Requires-Dist: use-computer>=0.0.2 ; extra == 'use-computer'
Requires-Dist: wandb>=0.27 ; extra == 'wandb'
Requires-Dist: cwsandbox>=0.23.3 ; extra == 'wandb'
Requires-Python: >=3.12
Provides-Extra: adapter
Provides-Extra: all
Provides-Extra: beam
Provides-Extra: blaxel
Provides-Extra: cloud
Provides-Extra: computer-1
Provides-Extra: cua
Provides-Extra: cwsandbox
Provides-Extra: daytona
Provides-Extra: dspy
Provides-Extra: e2b
Provides-Extra: ec2
Provides-Extra: gke
Provides-Extra: hf-sandbox
Provides-Extra: huggingface
Provides-Extra: hyperbrowser
Provides-Extra: islo
Provides-Extra: langsmith
Provides-Extra: modal
Provides-Extra: novita
Provides-Extra: opensandbox
Provides-Extra: runloop
Provides-Extra: skypilot
Provides-Extra: tensorlake
Provides-Extra: tinker
Provides-Extra: use-computer
Provides-Extra: wandb
Description-Content-Type: text/markdown

<div align="left">
  <h1>
    <!-- <img
      src="https://github.com/user-attachments/assets/d797b9df-c2b6-4fbf-b99d-9cf4d287386a"
      alt="Chakra logo"
      width="48"
      height="48"
      style="vertical-align: middle;"
    /> -->
    <span style="vertical-align: middle;">Marina</span>
  </h1>
</div>

[![Tests](https://github.com/Chakra-Network/marina/actions/workflows/pytest.yml/badge.svg)](https://github.com/Chakra-Network/marina/actions/workflows/pytest.yml)
[![PyPI](https://img.shields.io/pypi/v/chakra-marina)](https://pypi.org/project/chakra-marina/)
[![Python 3.12+](https://img.shields.io/badge/python-3.12+-blue)](https://pypi.org/project/chakra-marina/)
[![License](https://img.shields.io/github/license/Chakra-Network/marina)](LICENSE)

<img
  src="https://github.com/user-attachments/assets/9c8be9dc-8154-4cef-9be0-ed9a99deff03"
  alt="Marina banner"
  width="100%"
/>

Marina is [Chakra Labs](https://chakra-labs.com)' fork of [Harbor](https://github.com/harbor-framework/harbor), the framework for evaluating and optimizing AI agents. Everything Harbor does, Marina does: run any agent (Claude Code, OpenHands, Codex CLI, and a dozen more) against any benchmark, fan out across thousands of cloud sandboxes, and collect ATIF trajectories for RL.

```bash
marina run -p examples/tasks/hello-screenshot --agent openhands-sdk --model openrouter/openai/gpt-5.5 --ae LLM_SUPPORTS_VISION=true
```

## Why the fork

We track upstream closely and keep the diff small. What we've added is what we needed to run harder evals: agents that can see, environments where time is part of the task, and trajectories that survive messy runs.

**Vision that actually lands in the trajectory.** `--ae LLM_SUPPORTS_VISION=true` forces vision on for models LiteLLM misclassifies, and MCP image observations get written to `/logs/agent/trajectory-images/` and referenced from the ATIF trajectory. Screenshots become rollout data instead of disappearing into the void.

**Time travel.** Pin the agent's clock with `--ak current_datetime=...`, or jump the dojo timeserver forward mid-run with `--ak dojo_timeserver_advance_delta_ms=...`. Useful when "what day is it" is part of the eval.

**Prompt surgery without forking the agent.** `--ae SYSTEM_MESSAGE_SUFFIX=...` and `--ae USER_MESSAGE_SUFFIX=...` append to the OpenHands SDK system and user prompts.

**Reasoning dials.** `--ae OPENROUTER_REASONING_ENABLED` / `_EXCLUDE` and `--ae OPENROUTER_VERBOSITY` control OpenRouter reasoning (auto-on for Opus 4.7); `--ae LLM_THINKING_DISPLAY` sets the thinking display mode (default `summarized`). Hermes takes a `reasoning_effort` agent kwarg that's forwarded straight to the model.

**Leaner agents when you want them.** `--ak disable_builtin_tools=true` drops the default terminal/file-editor/task-tracker tools; `--ak disable_stuck_detection=true` turns off the SDK's stuck-agent detection.

**Trajectories that survive contact with reality.** OpenClaw runs rebuild the full multi-step ATIF trajectory from `session.jsonl` when the stdout envelope is missing or the session times out, so long runs come back with a real trace instead of a stub.

**Odds and ends.** `--ae AWS_BEARER_TOKEN_BEDROCK` for bearer-token Bedrock auth.

Unless noted, the env vars above apply to the `openhands-sdk` agent.

## Installation

```bash
uv tool install chakra-marina
# or
pip install chakra-marina
```

For cloud providers

- `chakra-marina[daytona]` — Daytona
- `chakra-marina[cloud]` — all cloud providers
- `chakra-marina[all]` — everything

## Example: Running a task

A vision smoke test: the agent calls an MCP `take_screenshot` tool, sees a solid-color image, and reports the color.

```bash
export LLM_API_KEY=<YOUR-KEY>
marina run -p examples/tasks/hello-screenshot \
   --agent openhands-sdk \
   --model openrouter/openai/gpt-5.5 \
   --ae LLM_SUPPORTS_VISION=true \
   --ae SYSTEM_MESSAGE_SUFFIX="You run fully autonomously — never ask for confirmation."
```

`--ae LLM_SUPPORTS_VISION=true` enables vision (required for this task), and `--ae SYSTEM_MESSAGE_SUFFIX="..."` appends text to the OpenHands SDK system prompt.

Same thing on Daytona:

```bash
export LLM_API_KEY=<YOUR-KEY>
export DAYTONA_API_KEY=<YOUR-KEY>
marina run -p examples/tasks/hello-screenshot \
   --agent openhands-sdk \
   --model openrouter/openai/gpt-5.5 \
   --ae LLM_SUPPORTS_VISION=true \
   --env daytona
```

For all supported agents and options:

```bash
marina run --help
```
