You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/config/agents.md
+34-2Lines changed: 34 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,6 +22,37 @@ There are 2 types of agents defined via `mode` field (when absent, defaults to p
22
22
|__explorer__| subagent | Fast agent specialized for exploring codebases. Finds files by patterns, searches code for keywords, or answers questions about the codebase. Read-only, no edit tools. |
23
23
|__general__| subagent | General-purpose agent for researching complex questions and executing multi-step tasks. Can be used to execute multiple units of work in parallel. |
24
24
25
+
## Inheriting from other agents
26
+
27
+
You can create a new agent that inherits all settings from an existing agent using the `inherit` key. The new agent's settings are deep-merged on top of the inherited agent's settings, so any field you specify overrides the parent's value while the rest is preserved.
28
+
29
+
This is useful when you want a variant of a built-in or custom agent with small tweaks, without duplicating the entire configuration.
30
+
31
+
=== "Config"
32
+
33
+
```javascript title="~/.config/eca/config.json"
34
+
{
35
+
"agent": {
36
+
"my-plan": {
37
+
"inherit": "plan",
38
+
"defaultModel": "openai/gpt-5"
39
+
}
40
+
}
41
+
}
42
+
```
43
+
44
+
The `my-plan` agent above inherits all of `plan`'s configuration (disabled tools, tool approval rules, prompts, etc.) but uses a different default model.
45
+
46
+
=== "Markdown"
47
+
48
+
```markdown title=".eca/agents/my-explorer.md"
49
+
---
50
+
inherit: explorer
51
+
description: Explorer with a custom model
52
+
defaultModel: google/gemini-2.5-pro
53
+
---
54
+
```
55
+
25
56
## Custom agents and prompts
26
57
27
58
You can create an agent and define its prompt, tool call approval and default model.
@@ -64,10 +95,11 @@ The major advantages of subagents are:
64
95
65
96
Subagents can be configured in config or markdown and support/require these fields:
66
97
67
-
-`mode` (required): `subagent` always, this is waht differ a primary agent than a subagent for ECA.
98
+
-`mode` (required): `subagent` always, this is what differs a primary agent from a subagent for ECA.
68
99
-`description` (required): a short summary of what this subagent will do, this is important to primary agent knows when to delegate to it.
69
-
-`systemPrompt` or the markdown content (required): Instructions for the subagent to what do when receive a task.
100
+
-`systemPrompt` or the markdown content (required unless using `inherit`): Instructions for the subagent to what do when receive a task.
70
101
102
+
-`inherit` (optional): name of another agent to inherit all settings from. The subagent's own fields are merged on top.
71
103
-`model` (optional): which full model to use for this subagent, using primary agent model if not specified.
72
104
-`tools` (optional): same as ECA tool approval logic to control what tools are allowed/askable/denied.
73
105
-`maxSteps` (optional): set a max limit of turns/steps that his subagent must finish and return an answer.
0 commit comments