We will be at Gamescom Dev, Aug 23-25. Confex, Koelnmesse, Cologne · Booth B01 · Come find us.

ThinkingAI Logo

Watch a ThinkingAI agent run the full loop, from data collection to closed-loop action.

Seven steps, one agent, every prompt included. It scans your project, plans and writes the instrumentation, verifies the data, builds the metrics library and dashboard, and drafts the win-back flow your team approves. All from your terminal, powered by ae-cli and ThinkingAI Skills.

Overview

One loop, seven steps, every prompt included.

You pair a coding agent with ae-cli and our Skills. The agent scans your project, generates the tracking plan, writes the instrumentation, verifies the data, compiles a cited metrics library, builds the dashboard, and drafts the win-back flow your team approves. Each step below gives you the exact prompt to paste, what the agent does with it, and how the server confirms it worked.

STEP 01

Set up ae-cli and authorize, once.

Local integration works alongside the coding agent on your computer. Before you start, have a project to instrument, Node.js 18+, and a working AE account ready. Use this site's address as your AE Host.

Before you start
A project to instrument
Any codebase you want to add analytics to.
Node.js 18+
Required to install and run ae-cli.
An AE account
A working Agentic Engine login.
AE Host
Use the address of this site.
Run in your terminalOne time only
$npm install -g @thinkingai/ae-cli
$npx skills add ThinkingAIAgenticEngine/ae-cli -g -y
$ae-cli config set-host "{{AE_HOST}}"
$ae-cli auth login
Server-side validation
  • The server confirms the current user has authorized through the AE CLI.
  • The first time, run ae-cli auth login once to sign in.
STEP 02

The agent drafts an AE-standard tracking plan.

In your project directory, use the ae-generate-tracking-plan Skill. It scans the current code, identifies the project background and core scenarios, and generates and uploads a tracking plan that follows AE conventions.

The prompt
What you say
Please use the ae-generate-tracking-plan Skill to scan the current project code and generate and upload a tracking plan that follows AE conventions.
[Target AE project]
AE Host: {{AE_HOST}}
Project ID: {{AE_PROJECT_ID}}
The AE CLI is already authorized. Use the Host and Project ID above directly. Do not ask me to log in again or look up the project ID.
[Business context]
Product background: Identify the product form, target users, and core business from the current project code. Do not ask me to fill this in again.
Required scenarios: Identify the core features and real business flows from the current project code. Cover only scenarios that actually exist. Do not copy the examples or invent features.
[Execution requirements]
Use the current project code as the primary source. Follow the Skill to generate, confirm, validate, archive, and upload the plan.
Name events in snake_case. Note the trigger timing and required properties for each event. Every event, event property, common event property, and user property must have a human-readable display name filled in. None may be left blank.
Show me the event table and property table for confirmation first. Do not upload before I confirm.
After confirmation, use ae-cli to generate and validate the draft/xlsx, then upload to the Project ID above. After upload, run ae-cli tracking plan get to read it back and confirm.
After a successful upload, run ae-cli tracking plan sync-display-names --project-id {{AE_PROJECT_ID}} --draft <path to the draft.json you generated>. Fill in only the blank display names. Do not overwrite display names that already exist in AE.
If it returns missing_in_metadata, list the events or properties that have not appeared yet and retry after the data is reported. Do not treat this as a failed plan upload.
Finally, return the AE tracking-plan page, the local archive file path, and the display-name sync result.
Copied to your clipboard. Paste it in your agent with Ctrl or Cmd + V.
What the agent does
  • 1Scans the code, extracts the business logic, and sets the definitions to match how the project actually works.
  • 2Produces the event table and property table, shows them to you for confirmation, and uploads nothing before you confirm.
  • 3After confirmation, uploads to the specified AE project and saves the local archive file .ae-tracking/draft.json.
Server-side validation
  • The server confirms the target project now has an uploaded tracking plan.
  • In AE under Data Management > Tracking Plan, you see every event and its trigger-timing standard.
STEP 03

It configures the SDK and writes the tracking calls.

Use the ae-generate-tracking-code Skill to read the confirmed plan and the current project code. It shows a change preview first, then configures the SDK, writes the tracking calls, and runs a build check after you confirm.

The prompt
What you say
Please use the ae-generate-tracking-code Skill to read the current project code and the .ae-tracking/draft.json generated in the previous step, and complete the tracking-code integration.
[AE integration info]
AE Host: {{AE_HOST}}
Project ID: {{AE_PROJECT_ID}}
SERVER_URL: {{AE_SERVER_URL}}
APP_ID: {{AE_APP_ID}}
[Configuration rules]
SERVER_URL is already derived from the current AE address: replace only the -web- in the domain with -receiver-, and keep the protocol, the rest of the domain, and the port.
Project ID and APP_ID are two different fields. Do not mix them up.
When SERVER_URL and APP_ID are not UNAVAILABLE, they have already been provided and confirmed by the current AE project. Write them directly into meta.server_url and meta.app_id in .ae-tracking/draft.json. Do not ask again.
If APP_ID is UNAVAILABLE, query it first through ae-cli using the Project ID above. If it cannot be found, prompt me to go to AE under Project Management > Integration Config and copy the APP_ID.
If SERVER_URL is UNAVAILABLE, do not substitute the AE Host. Prompt me to get the public data-reporting address from AE under Project Management > Integration Config.
[Code change requirements]
Read .ae-tracking/draft.json first. If it does not exist, use the AE Host and Project ID above to fetch the uploaded tracking plan.
Analyze the current project code first and list the files and tracking locations you plan to add or change.
Provide a change preview first. Do not change any code before I confirm.
After confirmation, complete the SDK configuration and the tracking-code changes.
When done, run the project build and the related checks.
Copied to your clipboard. Paste it in your agent with Ctrl or Cmd + V.
What the agent does
  • 1Outputs a preview of the insertion points first (new files plus a change list), and touches no code until you confirm.
  • 2Centralized design: route listening plus event delegation, so the change surface stays small.
  • 3After the changes land, runs the project build and the type checks.
Server-side validation
  • The current version completes with a local confirmation record. Later, the data-reporting status serves as back-proof that the code is integrated.
  • The project diff shows the SDK wrapper file and the tracking calls, and npm run build passes successfully.
STEP 04

Debug events fire, land, and get checked.

Continue with the ae-generate-tracking-code Skill to generate a debug validation script, add a debug device, run the script, and confirm on the AE Debug page that the SDK configuration and the reporting path work.

The prompt
What you say
Please continue using the ae-generate-tracking-code Skill to generate a debug validation script for the current project, and guide me through verifying the data reporting.
[Verification target]
AE Host: {{AE_HOST}}
Project ID: {{AE_PROJECT_ID}}
Platform or SDK: {{e.g. Web JavaScript SDK, Android SDK}}
[Verification requirements]
Choose representative business events from the tracking plan and generate a validation script.
Generate a stable debug device ID. First run ae-cli tracking debug-device list to see existing devices.
If the device does not exist, create it with ae-cli tracking debug-device add, then apply it with ae-cli tracking debug-device select.
After running the validation script, use ae-cli tracking debug-data list to query the last hour of debug data. Filter by event name if needed.
Only judge the verification successful when has_data is true and the event names, property structures, and error-field checks all pass.
After the debug data is confirmed to arrive, run ae-cli tracking plan sync-display-names --project-id {{AE_PROJECT_ID}} --draft <path to the draft.json you generated> to fill in the blank display names for this batch of events and properties. Do not overwrite existing display names.
Verify locally by default. Only when the CLI capability is unavailable, tell me how to troubleshoot on the AE Debug page.
If verification fails, explain the cause and how to fix it.
[Additional notes]
{{Other verification requirements; delete if none}}
Copied to your clipboard. Paste it in your agent with Ctrl or Cmd + V.
What the agent does
  • 1Selects representative business events and generates an automated validation script.
  • 2Guides you through adding the debug device and the run logic, comparing every event name and property structure in full.
Server-side validation
  • The server confirms the target project has received test reporting data.
  • On the AE Debug page you see events streaming in live, judged as correct.
STEP 05

Metric definitions leave people's heads and land in a cited library.

Use the ae-kb Skill to create a company knowledge base from the tracking plan and metric definition docs, compile it into a searchable wiki, and get answers back with citations.

The prompt
What you say
Please use the ae-kb Skill to build a metrics knowledge base for the current AE project through ae-cli.
[Target project]
AE Host: {{AE_HOST}}
Project ID: {{AE_PROJECT_ID}}
[Goal]
Create a company knowledge base named "marketing-site metrics library". Add the project's uploaded tracking plan and the metric definition docs, compile it, and confirm the wiki is searchable.
[Execution requirements]
Use ae-cli kb commands only (+create, +upload, +compile, +query).
After compiling, run one test query: ask for the numerator and denominator of the signup conversion rate, and require the answer to cite its source page.
Do not invent metric definitions. If a definition is missing from the docs, list it as an open question instead.
When done, return the knowledge base name, the page count, and the cited answer.
Copied to your clipboard. Paste it in your agent with Ctrl or Cmd + V.
What the agent does
  • 1Creates the knowledge base and uploads the tracking plan and definition docs through ae-cli kb.
  • 2Compiles the sources into a searchable wiki, one entry per event and metric.
  • 3Answers metric questions with the calculation and a citation back to the source page.
Server-side validation
  • The knowledge base shows as Compiled in the AE console, with its page count.
  • A test query returns the definition with a citation to the library page.
  • Later analyses cite the same definitions instead of re-deriving them.
STEP 06

Real events become reports on a shareable dashboard.

Use the ae-analysis Skill to read the project's uploaded tracking plan through ae-cli, create analysis reports from the real events and properties, and add them to a dashboard.

The prompt
What you say
Please use the ae-analysis Skill to create dashboard reports in the current AE project through ae-cli.
[Target project]
AE Host: {{AE_HOST}}
Project ID: {{AE_PROJECT_ID}}
[Analysis goal]
Identify the core business goals and complete the analysis using the current project code, the uploaded tracking plan, and the existing data.
[Example scenarios]
A 7-day trend of the core events
A conversion funnel for the core business path
Next-day retention of new users
[Execution requirements]
Use the Host and Project ID above and read the project's uploaded tracking plan.
Do not guess or substitute the project_id, event names, or property names. Use only the events and properties that actually exist in the tracking plan.
Understand the real business scenarios from the current project code and choose analysis goals that fit this project. The scenarios above are for reference only.
Create at least 2 analysis reports and one dashboard that matches the project and the analysis goals, and add the created reports to the dashboard.
Verify that each report queries correctly. If the current data is insufficient, say so clearly. Do not fabricate data.
When done, return the dashboard link and the report list.
Copied to your clipboard. Paste it in your agent with Ctrl or Cmd + V.
What the agent does
  • 1Reads the real tracking plan and matches the event and property definitions precisely.
  • 2Creates at least two analysis reports and assembles a dashboard, completing a compliance check on the data queries.
Server-side validation
  • The target project has at least one valid dashboard and one valid report.
  • When the dashboard opens, every report queries correctly and shows the mapping basis.
STEP 07

The loop closes: segments become messages your team approves.

Use the ae-engage Skill to segment lapsed high-intent visitors, draft the win-back messages for your approval, launch a scheduled two-branch flow, and watch the results flow back to the dashboard.

The prompt
What you say
Please use the ae-engage Skill to build a win-back flow in the current AE project through ae-cli.
[Target project]
AE Host: {{AE_HOST}}
Project ID: {{AE_PROJECT_ID}}
[Goal]
Segment last-7-day visitors who typed into the inquiry form but never submitted, and win them back.
[Execution requirements]
Create two cohorts: high-intent churn (form input in the last 7 days) and light churn (exposure only).
Draft the message for each branch and stop for my approval. Do not launch anything before I confirm.
After I confirm, create one canvas with two branches on a daily 09:00 schedule.
Add a report to the existing dashboard tracking signup conversion of the win-back cohort.
When done, return the flow name, the node count, and the report link.
Copied to your clipboard. Paste it in your agent with Ctrl or Cmd + V.
What the agent does
  • 1Builds both cohorts and drafts a message per branch, then waits for your approval.
  • 2Creates the two-branch canvas on a daily schedule once you confirm.
  • 3Adds a win-back conversion report to the dashboard, so results flow back into the loop.
Server-side validation
  • The flow shows as Running with a scheduled daily entry.
  • Sends start only after your confirmation, never before.
  • The dashboard gains a fourth report tracking the win-back cohort's conversion.
FAQ

Common questions

Do I have to use a specific coding agent?

No. ae-cli and the Skills work in any agent environment that supports Skills, including Codex, Claude Code, Cursor, and Trae.

How do I use these prompts?

Click Copy on any prompt to put it on your clipboard, then press Ctrl or Cmd + V in your agent's chat box to paste it.

Where does the demo data come from?

Every screen and prompt in this guide comes from real project work in a live AE environment.

Ready when you are

Ready to run your growth loop?

Try Agentic Engine now. From the first event to the win-back flow, let the agent run every step and approve each one yourself.