---
title: "Configure, run cycle, pause, or resume autopilot"
method: POST
path: "/v1/agent/autopilot"
tags: ["Autopilot"]
---

# Configure, run cycle, pause, or resume autopilot

`POST /v1/agent/autopilot`

## Request

- Base URL: `https://www.farmdash.one/api`
- URL: `https://www.farmdash.one/api/v1/agent/autopilot`
- Auth: HTTP bearer

Multiplexed endpoint. Set `action` to one of:
`configure`, `cycle`, `pause`, `resume_autopilot`.
All POST actions require `sessionId`, owning `agentAddress`, and
`sessionToken` in the JSON body or `X-FarmDash-Session-Token` header.
Syndicate required for configure/cycle/pause/resume.

## Headers

- `X-ClawHub-Skill` string

## Request body

- object
  - `action` 'configure' | 'cycle' | 'pause' | 'resume_autopilot', required
  - `sessionId` string, required
  - `agentAddress` string, required
  - `sessionToken` string: Session capability returned by `create`
  - `config` AutopilotConfig
    - `strategies` string[]
    - `assets` string[]
    - `maxEquityPct` number
    - `rebalanceIntervalMin` integer
    - `autoCompound` boolean
    - `riskPreference` 'conservative' | 'balanced' | 'aggressive'
    - `riskSentinel` RiskSentinelConfig
      - `minHealthFactor` number
      - `minLiquidationBufferPct` number
      - `maxStablecoinDepegPct` number
    - `executionAlpha` ExecutionAlphaConfig
      - `mevSafetyMode` 'strict' | 'balanced'
      - `maxQuoteDecayBps` number
      - `maxGasUsdPerAction` number
      - `requirePositiveNetEdge` boolean
      - `minNetEdgeUsd` number
  - `accountState` object: Required for `cycle` action
    - `equity` number
    - `dailyPnlPct` number
    - `weeklyPnlPct` number
    - `drawdownPct` number
    - `openPositionCount` integer
    - `aggregateLeverage` number
    - `markPrices` object
    - `healthFactor` number
    - `liquidationBufferPct` number
    - `stablecoinDepegPct` number
    - `quoteDecayBps` number
    - `gasPerActionUsd` number
    - `rebalanceContext` RebalanceContext
      - `expectedUpsideUsd` number, nullable
      - `bridgeFeeUsd` number, nullable
      - `gasUsd` number, nullable
      - `riskBufferUsd` number, nullable
      - `currentChain` string, nullable
      - `targetChain` string, nullable

## Response `200`

Autopilot action result

- object
  - `ok` boolean
  - `session` AgentSession
    - `id` string
    - `agentAddress` string
    - `status` 'active' | 'paused' | 'halted' | 'expired'
    - `delegation` DelegationRecord
      - `ownerAddress` string
      - `apiWalletAddress` string
      - `verified` boolean
      - `verifiedAt` string, date-time, nullable
    - `autopilot` AutopilotConfig
      - `strategies` string[]
      - `assets` string[]
      - `maxEquityPct` number
      - `rebalanceIntervalMin` integer
      - `autoCompound` boolean
      - `riskPreference` 'conservative' | 'balanced' | 'aggressive'
      - `riskSentinel` RiskSentinelConfig
        - `minHealthFactor` number
        - `minLiquidationBufferPct` number
        - `maxStablecoinDepegPct` number
      - `executionAlpha` ExecutionAlphaConfig
        - `mevSafetyMode` 'strict' | 'balanced'
        - `maxQuoteDecayBps` number
        - `maxGasUsdPerAction` number
        - `requirePositiveNetEdge` boolean
        - `minNetEdgeUsd` number
    - `activePositions` TrackedPosition[]
      - `coin` string
      - `side` 'long' | 'short'
      - `entryPrice` number
      - `size` number
      - `leverage` number
      - `stopLoss` number, nullable
      - `takeProfit` number, nullable
      - `openedAt` string, date-time
      - `strategy` string
      - `unrealizedPnl` number
    - `sessionPnl` number
    - `peakEquity` number
    - `tradeCount` integer
    - `lastHeartbeat` string, date-time
    - `createdAt` string, date-time
    - `expiresAt` string, date-time
    - `agentMeta` AgentMeta
      - `name` string
      - `version` string
      - `framework` string
      - `capabilities` string[]
  - `actions` AutopilotAction[]
    - `type` 'analyze' | 'execute' | 'adjust_stop' | 'close_position' | 'rebalance' | 'skip' | 'halt'
    - `asset` string
    - `reason` string
    - `details` object
    - `priority` 'high' | 'medium' | 'low'
  - `riskStatus` AutopilotRiskStatus
    - `dailyPnlPct` number
    - `weeklyPnlPct` number
    - `drawdownPct` number
    - `openPositions` integer
    - `aggregateLeverage` number
    - `healthFactor` number, nullable
    - `liquidationBufferPct` number, nullable
    - `stablecoinDepegPct` number, nullable
    - `quoteDecayBps` number, nullable
    - `gasPerActionUsd` number, nullable
    - `alerts` string[]
    - `isTradingAllowed` boolean
    - `haltReason` string, nullable

## Other responses

- `401`: Missing or invalid session capability token
- `402`: Free-tier limit exceeded — x402 payment required
- `403`: Session owner or token verification failed

---

[API](https://skmtc.dev/farmdash/apis/farmdash-agent-api.md) · [All operations](https://skmtc.dev/farmdash/apis/farmdash-agent-api/llms.txt) · [OpenAPI document](https://skmtc.dev/farmdash/apis/farmdash-agent-api/revisions/96310281f58c?raw)
