Portfolio Autopilot
Autonomous portfolio management for Kalshi prediction markets. An LLM agent with 50+ tools reviews your positions, scans for opportunities, and executes trades aligned with your views — on a schedule you control.
How it works
On a schedule you configure, a cloud agent wakes up with your full context: your views, your strategies, your risk limits, and what happened last tick. It calls a comprehensive set of tools — balance checks, position analysis, market screening, web search, legislative data — then makes decisions and writes a handoff note for next time.
Views vs Strategies
Two distinct concepts guide the agent:
Views
Your convictions about the world. "A specific risk is being systematically underpriced because markets overreact to surface-level signals." The agent trades in alignment with your views — it will never take positions that contradict them.
sf portfolio view add "My macro view" \ "Analysis of the structural mispricing..." \ --category geopolitical \ --tickers KXTICKER1,KXTICKER2 \ --conviction 5 --horizon 2026-12-31
Strategies
Rules and constraints. "Focus on high-yield, low-spread markets. No sports. Max 20 positions." The agent must follow these — they are mechanically enforced, not suggestions.
sf portfolio strategy add \ "Conservative yield" \ "Focus on high-yield, low-spread markets" \ --priority 3
Risk Gates
Every order passes through 7 hard gates before execution. These are mechanical — the LLM cannot bypass them. Exits (sells) are always allowed; gates only block new entries.
| Gate | Default | Blocks |
|---|---|---|
| Total exposure cap | configurable | entry |
| Per-market position limit | configurable | entry |
| Daily loss ceiling | configurable | entry |
| Max position count | configurable | entry |
| Balance floor | configurable | always |
| Orders per tick | configurable | entry |
| Single order size | configurable | always |
All limits are configurable per-user. The agent sees these limits in its instruction and the gates enforce them mechanically on every order.
Context Continuity
Each tick is a fresh LLM invocation (no persistent session), but the agent maintains continuity through handoff notes.
At the end of each tick, the agent writes a structured note covering: key observations per position, decisions made and why, things to watch next tick, updates on the PM's views. The next tick reads the last 5 notes as context.
Setup
1. Enable
sf portfolio enable # Interactive wizard: upload Kalshi API key, set schedule, choose execution mode
2. Add your views
sf portfolio view add "My thesis title" "Full analysis text..." \ --category geopolitical --conviction 5 --tickers KXTICKER1,KXTICKER2
3. Add strategies
sf portfolio strategy add "Conservative" "Focus on high-IY, avoid sports" --priority 3
4. Test in dry-run
sf portfolio trigger # manually run a tick # Check results in dashboard or via CLI
5. Go live
sf portfolio config --execution-mode live
Only do this after reviewing several dry-run ticks. Live mode places real orders.
CLI Reference
Security
Your Kalshi API key is encrypted with industry-standard encryption before storage. The encryption key exists only in the cloud runtime environment. Your key is decrypted in-memory for each tick, used to sign API requests, then immediately erased from process memory.
At any time: sf portfolio revoke permanently deletes your encrypted key from the database.
Cost
| Component | Notes |
|---|---|
| LLM inference | varies by model selection |
| Compute | minimal overhead |
| Total | scales with frequency and model tier |