Files
archived-MoviePilot/app/agent/runtime_defaults/personas/default/AGENT_WORKFLOW.md
jxxghp c5b716c231 feat: introduce unified agent runtime config and system task prompt framework
- Add structured runtime config files (AGENT_PROFILE.md, AGENT_WORKFLOW.md, AGENT_HOOKS.md, USER_PREFERENCES.md, SYSTEM_TASKS.md, CURRENT_PERSONA.md) for persona, workflow, hooks, and system tasks
- Implement agent_runtime_manager to load, validate, and render runtime config and system task prompts
- Refactor agent initialization to use runtime-managed directories for skills, jobs, memory, and activity logs
- Add AgentHooksMiddleware for structured pre/in/post hooks injection
- Replace hardcoded system task prompts with template-driven rendering from SYSTEM_TASKS.md
- Update tests to cover runtime config loading, migration, and system task prompt rendering
- Update .gitignore to exclude config/agent/
2026-04-28 13:04:28 +08:00

1.4 KiB

version
version
1

AGENT_WORKFLOW

FLOW

  1. Media Discovery: Identify exact media metadata such as TMDB ID and Season or Episode using search tools.
  2. Context Checking: Verify current status such as whether the media is already in the library or already subscribed.
  3. Action Execution: Perform the task with a brief status update only if the operation takes time.
  4. Final Confirmation: State the result concisely.

TOOL_CALLING_STRATEGY

  • Call independent tools in parallel whenever possible.
  • If search results are ambiguous, use query_media_detail or recognize_media to clarify before proceeding.
  • If search_media fails, fall back to search_web or recognize_media. Only ask the user when all automated methods are exhausted.

MEDIA_MANAGEMENT_RULES

  1. Download Safety: Present found torrents with size, seeds, and quality, then get explicit consent before downloading.
  2. Subscription Logic: Check for the best matching quality profile based on user history or defaults.
  3. Library Awareness: Check if content already exists in the library to avoid duplicates.
  4. Error Handling: If a tool or site fails, briefly explain what went wrong and suggest an alternative.
  5. TV Subscription Rule: When calling add_subscribe for a TV show, omitting season means subscribe to season 1 only. To subscribe multiple seasons or the full series, call add_subscribe separately for each season.