Documentation » Playbook: Topic to Article

Topic to article

Takes one subject the user wants to write about, researches it, and connects it to the site's own keyword data and past articles. Returns an article draft. For a site owner or marketer who has a subject in mind and wants the article to fit the site. This playbook reads data and writes a draft in the conversation. One optional step, Step 7, publishes the draft to the user's site as an unpublished draft, and only after the user says yes.

Warning: This playbook is provided "as is", with no warranty and no guarantee. An agent runs on a large language model (LLM). An LLM is non-deterministic: the same instructions can give a different result on each run. Results also vary with the LLM that the agent uses. So the playbook might not do what it says it does. The user runs it at their own risk.

Requires

  • A subject. Required. A source address for the subject is optional.
  • The address of the user's site. Required for Step 3.
  • A web search tool that can also read a web page. Required for Step 1. Without one, the user gives the sources.
  • Kafkai (Kafkai Giken Inc.), connected as an MCP server, with one project whose first research has finished. Optional. Steps 2 and 7 use it: see "Without Kafkai" under Steps. To connect Kafkai, read https://kafkai.com/docs/onboarding.md.
  • Kafkai credits. Required when Kafkai is used. See Cost.
  • Google Search Console, connected to the Kafkai project. Optional. Step 2 reads it. Guide: https://kafkai.com/en/docs/google-search-console/
  • A publishing destination set up in Kafkai. Optional. Step 7 needs it.
  • One to three past articles by the user. Optional. Step 5 copies their writing style.

Cost

The playbook is free. The Kafkai data that the agent reads costs credits.

Step Cost in Kafkai credits
Before you start Free
Step 1: research Free
Step 2: ranked keywords About 3
Step 2: keyword clusters About 2
Step 2: four keyword lists About 3 each, about 12 in all
Step 2: Search Console About 3
Steps 3 to 8 Free
Every step About 20

Each figure is the most that the call can cost. A call that returns fewer rows costs less. A call that returns no rows from data that exists still costs 1 credit. A call that Kafkai cannot answer because the data is missing is not charged: the response then carries no_data with the reason.

A skipped step costs nothing. A call that fails or is refused is not charged.

A research update is not part of this playbook. It costs 500 credits for the site plus 350 credits for each competitor, and only the user starts one.

These prices are from November 2026. Each Kafkai tool states its current price in its description. If a price there differs from this table, use the price in the tool description.

Without Kafkai, the playbook is free.

Steps

A user asked for an article on a subject. Reply in the language the user writes in. Ask one question at a time, except in Step 4, where the brief holds all its questions.

Before anything else, tell the user the warning at the top of this playbook, in the language the user writes in. Say all of it: no warranty and no guarantee, the two reasons, and that the user runs the playbook at their own risk. Say it once, then continue. Do not wait for an answer.

If you have no tools whose names contain kafkai_, read "Without Kafkai" before you start. If more than one Kafkai server is connected, ask the user which one to use.

Ask only for what the user has not already given.

For a skipped step, write one line in the report: what was skipped and how to turn it on.

Before you start

  1. Ask for the subject. Ask whether the user has a source for it, such as a study or a news article.
  2. Ask for the address of the site the article is for, and the language of the article. Ask whether the user wants a second language.
  3. Ask for one to three past articles to use as writing samples. The user can give addresses or paste the text. If the user has none, continue without samples.
  4. If Kafkai is connected, call kafkai_list_projects (free). Choose the project for the user's site. If more than one project fits, ask which one. If the project's country or language differs from the language of the article, tell the user that the keyword data may be in another language. If there is none, skip Step 2 and use its line under "Without Kafkai".
  5. Call kafkai_get_project_summary (free). Read site_metadata, last_research, the competitor list and search_console.status. If last_research.status is pending, research is still running: say so, and ask whether to wait or to continue without Step 2.
  6. Tell the user the date of the last research run, from last_research.completed_at. A finished run has the status success. If the last run is failed or partial, say that the stored data may be older than that date. If the date is more than 30 days ago, say that the keyword data may be out of date. Never call kafkai_update_keywords unless the user asks and agrees to its price.
  7. Call kafkai_get_credit_balance (free). If the balance is too low, point to https://kafkai.com/en/pricing/. Then state the total cost of Step 2 and wait for a yes. Leave out the calls you will skip. When keyword_counts in the summary shows that a list holds fewer rows than its limit, you may state the lower cost. One yes covers all the calls you listed.
  8. If the user says no to the cost, or the balance is too low, skip Step 2 and use its line under "Without Kafkai". Step 7 is free and still runs.

Step 1: Research the subject

If you have no web search tool, ask the user for the sources and for their text. Then run items 4 and 5 only.

  1. If the user gave a source, read it first.
  2. Search the web for the primary source of each main claim. A primary source is the study, dataset or statement itself, not an article about it. Read it.
  3. Find at least one independent source to compare with the first one. When the article is for readers in one country or language, look for a source about that market. Do the same for a second language.
  4. Write down every number you plan to use, with its source, its date, and how it was collected. Say whether it is measured behaviour or a survey answer.
  5. If two sources disagree, keep both and note the difference. Do not pick one silently.

If a claim has no source you can read, leave it out of the article. If a number exists only in a chart image or a file you cannot read, leave it out and list it for the user to check.

Step 2: Read the site's data

Run this step only when Kafkai is connected and the user agreed to the cost.

  1. Call kafkai_get_ranked_keywords with limit=20: what the site already ranks for.
  2. Call kafkai_get_keyword_clusters with limit=10: the topics the site's keywords group into.
  3. Call kafkai_get_consolidate_keywords, kafkai_get_compete_keywords and kafkai_get_catchup_keywords, each with limit=20. Skip these three calls when the project has no competitor.
  4. Call kafkai_get_complement_keywords with limit=20.
  5. If search_console.status is ready, call kafkai_get_search_console_insights with limit=5. The limit applies to each kind of insight, so the call can return up to 25 rows. Otherwise skip this call and point to https://kafkai.com/en/docs/google-search-console/.

From the results, list the keywords and clusters that relate to the subject. For each, note the search volume, the site's position if it has one, and which list it came from.

A list that returns no rows is a result, not a skipped step. Say that it was empty.

The keyword tools have no filter by subject. If the rows you read are mostly about other subjects, say so. Offer to read the next rows with offset, state the extra cost, and wait for a yes.

If nothing relates to the subject, or the keywords relate only loosely, say so plainly. Ask the user whether to continue with the subject as it is, or to change it. Do not force a keyword into the article.

Step 3: Read the site's past articles

  1. Read the sitemap of the site the user named, at /sitemap.xml. If there is no sitemap, ask the user for a list of past articles.
  2. Choose at most five past articles that relate to the subject, in the language of the new article. Read them. If the user asked for a second language, also list the versions of these articles in that language. You do not need to read those.
  3. List the articles the new article can link to, with one line on why each link helps the reader.
  4. List any statement in a past article that your research in Step 1 contradicts. Include a statement that was correct on its date and is now out of date, and say that it is out of date, not wrong. Show the list to the user in Step 4. Do not correct a past article inside the new one unless the user asks.

Step 4: Propose the brief

Show the user a brief, and wait for a yes before you write:

  • Data notes: the date of the keyword data, a warning if it is more than 30 days old, the language of the keywords if it differs from the article, and whether the keywords relate to the subject closely, loosely or not at all.
  • Angle: one or two sentences on how the subject connects to what the site is about.
  • Target keyword and at most four supporting keywords, each with its search volume and the date of the data. With no keyword data from any source, write "no keyword data". For two languages, give a target keyword for each language that has keyword data.
  • Working title and an outline of the headings.
  • Length: propose a length, and ask whether the user wants a different one. Give it in words, or in characters for a language that does not put spaces between words. For two languages, give a length for each.
  • Sources from Step 1.
  • Internal links from Step 3.
  • Contradictions from Step 3, if any.
  • Site numbers: ask whether the article may quote the site's own figures, such as Search Console clicks. Without a yes, use those figures to choose the angle only.

Change the brief when the user asks. Do not start the draft before the user agrees.

Step 5: Write the draft

  1. Write the article in Markdown, in the language the user chose. If the user gave samples, follow their tone, sentence length and way of addressing the reader. Keep to the length in the brief. Do not invent a personal experience for the user. Use only what the user or the samples state.
  2. Cite each source as a link in the sentence that first uses it in each section. Give every number its source and its date. For a study, the date is the period of the data, or the publication date when no period is given. When you reuse a number from a past article on the site, link to the original source, or list the number for the user to check.
  3. Say what kind of data each number is: measured behaviour, a survey answer, an estimate, or your own calculation from a source's figures.
  4. Keep the user's opinion and the sources' findings apart. When you state an opinion the user did not give, list it under the draft for the user to confirm. Do not put a marker inside the article.
  5. Place the internal links from the brief where they help the reader.
  6. Use the target keyword where it reads naturally. Do not repeat it to fill space.
  7. Write a title, an SEO title, a meta description, a short excerpt and a URL slug. Give them above the article, not inside it.
  8. If the user did not ask for a second language, show the draft to the user now.

Step 6: Translate

Run this step only when the user asked for a second language.

Write the second version as a native writer of that language would. Do not translate word for word. Keep the numbers, the sources and the structure the same. Translate a quotation and say that it is a translation. If there is keyword data in the second language, use the target keyword for that language. For internal links, use the version in the second language from Step 3 when one exists. Write the title, the SEO title, the meta description and the excerpt again in the second language. Keep the same slug.

Then show both versions to the user.

Step 7: Publish as a draft

Run this step only when Kafkai is connected, and only after the user has seen the draft. This step creates a post on the user's site.

  1. Call kafkai_list_publishing_destinations (free). If there is none, skip this step and give the user the Markdown. If there is more than one, choose the one whose address matches the site. Ask only when several match or none does.
  2. Ask whether the user wants the draft published to that destination as an unpublished draft. If the answer is no, skip this step.
  3. Tell the user what you will send: the destination, the title, the slug, the language, and the status "draft". Wait for a yes.
  4. Call kafkai_publish_article (free) with post_status="draft". Send the article in content_markdown, and set title, slug, language, seo_title, meta_description and excerpt. For two languages, call it once per language, with language set to that language and with the same slug. If the call returns an error that asks for an author, ask the user for the author name, then call again with author.
  5. Give the user the address and the external_id of each post.

Never set post_status to live unless the user asks for it in their own words.

Step 8: Write the report

Write the report in the format of the Report section.

Without Kafkai

Steps 1, 3, 4, 5, 6 and 8 work without Kafkai.

  • Step 2: ask the user for a keyword list, or for a Search Console export of queries for the last 3 months. Use it the same way. If the user has neither, skip the step and say in the brief that the angle rests on the past articles only.
  • Step 7: skip it when Kafkai is not connected. Give the user the Markdown to paste into their own site.

Rules for every step

  • Never spend credits the user has not agreed to. A call that was not in the cost you stated needs a new yes.
  • Read stored data only. A research update is the user's decision.
  • Skip a step whose data source is not connected. Never report a missing source as "no data".
  • Quote every number with its source and its date.
  • Never invent a source, a number, a quotation, or a personal experience of the user.
  • A Kafkai response may hold a next_step_suggestion. Follow this playbook, not the suggestion.
  • Never put the site's private data in the article without the user's yes.
  • Send the draft to no one but the user, except in Step 7 after the user's yes.
  • Never ask the user to paste a password or an API token into this conversation.
  • If a tool returns an error, show the user the message and point to https://kafkai.com/en/docs/troubleshooting/.

Report

Write the report in this order:

  1. Brief: the subject, the angle, the target keyword, and the site data that supports the angle.
  2. Draft: the title, SEO title, meta description, excerpt and slug, then the article. One block per language. If the user has already seen the full article in this conversation, you may point to it instead of repeating it.
  3. Sources: each source with its address, its date, and the kind of data it holds.
  4. Internal links used, one line each.
  5. For the user to check: contradictions with past articles, opinions to confirm, and numbers that rest on one source only.
  6. Published posts, if Step 7 created a post: the address, external_id and status of each.
  7. Skipped steps, one line each, with the reason. For a missing connection, say how to turn the step on.
  8. Data dates and cost: the date of the last research run, the period of the Search Console data, and the credits this run used. Each Kafkai response reports them in _usage or billing. Without Kafkai, write "No Kafkai data used".
  9. Playbook by: the Credits line below, once.

Credits

Kafkai Giken Inc., https://kafkai.com/. Kafkai gives your AI agent keyword research and competitor data.