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.

tick starts
1. read configuration, active strategies, views, recent context notes
2. decrypt Kalshi API key (industry-standard encryption, in-memory only)
3. build instruction views + mandate + preferences + risk limits + history
4. run agent LLM with comprehensive toolset, multi-turn reasoning
5. extract handoff structured note for next tick
6. write state updated portfolio state and tick history
cost scales with tick frequency and model selection

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.

GateDefaultBlocks
Total exposure capconfigurableentry
Per-market position limitconfigurableentry
Daily loss ceilingconfigurableentry
Max position countconfigurableentry
Balance floorconfigurablealways
Orders per tickconfigurableentry
Single order sizeconfigurablealways

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.

tick N instruction includes:
- your active views (convictions)
- your strategies (rules)
- your preferences (categories, IY thresholds, etc.)
- your risk limits (enforced mechanically)
- last 5 handoff notes (rolling memory)
- last 10 trades

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

sf portfolio enable ��� interactive setup wizard
sf portfolio disable — stop scheduler (keeps credentials)
sf portfolio revoke — delete cloud credentials
sf portfolio trigger — run a tick immediately
sf portfolio view list — list PM views
sf portfolio view add — add a view
sf portfolio view remove — remove a view
sf portfolio strategy list — list strategies
sf portfolio strategy add — add a strategy
sf portfolio strategy remove — remove a strategy

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

ComponentNotes
LLM inferencevaries by model selection
Computeminimal overhead
Totalscales with frequency and model tier