How kevinhayesanderson/autonomous-trading-agent works
AQTA is an autonomous US-equity allocation agent. Users initiate portfolio audits, deliberation, previews, or monthly execution through the CLI or MCP server; the monthly pipeline screens candidates, forms committee recommendations, rebalances under risk and capital controls, and can place broker orders. Persistent memory and feedback calibration support later cycles. The README documents additional MCP resources/prompts and paper trading; unsampled implementation links are omitted or marked unverified.
Main entry points: engine.py Execution Orchestrator · broker.py Broker Transport · mcp_server.py MCP Server · deliberation.py Committee Debate
Components 24
User Interfaces
- CLI
agent.py - MCP Server
server/mcp_server.py - Monthly Cycle
scripts/monthly_cycle.py
Investment Decisions
- Quant Screener
trading_agent/core/screener.py - Fundamental Dossiers
trading_agent/core/intelligence.py - Committee Debate
trading_agent/core/deliberation.py - Consensus Scoring
trading_agent/core/consensus.py - Structured Schemas
trading_agent/core/schemas.py
Portfolio & Trading
- Risk & Tenure
trading_agent/core/risk.py - Rebalance Logic
trading_agent/core/rebalance.py - Rebalance Engine
scripts/rebalance_engine.py - Execution Orchestrator
trading_agent/core/engine.py - Order Execution
trading_agent/core/execution.py - Wallet Drain
trading_agent/core/wallet.py
Memory & Feedback
- Persistent Memory
trading_agent/core/memory.py - Retrospective Loop
scripts/feedback_loop.py - Git State Sync
scripts/git_sync.py - Configuration & Collars
trading_agent/core/config.py
Broker Integrations
- Token Resolution
trading_agent/core/auth.py - Tickertape Login
scripts/tickertape_auth.py - Broker Transport
trading_agent/core/broker.py - Tickertape / DriveWealth
- Alpaca Paper API
Other components
- Investor / Client
Connections 38
- Investor / Client → CLI: invokes
agent.py - Investor / Client → MCP Server: connects
README.md - CLI → Execution Orchestrator: runs pipeline
agent.py - MCP Server → Execution Orchestrator: runs pipeline
server/mcp_server.py - Monthly Cycle → Retrospective Loop: runs
scripts/monthly_cycle.py - Monthly Cycle → Rebalance Engine: runs
scripts/monthly_cycle.py - Monthly Cycle → Git State Sync: synchronizes
scripts/monthly_cycle.py - Monthly Cycle → Tickertape Login: uses login
scripts/monthly_cycle.py - Execution Orchestrator → Quant Screener: screens candidates
trading_agent/core/engine.py - Execution Orchestrator → Consensus Scoring: scores candidates
trading_agent/core/engine.py - Execution Orchestrator → Rebalance Logic: evaluates holdings
trading_agent/core/engine.py - Execution Orchestrator → Order Execution: executes orders
trading_agent/core/engine.py - Execution Orchestrator → Risk & Tenure: audits portfolio
trading_agent/core/engine.py - Execution Orchestrator → Persistent Memory: loads state
trading_agent/core/engine.py - Execution Orchestrator → Git State Sync: syncs state
trading_agent/core/engine.py - Consensus Scoring → Committee Debate: debates candidates
trading_agent/core/consensus.py - Committee Debate → Structured Schemas: validates output
trading_agent/core/deliberation.py - Committee Debate → Quant Screener: uses candidate data
trading_agent/core/deliberation.py - Quant Screener → Broker Transport: requests screener data
trading_agent/core/screener.py - Rebalance Logic → Risk & Tenure: checks guardrails
trading_agent/core/rebalance.py - Order Execution → Broker Transport: places orders
trading_agent/core/execution.py - Wallet Drain → Broker Transport: previews and places
trading_agent/core/wallet.py - Wallet Drain → Order Execution: delegates order
trading_agent/core/wallet.py - Risk & Tenure → Broker Transport: audits account
trading_agent/core/risk.py - Broker Transport → Configuration & Collars: reads endpoints
trading_agent/core/broker.py - Token Resolution → Configuration & Collars: reads credential paths
trading_agent/core/auth.py - Token Resolution → Tickertape Login: refreshes token
trading_agent/core/auth.py - Broker Transport → Tickertape / DriveWealth: calls MCP API
README.md - Broker Transport → Alpaca Paper API: supports paper API
README.md - Persistent Memory → Configuration & Collars: uses memory paths
trading_agent/core/memory.py - Retrospective Loop → Persistent Memory: calibrates weights
scripts/feedback_loop.py - CLI → Persistent Memory: reports memory status
agent.py - CLI → Git State Sync: sync command
agent.py - MCP Server → Token Resolution: gets token
server/mcp_server.py - MCP Server → Broker Transport: queries account
server/mcp_server.py - MCP Server → Committee Debate: deliberates ticker
server/mcp_server.py - MCP Server → Quant Screener: exposes screener
server/mcp_server.py - Fundamental Dossiers → Committee Debate: informs committee
README.md