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

# ELUUP AI Agents: Autonomous DEX Trading

> Learn how ELUUP AI trading agents autonomously watch signals, execute DEX swaps, and manage risk from entry to exit.

ELUUP AI trading agents are autonomous programs that trade DEX altcoins on your behalf. Each agent connects to a wallet on a supported chain, subscribes to buy/sell signals, and handles the full trade lifecycle: sizing positions, submitting swaps, managing stops, and taking profit. You define the risk parameters once, and the agent operates around the clock.

When a signal fires, the agent evaluates whether it meets your configured confidence threshold and position limits. If the conditions pass, the agent calculates position size based on a percentage of available wallet balance, executes the swap through the DEX router, and immediately attaches a stop loss, trailing stop, and take profit to the position. The agent exits automatically when any of those levels trigger or when a sell signal arrives.

## Agent Lifecycle

An agent moves through a small set of states that reflect its current operating mode:

| State    | Description                                                                                                                                       |
| -------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `idle`   | The agent has been created but not yet started. It will not trade.                                                                                |
| `active` | The agent is running and monitoring signals. It will enter and exit trades according to its configuration.                                        |
| `paused` | The agent was active and has been paused. Open positions remain, but no new trades are opened.                                                    |
| `error`  | The agent encountered a fault (for example, wallet connection issues or RPC errors). Review the agent logs and restart after resolving the cause. |

You start an agent with [POST /agents/](/api-reference/agents/start-agent){id}[/start](/api-reference/agents/start-agent) and stop it with [POST /agents/](/api-reference/agents/stop-agent){id}[/stop](/api-reference/agents/stop-agent). Pausing is useful when you want to stop new entries without closing existing positions.

## What an Agent Does End to End

1. **Monitors signals** — The agent polls the signal stream for the chain it is configured to trade on.
2. **Filters by confidence** — Only signals at or above `min_confidence` are considered. Each signal carries a confidence score from 0 to 1.
3. **Sizes the position** — The agent calculates the swap amount using `risk.position_size_pct` of the wallet's available token balance.
4. **Executes the swap** — The agent constructs and submits a swap transaction to the DEX router on chain.
5. **Attaches risk controls** — A stop loss, trailing stop, and take profit are set immediately based on the agent's `risk` configuration.
6. **Manages the exit** — The agent exits the position when the stop loss, trailing stop, or take profit triggers, or when a sell signal arrives.

## Next Steps

<CardGroup cols={2}>
  <Card title="Create an Agent" icon="rocket" href="/agents/create-agent">
    Walk through connecting a wallet and deploying your first trading agent.
  </Card>

  <Card title="Configure an Agent" icon="sliders" href="/agents/configure">
    Adjust risk parameters, confidence thresholds, and position limits.
  </Card>

  <Card title="Monitor Agent Performance" icon="chart-line" href="/agents/monitor">
    Track trades, open positions, and performance metrics.
  </Card>
</CardGroup>
