Nano
Trading and agent rules that run the same way every time — with a receipt.
Read every strategy in this repo — source, compiled IR, signals and the corpus
provenance policy — in your browser. No install, no account. Open any one of them
straight into an editor.
Install · Strategy library · Language · Receipts · Contribute
Write the rule in plain text. Replay any decision. Keep final authority in your application.
Nano is a small, Python-embeddable language for transparent threshold rules. You write the rule; Nano compiles it into validated IR, evaluates it against numbers your system supplies, and returns proposed Intent values with an ordered run log of every step it took to get there. The core does not call an exchange, API, or other external system.
strategy MaxDrawdownBreaker {
agent RiskDesk
every 1m {
if DRAWDOWN >= 5 {
pause()
}
}
}
That is the risk breaker from the strategy library, with its comment header trimmed: when portfolio drawdown reaches 5 percent, propose a PAUSE and escalate to a named risk desk. Nano cannot halt anything by itself — your application's gate decides whether to act on the proposal. That separation is the whole design.
Install and explore
pip install aether-nano
nano library search momentum
nano intent compile "when is spy earnings" --json
The package has zero required dependencies and includes the compiler, runtime,
CLI, 63-strategy conformance library, 40 deterministic indicators, Intent
frontend, and project-search fixtures. The core does not fetch market data or take
actions: hosts supply observations and retain final authority.
Why that matters when money is on the line
- Deterministic — the same rule over the same inputs replays to the same decision, every time.
- Auditable — every run carries an ordered log you can archive, diff, or hand to someone who is asking questions.
- Host-governed — Nano proposes an intent; your system disposes. Nano cannot place an order.
- Small — few moving parts to audit, and it embeds in a Python stack you already have.
Beta reference implementation for Nano IR/language v1.0.0 — Development Status :: 4 - Beta. This is the language and IR version, not the independently versioned installable package; pyproject.toml is authoritative for the package release. The examples are trading-oriented, but Nano fits any system where a host supplies numeric signals and must retain control over what happens next — see deterministic watchdogs and compliance controls.
Why Nano
A rule and an approval are different jobs. Nano makes the rule compact, versioned, and replayable; your application owns data quality, policy, persistence, and real-world effects. That separation makes a decision trail easier to inspect without giving a script authority over your infrastructure.
Nano also ships an independently versioned Intent frontend for short human
requests. It compiles phrases such as spy earnings or
when is spy earnings into typed, auditable, host-governed command plans without
changing the strategy language or calling a model. Try
nano intent compile "when is spy earnings" --json; see the
Intent compiler architecture for the separate AST,
IR 0.1.0, catalogs, effects, consent policy, and canonical fixtures.
Nano + Qiskit
Nano keeps quantum work outside its dependency-free rule engine. Main already
includes an optional Qiskit Aer service for quadratic
binary optimization (QUBO), with declared job limits and simulation receipts.
Hosts own data, authorization and external effects.
Included in this source checkout; the native prepare/sample bridge is opt-in and local-only.
Typed operations distinguish known-bit
preparation, sampling and QUBO optimization, with explicit shots, circuit counts
and QPU-second limits. The local known-bit path builds and measures a circuit
directly, then checks its samples before producing a structured reply.
Try the pinned demo checkout
in a separate checkout:
git clone https://github.com/AetherAI3/Nano.git Nano-quantum-preview
cd Nano-quantum-preview
git checkout --detach 676440bbf80de7bc8c878dab7ef78d85f225f3a7
python -m pip install -e ".[quantum]"
python examples/quantum_command_demo.py
The demo interprets
simulate quantum plan demo-plan on local with 100 shots 1 circuit 0 qpu seconds.
Its reply reports 100 samples, state: verified and observed_from: local_ideal.
This is classical simulation on your machine, requiring no model or IBM
credentials; it demonstrates neither hardware execution nor quantum advantage.
Other included capabilities add inspectable prepared artifacts
that record compilation choices and provenance. The legacy adapter still covers
optimize_qubo only. Known-bit preparation and sampling use a separate
native bridge: a pinned-Qiskit prepared artifact
and opt-in /qsearch/native/v1 service routes, disabled by default, that accept
only the local ideal simulator. A local result is not hardware qualification,
and no provider or hardware adapter is included.
JSON diagnostics point to source
errors, while nesting limits reject
excessively deep compiler input without promising global time or memory bounds.
Pinned local pure scalar helpers
let projects share small deterministic calculations.
Job and cancellation visibility,
with separate accounting updates,
distinguishes queued work, cancellation requests and settled usage.
For an application, the intended workflow is straightforward: inspect a proposal,
review its circuit and declared budget, run an allowed local experiment, and
read the result alongside its evidence. The host still decides what may run and
keeps credentials, scheduling and approvals. Simulation checks, delivery
verification and final usage accounting remain separate pieces of evidence.
Quick start
Strategy replay from source
Clone the repository to run the bundled Momentum strategy and the full test
suite:
git clone https://github.com/AetherAI3/Nano.git
cd Nano
python -m venv .venv
# macOS/Linux: source .venv/bin/activate
# Windows PowerShell: .venv\Scripts\Activate.ps1
python -m pip install -e ".[dev]"
python examples/momentum_demo.py
python -m pytest -q
The demo compiles a checked-in strategy, injects two RSI values, and produces a proposed action:
BUY BTC at timestamp=300 (confidence=0.91)
This is the complete .nano program it runs:
strategy Momentum {
every 5m {
if RSI(14) < 30 {
buy(BTC, 0.91)
}
}
}
RSI(14) is the feed-signal form: the host computes and injects the RSI series. v1.0 adds a computed form — RSI(close, 14), where close is a declared input and Nano derives the series itself from 40 deterministic kernels. Nano still never fetches market data. See the language reference for both contracts.
Project search and compact memory
Nano also supports general application discovery through nano.project:
classify PRs, commits, and memory records into evidence-bearing tags; compile
searches such as frontend css pending review; group results; suggest titles;
and emit compact agent summaries. It uses no model or network calls.
nano project parse "frontend css pending review group by area"
nano project search nano/project/fixtures/records.json "css" --project-id example-project
The host supplies authorized records and current status observations. Nano
does not rename PRs or upload memory. See the project intelligence contract
and APR integration guide.
Start with the strategy library
The strategy library is Nano's community on-ramp: a small, tested corpus of familiar trading ideas — and deterministic watchdog controls — translated into the DSL. Every entry pairs readable .nano source with expected IR, so quant researchers can learn the language, compare conventions, and contribute a new rule with confidence.
Your first contribution → walks the whole path once, with a real rule: idea, source, generated IR, deterministic replay, CI, pull request. One command generates the IR fixture and checks the entry before you push it.
The same corpus is browsable at aethersystems.net/nano — search and filter by category, cadence or signal, read the source and compiled IR side by side, and open any strategy directly in an editor. Nothing to install, no account needed.
| momentum |
mean_reversion |
trend |
volatility |
volume |
risk |
event_volatility |
watchdog |
| 6 rules |
8 rules |
9 rules |
5 rules |
4 rules |
8 rules |
11 rules |
12 rules |
That table holds two corpora. A baseline rule compares a host-supplied named signal with a literal and compiles to byte-stable v0.1.0 IR. A v1 rule declares its own inputs and lets Nano compute the indicators, so the host contract is OHLCV rather than a vocabulary of agreed indicator names. tests/test_library.py derives every count above from the directory, so the table cannot go stale silently.
The library is a conformance corpus, not a performance claim, live signal service, or trading recommendation.
Strategy names and indicator names such as Bollinger Bands are used nominatively,
to identify the calculation each entry implements. No affiliation with or
endorsement by any trademark holder is implied. The contribution policy forbids
copying proprietary platform source and treats absent provenance as unspecified,
not original — see the library README.
Browse online → · Browse in-repo → · Your first contribution → · Add a strategy → · Propose a language change →
From rule to governed decision

Nano owns parsing, IR validation, and deterministic reference evaluation. The host supplies the MarketFrame, applies its DecisionGate, stores the result, and performs any real-world action. The same graph and frame produce the same reference result; bridge replay is deterministic when the host gate is deterministic too.
Small by design
| Nano provides |
The host retains |
A small strategy source format, validated StrategyGraph IR, and deterministic reference evaluation |
Signal calculation, data quality, and scheduling |
| Named numeric signal series and AND-only threshold conditions |
Policy, approvals, persistence, and external effects |