Documentation
06AI and API

Connect an AI agent

Let an agent read your analytics through the skills manifest and a scoped API key.

InsightFlare publishes a skills manifest that AI agents can follow. You can connect your deployment to agents such as OpenClaw, Codex, or Claude Code, so they can read your data directly, analyze it, and write reports.

Connect

Send this instruction to your agent, replacing the domain with your own InsightFlare address:

Read https://<your InsightFlare domain>/.well-known/skills.json, connect to this web analytics system, and guide me through authorization.

Following the manifest, the agent guides you through creating a dedicated API key in the dashboard:

  1. Sign in to InsightFlare.
  2. Use the team switcher in the sidebar to select the team that will own the key.
  3. Open API Keys in that team's sidebar and choose Create key.
  4. Give the key a purpose-based name and select only the permissions the task needs (below).
  5. Copy the key and give it to the agent. Do not post it in public places.

You need permission to manage API keys for the team to do this.

Pick permissions for the task

TaskPermissions
Read analytics for one known siteAnalytics read
Discover sites, then read analyticsSite read and Analytics read
Manage goals, funnels, or other analysis definitionsAnalysis definitions read and write (add Analytics read to see results)
Inspect tracking or sharing configurationConfig read
Change site configurationConfig write (only if you explicitly ask the agent to)

Permissions are additive. Do not grant write permissions for a read-only task. Restrict the key to the sites the agent needs when you can.

Ask questions

Then ask in natural language, for example:

How did my site perform last month? Where did most visitors come from among the highest-traffic sites? Which pages were the most popular?

How the agent behaves

According to the manifest, an agent should:

  • Use only an API key that you provide, with the Bearer scheme, and never invent or expose credentials.
  • Start by reading the manifest and the OpenAPI document, then inspect the key and the team, and list the sites.
  • Use a site scope for a question about one site, and the team scope only when you ask for a cross-site result.
  • Use the last seven days ending at the request time (UTC) when you give no time range, and state the range it used.
  • Read the site or team analytics schema before filtering, and use only the fields and operators it lists.
  • Not retry validation, authentication, authorization, or not-found failures, and use bounded retries for rate limits and service failures.