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_aca80b9b/sk-3a9384a808454868983f9f9adea41c96 according to https://skillhub.cn/install/skillhub.md.

About this skill

Problem

IMA exposes notes and knowledge-base features through separate OpenAPI operations: creating notes, appending content, searching knowledge bases, uploading files, adding web links, and retrieving original content all require different parameters and flows. When calling these APIs directly, teams often hit routing mistakes, encoding corruption, accidental filename changes, missing credentials, and inconsistent error layers. In particular, notes writes can become unrecoverable garbled text if content or title is not valid UTF-8, and PowerShell 5.1 may silently convert the request body to GBK.

How It Works

The skill consolidates the IMA OpenAPI surface into two modules: notes and knowledge-base. The notes module covers note creation, appending, search, and content retrieval. The knowledge-base module covers file uploads, web-link additions, knowledge-base search, and original-content management. It routes by intent: use import_doc or append_doc when the target is note content; use create_media, add_knowledge, or related lookup APIs when the target is a knowledge-base entry; and read both submodules before chaining cross-module operations.
Before calling the API, the skill expects IMA Client ID and API Key credentials. Requests are sent as HTTP POST + JSON through ima_api.cjs. Errors are split into two layers: script execution errors appear in stderr with -100 or -200; backend business errors appear in stdout with code and msg. Before notes writes, string fields must be validated as UTF-8. File uploads must preserve binary content, and title must match the original filename.

Boundaries

This is useful for automating IMA note and knowledge-base workflows, but it does not cover every IMA capability and does not support video files, Bilibili/YouTube URLs, or file:// addresses. It should not be used to rename original files, skip encoding checks, or repeatedly retry API calls when credentials are missing.

Use Cases

  • Create a new note from captured web-page points and append updates to an existing topic note.
  • Upload PDF or Excel files to a knowledge base, add web links, and search entries by topic.
  • Fetch a knowledge-base media item’s original note and read its content for analysis.
  • Check IMA credentials in a script, create or append notes via the API, and handle business errors.

Best For

  • Engineering teams maintaining IMA note workflows who need to create notes from web points and append to a target note.
  • Ops members managing knowledge-base entries who need to upload documents, add links, and retrieve content.
  • Engineers performing source analysis who need to fetch original media content and read note text.
  • Automation leads building API workflows who need credential checks, IMA calls, and two-layer error handling.