mirror of
https://github.com/agentscope-ai/ReMe.git
synced 2026-08-28 05:25:04 +00:00
Some checks are pending
CI / Documentation / Test and build documentation (push) Waiting to run
CI / Python packages / Build and verify distributions (push) Waiting to run
CI / Python quality / Pre-commit (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 / ReMe Studio / Studio checks (push) Waiting to run
CI / TypeScript integrations / Type-check, test, and pack (push) Waiting to run
CI / Windows / CLI smoke - py3.11 (push) Waiting to run
Deploy / Documentation / deploy (push) Blocked by required conditions
Deploy / Documentation / Build documentation (push) Waiting to run
Security / CodeQL / Analyze javascript-typescript (push) Waiting to run
Security / CodeQL / Analyze python (push) Waiting to run
* chore(release): prepare ReMe 0.4.1.9 * refactor(config): remove daily_cookbook and streamline plugin configs - Delete the entire daily_cookbook.yaml standalone application config - Remove qwenpaw dependencies verification and related CI workflow steps - Simplify release workflows by removing qwenpaw verification and enforcing reme-ai >=0.4.1.9 - Update plugin start commands and examples to use 'default' or 'demo' configs instead of daily_cookbook - Adjust imports and tests related to daily_cookbook removal and injected_job_kwargs enhancements - Refactor agent wrapper to support injected_job_kwargs for job parameter injection in auto-fin and daily-paper - Improve daily_paper digest prompt to include configured daily directory and correct historical search constraints - Update dependency versions in pyproject.toml files to require reme-ai >=0.4.1.9 and remove qwenpaw optional dependencies - Clean up unused environment variables and obsolete test cases related to daily_cookbook and verification steps * fix(local_embedding_store): retry batch computation on vector space changes - Add up to 3 attempts to recompute embedding batch if vector space changes during processing - Log warnings when maximum retries reached and discard stale results - Prevent caching results from outdated vector spaces to maintain consistency - Add tests to verify retry behavior and abort after continuous vector space churn fix(daily_paper): update digest search logic and tests - Change search to query existing memory, not only previous articles in daily_dir - Allow multiple searches outside daily_dir but limit links to dated markdown in daily_dir before today - Update test assertions to reflect revised search and linking rules * fix(embedding): retry vector space changes per request
225 lines
6.5 KiB
Markdown
225 lines
6.5 KiB
Markdown
# Plugin Management
|
|
|
|
ReMe plugins are ordinary Python distributions discovered through the `reme.plugins` entry-point group. Installing a
|
|
plugin makes it available to the current Python environment; it does not enable the plugin in every ReMe application.
|
|
|
|
Keep these two operations separate:
|
|
|
|
```text
|
|
reme plugins install ... install a package into the current Python environment
|
|
plugins: [auto-fin] enable an installed plugin for one Application
|
|
```
|
|
|
|
Plugin package management is local-only. It does not run through a ReMe HTTP or MCP service and never edits application
|
|
configuration files automatically.
|
|
|
|
A typical plugin workflow has three stages:
|
|
|
|
1. Install ReMe and the plugin distribution.
|
|
2. Configure the plugin's runtime environment as described in the
|
|
[ReMe model-configuration guide](../../README.md#optional-model-configuration).
|
|
3. Start an Application with the plugin explicitly enabled, for example
|
|
`reme start plugins='["auto-fin"]'`.
|
|
|
|
## List installed plugins
|
|
|
|
```bash
|
|
reme plugins list
|
|
```
|
|
|
|
The table shows the plugin entry-point name, Python distribution, version, and plugin contract:
|
|
|
|
```text
|
|
PLUGIN DISTRIBUTION VERSION FORMAT
|
|
-------- ------------- ------- --------
|
|
auto-fin reme-auto-fin X.Y.Z manifest
|
|
```
|
|
|
|
`manifest` plugins use the current package-level `plugin.yaml` contract. `legacy` plugins use the compatible Python
|
|
descriptor contract.
|
|
|
|
A manifest separates backend registration from application configuration:
|
|
|
|
```yaml
|
|
backends:
|
|
example_step: example_plugin.steps:ExampleStep
|
|
|
|
application_defaults:
|
|
jobs:
|
|
example:
|
|
backend: base
|
|
steps:
|
|
- backend: example_step
|
|
```
|
|
|
|
`application_defaults` is a partial `ApplicationConfig`. It is kept below the manifest's `backends` namespace because
|
|
backend import declarations are part of plugin discovery and are not application configuration.
|
|
|
|
Use JSON when another local tool needs structured output:
|
|
|
|
```bash
|
|
reme plugins list --json
|
|
```
|
|
|
|
To compare installed plugins with one application config:
|
|
|
|
```bash
|
|
reme plugins list --config default
|
|
```
|
|
|
|
The optional `ENABLED` column reflects only the `plugins` list resolved from that config. A command-line override used
|
|
by another running process is not a global enable state.
|
|
|
|
## Install a plugin package
|
|
|
|
Install a published distribution:
|
|
|
|
```bash
|
|
reme plugins install reme-auto-fin
|
|
```
|
|
|
|
Install or upgrade a pinned version:
|
|
|
|
```bash
|
|
reme plugins install 'reme-auto-fin==X.Y.Z'
|
|
reme plugins install reme-auto-fin --upgrade
|
|
```
|
|
|
|
Install a local plugin project:
|
|
|
|
```bash
|
|
reme plugins install ./plugins/auto-fin
|
|
```
|
|
|
|
Use editable mode while developing it:
|
|
|
|
```bash
|
|
reme plugins install ./plugins/auto-fin --editable
|
|
```
|
|
|
|
ReMe invokes pip through the same Python interpreter that runs the `reme` command. Pip remains responsible for package
|
|
resolution, downloads, dependency changes, and build execution. Install only packages and local projects you trust.
|
|
|
|
After installation, confirm the discovered plugin name:
|
|
|
|
```bash
|
|
reme plugins list
|
|
reme plugins validate auto-fin
|
|
```
|
|
|
|
## Inspect a plugin
|
|
|
|
```bash
|
|
reme plugins show auto-fin
|
|
```
|
|
|
|
For a manifest plugin, the result includes its registered backend names and default Job names. JSON output is also
|
|
available:
|
|
|
|
```bash
|
|
reme plugins show auto-fin --json
|
|
```
|
|
|
|
`show` identifies the package contract without constructing a ReMe Application.
|
|
|
|
## Validate a plugin
|
|
|
|
Validate an installed plugin:
|
|
|
|
```bash
|
|
reme plugins validate auto-fin
|
|
```
|
|
|
|
Validate a local project before installation:
|
|
|
|
```bash
|
|
reme plugins validate ./plugins/auto-fin
|
|
```
|
|
|
|
Validation checks the entry point, `plugin.yaml`, backend imports and component types, registry collisions, merged
|
|
`application_defaults`, and the resulting `ApplicationConfig`. Validation imports plugin backend modules, so run it
|
|
only for trusted code.
|
|
|
|
## Enable a plugin in a service
|
|
|
|
Installation alone does not load plugin code into an Application. Enable plugins explicitly in configuration:
|
|
|
|
```yaml
|
|
plugins:
|
|
- auto-fin
|
|
```
|
|
|
|
Or add them for one service launch:
|
|
|
|
```bash
|
|
reme start plugins='["auto-fin"]'
|
|
```
|
|
|
|
When `config` is omitted, ReMe loads `default.yaml`. The plugin's `application_defaults` are merged below that config,
|
|
so explicit config values and CLI overrides win. This mapping is an `ApplicationConfig` fragment, not a separate
|
|
configuration schema. The plugin backends are registered only in that Application's local registry.
|
|
|
|
After the default HTTP service starts, access plugin Jobs through ReMe's CLI client or HTTP:
|
|
|
|
```bash
|
|
reme auto_fin topics="黄金,AI,存储芯片"
|
|
```
|
|
|
|
```bash
|
|
curl -s http://127.0.0.1:2333/auto_fin \
|
|
-H 'Content-Type: application/json' \
|
|
-d '{"topics":"黄金,AI,存储芯片"}'
|
|
```
|
|
|
|
When the application uses an MCP service, service-enabled plugin Jobs appear as MCP tools instead.
|
|
|
|
Custom application configs must provide the plugin's runtime dependencies, including an `agent_wrapper.default` and
|
|
the `search` and `read` Jobs used by Auto Fin.
|
|
|
|
## Uninstall a plugin
|
|
|
|
Use the plugin entry-point name, not necessarily the distribution name:
|
|
|
|
```bash
|
|
reme plugins uninstall auto-fin
|
|
```
|
|
|
|
Skip pip's confirmation prompt when needed:
|
|
|
|
```bash
|
|
reme plugins uninstall auto-fin --yes
|
|
```
|
|
|
|
ReMe resolves `auto-fin` to the distribution that provides it, such as `reme-auto-fin`. If one distribution provides
|
|
multiple plugin entry points, the command lists the other plugins that will also be removed.
|
|
|
|
Uninstallation does not rewrite user configuration. Remove the plugin from relevant `plugins` lists yourself;
|
|
otherwise the next Application startup fails explicitly because the configured plugin is no longer installed. Restart
|
|
already-running ReMe processes after installing, upgrading, or uninstalling packages.
|
|
|
|
## Troubleshooting
|
|
|
|
### Plugin is installed but unavailable
|
|
|
|
Check that the `reme` command and pip package share one Python interpreter:
|
|
|
|
```bash
|
|
reme plugins list
|
|
python -c 'import sys; print(sys.executable)'
|
|
```
|
|
|
|
Using `reme plugins install` avoids the most common interpreter mismatch because it runs `python -m pip` with ReMe's
|
|
own interpreter.
|
|
|
|
### Plugin is installed but not loaded
|
|
|
|
Add its entry-point name to the Application's `plugins` list. ReMe intentionally has no global enable/disable state.
|
|
|
|
### Startup reports that the plugin is not installed
|
|
|
|
The active config still enables a missing plugin. Reinstall it or remove the corresponding name from `plugins`.
|
|
|
|
### Changes are not visible in a running service
|
|
|
|
Plugin discovery and backend registration happen during Application construction. Restart the service after changing
|
|
installed packages.
|