A local Obsidian plugin for creating a customizable floating pet that can chat, manage dashboard reminders, run local reading-analysis tools, and help build paper knowledge graphs.
If the video does not render in your GitHub client, open assets/demo.mov directly.
- Added built-in reading skills for paper knowledge graphs and reading-record analysis.
- Added Agent tools and command palette actions for
Create reading knowledge graphandAnalyze reading records. - Made reading-log parsing generic across Chinese and English note formats.
- Added clean release packaging with
npm run package. - Added
versions.json, built runtime files, and a macOS-only native desktop companion guard.
See CHANGELOG.md for details.
- Create multiple pets and switch between them.
- Upload a pet cover asset and per-action PNG/JPG/WebP/GIF files or horizontal spritesheets.
- Save multiple appearance templates per pet, expand each template to edit its unique info, and apply one to switch the pet's cover and idle appearance.
- Automatically cut out simple static-image backgrounds during upload.
- Define actions such as idle, wave, jump, think, sleep, shake, and custom.
- For spritesheets, set
assetTypetospritesheet, then configureframeCountandframeDurationMs. - Keep the pet fixed and draggable, or optionally let it walk inside the Obsidian window.
- Background handoff can show the same 2D pet as a transparent desktop window on macOS while Obsidian is in the background. Other platforms keep the in-window Obsidian pet.
- Click the pet to open or close the Dashboard / Chat panel.
- Mark dashboard rows from the pet panel. Markdown tasks are written back to their source file; Apex cards stay in
dashboard.mdand are marked complete. - Use Obsidian commands
Create reading knowledge graphandAnalyze reading recordsto run the local reading tools without opening pet chat. - Show fixed Dashboard tabs in the pet panel: Memo, Tasks, Study, and Learned.
- Add Apex Memo, Task, and Study cards from the Dashboard panel; entries are written into the configured
dashboard.mdand refreshed immediately. - Memo rows show a short preview by default; click a memo to expand or collapse the full content with an inline animation.
- Keep Apex Dashboard content synchronized with
dashboard.md; completed rows disappear from the pet panel while the dashboard file keeps completed items marked. - Show deadline reminders on the pet when a dashboard/task
due,deadline, orremindervalue is approaching. Lead time, check interval, repeat interval, and default action are configurable. - Chat with a model API through OpenAI-compatible Chat Completions or OpenAI Responses.
- Configure multiple model profiles and switch them from the Chat panel or settings.
- Send chat messages with
Enter; drag the divider in the chat panel to resize the message history area. - Send the active Markdown/text note, image, or PDF as optional chat context.
- Keep bounded chat history with rolling or summarize-old-context strategies.
- Optionally append completed chat exchanges to a Markdown log file.
- Optional Agent mode lets the pet search/read notes, refresh pet content, show messages, and, with explicit write permission, create/append/overwrite notes or complete the current reminder.
- Optional external Agent tools can open http/https browser links or prepare a WeChat draft after explicit settings permission and per-action confirmation.
- Expose an API for other plugins to register content providers and action generators.
- Click the pet to show or hide the conversation menu.
- Choose
DashboardorChatfrom the outer menu. - In
Dashboard, use the innerMemo,Tasks,Study, andLearnedtabs to switch sections. - Choose
Chatto open the pet chat panel. Chat no longer renders dashboard rows or dashboard add buttons under the messages, so the conversation area is only for conversation. UseClearinMoreto erase the current persisted session history. - Tick a row checkbox to complete that item. Standard Markdown tasks become
- [x]; Apex task rows become checked; Apex memo/learned cards stay indashboard.mdwithdone: trueand strikethrough titles. - Selecting a dashboard row no longer opens
dashboard.mdimmediately. Use the previewOpenbutton when you want to jump to the source file. - Completing Apex Study moves the study card into
## Learnedwith alearned:date and source link.
Auto cutout uploads is enabled by default. It converts static PNG, JPG, and WebP uploads to transparent PNGs by removing edge-connected background colors.
This works best for plain or simple backgrounds. GIFs are kept unchanged, and complex photos may still need a manually prepared transparent PNG.
In Pet -> Appearance templates, use Save current to store the active cover/idle asset as a reusable look. Each template is expandable and stores:
- Name.
- Unique description/info.
- Asset path and asset type.
Apply switches the pet cover and idle action to that template. This lets one pet keep several 2D looks.
This build is intentionally 2D-only to keep Obsidian memory low. GLB/GLTF uploads are rejected, and old model3d/.glb/.gltf configuration is ignored at render time instead of loading WebGL.
Recommended 2D asset requirements:
- Format: PNG, JPG, WebP, GIF, or a horizontal spritesheet image.
- Keep one character centered with transparent or simple background.
- Prefer transparent PNG/WebP for static pets.
- Keep assets small when possible; under 2 MB is a good target for Obsidian startup and panel performance.
- For frame animation, use a horizontal spritesheet and set
frameCountplusframeDurationMs.
Upload path:
Pet -> Cover asset -> Upload: sets the default pet body and syncs the idle action.Actions -> Upload: sets a specific action asset.Background handoff: reuses the same 2D asset or emoji fallback on macOS; it does not load Three.js or WebGL. On Windows, Linux, and mobile, the pet stays inside Obsidian.
Run this before publishing or sharing a manual-install build:
npm run packageThe command rebuilds the plugin and writes a clean release folder to dist/obsidogx. It includes runtime files needed by Obsidian, including manifest.json, versions.json, main.js, styles.css, overlay-model.js, docs, and the optional macOS companion binary. It excludes local state such as data.json, chat history, generated pet assets, companion state files, and node_modules.
- Apex Dashboard: reads the configured dashboard markdown file, usually
dashboard.md, ensures## Goal,## Memo,## Todo,## Study, and## Learnedexist, and parses cards, tasks, due/deadline/reminder values, and learned review links. - Markdown tasks: unchecked tasks like
- [ ] Write draft 📅 2026-06-08. - Markdown memos: notes under configured memo folders, or notes containing configured tags such as
#memoor#备忘录.
Supported deadline syntax includes:
- [ ] Write draft 📅 2026-06-14
- [ ] Review slides due: 2026-06-14 09:00
## Todo
### Submit report
deadline: 2026-06-14 18:00Content & reminders -> Deadline reminders controls whether the pet bubbles when the deadline is inside the lead window. The default lead is one week (10080 minutes). You can bind deadline-reminder to any action in Actions -> Action bindings.
Enable Chat -> Enable chat, then configure:
Provider preset: OpenAI Chat Completions, OpenAI Responses, OpenRouter, DeepSeek, SiliconFlow, Moonshot, Ollama, LM Studio, or Custom.API format:Chat Completionsfor OpenAI-compatible chat APIs;Responseswhen you want OpenAI Responses features such as PDF file context.Endpoint,Model, andAPI key: fully editable even after choosing a preset.Model profile: create multiple profiles for different providers or local models in settings. In the Chat panel, use the header dropdown to switch profiles.System prompt: controls the pet's personality and answer style.Max history messagesandHistory strategy: either keep newest messages only, or summarize older messages into compact memory.
Chat history is stored per session in plugin data, capped by Max history messages, and can either roll over or summarize older context. Clear removes the current session context, but does not delete an optional Markdown chat log file.
The visible chat panel keeps model switching in the header, moves session/mode controls below the input, folds chat-specific actions into More, supports Enter to send, and includes a draggable message-history divider.
If Write chats to file is enabled, completed exchanges are appended to Chat log file such as Pet Chats.md or Logs/Pet Chats.md. Clearing chat history does not delete that file.
Active file context:
- Markdown and text-like files are sent as clipped text.
- Images are sent as vision input when
Include active imagesis enabled. - PDFs are sent as file input only in
Responsesmode whenInclude active PDFsis enabled. InChat Completionsmode, the pet sends only a note that a PDF is active. Attachment max bytesprevents large images or PDFs from being sent accidentally.
Agent mode:
Agent modelets the model request one tool at a time using a JSON tool protocol.- Read/search tools include
read_current_file,search_vault,read_note,list_pet_content, andrefresh_pet_content. - Action/write tools include
show_pet_message,create_note,append_note,overwrite_note, andcomplete_current_pet_content. - Reading tools include
create_knowledge_graphandanalyze_reading_records. They auto-discover a note named阅读记录.md,Reading Log.md, or a note with reading-log frontmatter, then generate Markdown outputs such as知识图谱.mdand阶段阅读分析.md. Agent can write vault filesmust be enabled before write tools or completing current pet content can run.- Because reading tools create or overwrite Markdown files, they also require
Agent can write vault files. - External tools include
open_browser,open_web_search, andprepare_wechat_message. They are disabled by default underExternal actions. open_browseronly acceptshttpandhttpsURLs.prepare_wechat_messagecopies a draft to the clipboard and tries to open WeChat. It does not send the message automatically.External actionshas test buttons for browser search and WeChat draft preparation after the matching permission is enabled.Agent max stepslimits tool-call loops so the pet eventually answers.
Command palette:
Obsidogx: Create reading knowledge graphObsidogx: Analyze reading records
These commands use the same local reading tools as Agent mode, but they are explicit user commands, so they do not require chat, a model API, or Agent mode. Agent-triggered reading tools still require Agent can write vault files.
Reading graph examples:
创建知识图谱
分析阅读记录最近 8 篇
分析阅读记录 from 2026-06-01 to 2026-06-30
The built-in reading tools are local and deterministic. They do not require a web API, external scripts, or a fixed vault path. For best results, write each paper record with a ### [[Paper Title]] heading plus fields such as 方向, 任务, 创新点, and 相关算法或公式.
Skills are reusable instruction blocks injected into pet chat and Agent mode. They work like lightweight agent skills: each enabled skill adds a name, description, and instruction prompt to the model context.
Built-in reading skills teach Agent mode when to call local reading tools:
Reading Knowledge Graph: callscreate_knowledge_graphwhen the user asks to build or refresh a paper knowledge graph.Reading Log Analyst: callsanalyze_reading_recordswhen the user asks for reading direction analysis, stage analysis, gaps, or next reading suggestions.
In Skills settings:
Add skill: create a local DIY skill and edit its name, description, and prompt directly.Restore built-ins: restore the built-in Obsidian skills without deleting custom skills.Import from GitHub or raw URL: download skills from a GitHub repository, GitHub folder, GitHub file, rawSKILL.md,skill.json, orskills.json.
GitHub import supports these URL shapes:
https://github.com/user/repo
https://github.com/user/repo/tree/main/skills
https://github.com/user/repo/blob/main/skills/review/SKILL.md
https://raw.githubusercontent.com/user/repo/main/skills/review/SKILL.md
For repository or folder URLs, the plugin scans a limited depth for SKILL.md, skill.json, and skills.json, including layouts such as skills/review/SKILL.md.
SKILL.md format:
---
name: Review Coach
description: Create active-recall review prompts from notes and Learned dashboard items.
---
# Review Coach
When reviewing material, produce short active-recall questions, answers, and a next review suggestion. Prefer links back to useful notes.skill.json format:
{
"id": "review-coach",
"name": "Review Coach",
"description": "Create review prompts from notes.",
"prompt": "Use active recall, short answers, and link back to relevant notes."
}skills.json can contain multiple skills:
{
"skills": [
{
"id": "dashboard-reviewer",
"name": "Dashboard Reviewer",
"description": "Review Goal, Todo, Study, and Learned.",
"prompt": "Keep dashboard sections separate and suggest the next action."
}
]
}Cover assetis the default pet appearance and is also used by the idle action unless that action has its own asset.- Each action can use its own uploaded image, GIF, WebP, or horizontal spritesheet.
Actions -> DIY action slotsis the manual upload interface. UseAdd, set a stable lowercaseAction id, upload a 2D asset, set playback options, thenPreview.motionadds CSS movement such as wave, jump, think, sleep, shake, or spin.- Spritesheets use
frameCountandframeDurationMsto animate frames from left to right. - Generated actions can return an existing
assetPathor inline image data such asassetDataUrl/assetBase64. - Action bindings can play actions automatically on user messages, assistant replies, agent tool calls, completed content, or deadline reminders. Keyword patterns are comma-separated.
Other plugins can access the API after this plugin loads:
const plugin = app.plugins.plugins["obsidogx"];
const api = plugin?.api;
api?.showMessage("Time to stretch.", {
sourceName: "Reminder",
actionId: "wave",
timeoutMs: 3000
});
await api?.chat("Summarize the file I am looking at.");
api?.clearChatHistory();Register a content provider:
const unregister = api.registerContentProvider({
id: "my-reminders",
name: "My Reminders",
async getItems(context) {
return [
{
id: "reminder-1",
sourceId: "my-reminders",
sourceName: "Reminders",
title: "Review today's notes",
priority: "normal"
}
];
}
});Register an action generator:
api.registerActionGenerator({
id: "my-generator",
name: "My Generator",
async generate(input, context) {
return [
{
id: "wave",
name: "Wave",
motion: "wave",
assetPath: input.coverAssetPath,
assetType: "image",
loop: true,
createdAt: Date.now(),
updatedAt: Date.now()
}
];
}
});The built-in Custom HTTP action generator posts this JSON to your endpoint:
{
"pet": {},
"coverAssetPath": ".obsidian/plugins/obsidogx/pets/pet-id/cover.png",
"requestedActions": ["idle", "wave", "jump"],
"stylePrompt": "Small Obsidian desktop pet..."
}Return either existing vault paths or generated image payloads:
{
"actions": [
{
"id": "wave",
"name": "Wave",
"motion": "wave",
"assetDataUrl": "data:image/png;base64,...",
"loop": true
}
]
}Supported generated asset fields are assetPath, assetDataUrl, assetBase64, assetMimeType, assetFileName, frameCount, and frameDurationMs.
The plugin also dispatches a browser event when the API is ready:
window.addEventListener("obsidogx:api-ready", (event) => {
const api = event.detail;
});- Settings are grouped into collapsible sections: General, Pet, Actions, Content & reminders, Chat & Agent, Skills, Generation, and External actions.
- Skills can be added manually or imported from GitHub/raw
SKILL.md,skill.json, andskills.json; repo and folder imports scan for multiple skill files. - Pet appearance templates can store multiple looks per pet and apply a saved look to the cover/idle action.
- Agent external actions support browser opening and WeChat draft preparation with explicit permission and confirmation.
- Dashboard/task deadline reminders can pop a pet bubble before
due,deadline, orremindertimes. - Chat panel controls now switch session, Chat/Agent mode, provider preset, and model in place.
- Chat history is stored per session with bounded history, summary memory, clearing, and optional Markdown logging.
- Pet Profile fields are injected into chat, so self-introduction can use the configured background, personality, abilities, preferences, catchphrases, and preferred intro.
- Agent mode supports
web_searchwhen enabled, with DuckDuckGo HTML, Brave, Tavily, SerpAPI, or Custom JSON providers. - Apex Dashboard now reads
## Goal,## Study, and## Learnedin addition to Memo/Todo. - The pet panel now has a two-level UI: outer
Dashboard / Chat, then Dashboard tabs forMemo / Tasks / Study / Learned. - Chat mode is chat-only and no longer places dashboard modules below or over the message history.
- Completing an Apex Study card or Study task moves the study card to
## Learnedwith a source link. - Action settings now focus on manual DIY action slots: edit action ids, upload 2D assets/spritesheets, preview them, and bind them to messages, Agent tools, completions, or reminders.
- This low-memory build disables GLB/GLTF rendering and removes the Three.js runtime path.
- Background handoff has a click-to-toggle bubble for the current reminder and dashboard module summary while Obsidian is in the background.