{
  "markdown": "<p align=\"center\">\n  <img src=\"assets/banner.svg\" alt=\"Sleepwalker\" width=\"100%\">\n</p>\n\n<p align=\"center\">\n  <a href=\"https://github.com/followanton/sleepwalker/actions/workflows/ci.yml\"><img src=\"https://github.com/followanton/sleepwalker/actions/workflows/ci.yml/badge.svg\" alt=\"CI\"></a>\n  <img src=\"https://img.shields.io/badge/license-MIT-22c55e?style=flat-square\" alt=\"MIT\">\n  <img src=\"https://img.shields.io/npm/v/@sleepwalkerai/cli?color=a78bfa&label=cli&style=flat-square\" alt=\"CLI npm version\">\n  <img src=\"https://img.shields.io/badge/dependencies-zero-22c55e?style=flat-square\" alt=\"Zero dependencies\">\n  <img src=\"https://img.shields.io/badge/MCP-ready-a78bfa?style=flat-square\" alt=\"MCP ready\">\n</p>\n\n<p align=\"center\">\n  <b>AI Visibility and Content Intelligence for agents, products, and teams.</b><br>\n  Run AI-search checks, inspect citations, score content, and save every result in one workspace.\n</p>\n\n<p align=\"center\">\n  <a href=\"https://www.sleepwalker.ai/\">Website</a> ·\n  <a href=\"https://app.sleepwalker.ai\">App</a> ·\n  <a href=\"https://www.sleepwalker.ai/docs/\">Docs</a> ·\n  <a href=\"https://www.sleepwalker.ai/docs/mcp/\">MCP</a> ·\n  <a href=\"https://www.sleepwalker.ai/docs/api/\">API</a> ·\n  <a href=\"https://www.sleepwalker.ai/docs/cli/\">CLI</a> ·\n  <a href=\"docs/cookbook.md\">Cookbook</a>\n</p>\n\n---\n\nSleepwalker helps teams understand how AI systems talk about a brand and what content needs to change. It combines two connected workflows:\n\n- **AI Visibility**: run prompts across ChatGPT, Perplexity, Grok, and Gemini; capture full answers, citations, competitors, and mention types.\n- **Content Intelligence**: serialize public pages, discover demand, score content depth and freshness, and return practical recommendations.\n\nYou can run the same work from the hosted app, the public API, MCP clients, or the CLI. Results stay connected, so a run started by an agent can be reviewed later in the app or queried from code.\n\nThis repository is the public developer surface for Sleepwalker: CLI package, API examples, MCP setup notes, and short guides. The hosted engine, app source, database schema, provider integrations, and billing systems are private.\n\n## Quickstart\n\nTry the CLI without an account first. `okf export` is free and open source. It runs on your machine, fetches a page, and writes an agent-ready markdown bundle to a local folder. No API key, no credits:\n\n```bash\nnpx -y @sleepwalkerai/cli okf export https://www.sleepwalker.ai\n```\n\nOne command exports both concepts: the page content and the technical\nsnapshot of what AI crawlers see. Narrow it with `--content` or\n`--technical`. Both concepts are described in the next section.\n\nFor everything else, install the CLI:\n\n```bash\nnpm install -g @sleepwalkerai/cli\nsleepwalker init\n```\n\nCreate an API key in the [Sleepwalker app](https://app.sleepwalker.ai), then run your first visibility check:\n\n```bash\nsleepwalker auth key set sw_api_live_...\nsleepwalker doctor\nsleepwalker visibility run https://yourbrand.com \\\n  --brand YourBrand \\\n  --prompt \"best ai visibility platform 2026\" \\\n  --platform perplexity,openai,grok,gemini \\\n  --watch\n```\n\n<p align=\"center\">\n  <img src=\"assets/terminal.svg\" alt=\"Sleepwalker CLI running an AI Visibility check\" width=\"92%\">\n</p>\n\n## The free OKF export: content and technical\n\nOne command turns any public page into an [Open Knowledge Format](https://github.com/GoogleCloudPlatform/knowledge-catalog/tree/main/okf) bundle: a folder of plain markdown files with YAML frontmatter that any AI agent can read directly. OKF is an open format published in Google Cloud's knowledge-catalog repo. The export runs entirely on your machine and is free for everyone: no account, no API key, no credits.\n\n```text\nsleepwalker.ai-okf/\n├── index.md            navigation and okf_version\n├── log.md              how and when the bundle was generated\n├── home.md             the content concept\n└── home-technical.md   the technical snapshot\n```\n\nBoth concepts ship by default. `--content` exports only the content concept,\n`--technical` exports only the snapshot.\n\n**The content concept** is the page as a reader sees it: clean markdown with headings, paragraphs, lists, and links, plus the title, description, canonical URL, and timestamp in the frontmatter. Use it to hand pages to agents, prompts, and retrieval pipelines without HTML noise.\n\n**The technical snapshot** is the page as an AI crawler sees it. Most AI crawlers do not run JavaScript, so the snapshot reads only the served HTML plus the response itself: the redirect chain and HTML size, curated HTTP headers, the html lang attribute, meta and title tags, canonical, icon and feed links, headings, hreflang, social tags, head scripts, every JSON-LD block, a microdata and RDFa summary, links, images, and the robots directives the page and response carry (meta robots and X-Robots-Tag). Use it to audit what ChatGPT, Claude, Perplexity, and Gemini can actually read on your pages.\n\nOne excerpt shows why this matters. A client-side rendered page often exports like this:\n\n```text\n## Structured data\n\nJSON-LD: none found. AI crawlers get no schema.org data from this page as served.\n```\n\nEverything is reported, nothing is judged: the export quotes what the page serves and leaves conclusions to you. Duplicate titles and canonicals are preserved on purpose, because they are findings. The only network request is the page fetch itself. Flags, caps, and the full section list live in [`docs/cli.md`](docs/cli.md).\n\nWant to see the shape of the data first? Open [`docs/responses.md`](docs/responses.md) for full example outputs from serialization, prompt suggestions, AI Visibility, Content Intelligence, and report lookup.\n\n## What you can build\n\n<p align=\"center\">\n  <img src=\"assets/visibility.svg\" alt=\"Sample AI Visibility result across platforms\" width=\"92%\">\n</p>\n\n- **AI search (GEO) monitoring**: set up prompt tracking for specific URLs across ChatGPT, Perplexity, Grok, and Gemini.\n- **Agent workflows**: give MCP clients such as Claude access to LLM answers, cited domains, competitor performance, and content trends.\n- **Product integrations**: use the API from internal tools, client portals, reporting pipelines, or automated QA checks.\n- **Content review**: inspect what a page says, which trends it misses, and what to fix first.\n- **Free page export**: turn any public page into agent-ready markdown with `okf export`. Open source, runs locally, no account needed.\n- **Free technical snapshot**: every `okf export` also captures the page's technical layer as served, including meta tags, structured data, headers, and robots directives. `--technical` exports it alone.\n- **Custom workflows**: combine Sleepwalker with other MCP servers to build your own skills and automations.\n\n## Access paths\n\n| Surface | Best for | Entry point |\n|---|---|---|\n| App | Human review, credits, keys, and full result views | [app.sleepwalker.ai](https://app.sleepwalker.ai) |\n| API | Scripts, products, scheduled jobs, and reporting workflows | [API docs](https://www.sleepwalker.ai/docs/api/) |\n| MCP | Claude and other MCP-capable agents | [MCP setup](https://www.sleepwalker.ai/docs/mcp/) |\n| CLI | Terminal workflows and automation | [CLI docs](https://www.sleepwalker.ai/docs/cli/) |\n\n<p align=\"center\">\n  <img src=\"assets/architecture.svg\" alt=\"Sleepwalker action flow across app, API, MCP, and CLI\" width=\"68%\">\n</p>\n\n## Run Sleepwalker from anywhere\n\n**CLI**\n\n```bash\nsleepwalker visibility run https://yourbrand.com \\\n  --brand YourBrand \\\n  --prompt \"best ai visibility platform 2026\" \\\n  --platform perplexity,openai,grok,gemini \\\n  --watch\n```\n\n**API**\n\n```bash\ncurl -s https://api.sleepwalker.ai/v1/visibility/runs \\\n  -H \"Authorization: Bearer $SLEEPWALKER_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"url\": \"https://yourbrand.com\",\n    \"target_entity\": \"YourBrand\",\n    \"prompts\": [\"best ai visibility platform 2026\"],\n    \"platforms\": [\"perplexity\",\"openai\",\"grok\",\"gemini\"]\n  }'\n```\n\n**MCP**\n\n```text\nhttps://mcp.sleepwalker.ai/mcp\n```\n\nAsk an MCP-capable client: `Check how YourBrand appears across AI search this week.`\n\n**App**\n\nOpen [app.sleepwalker.ai](https://app.sleepwalker.ai) for the visual workflow, saved results, credits, and keys.\n\n## Developer resources\n\n| Path | What it shows |\n|---|---|\n| [`docs/agents.md`](docs/agents.md) | MCP tool catalog and agent workflow walkthrough |\n| [`docs/concepts.md`](docs/concepts.md) | Runs, probes, serialization, scoring, credits |\n| [`docs/cli.md`](docs/cli.md) | CLI usage, including the free local `okf export` |\n| [`docs/cookbook.md`](docs/cookbook.md) | Runnable workflows, including CI checks |\n| [`docs/responses.md`](docs/responses.md) | Full example outputs for the main Sleepwalker actions |\n| [`mcp/server.json`](mcp/server.json) | Remote MCP server manifest |\n| [`mcp/tools.json`](mcp/tools.json) | Public MCP tool catalog, scopes, and credit behavior |\n| [`examples/api/curl`](examples/api/curl) | One-call examples for public API actions |\n| [`examples/api/javascript`](examples/api/javascript) | Raw `fetch` plus a zero-dependency client helper |\n| [`examples/api/python`](examples/api/python) | `urllib` examples plus a small client class |\n| [`examples/mcp`](examples/mcp) | OAuth and bearer-token setup notes |\n\n## Credits\n\nSleepwalker is pay as you go. Reads, lists, and status polling are normally unmetered. Actions that run work, such as visibility checks, content scoring, and serialization, use prepaid credits. `okf export` is the exception: it runs locally and is always free. Details live in [docs/credits.md](docs/credits.md) and the hosted [billing docs](https://www.sleepwalker.ai/docs/billing/credits/).\n\n## Repository boundary\n\nThis repository is intentionally small.\n\n| Public here | Private in Sleepwalker |\n|---|---|\n| CLI, examples, setup notes, short docs | Hosted engine and app source |\n| Public API request shapes | MCP server implementation |\n| MCP client connection examples | Database schema and billing internals |\n| Product-level credit behavior | Provider integrations and routing |\n\nDo not commit real keys. Use environment variables or the CLI key store:\n\n```bash\nexport SLEEPWALKER_API_KEY=sw_api_live_...\n```\n\n## Links\n\n- Website: [sleepwalker.ai](https://www.sleepwalker.ai/)\n- App: [app.sleepwalker.ai](https://app.sleepwalker.ai)\n- Docs: [sleepwalker.ai/docs](https://www.sleepwalker.ai/docs/)\n- npm: [@sleepwalkerai/cli](https://www.npmjs.com/package/@sleepwalkerai/cli)\n- Security policy: [SECURITY.md](SECURITY.md)\n- Contributing: [CONTRIBUTING.md](CONTRIBUTING.md)\n- License: [MIT](LICENSE)\n",
  "bytes": 10625,
  "sha": "706fe6a5852d3f1e67c80ce21e55ece23b65fa1749fcb7ae05db02f21fc1c0a7",
  "repo_slug": "followanton/sleepwalker",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_ai_sleepwalker_sleepwalker_66178d9c/readme"
}