Metadata-Version: 2.4
Name: atlas-env
Version: 0.1.0
Summary: CLI + SDK + agent framework for the 3I Atlas Gym
Author: 3I Atlas
License: MIT
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: http
Requires-Dist: httpx>=0.27; extra == "http"
Provides-Extra: dev
Requires-Dist: pytest>=8; extra == "dev"
Requires-Dist: build>=1.0; extra == "dev"
Requires-Dist: twine>=5.0; extra == "dev"
Dynamic: license-file

# atlas-env

A pip-installable CLI + SDK + agent framework for the **3I Atlas Gym**.

- Import name: `atlas_env`
- Console script: `atlas`
- No hard third-party dependencies (the SDK prefers `httpx`/`requests` and falls
  back to the stdlib `urllib.request`).

## Install

```bash
pip install .
# or editable:
pip install -e .
```

## CLI

```bash
atlas --version                        # 0.1.0
atlas list                             # list predefined tasks
atlas init <name> [--trainable]        # scaffold a project
cd <name> && atlas run_app             # run application/main.py
atlas eval --task analyst_forecast_v1 --domain compute --as_of 2026-11-25
atlas train                            # run train/train.py if present
```

## Predefined tasks

| id                      | role      | metric     | action fields        |
| ----------------------- | --------- | ---------- | -------------------- |
| `analyst_forecast_v1`   | analyst   | pinball    | `p10`, `p50`, `p90`  |
| `macro_rates_v1`        | macro     | pinball    | `p10`, `p50`, `p90`  |
| `portfolio_allocator_v1`| portfolio | net_return | `weight`             |

## SDK

```python
from atlas_env.sdk import Atlas

atlas = Atlas()  # reads ATLAS_API_BASE / ATLAS_API_TOKEN
session = atlas.create_session("analyst_forecast_v1", {"domain": "compute"})
obs = atlas.observation(session["session_id"])
action = {"p10": 0.0, "p50": 0.0, "p90": 0.0}
result = atlas.step(session["session_id"], action)
```

## Agents

Subclass `atlas_env.agents.base.Agent`, set `id` / `compatible_tasks`, and
implement `act(observation, task) -> dict`.

## License

MIT — see [LICENSE](LICENSE).
