> ## Documentation Index
> Fetch the complete documentation index at: https://docs.simplefunctions.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# User Manual

> Human-facing end-to-end guide — CLI setup, API usage, agents, MCP, runtime, portfolio, and risks.

This manual is the human-facing path through SimpleFunctions.

If you are building an agent, start with [Quickstart](/quickstart). If you are evaluating the product, read this page once, then use the focused references.

## 1. Install the CLI

```bash theme={null}
npm install -g @spfunctions/cli
sf status --json
```

## 2. Authentication and API keys

Public reads work without auth. Account, portfolio, thesis, intent, and exchange actions require credentials.

```bash theme={null}
sf login
```

or:

```bash theme={null}
export SF_API_KEY="sf_live_..."
export SF_API_URL="https://simplefunctions.dev"
```

## 3. Search markets

```bash theme={null}
sf query "Fed rate cut" --json --limit 3
sf scan "gold" --json
sf screen --json --limit 10
```

## 4. Read world state

```bash theme={null}
sf world --json
sf world --delta --json --since 1h
sf inspect KXRATECUT-26DEC31 --json
```

## 5. Use REST directly

```bash theme={null}
curl "https://simplefunctions.dev/api/public/query?q=Fed%20rate%20cut&limit=3"
curl "https://simplefunctions.dev/api/agent/world"
curl "https://simplefunctions.dev/api/contracts/tools"
```

## 6. Connect MCP

```bash theme={null}
claude mcp add simplefunctions --url https://simplefunctions.dev/api/mcp/mcp
```

## 7. Run the agent

```bash theme={null}
sf agent
sf describe --all --json
```

Use `--json` for agent consumption and `sf describe --all --json` for tool discovery.

## 8. Runtime and monitoring

```bash theme={null}
sf runtime start --smart --daemon
sf runtime status --json
sf runtime stop
```

Runtime surfaces monitor intents, soft conditions, and alerts. Treat runtime commands as operational state, not static docs examples.

## 9. Portfolio and account memory

```bash theme={null}
sf me --json --detail --limit 10
sf feed --json --hours 24
sf portfolio status --json
sf portfolio history --json --ticks 20 --trades 10 --since 2026-04-23
sf portfolio last --json --include handoff
sf portfolio view list --json
sf portfolio strategy list --json
```

These reads are scoped to the authenticated user.

## 10. Portfolio Autopilot

Portfolio Autopilot is the autonomous portfolio workflow: views, strategies, ticks, risk gates, actions, and trades.

Start in read-only mode:

```bash theme={null}
sf portfolio status --json
sf portfolio history --json --ticks 20 --trades 10
sf portfolio watch --once --dry-run
```

Only enable execution after reviewing risk limits and dry-run behavior.

## Risks

* Direct order commands can place real orders.
* Portfolio workflows can mutate account state when execution is enabled.
* LLM-assisted workflows can be wrong or stale.
* Prediction markets are not official truth; they are market-implied probabilities.
* Keep API keys and exchange credentials outside prompts, docs, and transcripts.
