ReMe/reme/config/proactive.yaml
jinliyl ae55e2e570
Some checks are pending
CI / Python packages / Build and verify distributions (push) Waiting to run
CI / Python quality / GitHub Actions (push) Waiting to run
CI / Python quality / Pre-commit (push) Waiting to run
CI / Python tests / Hermes embedded - ubuntu-latest (push) Waiting to run
CI / Python tests / Hermes embedded - windows-latest (push) Waiting to run
CI / Python tests / Unit Tests - py3.11 (push) Waiting to run
CI / Python tests / Unit Tests - py3.12 (push) Waiting to run
CI / Python tests / Unit Tests - py3.13 (push) Waiting to run
CI / Python tests / Unit Tests - py3.14 (push) Waiting to run
CI / ReMe Studio / Studio checks (push) Waiting to run
CI / Windows / CLI smoke - py3.11 (push) Waiting to run
Deploy / Documentation / Build documentation (push) Waiting to run
Deploy / Documentation / deploy (push) Blocked by required conditions
Security / CodeQL / Analyze javascript-typescript (push) Waiting to run
Security / CodeQL / Analyze python (push) Waiting to run
feat!: split proactive runtimes and add Studio backend management (#776)
* refactor(proactive)!: separate runtime ownership and unify delivery

* refactor(proactive): finish runtime and Studio migration

* test(proactive): make scheduled skip coverage deterministic

* refactor(studio): unify navigation and notebook resource loading

* feat(studio): edit workspace documents and update proactive task names

* refactor(studio): simplify task settings and navigation

* feat(studio): secure and supervise backend settings

* feat(studio): unify workbench timelines and refine desktop updates

Use shared timeline panes for notebook, memory, and resources. Add Todo creation ordering, persist companion visibility, and align desktop update handling and release artifacts.

Recheck editor file versions at read and publication boundaries. Retry reminder detail requests from the resource view.

* fix(studio): support unsigned GitHub preview releases

* fix: verify container state and isolate proactive view errors

Mount private supervisor state in Docker smoke tests and verify token and settings persistence. Exercise Studio startup with a loopback-only model fixture, and exclude packaged desktop output from Docker contexts.

Keep Remy subscriptions and healthy tasks available when an individual task has an invalid workspace path or session history.

* fix(home): align candidate Docker context exclusions

* chore(deps): update openai-codex dependency to v0.172.0

- Bump openai-codex from version 0.169.0 to 0.172.0 in pyproject.toml
- Keep other dependencies unchanged
- Ensure compatibility with latest openai-codex features and fixes

* fix(daemon): discover parent dotenv and isolate listeners

Restore parent-directory environment discovery in workers while retaining system precedence. Partition the default supervisor profile and lock by the configured bind address and port.
2026-11-25 21:33:16 +08:00

792 lines
28 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Proactive Manager with Chat and named Proactive Runtimes.
# Start with LLM_API_KEY, LLM_BASE_URL and optionally REME_MODEL_NAME.
# reme start config=proactive
# Studio jobs and their runtime dependencies. Examples live in demo.yaml.
language: zh
reme_agent_dir: reme_agents
service:
backend: http
web_enabled: true
mcp_enabled: true
jobs:
health_check:
backend: base
description: "Return a health snapshot of ReMe components."
steps:
- backend: health_check_step
todo:
backend: base
description: >-
Manage one-sentence tasks: create/list/get/update. Use list_projects to count Todo and Idea records per project.
IDs, creation times and progress timestamps are generated automatically.
Pass progress_text to append progress, or use progress_match to edit or remove an existing note.
Set status=closed to archive with an optional close_note.
Set status=pending or in_progress to reopen and clear the closure details.
source_idea links an existing idea; create inherits omitted project/text from that idea.
Follow the manage-todos-ideas skill for workflows and examples.
parameters:
type: object
additionalProperties: false
properties:
action: {type: string, enum: [create, list, list_projects, get, update]}
id: &record_id {type: string, minLength: 1, description: "Existing record ID; never supplied on create."}
project: &record_project {type: string, description: "Project name. Defaults to 随笔 (Notes in English); blank also means 随笔. Omit on create to inherit the source Idea's project. Omit on update to retain. Exact filter for list; use 随笔 for Notes."}
text: &record_text {type: string, minLength: 1, description: "One-sentence content; create/update only."}
status: {type: string, enum: [pending, in_progress, closed], description: "Task state. Defaults to pending on create; exact filter for list."}
due_date: {type: [string, "null"], format: date, description: "Optional deadline. Update with null to clear; omit to retain."}
source_idea: {type: [string, "null"], minLength: 1, description: "Idea ID to link or filter by; null removes the link on update."}
progress_text: {type: string, minLength: 1, description: "Append one progress note, or replace the note selected by progress_match."}
progress_time: {type: [string, "null"], format: date-time, description: "Optional explicit progress time with timezone; requires progress_text."}
progress_match:
type: object
additionalProperties: false
description: "On update, use the original time and text from get. Omit progress_text to remove this note."
properties:
time: {type: string, format: date-time}
text: {type: string, minLength: 1}
required: [time, text]
close_note: {type: [string, "null"], minLength: 1, description: "Confirmed outcome or reason for closure. Requires status=closed; null clears the note."}
scope: {type: string, enum: [active, archive, all], description: "Active lists by earliest target date with undated tasks last. Archive lists newest closures first. Defaults to active for list and all for list_projects."}
order: {type: string, enum: [due, created], description: "List only. Active lists default to earliest target date. Use created for newest creation time first, with unknown dates last. Archive lists always use closure time."}
query: &record_query {type: string, description: "List only; case-insensitive substring search."}
offset: &record_offset {type: integer, minimum: 0, description: "List only; defaults to 0."}
limit: &record_limit {type: integer, minimum: 1, maximum: 100, description: "List only; defaults to 20."}
required: [action]
steps:
- backend: todo_step
idea:
backend: base
description: >-
Capture and manage one-sentence ideas: create/list/get/update/archive/restore.
IDs and capture timestamps are generated automatically; archive retains the idea and its Todo links.
Creating or completing a linked Todo does not close the idea.
Follow the manage-todos-ideas skill for workflows and examples.
parameters:
type: object
additionalProperties: false
properties:
action: {type: string, enum: [create, list, get, update, archive, restore]}
id: *record_id
project: *record_project
text: *record_text
scope: {type: string, enum: [active, archive, all], description: "List only; defaults to active (newest captures first, undated ideas last). Archive lists newest archives first."}
query: *record_query
offset: *record_offset
limit: *record_limit
required: [action]
steps:
- backend: idea_step
tts:
backend: base
description: "Synthesize text; returns Base64 audio, format and sample rate; requires DASHSCOPE_API_KEY."
parameters:
type: object
additionalProperties: false
properties:
text: {type: string, minLength: 1}
required: [text]
steps:
- backend: tts_step
tts: default
asr:
backend: base
description: "Transcribe Base64-encoded audio; requires DASHSCOPE_API_KEY."
parameters:
type: object
additionalProperties: false
properties:
audio: {type: string, minLength: 1, description: "Base64-encoded audio bytes"}
audio_format: {type: string, enum: [wav, mp3, pcm, opus], default: wav}
sample_rate: {type: integer, minimum: 1, description: "Audio sample rate in Hz"}
required: [audio]
steps:
- backend: asr_step
asr: default
process_chat_reminders:
backend: base
enable_serve: false
steps:
- backend: process_chat_reminders_step
job_tools: &chat_tools [manage_proactive_agent, todo, idea]
timeout_seconds: 120
screen_capture_cron:
backend: cron
enabled: true
cron: "*/5 * * * *"
steps:
- backend: screen_capture_step
similarity_threshold: 0.99
task_names: [proactive_memory]
codex_dialogue_cron:
backend: cron
cron: "*/5 * * * *"
# Establish the baseline on startup, without importing existing dialogue.
init_steps:
- backend: codex_dialogue_init_step
codex_home: &codex_home ${CODEX_HOME:-~/.codex}
steps:
- backend: codex_dialogue_step
task_names: [proactive_memory, proactive_note]
codex_home: *codex_home
finance_news_cron:
backend: cron
cron: "*/5 * * * *"
steps:
- backend: finance_news_step
task_names: [proactive_fin]
gold_quotes_cron:
backend: cron
cron: "*/5 * * * *"
steps:
- backend: tencent_quotes_step
instrument: gold
task_names: [proactive_fin]
oil_quotes_cron:
backend: cron
cron: "*/5 * * * *"
steps:
- backend: tencent_quotes_step
instrument: oil
task_names: [proactive_fin]
nasdaq_quotes_cron:
backend: cron
cron: "*/5 * * * *"
steps:
- backend: tencent_quotes_step
instrument: nasdaq
task_names: [proactive_fin]
btc_quotes_cron:
backend: cron
cron: "*/5 * * * *"
steps:
- backend: btc_quotes_step
task_names: [proactive_fin]
manage_proactive_agent:
backend: base
description: >-
Manage background tasks: list/create/status/update/delete/query. All parameters are top-level.
Create requires agent_name and task_description. Supply cron for a time-triggered task or omit it for an event-triggered task.
The trigger type is fixed after creation, including when restoring a deleted task. Only event-triggered tasks receive observations.
Other actions except list require agent_name; query also requires question and an existing queryable task session.
Update changes execution settings; edit task requirements in TASK.md at the returned task_path.
Follow the manage-proactive-agent skill for workflows and examples.
parameters:
type: object
additionalProperties: false
properties:
action: {type: string, enum: [list, create, status, update, delete, query]}
agent_name: &agent_name
type: string
minLength: 1
maxLength: 80
pattern: '^[\w-]+$'
description: "Stable Agent name. New task names should use simple lowercase words joined by underscores."
task_description:
type: string
minLength: 1
maxLength: 100000
description: "Create only: task description written verbatim to TASK.md."
enabled: {type: boolean}
cron: {type: [string, "null"], description: "At creation, an expression selects time-triggered execution in the application timezone. Omission or null selects event-triggered execution. A time-triggered task can update its expression."}
min_trigger_interval_seconds: {type: number, minimum: 0, description: "Minimum interval before processing observations, in seconds."}
notify_window:
type: [object, "null"]
description: "Time window for automatic Chat processing and sending."
properties:
start: {type: string, pattern: '^(?:[01][0-9]|2[0-3]):[0-5][0-9]$'}
end: {type: string, pattern: '^(?:[01][0-9]|2[0-3]):[0-5][0-9]$'}
required: [start, end]
additionalProperties: false
question: {type: string, minLength: 1, maxLength: 100000, description: "Query only: question for the latest task session."}
required: [action]
steps:
- backend: manage_proactive_agent_step
append_task_events:
backend: base
description: "Append observations to existing event-triggered tasks. Each recipient is handled independently."
parameters:
type: object
additionalProperties: false
properties:
task_names:
type: array
minItems: 1
uniqueItems: true
items: &task_agent_name {<<: *agent_name, description: "Name of an existing background task."}
events:
type: array
minItems: 1
items:
type: object
properties:
id: {type: string}
event_ts: {type: string, format: date-time}
source: {type: string}
description: {type: string}
paths: {type: array, items: {type: string}}
metadata: {type: object}
required: [event_ts, source, description]
additionalProperties: false
required: [task_names, events]
steps:
- backend: append_task_events_step
submit_chat_reminder:
backend: base
enable_serve: false
description: Send a concise assistant reminder to the source Chat conversation. Empty content means stay quiet.
parameters:
type: object
additionalProperties: false
properties:
content: {type: string, maxLength: 100000}
required: [content]
steps:
- backend: submit_chat_reminder_step
run_proactive_agent:
backend: base
enable_serve: false
track_execution: true
steps:
- backend: run_proactive_agent_step
effort: low # Time- and event-triggered runs.
timeout_seconds: 1200
max_local_search_calls: 10
recent_history_hours: 24
sandbox: null # Use the selected wrapper's sandbox setting.
proactive_loop:
backend: background
steps:
- backend: proactive_loop_step
list_task_reminders:
backend: base
description: "List reminders produced by an existing background task."
parameters:
type: object
additionalProperties: false
properties:
agent_name: *task_agent_name
offset: &page_offset {type: integer, minimum: 0, default: 0}
limit: &page_limit {type: integer, minimum: 1, maximum: 100, default: 20}
state: {type: string, enum: [all, pending, processed], default: all}
required: [agent_name]
steps:
- backend: list_task_reminders_step
read_agent_reminder:
backend: base
parameters:
type: object
additionalProperties: false
properties:
agent_name: &view_agent_name
<<: *agent_name
default: Remy
description: "Name of a visible Agent. Defaults to Remy."
message_id: {type: string, minLength: 1, description: "Workspace-relative reminder path or Chat message ID."}
required: [message_id]
steps:
- backend: agent_reminder_step
list_agent_inbox:
backend: base
description: "List a task's input events or Remy's incoming reminder records, with their processing state."
parameters:
type: object
additionalProperties: false
properties:
agent_name: *view_agent_name
offset: *page_offset
limit: *page_limit
state: {type: string, enum: [all, pending, processing, processed], default: all}
steps:
- backend: agent_inbox_step
list_agents:
backend: base
parameters:
type: object
additionalProperties: false
properties: {}
steps:
- backend: agent_list_step
read_agent_session:
backend: base
parameters: &agent_request
type: object
additionalProperties: false
properties:
agent_name: *view_agent_name
steps:
- backend: agent_session_step
task_document:
backend: base
description: "Read or save a named task's TASK.md. Pass the mtime from read as expected_mtime when saving."
parameters:
type: object
additionalProperties: false
properties:
action: {type: string, enum: [read, save]}
agent_name: *task_agent_name
content: {type: string, minLength: 1, maxLength: 100000}
expected_mtime: {type: string, minLength: 1, maxLength: 80}
required: [action, agent_name]
steps:
- backend: task_document_step
watch_agent_session:
backend: stream
parameters: *agent_request
steps:
- backend: watch_agent_session_step
stream_queue_size: 1
ask_agent:
backend: stream
parameters:
type: object
additionalProperties: false
properties:
agent_name: *view_agent_name
query:
type: string
minLength: 1
maxLength: 100000
required:
- query
steps:
- backend: ask_agent_step
job_tools: *chat_tools
create_chat_session:
backend: base
parameters:
type: object
additionalProperties: false
properties: {}
steps:
- backend: agent_new_session_step
job_tools: *chat_tools
list_workspace:
backend: base
description: List files under a workspace path.
parameters:
type: object
properties:
path:
type: string
description: workspace-relative dir; empty = root
default: ''
recursive:
type: boolean
description: recurse
default: false
sort_by:
type: string
enum:
- mtime
description: optional ordering; mtime returns most recently modified files first
extensions:
type: array
items:
type: string
description: optional extension allowlist applied before sorting and limiting
limit:
type: integer
description: max results
default: 100
steps:
- backend: list_step
load_file:
backend: base
description: Load a complete text file for the local editor without agent-output truncation.
parameters:
type: object
properties:
path:
type: string
description: workspace-relative path
required:
- path
steps:
- backend: load_step
max_bytes: 5242880
save_file:
backend: base
description: Save an existing workspace text document if its version still matches the loaded version.
parameters:
type: object
additionalProperties: false
properties:
path:
type: string
description: workspace-relative path
content:
type: string
description: complete source text, including frontmatter
expected_mtime:
type: string
minLength: 1
description: file version returned by load_file
required: [path, content, expected_mtime]
steps:
- backend: save_step
require_expected_mtime: true
max_bytes: 5242880
read_image:
backend: base
description: Read an image file as base64 (workspace-relative path).
parameters:
type: object
properties:
path:
type: string
description: workspace-relative path; common image formats supported (png/jpg/jpeg/webp/gif/bmp/tiff/heic)
required:
- path
steps:
- backend: read_image_step
max_bytes: 5242880
list_tags:
backend: base
description: List active tags with file counts. Returns {total_tags, total_pages, page, range, items}; range is the inclusive
1-based item range and each item is [tag, file_count]. A page past the end returns empty items and range [0, 0].
parameters:
type: object
properties:
page:
type: integer
minimum: 1
default: 1
description: 1-based page; values past the end return an empty page
order_by:
type: string
enum:
- tag
- file_count
default: tag
description: sort by tag or file count
order:
type: string
enum:
- asc
- desc
description: defaults to asc for tag, desc for file_count
page_size:
type: integer
minimum: 1
maximum: 1000
default: 100
description: items per page
steps:
- backend: list_tags_step
search_workspace:
backend: base
description: Hybrid workspace search (vector + BM25, RRF-fused).
parameters:
type: object
properties:
query:
type: string
description: search query
limit:
type: integer
description: max results
default: 5
min_score:
type: number
description: Minimum returned score; 0 disables filtering (recommended). Uses native vector or BM25 scores when only
one branch has hits, and rank-based RRF scores (at most 1/61, about 0.01639) when both have hits. The scale can
change per query; this is not a normalized relevance threshold.
default: 0.0
tags:
type: array
items:
type: string
description: optional tags filter; a file matches when it contains at least one valid tag
default: []
start_date:
type: string
description: optional inclusive start date filter (YYYY-MM-DD); results earlier than this date are excluded
end_date:
type: string
description: optional inclusive end date filter (YYYY-MM-DD); results later than this date are excluded
expand_links:
type: boolean
description: include wikilink neighbors for matching documents
default: true
required:
- query
steps:
- backend: search_step
vector_weight: 0.7
candidate_multiplier: 5.0
expand_links: true
max_links_per_direction: 10
index_update_loop:
backend: background
watch_dirs:
- daily_dir
- digest_dir
watch_suffixes:
- md
steps:
- backend: init_changes_step
monitor_type: file_store
monitor_name: default
dispatch_steps:
- update_index_step
- backend: watch_changes_step
watch_mode: awatch
monitor_type: file_store
dispatch_steps:
- backend: update_index_step
persist: false
list_tag_files:
backend: base
description: Browse existing files matching any selected memory tag, within a workspace directory.
parameters:
type: object
properties:
tags:
type: array
items:
type: string
minItems: 1
path:
type: string
default: ''
page:
type: integer
minimum: 1
default: 1
page_size:
type: integer
minimum: 1
maximum: 1000
default: 100
required:
- tags
steps:
- backend: list_tag_files_step
get_client_info:
backend: base
description: "Return workspace information and supported client capabilities."
steps:
- backend: client_info_step
components:
asr:
default:
backend: dashscope
api_key: ${DASHSCOPE_API_KEY:-}
base_url: https://dashscope.aliyuncs.com/api/v1
model: qwen-audio-3.1-asr-flash
timeout: 60
tts:
default:
backend: dashscope
api_key: ${DASHSCOPE_API_KEY:-}
base_url: https://dashscope.aliyuncs.com/api/v1
model: qwen-audio-3.1-tts-plus
voice: longanhuan_v3.1
audio_format: mp3
sample_rate: 22050
timeout: 60
agent_inbox:
default:
backend: event
proactive_manager:
default:
backend: local
agent_wrapper: default
inbox: default
chat:
initial_memory: |
主人关注 AI 相关的大新闻,以及当前项目的进度、进展、难点和待讨论问题。
# Initial descriptions are written verbatim to TASK.md when creating tasks.
runtimes:
- agent_name: proactive_fin
enabled: true
min_trigger_interval_seconds: 10
max_batch_events: 20
task_description: |
关注现货黄金(XAU/USD)、WTI 原油期货(CL)、BTC/USDT 和纳斯达克综合指数(IXIC)。用财联社电报补充与这四项行情直接相关的背景。
以最新有效报价为准,涨跌幅绝对值达到 3% 才提醒。黄金、原油和纳指以昨收为基准,BTC 使用滚动 24 小时涨跌幅。
提醒说明标的、价格或点位、涨跌幅、报价时间和来源。有依据时补充新闻背景。同一波变动只提醒一次,报价有延迟时注明。
- agent_name: proactive_memory
max_batch_events: 2
enabled: true
task_description: |
帮我梳理目前在做的项目,跟进各个项目的进展和难点,整理需要进一步讨论的问题。
- agent_name: proactive_note
step_backend: proactive_notebook_step
enabled: true
max_batch_events: 2
task_description: |
跟进 Todo 和 Idea,更新有依据的 Todo 状态和进展,把需要用户决定的事项交给 Remy。
- agent_name: proactive_news
enabled: true
cron: "0 8 * * *"
task_description: |
每天早上8点帮我整理一份科技早报,汇总过去24小时的重要科技新闻,简要说明要点和影响,并附上来源链接。整理好后提醒我查看。
codex_app_server:
default:
backend: sdk
auth_mode: api_key
api_key: ${LLM_API_KEY:-}
base_url: ${LLM_BASE_URL:-}
codex_home: .codex
supports_websockets: false
experimental_api: true
config_overrides:
# Disable automatic repository AGENTS.md loading for every Agent on this server.
- project_doc_max_bytes=0
# Keep the configured input budget; put safety headroom in the compaction threshold.
# At 95% usable context, 600000 leaves 334435 tokens below Codex's hard cap.
# Budget 128 KiB of new text at one token/byte, not Codex's byte/4 estimate of 32768.
# Planning allowances: 131072 output + 131072 new text + 32768 estimation/compaction overhead.
# This soft margin does not enforce request limits or guarantee room for arbitrary text/images.
- model_context_window=983616
- model_auto_compact_token_limit=600000
- 'model_auto_compact_token_limit_scope="total"'
# Zero disables extra compaction after a completed reply.
- model_post_turn_compact_threshold_percent=0
- features.async_compaction=false
# 2500 approximate tokens matches the fallback's 10000-byte tool-output limit.
- tool_output_token_limit=2500
# Leave compact_prompt / experimental_compact_prompt_file unset to use the built-in prompt.
- sandbox_workspace_write.network_access=false
- 'web_search="live"'
# Enable JavaScript tool orchestration and waiting.
- features.code_mode=true
- features.sleep_tool=true
# Keep review and inherited Agent defaults on the configured Qwen endpoint.
- 'model="${REME_MODEL_NAME:-qwen4-max}"'
- 'model_reasoning_effort="xhigh"'
- 'review_model="${REME_MODEL_NAME:-qwen4-max}"'
# Long-term memory generation and injection are separate from context compaction.
- features.memories=true
- memories.generate_memories=true
- memories.use_memories=true
- 'memories.extract_model="${REME_MODEL_NAME:-qwen4-max}"'
- 'memories.consolidation_model="${REME_MODEL_NAME:-qwen4-max}"'
# Local Codex capability settings for the configured Qwen model.
model_catalog:
models:
- slug: ${REME_MODEL_NAME:-qwen4-max}
display_name: Qwen4 Max
description: Work and life assistant with text and image input
base_instructions: ""
default_reasoning_level: xhigh
supported_reasoning_levels:
- effort: none
description: Disable thinking
- effort: low
description: Light reasoning
- effort: medium
description: Balanced reasoning
- effort: xhigh
description: Maximum reasoning
context_window: 983616
max_context_window: 983616
effective_context_window_percent: 95
input_modalities: [text, image]
# The provider returns reasoning content without a reasoning.summary request parameter.
supports_reasoning_summary_parameter: false
supports_reasoning_summaries: false
supports_parallel_tool_calls: false
support_verbosity: false
shell_type: unified_exec
apply_patch_tool_type: freeform
visibility: list
supported_in_api: true
priority: 0
experimental_supported_tools: [clock]
truncation_policy:
mode: bytes
limit: 10000
# Agent context comes from PromptHandler.
model_messages:
instructions_template: ""
agent_wrapper:
default:
backend: codex
app_server: default
project_path: .. # Keep project skills separate from the default .reme workspace.
cwd: .
skills: [manage-proactive-agent, manage-todos-ideas]
model: ${REME_MODEL_NAME:-qwen4-max}
effort: xhigh
approval_mode: deny_all # SDK maps this to approval_policy=never; no approval requests.
sandbox: workspace-write
file_graph:
default:
backend: local
file_chunker:
markdown:
backend: markdown
supported_extensions:
- md
embed_toc: true
max_ast_sections: 100
include_frontmatter_in_metadata: false
include_frontmatter_keys_in_metadata: []
keyword_index:
default:
backend: bm25
tokenizer: default
tag_index:
default:
backend: local
tag_key: memory_tags
max_tags_per_file: 3
max_tag_length: 64
file_store:
default:
backend: local
store_name: local
embedding_store: ''
keyword_index: default
file_graph: default
tag_index: default
tokenizer:
default:
backend: regex