Public
Agentic Trading Network bot with CNOS cognitive resolution layer
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Mutualize perception. Privatize execution.
One network. Many nodes. One intelligence.
This is the first deployed vertical of CNOS (Cognitive Network OS) — the missing cognitive resolution layer (Layer 6) that completes the AI agent stack. ATN enables traders to run private agentic desks that contribute structured market intelligence to a shared network while keeping execution, accounts, positions, and PnL completely private.
Layer 6: Cognitive Resolution Layer (CNOS) ← THIS PROJECT
Layer 5: Agent Orchestration (TypeScript state machines)
Layer 4: Agent Communication (HTTP API)
Layer 3: Tool & Data Access (Market data via Yahoo Finance)
Layer 2: Model Layer (Computed indicators, no LLM required)
Layer 1: Infrastructure (Val Town managed runtime)
Observe → Hypothesis → Proof → Contradiction → Invalidation
→ Resolution → Memory → Reuse → Repeat
lib/
db.ts — SQLite schema, MarketCase/Observation storage
market-data.ts — Market data tools (quotes, OHLCV, technicals, levels, news)
agents.ts — 6 private desk agents (macro, structure, liquidity, risk, memory, execution)
cnos.ts — 8-stage cognitive resolution cycle engine
settings.ts — Settings system (blob storage)
telegram.ts — Telegram notification service
dashboard.ts — Dashboard HTML generator
api/
main.ts — HTTP API + dashboard (Hono)
cron/
pipeline.ts — Automated pipeline cron job
- Macro Agent — Economic regime, cross-asset flows, VIX/DXY context
- Structure Agent — Price action, SMC, swing analysis, multi-TF alignment
- Liquidity Agent — VWAP, volume profiling, FVGs, premium/discount
- Risk Agent — ATR-based risk assessment, position sizing suggestions
- Memory Agent — RAG over resolved network memory
- Execution Agent — Private signal generation (NEVER shared)
- Observation — Agents produce structured observations
- Hypothesis — Best observation becomes a testable MarketCase
- Proof — Automated backtesting (win rate, profit factor, drawdown)
- Contradiction — Compare against other network cases
- Invalidation — Check if price hit invalidation level
- Resolution — CONFIRMED / REJECTED / REFINED / PENDING
- Memory — Verified cases enter resolved memory store
- Reuse — Future analysis benefits from resolved memory
search_symbols— Fuzzy symbol resolutionget_quote— Real-time price snapshotget_quotes_batch— Multi-symbol quotesget_ohlcv— Historical OHLCV barsget_technicals— RSI, MACD, EMAs, Bollinger, ATR, Stoch, ADXget_technicals_rating— Aggregated buy/sell/neutral ratinganalyze_multi_timeframe— Trend alignment across 15m, 1H, 4H, 1Dcompute_levels— Support/resistance, swing levels, FVGs, premium/discountget_news— Latest headlines for a symbolrun_screener— Filter symbols by indicator conditionscompare_symbols— Side-by-side comparisoncalculate_correlation— Log-return correlation matrix
- New MarketCase notifications
- Resolution notifications (CONFIRMED/REJECTED)
- Contradiction alerts
- Pipeline run summaries
- Error alerts
- All configurable from the dashboard Settings tab
- Dashboard tab — Network stats, recent cases, pipeline runs
- MarketCases tab — Browse all cases, filter by resolution
- Pipeline tab — Manually trigger pipeline, view run history
- Settings tab — Configure Telegram, pipeline, desk, notifications
- Market Tools tab — Interactive market data tool testing
- Memory tab — Search resolved network memory
| Method | Path | Description |
|---|---|---|
| GET | / | Dashboard |
| GET | /api/health | Health check |
| GET | /api/stats | Network statistics |
| GET | /api/cases | Recent MarketCases (optional ?resolution= filter) |
| GET | /api/pipeline | Pipeline run history |
| POST | /api/pipeline/run | Manually trigger pipeline |
| GET | /api/settings | Current settings |
| POST | /api/settings | Update settings |
| POST | /api/settings/reset | Reset to defaults |
| POST | /api/telegram/test | Send test Telegram message |
| GET | /api/memory/search?q= | Search resolved memory |
| POST | /api/tools/search_symbols | Search symbols |
| POST | /api/tools/get_quote | Get quote |
| POST | /api/tools/get_ohlcv | Get OHLCV |
| POST | /api/tools/get_technicals | Get technicals |
| POST | /api/tools/get_technicals_rating | Get rating |
| POST | /api/tools/analyze_multi_timeframe | Multi-TF analysis |
| POST | /api/tools/compute_levels | Compute levels |
| POST | /api/tools/get_news | Get news |
| POST | /api/tools/run_screener | Run screener |
| POST | /api/tools/compare_symbols | Compare symbols |
| POST | /api/tools/calculate_correlation | Correlation matrix |
| POST | /api/cycle/:symbol | Run full CNOS cycle for one symbol |
- Open the dashboard (the live URL)
- Go to Settings tab
- Configure Telegram (bot token + chat ID from @BotFather)
- Configure Pipeline (symbols, timeframe, enable automation)
- Click Save Settings
- Go to Pipeline tab and click Run Pipeline Now to test
- Enable the automated pipeline toggle to run on schedule
- Perception is mutualized
- Execution remains private
- Protocol before memory
- Resolution creates trust
- Memory compounds value
Observe → Structure → Normalize → MarketCase → Tag → Route
→ Resolve → Remember → Improve → Repeat
ONE NETWORK. MANY NODES. ONE INTELLIGENCE.