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

# AI Agents

> Power autonomous agents that research, monitor, and trade on prediction markets.

## Overview

Prediction markets are a natural fit for AI agents. Structured outcomes, real-time pricing, and rich historical data make them ideal for automated research and trading. Struct provides the data infrastructure agents need to operate on Polymarket, and the docs are [built for agents](/introduction/ai-first) with copy-ready context on every page.

## What You Can Build

<CardGroup cols={2}>
  <Card title="Trading Agents" icon="robot" href="/sdk/overview">
    Autonomous agents that monitor markets, evaluate probabilities, and execute strategies on the typed SDK.
  </Card>

  <Card title="Research Agents" icon="magnifying-glass-chart" href="/guides/finding-market-movers">
    Agents that ingest market data and history to find movers and generate forecasts.
  </Card>

  <Card title="Monitoring Agents" icon="bell" href="/webhooks/getting-started">
    Agents that watch for new markets, large trades, or price crossings and act on them.
  </Card>

  <Card title="Market Making Bots" icon="scale-balanced" href="/websockets/rooms/order-book">
    Bots that quote prices from the live order book and trade stream.
  </Card>
</CardGroup>

## Event-driven agent triggers

Instead of polling, let events wake your agent up:

* **[Price thresholds](/webhooks/price-threshold)**: trigger a workflow the moment a market crosses a level. Combine with [fire-and-delete](/webhooks/fire-and-delete) for single-shot triggers an agent arms and forgets.
* **[Whale trades](/webhooks/trader-whale-trade)** and **[spikes](/webhooks/price-spike)**: react to large or fast-moving activity.
* **Market lifecycle**: settle, re-evaluate, or open positions when a market [resolves](/webhooks/market-resolved) or is [disputed](/webhooks/market-disputed).

Delivered as [webhooks](/webhooks/getting-started) or [websocket alerts](/websockets/alerts/getting-started), so an always-on agent can hold a socket while a serverless one takes an HTTP POST.

## Relevant Struct Features

* **[REST API](/api-reference/getting-started)**: Give agents structured access to [markets, events, and trades](/guides/fetching-all-data), and [trader positions](/guides/trader-open-and-closed-positions).
* **[Websockets](/websockets/getting-started)**: Feed agents real-time [price](/websockets/rooms/asset-prices) and [trade](/websockets/rooms/trades) streams for fast decisions.
* **[Webhooks](/webhooks/getting-started)**: Trigger agent workflows when [specific events](/webhooks/price-threshold) occur, with no polling loop required.
* **[TypeScript SDK](/sdk/overview)**: A typed client with [authentication](/sdk/authentication), [REST](/sdk/rest-api), and [streaming](/sdk/websockets) built in.
* **[Indexing & Backfilling](/indexing/getting-started)**: Load historical data into your own database for backtesting and training.

## Guides to get started

<CardGroup cols={2}>
  <Card title="Find market movers" icon="arrow-trend-up" href="/guides/finding-market-movers">
    Rank the biggest moves across markets.
  </Card>

  <Card title="Trending events" icon="fire" href="/guides/real-time-trending-events-and-markets">
    Track what is heating up in real time.
  </Card>

  <Card title="Mobile / push alerts" icon="bell" href="/guides/mobile-price-alerts">
    Notify on a price crossing via webhook.
  </Card>

  <Card title="API cookbook" icon="book" href="/guides/api-cookbook">
    Common request recipes to get going fast.
  </Card>
</CardGroup>
