AI Agent Hub
Back to skills
IMA Notes and Knowledge Base API icon

IMA Notes and Knowledge Base API

Knowledge Management Updated 2026.08.30

Paste the following prompt into your AI chat to install this skill:

Please install @user_8d97f2ac/123-v2 according to https://skillhub.cn/install/skillhub.md.

About this skill

Problem Solved

Calling IMA directly can mix up note and knowledge-base APIs, and Chinese content may break during file reads, web fetches, or PowerShell requests. This skill wraps the official ima.qq.com OpenAPI into a unified entry point for notes and knowledge-base operations.

How It Works

  • Notes module: search notes, browse notebooks, read content, create with import_doc, and append with append_doc.
  • Knowledge-base module: upload files, add web links, search knowledge bases, browse content, and retrieve metadata or available lists.
  • Unified calls: requests use HTTP POST + JSON and target only the official Base URL https://ima.qq.com; credentials are resolved by environment variables first, then config files.
  • Routing: use notes when the target is note content; use knowledge-base when the target is a knowledge-base item; multi-module tasks run in intent order.

Boundaries

  • Validate content and title as legal UTF-8 before note writes to avoid unrecoverable mojibake.
  • Upload knowledge-base files as their original binary content without encoding conversion.
  • In PowerShell 5.1, explicitly convert all API bodies to UTF-8 byte arrays to prevent silent GBK conversion by Invoke-RestMethod.

Use Cases

  • Turn fetched web articles into IMA notes, checking source encoding before writing content.
  • Upload PDFs, spreadsheets, and images unchanged to an IMA knowledge base as searchable items.
  • Call IMA OpenAPI from PowerShell 5.1 without silently converting Chinese bodies to GBK.
  • Route knowledge-base-to-note requests by reading the knowledge base first, then creating or appending a note.

Best For

  • Content engineers who write external articles or meeting notes into IMA.
  • Knowledge administrators who maintain IMA file uploads and link entries.
  • Backend developers integrating IMA APIs inside Windows PowerShell.
  • Automation engineers who search knowledge bases and summarize results into notes.