Forge
markdown3407750f
1# Forge runtime plugins (M0)
2
3This folder is the **optional dev drop zone** for plugin DLLs. At runtime Forge loads assemblies from:
4
51. `FORGE_PLUGINS_PATH` (if set), else
62. `{app}/plugins/` (created on build/publish for standard bundle plugins)
7
8## Dev workflow
9
10```bash
11dotnet build
12dotnet run --project src/AgentForge
13```
14
15Built-in plugins (`AgentForge.Plugin.*.dll`) are copied into `src/AgentForge/bin/Debug/net10.0/plugins/` automatically.
16
17### Hot reload (dev)
18
19With `dotnet run` in Development, **`Forge:WatchPlugins` is on** (`appsettings.Development.json`). After you rebuild a plugin DLL, Forge detects the change under `plugins/` and schedules a **process restart** (see [FORGE-ADR-0023](../design/FORGE-ADR-0023-plugin-folder-and-hot-reload.md)).
20
21Override:
22
23```bash
24set FORGE_WATCH_PLUGINS=false # disable
25set FORGE_WATCH_PLUGINS=true # enable outside Development
26```
27
28Manual reload: `POST /api/v1/admin/plugins/reload?mode=restart|hot` (bootstrap token).
29
30To test a custom plugin locally, copy your DLL here **or** set:
31
32```bash
33set FORGE_PLUGINS_PATH=D:\path\to\plugins
34```
35
36Add an entry to [`forge.plugins.toml`](../forge.plugins.toml) (`[plugins.{id}]` with `assembly`; tier is declared on `IForgePlugin`) and list the plugin id in your active bundle.
37
38For dev-only **auto discovery** (load all `AgentForge.Plugin.*.dll` in the folder), set `[plugins] discovery = "auto"`, `FORGE_PLUGIN_DISCOVERY=auto`, or use the AgentForge launch profile (Development defaults to auto). AMS `-Showcase` deploy sets `FORGE_PLUGIN_DISCOVERY=auto` on the host. See [FORGE-ADR-0030](../design/FORGE-ADR-0030-plugin-host-discovery-v1.md).
39
40## Git
41
42`*.dll` and `*.pdb` in this folder are gitignored. Do not commit binaries.
43
44See [FORGE-ADR-0023](../design/FORGE-ADR-0023-plugin-folder-and-hot-reload.md) for hot-reload phases.
45
View only · write via MCP/CIDE