Skip to content

Commit ef6e710

Browse files
bchapuisclaude
andcommitted
Clarify email-agent attribute docs and hide advanced inputs
Rewrite every input/output description on the email-agent node, and hide the less-important attributes (context, subject, max_rounds, reply_timeout, tools, schema inputs; rounds and usage_metadata outputs) so the editor surfaces only from/interlocutors/objective/instructions and the result/transcript/finish_reason outputs by default. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 714ea1e commit ef6e710

1 file changed

Lines changed: 43 additions & 17 deletions

File tree

packages/runtime/src/nodes/email/base-email-agent-node.ts

Lines changed: 43 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,64 +19,86 @@ const MAX_BACKSTOP_MS = 30 * 24 * 60 * 60 * 1000;
1919
const EMAIL_AGENT_INPUTS: NodeType["inputs"] = [
2020
{
2121
name: "from",
22-
description: "Organization email address to send from.",
22+
description:
23+
"The organization email address the agent sends from. Replies route " +
24+
"back to this mailbox so the agent can read them.",
2325
type: "email",
2426
required: true,
2527
},
2628
{
2729
name: "interlocutors",
2830
description:
29-
"People the agent may email: an array of { id, email, name?, role? }. The agent addresses them by id.",
31+
"The people the agent may email, as a JSON array. Each entry requires " +
32+
"an `email`; `name` and `role` are optional context for the agent, and " +
33+
"an optional short `id` is the handle it uses to address them (defaults " +
34+
"to the email, and keeps real addresses out of the model's reasoning). " +
35+
'Example: [{ "id": "approver", "email": "a@x.com", "name": "Alice", "role": "Budget owner" }].',
3036
type: "json",
3137
required: true,
3238
},
3339
{
3440
name: "objective",
35-
description: "The goal the agent should pursue through the conversation.",
41+
description:
42+
"The goal the agent pursues through the email conversation. State it as " +
43+
'a concrete outcome, e.g. "Get all three approvers to confirm the Q3 budget."',
3644
type: "string",
3745
required: true,
3846
},
3947
{
4048
name: "instructions",
41-
description: "Optional persona / behavioural system prompt.",
49+
description:
50+
"Optional persona and behavioural guidance — tone, constraints, and how " +
51+
"to handle non-replies. Becomes part of the agent's system prompt.",
4252
type: "string",
4353
required: false,
4454
},
4555
{
4656
name: "context",
47-
description: "Optional background material for the agent.",
57+
description:
58+
"Optional background material (facts, prior decisions, reference text) " +
59+
"the agent should know before it starts. Appended to the objective.",
4860
type: "string",
4961
required: false,
62+
hidden: true,
5063
},
5164
{
5265
name: "subject",
53-
description: "Default subject for newly opened email threads.",
66+
description:
67+
"Default subject line for new email threads the agent opens. If omitted, " +
68+
"one is derived from the objective.",
5469
type: "string",
5570
required: false,
71+
hidden: true,
5672
},
5773
{
5874
name: "max_rounds",
59-
description: `Maximum conversation rounds before wrapping up (default ${DEFAULT_MAX_ROUNDS}).`,
75+
description: `Maximum number of conversation rounds before the agent wraps up, even if the objective isn't met (default ${DEFAULT_MAX_ROUNDS}).`,
6076
type: "number",
6177
required: false,
6278
value: DEFAULT_MAX_ROUNDS,
79+
hidden: true,
6380
},
6481
{
6582
name: "reply_timeout",
66-
description: `How long to wait for each reply, e.g. "3 days", "24 hours" (default ${DEFAULT_REPLY_TIMEOUT}).`,
83+
description: `How long to wait for each reply before treating that person as unresponsive and letting the agent decide how to proceed. Accepts values like "3 days", "24 hours", or "30 minutes" (default ${DEFAULT_REPLY_TIMEOUT}).`,
6784
type: "string",
6885
required: false,
6986
value: DEFAULT_REPLY_TIMEOUT,
87+
hidden: true,
7088
},
7189
{
7290
name: "tools",
73-
description: "Tool references the agent may call between emails.",
91+
description:
92+
"Optional tool references the agent may call between emails (for example " +
93+
"to look something up before replying), as a JSON array.",
7494
type: "json",
7595
required: false,
96+
hidden: true,
7697
},
7798
{
7899
name: "schema",
79-
description: "Optional schema constraining the final result.",
100+
description:
101+
"Optional JSON schema constraining the shape of the final result.",
80102
type: "schema",
81103
required: false,
82104
hidden: true,
@@ -86,25 +108,29 @@ const EMAIL_AGENT_INPUTS: NodeType["inputs"] = [
86108
const EMAIL_AGENT_OUTPUTS: NodeType["outputs"] = [
87109
{
88110
name: "result",
89-
description: "The agent's final result once the objective is reached.",
111+
description:
112+
"The agent's final answer once the objective is reached (or it stops). " +
113+
"Matches `schema` when one is provided.",
90114
type: "any",
91115
},
92116
{
93117
name: "transcript",
94118
description:
95-
"Per-interlocutor record of the messages sent and replies received.",
119+
"Per-interlocutor record of every message sent and reply received, " +
120+
"including who timed out. One entry per email thread.",
96121
type: "json",
97122
},
98-
{
99-
name: "rounds",
100-
description: "Number of conversation rounds taken.",
101-
type: "number",
102-
},
103123
{
104124
name: "finish_reason",
105125
description: "Why the agent stopped: goal_reached, max_rounds, or error.",
106126
type: "string",
107127
},
128+
{
129+
name: "rounds",
130+
description: "Number of conversation rounds the agent took.",
131+
type: "number",
132+
hidden: true,
133+
},
108134
{
109135
name: "usage_metadata",
110136
description: "Token usage for the run.",

0 commit comments

Comments
 (0)