Skip to content

armgit / eve

Public Imported from GitHub
0

The Open Framework for Building Agents

fix(eve): improve self-mod instructions so installtion requests route to subagent (#3258)

Ben Pankow956205d1bae6
diff --git a/.changeset/tidy-linear-self-mod.md b/.changeset/tidy-linear-self-mod.md
new file mode 100644
index 000000000..8ec7cb5a5
--- /dev/null
+++ b/.changeset/tidy-linear-self-mod.md
@@ -0,0 +1,5 @@
+---
+"eve": patch
+---
+
+Teach root agents with self-modification to treat named product installation questions as requests to add capabilities, so they delegate registry discovery instead of denying device access or asking what kind of installation the user means.
diff --git a/e2e/fixtures/agent-subagents/agent/subagents/self-modification/instructions.md b/e2e/fixtures/agent-subagents/agent/subagents/self-modification/instructions.md
index c5428a534..7ad4be6ce 100644
--- a/e2e/fixtures/agent-subagents/agent/subagents/self-modification/instructions.md
+++ b/e2e/fixtures/agent-subagents/agent/subagents/self-modification/instructions.md
@@ -1 +1 @@
-This fixture tests whether the parent routes a request for a reusable model-callable action to you. Reply with exactly `SELF_MODIFICATION_ACTION_REQUEST_ACCEPTED` and do not call tools.
+This fixture tests whether the parent routes self-modification requests to you. For a request for a reusable model-callable action, reply with exactly `SELF_MODIFICATION_ACTION_REQUEST_ACCEPTED`; for a capability installation request, reply with exactly `SELF_MODIFICATION_INSTALL_REQUEST_ACCEPTED`. Do not call tools.
diff --git a/e2e/fixtures/agent-subagents/evals/self-modification/add-capability.eval.ts b/e2e/fixtures/agent-subagents/evals/self-modification/add-capability.eval.ts
new file mode 100644
index 000000000..f6d333f6f
--- /dev/null
+++ b/e2e/fixtures/agent-subagents/evals/self-modification/add-capability.eval.ts
@@ -0,0 +1,13 @@
+import { defineEval } from "eve/evals";
+
+export default defineEval({
+ tags: ["real-model"],
+ description: "Requests to add a named service delegate to the self-modification subagent.",
+ async test(t) {
+ const started = await t.send("Can you add Notion to this agent?");
+ started.expectOk();
+
+ t.succeeded();
+ t.calledSubagent("self-modification");
+ },
+});
diff --git a/e2e/fixtures/agent-subagents/evals/self-modification/connect-capability.eval.ts b/e2e/fixtures/agent-subagents/evals/self-modification/connect-capability.eval.ts
new file mode 100644
index 000000000..3062825b0
--- /dev/null
+++ b/e2e/fixtures/agent-subagents/evals/self-modification/connect-capability.eval.ts
@@ -0,0 +1,13 @@
+import { defineEval } from "eve/evals";
+
+export default defineEval({
+ tags: ["real-model"],
+ description: "Requests to connect to a named service delegate to the self-modification subagent.",
+ async test(t) {
+ const started = await t.send("Can you connect to Salesforce for me?");
+ started.expectOk();
+
+ t.succeeded();
+ t.calledSubagent("self-modification");
+ },
+});
diff --git a/e2e/fixtures/agent-subagents/evals/self-modification/enable-capability.eval.ts b/e2e/fixtures/agent-subagents/evals/self-modification/enable-capability.eval.ts
new file mode 100644
index 000000000..5cc9ccfd1
--- /dev/null
+++ b/e2e/fixtures/agent-subagents/evals/self-modification/enable-capability.eval.ts
@@ -0,0 +1,13 @@
+import { defineEval } from "eve/evals";
+
+export default defineEval({
+ tags: ["real-model"],
+ description: "Requests to enable a named service delegate to the self-modification subagent.",
+ async test(t) {
+ const started = await t.send("Can you enable GitHub access for this agent?");
+ started.expectOk();
+
+ t.succeeded();
+ t.calledSubagent("self-modification");
+ },
+});
diff --git a/e2e/fixtures/agent-subagents/evals/self-modification/install-capability.eval.ts b/e2e/fixtures/agent-subagents/evals/self-modification/install-capability.eval.ts
new file mode 100644
index 000000000..09dcf6f8a
--- /dev/null
+++ b/e2e/fixtures/agent-subagents/evals/self-modification/install-capability.eval.ts
@@ -0,0 +1,14 @@
+import { defineEval } from "eve/evals";
+
+export default defineEval({
+ tags: ["real-model"],
+ description:
+ "Capability installation questions proactively delegate to the self-modification subagent.",
+ async test(t) {
+ const started = await t.send("Are you able to install Linear for me?");
+ started.expectOk();
+
+ t.succeeded();
+ t.calledSubagent("self-modification");
+ },
+});
diff --git a/packages/eve/src/self-modification/agent.ts b/packages/eve/src/self-modification/agent.ts
index bffbb6dd1..0c6f34f38 100644
--- a/packages/eve/src/self-modification/agent.ts
+++ b/packages/eve/src/self-modification/agent.ts
@@ -34,6 +34,9 @@ const persistenceDelegation =
"Infer persistence from the request and conversation rather than waiting for phrases such as “modify your source.” " +
"For example, asking the agent to stop always doing something, add a capability, or change future responses calls for inspecting and editing the authored source instead of providing a one-turn workaround.";
+const namedInstallationDelegation =
+ "Treat questions phrased as whether you can install, add, enable, or connect to a named product or service as requests to extend this eve agent and delegate immediately. Do not assume they refer to device software, ask what kind of installation they mean, or deny them because you lack access to the user's device. The subagent determines whether the request maps to an integration, channel, connection, or other capability, then checks registry availability and any required setup.";
+
const followUpDelegation =
"Resolve short follow-ups such as “yes” or “do it” against the preceding conversation. " +
"If whether the requested change should persist is genuinely ambiguous, ask one concise clarifying question.";
@@ -63,6 +66,7 @@ export function defineSelfModificationAgent(options: SelfModificationAgentOption
"Delegate here when the user asks to change this eve agent or its authored source.",
sourceDelegation,
persistenceDelegation,
+ namedInstallationDelegation,
mode === "local" ? localIntegrationDelegation : deployedIntegrationDelegation,
mode === "local" ? localTraceDelegation : "",
followUpDelegation,