How git8193/agentic works
Upstox Agents is an offline, event-driven trading platform configured through a Python web console. Users choose an instrument, timeframe, indicator, strategy, and order agent; the engine builds the pipeline, market data feeds candles and indicators, strategies produce trading actions, and risk checks precede paper or live execution. The graph also preserves authentication, exports, replay, and supporting trading state. Some system-agent and broker wiring is documented but unsampled, so those relationships are omitted unless the README or an excerpt supports them.
Main entry points: engine.py Engine · console.py Web console · candles.py Candle builder · strategies Strategy agents
Components 24
Console and setup
- Web console
ui/console.py - Pipeline builder
ui/builder.py
Market data
- Instrument master
broker/instruments.py - WebSocket feed
broker/ws_feed.py - Candle builder
system_agents/candles.py
Trading pipeline
- Pipeline configuration
core/pipeline.py - Engine
app/engine.py - Indicator agents
agents/indicators - Strategy agents
agents/strategies - Position state
core/position.py - Event bus
core/bus.py
Execution and broker
- Upstox authentication
broker/auth.py - Risk agent
system_agents/risk.py - Order agents
agents/orders - Upstox REST client
broker/rest.py - Paper broker
broker/paper.py
Operations and records
- Runtime store
core/store.py - Paper-trade analytics
system_agents/analytics.py - Market replay
system_agents/replay.py - Exports
system_agents/export.py - Persistence agent
system_agents/persistence.py
Other components
- Trader
- Upstox
- Browser
Connections 31
- Trader → Web console: configures
README.md - Web console → Pipeline builder: opens builder
ui/console.py - Web console → Engine: adds pipeline
ui/console.py - Pipeline builder → Pipeline configuration: creates config
ui/builder.py - Engine → Pipeline configuration: builds from
app/engine.py - Engine → Instrument master: uses
app/engine.py - Engine → Upstox authentication: uses
app/engine.py - Engine → WebSocket feed: uses
app/engine.py - WebSocket feed → Upstox: streams market data
README.md - WebSocket feed → Candle builder: provides ticks
README.md - Candle builder → Upstox REST client: loads and backfills
system_agents/candles.py - Engine → Candle builder: ensures candles
app/engine.py - Candle builder → Indicator agents: emits candle events
README.md - Engine → Indicator agents: constructs
app/engine.py - Indicator agents → Strategy agents: publishes results
README.md - Engine → Strategy agents: constructs
- Strategy agents → Position state: updates state
agents/strategies/ichimoku_s1_cloud_option/agent.py - Strategy agents → Risk agent: routes orders
README.md - Risk agent → Order agents: checks then routes
README.md - Order agents → Paper broker: places paper orders
agents/orders/paper/agent.py - Order agents → Upstox REST client: places live orders
- Upstox REST client → Upstox: requests broker API
README.md - Upstox authentication → Upstox: exchanges login code
broker/auth.py - Web console → Browser: serves downloads
README.md - Engine → Paper-trade analytics: uses analytics
app/engine.py - Engine → Market replay: supports replay
app/engine.py - Engine → Exports: supports exports
app/engine.py - Engine → Persistence agent: uses persistence
app/engine.py - Candle builder → Runtime store: stores candle data
system_agents/candles.py - Strategy agents → Runtime store: records trades
- Web console → Exports: offers exports
README.md