Skip to content

Overview

analyze provides analytics and reporting capabilities for the KanseiLink ecosystem. It can quantify token savings from using KanseiLink, audit agent costs across services, and generate AEO (Agent Experience Optimization) reports and publishable articles.

This is primarily an admin/operator tool used for business intelligence and content generation.

Modes

analyze supports 4 modes. The mode is auto-detected from your parameters, or you can set it explicitly.

token_savings

Quantify how many tokens agents save by using KanseiLink's pre-verified data versus trial-and-error with raw API docs.

services (string[]): List of service IDs to analyze (e.g., ["freee", "kintone"]). Omit to analyze the top 10 most-used services.

task (string): Optional task context (e.g., "create invoice in freee") to tailor the analysis.

Example

json
analyze({
  "mode": "token_savings",
  "services": ["freee", "smarthr", "kintone"]
})
json
analyze({
  "task": "create invoice in freee"
})

cost

Audit agent costs across services. Returns cost breakdowns and optimization recommendations sorted by impact.

cost_service_id (string): Audit a specific service, or omit for all services. Triggers cost mode.

period_days (integer, default: 30): Analysis period in days. Default: 30.

top_n (integer, default: 10): Max recommendations to return (default: 10, max: 50). Sorted by priority (high first) then by monthly_savings_usd descending.

min_priority (enum, default: "low"): Minimum priority level to include: "high" returns only impactful recommendations, "low" returns everything. Default: "low".

Example

json
analyze({
  "cost_service_id": "freee",
  "period_days": 90,
  "min_priority": "high"
})
json
analyze({
  "mode": "cost",
  "top_n": 5,
  "min_priority": "medium"
})

aeo_report

Generate an AEO (Agent Experience Optimization) report with scores and rankings for services. Used for consulting deliverables and vendor feedback.

aeo_service_id (string): Filter by service ID. Triggers aeo_report mode when present (without article-specific params).

category (string): Filter by category (e.g., "accounting", "hr", "crm"). When used alone (without aeo_service_id), triggers token_savings mode instead.

aeo_top_n (number, default: 20): Number of top services to return. Default: 20.

include_recommendations (boolean, default: true): Include improvement recommendations per service. Default: true.

Example

json
analyze({
  "aeo_service_id": "freee",
  "include_recommendations": true
})
json
analyze({
  "mode": "aeo_report",
  "category": "accounting",
  "aeo_top_n": 10
})

aeo_article

Generate a publishable AEO ranking article with category deep-dives. Outputs in markdown or JSON format.

article_type (string): Article type hint. Triggers aeo_article mode when present.

target_keyword (string): Target keyword for the article. Triggers aeo_article mode when present.

quarter (string, default: "Q2 2026"): Report period label (e.g., "Q2 2026", "2026年上半期"). Default: "Q2 2026".

format (enum, default: "markdown"): Output format: "markdown" for blog/press releases, "json" for API embedding. Default: "markdown".

article_top_n (number, default: 20): Number of services in the overall ranking table. Default: 20.

categories (string[]): Focus categories for deep-dive sections. Omit for the default set.

Example

json
analyze({
  "mode": "aeo_article",
  "quarter": "Q2 2026",
  "format": "markdown",
  "article_top_n": 30,
  "categories": ["accounting", "hr", "crm"]
})
json
analyze({
  "article_type": "quarterly_ranking",
  "target_keyword": "Japanese SaaS agent readiness"
})

Mode Auto-Detection

PriorityConditionMode
1mode parameter is set(explicit override)
2category alone (no aeo_service_id, no article_type/target_keyword)token_savings
3cost_service_id is presentcost
4period + model both presentcost
5aeo_service_id (without article_type/target_keyword)aeo_report
6article_type or target_keyword is presentaeo_article

If no actionable parameters are provided, the tool returns an error listing available modes.

All Parameters

ParameterTypeRequiredModesDescription
modeenum--allExplicit mode: token_savings, cost, aeo_report, aeo_article
servicesstring[]--token_savingsService IDs to analyze
taskstring--token_savingsTask context for tailored analysis
cost_service_idstring--costSpecific service to audit
period_daysinteger--costAnalysis period in days (default: 30)
top_ninteger--costMax recommendations (default: 10)
min_priorityenum--costMin priority: low, medium, high
aeo_service_idstring--aeo_reportFilter by service ID
categorystring--token_savings, aeo_reportFilter by category
aeo_top_nnumber--aeo_reportTop N services (default: 20)
include_recommendationsboolean--aeo_reportInclude recommendations (default: true)
quarterstring--aeo_articleReport period label
formatenum--aeo_articleOutput: markdown or json
article_top_nnumber--aeo_articleRanking table size (default: 20)
categoriesstring[]--aeo_articleDeep-dive categories
article_typestring--aeo_articleArticle type hint
target_keywordstring--aeo_articleTarget keyword
modelstring--costModel name hint for cost detection
periodstring--costPeriod hint for cost detection

Notes

  • This is an admin/operator tool primarily used for business intelligence, consulting deliverables, and content marketing.
  • Token savings analysis provides concrete ROI numbers for justifying KanseiLink adoption. Use lookup with the returned service_id for the full integration guide.
  • Cost audit recommendations are sorted by priority (high first) then by estimated monthly savings. Acting on high-priority recommendations first yields the greatest impact.
  • AEO reports can be shared with SaaS vendors to encourage agent-readiness improvements in their APIs.
  • AEO articles in markdown format are ready to publish. Review rankings for accuracy before distribution.
  • Reporting outcome data (via the report tool with model_name and token counts) improves the accuracy of future cost audits.

MIT License