Documentation
Start Here

Quickstart

Make the first Agent Mag API call and install docs context locally.

Status: Preview for hosted API calls, Available for docs context.

The Agent Mag API quickstart is the fastest path to make a first hosted request, confirm your API key setup, verify the right base URL, and install matching docs context into your local agent workspace.

1. Set Your Key

code
export AGENTMAG_API_KEY="agm_live_or_preview_key"

2. Scrape One Page

code
curl https://api.agentmag.dev/v1/scrape \
  -H "Authorization: Bearer $AGENTMAG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://docs.example.com",
    "formats": ["markdown", "links", "metadata"],
    "agentContext": true
  }'

3. Install Matching Docs Context

code
npx agentmag add docs web-intelligence/scrape --force

This writes .agents/docs/agentmag/web-intelligence/scrape.md and .agents/docs/agentmag/web-intelligence/scrape.json.