@culvii/cli 0.0.8 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{HelpView-E7HS4SVF.js → HelpView-NKJCCU5A.js} +1 -1
- package/dist/{chunk-IPETC2TK.js → chunk-D3YFBXU5.js} +1 -1
- package/dist/index.js +25 -27
- package/dist/lib/evaluator.js +2 -2
- package/dist/{login-OGOHEHFE.js → login-7VBXFHFC.js} +1 -1
- package/dist/{logout-BRUJBFUK.js → logout-OJRK2KGE.js} +1 -1
- package/dist/skill-bundle-5WQTV2OV.js +2553 -0
- package/package.json +2 -2
- package/skills/culvii/.culvii-skill.json +58 -27
- package/skills/culvii/SKILL.md +31 -0
- package/skills/culvii/examples/agent-workflow.culvii.ts +28 -5
- package/skills/culvii/examples/binary-document-workflow.culvii.ts +80 -0
- package/skills/culvii/examples/complete-workflow.culvii.ts +55 -11
- package/skills/culvii/examples/custom-output-surface.culvii.ts +69 -0
- package/skills/culvii/examples/custom-wait-surface.culvii.ts +90 -0
- package/skills/culvii/examples/human-in-the-loop-workflow.culvii.ts +125 -0
- package/skills/culvii/examples/integration-agent-workflow.culvii.ts +101 -0
- package/skills/culvii/examples/multi-agent-workflow-tools.culvii.ts +157 -0
- package/skills/culvii/examples/nested-agent-workflow.culvii.ts +108 -0
- package/skills/culvii/references/agents.md +53 -5
- package/skills/culvii/references/cli-guide.md +1 -1
- package/skills/culvii/references/cli-reference.md +33 -0
- package/skills/culvii/references/feedback-cycle.md +1 -1
- package/skills/culvii/references/kit-api.md +2 -2
- package/skills/culvii/references/node-argocd.md +44 -0
- package/skills/culvii/references/node-clickup-doc.md +38 -0
- package/skills/culvii/references/node-clickup-ticket.md +47 -0
- package/skills/culvii/references/node-core-loop-break.md +26 -0
- package/skills/culvii/references/node-core-loop-continue.md +26 -0
- package/skills/culvii/references/node-core-loop-output.md +24 -0
- package/skills/culvii/references/node-core-loop.md +25 -0
- package/skills/culvii/references/node-core-merge.md +23 -0
- package/skills/culvii/references/node-core-switch.md +24 -0
- package/skills/culvii/references/node-cost-explorer.md +45 -0
- package/skills/culvii/references/node-elasticsearch.md +2 -2
- package/skills/culvii/references/node-github-poll-trigger.md +31 -0
- package/skills/culvii/references/node-github-webhook-trigger.md +27 -0
- package/skills/culvii/references/node-github.md +251 -0
- package/skills/culvii/references/node-gmail-trigger.md +2 -2
- package/skills/culvii/references/node-gmail.md +2 -2
- package/skills/culvii/references/node-google-calendar.md +2 -2
- package/skills/culvii/references/node-google-docs.md +2 -2
- package/skills/culvii/references/node-grafana-dashboard.md +38 -0
- package/skills/culvii/references/node-grafana-data-source.md +42 -0
- package/skills/culvii/references/node-grafana-query.md +34 -0
- package/skills/culvii/references/node-hibp-list-domains.md +27 -0
- package/skills/culvii/references/node-hibp-stealer-logs.md +30 -0
- package/skills/culvii/references/node-kubernetes.md +51 -0
- package/skills/culvii/references/node-microsoft-outlook-trigger.md +2 -2
- package/skills/culvii/references/node-microsoft-outlook.md +3 -2
- package/skills/culvii/references/node-microsoft-sharepoint.md +2 -2
- package/skills/culvii/references/node-onionsearch.md +27 -0
- package/skills/culvii/references/node-prometheus.md +40 -0
- package/skills/culvii/references/node-s3.md +2 -2
- package/skills/culvii/references/node-slack-events-trigger.md +37 -0
- package/skills/culvii/references/node-slack-interactions-trigger.md +28 -0
- package/skills/culvii/references/node-slack-trigger.md +2 -2
- package/skills/culvii/references/node-slack.md +128 -4
- package/skills/culvii/references/node-supabase.md +61 -0
- package/skills/culvii/references/node-twilio.md +2 -2
- package/skills/culvii/references/nodes-index.md +24 -0
- package/skills/culvii/references/surface-authoring.md +12 -1
- package/skills/culvii/references/surface-display.md +1 -1
- package/skills/culvii/references/surface-feedback.md +24 -27
- package/dist/skill-bundle-7KYK5GBL.js +0 -1377
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import {
|
|
2
|
+
MultiAgentEngine,
|
|
3
|
+
Step,
|
|
4
|
+
Workflow,
|
|
5
|
+
createAgentModelConfigFromRef,
|
|
6
|
+
defineWorkflowTool,
|
|
7
|
+
} from '@culvii/kit';
|
|
8
|
+
|
|
9
|
+
const MODEL = createAgentModelConfigFromRef('openai/gpt-4.1', 'credential-id');
|
|
10
|
+
|
|
11
|
+
function createApprovalToolWorkflow() {
|
|
12
|
+
const trigger = new Step({ id: 'trigger', name: 'Manual Trigger', type: 'manualTrigger' });
|
|
13
|
+
const approval = new Step({
|
|
14
|
+
id: 'approval',
|
|
15
|
+
name: 'Approval',
|
|
16
|
+
type: 'core.set',
|
|
17
|
+
params: {
|
|
18
|
+
values: { stage: 'awaiting-review', amount: 1500 },
|
|
19
|
+
// A resume request continues from this node.
|
|
20
|
+
pauseAfterExecution: true,
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
trigger.connectTo(approval);
|
|
24
|
+
return new Workflow({
|
|
25
|
+
id: 'discount-approval-workflow',
|
|
26
|
+
name: 'Discount Approval Workflow',
|
|
27
|
+
steps: [trigger, approval],
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function createAccountLookupWorkflow() {
|
|
32
|
+
const trigger = new Step({ id: 'trigger', name: 'Manual Trigger', type: 'manualTrigger' });
|
|
33
|
+
const account = new Step({
|
|
34
|
+
id: 'account',
|
|
35
|
+
name: 'Account',
|
|
36
|
+
type: 'core.set',
|
|
37
|
+
params: { values: { plan: 'Enterprise', seats: 250 } },
|
|
38
|
+
});
|
|
39
|
+
trigger.connectTo(account);
|
|
40
|
+
return new Workflow({
|
|
41
|
+
id: 'account-lookup-workflow',
|
|
42
|
+
name: 'Account Lookup Workflow',
|
|
43
|
+
steps: [trigger, account],
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function createConciergeAgent() {
|
|
48
|
+
return new MultiAgentEngine({
|
|
49
|
+
id: 'discount-concierge',
|
|
50
|
+
name: 'Discount Concierge',
|
|
51
|
+
role: 'primary',
|
|
52
|
+
description: 'Looks up an account and requests approval before offering a discount.',
|
|
53
|
+
systemPrompt:
|
|
54
|
+
'Call lookup_account first. If a discount is requested, call request_approval and wait for its human decision before answering.',
|
|
55
|
+
model: MODEL,
|
|
56
|
+
metadata: {
|
|
57
|
+
runtimeDetails: {
|
|
58
|
+
sandboxProfile: 'default',
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
permissions: { default: { '*': 'ask', read_file: 'approve', delete_file: 'deny' } },
|
|
62
|
+
tools: {
|
|
63
|
+
lookup_account: defineWorkflowTool({
|
|
64
|
+
name: 'lookup_account',
|
|
65
|
+
description: 'Looks up account context.',
|
|
66
|
+
workflowId: 'account-lookup-workflow',
|
|
67
|
+
inputSchema: { type: 'object', properties: { account: { type: 'string' } } },
|
|
68
|
+
}),
|
|
69
|
+
request_approval: defineWorkflowTool({
|
|
70
|
+
name: 'request_approval',
|
|
71
|
+
description: 'Pauses for a human approval decision.',
|
|
72
|
+
workflowId: 'discount-approval-workflow',
|
|
73
|
+
inputSchema: { type: 'object', properties: { request: { type: 'string' } } },
|
|
74
|
+
}),
|
|
75
|
+
},
|
|
76
|
+
secondaryAgents: [],
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function createWorkflow() {
|
|
81
|
+
const trigger = new Step({ id: 'trigger', name: 'Manual Trigger', type: 'manualTrigger' });
|
|
82
|
+
const request = new Step({
|
|
83
|
+
id: 'request',
|
|
84
|
+
name: 'Request',
|
|
85
|
+
type: 'core.set',
|
|
86
|
+
params: { values: { customer: 'Acme Corp', request: 'Approve a renewal discount.' } },
|
|
87
|
+
});
|
|
88
|
+
const concierge = new Step({
|
|
89
|
+
id: 'concierge',
|
|
90
|
+
name: 'Concierge Agent',
|
|
91
|
+
type: 'core.agent',
|
|
92
|
+
params: {
|
|
93
|
+
agentReferenceKey: 'discount-concierge',
|
|
94
|
+
prompt: "Handle the request for {{ $('Request').json.customer }}.",
|
|
95
|
+
autoCloseSession: true,
|
|
96
|
+
},
|
|
97
|
+
});
|
|
98
|
+
const managerReview = new Step({
|
|
99
|
+
id: 'manager-review',
|
|
100
|
+
name: 'Manager Review',
|
|
101
|
+
type: 'core.set',
|
|
102
|
+
params: { values: { status: 'pending' }, pauseAfterExecution: true },
|
|
103
|
+
});
|
|
104
|
+
const persist = new Step({
|
|
105
|
+
id: 'persist',
|
|
106
|
+
name: 'Persist Decision',
|
|
107
|
+
type: 'core.set',
|
|
108
|
+
params: { values: { response: "={{ $('Concierge Agent').json.response }}" } },
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
trigger.connectTo(request);
|
|
112
|
+
request.connectTo(concierge);
|
|
113
|
+
concierge.connectTo(managerReview);
|
|
114
|
+
managerReview.connectTo(persist);
|
|
115
|
+
return new Workflow({
|
|
116
|
+
id: 'discount-request-workflow',
|
|
117
|
+
name: 'Discount Request Workflow',
|
|
118
|
+
steps: [trigger, request, concierge, managerReview, persist],
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
createApprovalToolWorkflow();
|
|
123
|
+
createAccountLookupWorkflow();
|
|
124
|
+
createConciergeAgent();
|
|
125
|
+
createWorkflow();
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { MultiAgentEngine, Step, Workflow, createAgentModelConfigFromRef } from '@culvii/kit';
|
|
2
|
+
|
|
3
|
+
// Resolve both credentials through the integration picker before running dev.
|
|
4
|
+
const MODEL = createAgentModelConfigFromRef(
|
|
5
|
+
'google-vertex/gemini-3.1-pro-preview',
|
|
6
|
+
'credential-id'
|
|
7
|
+
);
|
|
8
|
+
const GMAIL = { name: 'gmail', id: 'credential-id' };
|
|
9
|
+
|
|
10
|
+
const CUTOFF_CODE = `
|
|
11
|
+
export default async function main() {
|
|
12
|
+
return { cutoff: new Date(Date.now() - 5 * 60 * 1000).toISOString() };
|
|
13
|
+
}
|
|
14
|
+
`;
|
|
15
|
+
|
|
16
|
+
function createResearchAgent() {
|
|
17
|
+
return new MultiAgentEngine({
|
|
18
|
+
id: 'email-researcher',
|
|
19
|
+
name: 'Email Researcher',
|
|
20
|
+
role: 'primary',
|
|
21
|
+
description: 'Researches a recent email and prepares a reply.',
|
|
22
|
+
systemPrompt:
|
|
23
|
+
'Read the supplied email subject and content, research its question with your approved web tools, and return only a concise reply body.',
|
|
24
|
+
model: MODEL,
|
|
25
|
+
metadata: {
|
|
26
|
+
runtimeDetails: {
|
|
27
|
+
sandboxProfile: 'default',
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
permissions: { default: { '*': 'deny', web_fetch: 'approve' } },
|
|
31
|
+
secondaryAgents: [],
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function createWorkflow() {
|
|
36
|
+
const trigger = new Step({ id: 'trigger', name: 'Manual Trigger', type: 'manualTrigger' });
|
|
37
|
+
const cutoff = new Step({
|
|
38
|
+
id: 'cutoff',
|
|
39
|
+
name: 'Compute Cutoff',
|
|
40
|
+
type: 'core.code',
|
|
41
|
+
params: { code: CUTOFF_CODE, codeType: 'js' },
|
|
42
|
+
});
|
|
43
|
+
const readEmail = new Step({
|
|
44
|
+
id: 'read-email',
|
|
45
|
+
name: 'Read Recent Email',
|
|
46
|
+
type: 'gmail',
|
|
47
|
+
credentials: GMAIL,
|
|
48
|
+
params: {
|
|
49
|
+
resource: 'message',
|
|
50
|
+
operation: 'readAll',
|
|
51
|
+
output: 'simple',
|
|
52
|
+
limit: 10,
|
|
53
|
+
userFilters: {
|
|
54
|
+
filterBy: 'filters',
|
|
55
|
+
filters: {
|
|
56
|
+
readStatus: 'both',
|
|
57
|
+
sender: 'sender@example.com',
|
|
58
|
+
receivedAfter: "={{ $('Compute Cutoff').json.cutoff }}",
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
});
|
|
63
|
+
const research = new Step({
|
|
64
|
+
id: 'research',
|
|
65
|
+
name: 'Research Email',
|
|
66
|
+
type: 'core.agent',
|
|
67
|
+
params: {
|
|
68
|
+
agentReferenceKey: 'email-researcher',
|
|
69
|
+
prompt:
|
|
70
|
+
"Subject: {{ $('Read Recent Email').json.subject }}\nContent: {{ $('Read Recent Email').json.snippet }}\nPrepare the reply.",
|
|
71
|
+
autoCloseSession: true,
|
|
72
|
+
},
|
|
73
|
+
});
|
|
74
|
+
const sendReply = new Step({
|
|
75
|
+
id: 'send-reply',
|
|
76
|
+
name: 'Send Reply',
|
|
77
|
+
type: 'gmail',
|
|
78
|
+
credentials: GMAIL,
|
|
79
|
+
params: {
|
|
80
|
+
resource: 'message',
|
|
81
|
+
operation: 'send',
|
|
82
|
+
toRecipients: 'sender@example.com',
|
|
83
|
+
subject: "Re: {{ $('Read Recent Email').json.subject }}",
|
|
84
|
+
bodyContent: "={{ $('Research Email').json.response }}",
|
|
85
|
+
additionalFields: { bodyContentType: 'text' },
|
|
86
|
+
},
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
trigger.connectTo(cutoff);
|
|
90
|
+
cutoff.connectTo(readEmail);
|
|
91
|
+
readEmail.connectTo(research);
|
|
92
|
+
research.connectTo(sendReply);
|
|
93
|
+
return new Workflow({
|
|
94
|
+
id: 'integration-agent-workflow',
|
|
95
|
+
name: 'Integration Agent Workflow',
|
|
96
|
+
steps: [trigger, cutoff, readEmail, research, sendReply],
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
createResearchAgent();
|
|
101
|
+
createWorkflow();
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import {
|
|
2
|
+
MultiAgentEngine,
|
|
3
|
+
Step,
|
|
4
|
+
Workflow,
|
|
5
|
+
createAgentModelConfigFromRef,
|
|
6
|
+
defineWorkflowTool,
|
|
7
|
+
} from '@culvii/kit';
|
|
8
|
+
|
|
9
|
+
const MODEL = createAgentModelConfigFromRef('openai/gpt-4.1', 'credential-id');
|
|
10
|
+
|
|
11
|
+
// Workflow tools target workflows, not agents. Keep these leaf workflows free
|
|
12
|
+
// of core.agent steps so the resource graph stays within the depth limit.
|
|
13
|
+
function createLeafWorkflow(id: string, name: string, values: Record<string, unknown>) {
|
|
14
|
+
const trigger = new Step({ id: 'trigger', name: 'Manual Trigger', type: 'manualTrigger' });
|
|
15
|
+
const result = new Step({
|
|
16
|
+
id: 'result',
|
|
17
|
+
name,
|
|
18
|
+
type: 'core.set',
|
|
19
|
+
params: { values },
|
|
20
|
+
});
|
|
21
|
+
trigger.connectTo(result);
|
|
22
|
+
return new Workflow({ id, name, steps: [trigger, result] });
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const inventoryTool = defineWorkflowTool({
|
|
26
|
+
name: 'check_inventory',
|
|
27
|
+
description: 'Checks stock for a SKU.',
|
|
28
|
+
workflowId: 'inventory-workflow',
|
|
29
|
+
inputSchema: {
|
|
30
|
+
type: 'object',
|
|
31
|
+
properties: { sku: { type: 'string' } },
|
|
32
|
+
additionalProperties: false,
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
const shippingTool = defineWorkflowTool({
|
|
37
|
+
name: 'quote_shipping',
|
|
38
|
+
description: 'Returns shipping options for a destination.',
|
|
39
|
+
workflowId: 'shipping-workflow',
|
|
40
|
+
inputSchema: {
|
|
41
|
+
type: 'object',
|
|
42
|
+
properties: { destination: { type: 'string' } },
|
|
43
|
+
additionalProperties: false,
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
const complianceTool = defineWorkflowTool({
|
|
48
|
+
name: 'screen_compliance',
|
|
49
|
+
description: 'Screens an order destination for export restrictions.',
|
|
50
|
+
workflowId: 'compliance-workflow',
|
|
51
|
+
inputSchema: {
|
|
52
|
+
type: 'object',
|
|
53
|
+
properties: { destination: { type: 'string' } },
|
|
54
|
+
additionalProperties: false,
|
|
55
|
+
},
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
function createCoordinatorAgent() {
|
|
59
|
+
return new MultiAgentEngine({
|
|
60
|
+
id: 'fulfillment-coordinator',
|
|
61
|
+
name: 'Fulfillment Coordinator',
|
|
62
|
+
role: 'primary',
|
|
63
|
+
description: 'Coordinates inventory, shipping, compliance, and specialist review.',
|
|
64
|
+
systemPrompt:
|
|
65
|
+
'For every line item, check inventory and quote shipping. Delegate compliance to the finance specialist and combine all returned facts into the final fulfillment plan.',
|
|
66
|
+
model: MODEL,
|
|
67
|
+
metadata: {
|
|
68
|
+
runtimeDetails: {
|
|
69
|
+
sandboxProfile: 'default',
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
permissions: {
|
|
73
|
+
default: {
|
|
74
|
+
'*': 'ask',
|
|
75
|
+
git: 'ask',
|
|
76
|
+
delete_file: 'deny',
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
tools: {
|
|
80
|
+
check_inventory: inventoryTool,
|
|
81
|
+
quote_shipping: shippingTool,
|
|
82
|
+
screen_compliance: complianceTool,
|
|
83
|
+
},
|
|
84
|
+
secondaryAgents: [
|
|
85
|
+
{
|
|
86
|
+
id: 'finance-specialist',
|
|
87
|
+
name: 'Finance Specialist',
|
|
88
|
+
role: 'secondary',
|
|
89
|
+
description: 'Screens the order and reports financial or regulatory risks.',
|
|
90
|
+
systemPrompt:
|
|
91
|
+
'Review the supplied compliance result, then return its financial or regulatory risks.',
|
|
92
|
+
model: MODEL,
|
|
93
|
+
},
|
|
94
|
+
],
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function createWorkflow() {
|
|
99
|
+
const trigger = new Step({ id: 'trigger', name: 'Manual Trigger', type: 'manualTrigger' });
|
|
100
|
+
const order = new Step({
|
|
101
|
+
id: 'order',
|
|
102
|
+
name: 'Order',
|
|
103
|
+
type: 'core.set',
|
|
104
|
+
params: {
|
|
105
|
+
values: {
|
|
106
|
+
customer: 'Acme Corp',
|
|
107
|
+
destination: 'DE',
|
|
108
|
+
lineItems: [
|
|
109
|
+
{ sku: 'WIDGET-001', quantity: 12 },
|
|
110
|
+
{ sku: 'GADGET-114', quantity: 4 },
|
|
111
|
+
],
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
});
|
|
115
|
+
const coordinator = new Step({
|
|
116
|
+
id: 'coordinator',
|
|
117
|
+
name: 'Coordinator Agent',
|
|
118
|
+
type: 'core.agent',
|
|
119
|
+
params: {
|
|
120
|
+
agentReferenceKey: 'fulfillment-coordinator',
|
|
121
|
+
prompt:
|
|
122
|
+
"Fulfill the order for {{ $('Order').json.customer }} shipping to {{ $('Order').json.destination }}. Process every line item and use your tools and finance specialist.",
|
|
123
|
+
autoCloseSession: true,
|
|
124
|
+
},
|
|
125
|
+
});
|
|
126
|
+
const persist = new Step({
|
|
127
|
+
id: 'persist',
|
|
128
|
+
name: 'Persist Plan',
|
|
129
|
+
type: 'core.set',
|
|
130
|
+
params: { values: { plan: "={{ $('Coordinator Agent').json.response }}" } },
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
trigger.connectTo(order);
|
|
134
|
+
order.connectTo(coordinator);
|
|
135
|
+
coordinator.connectTo(persist);
|
|
136
|
+
return new Workflow({
|
|
137
|
+
id: 'fulfillment-workflow',
|
|
138
|
+
name: 'Fulfillment Workflow',
|
|
139
|
+
steps: [trigger, order, coordinator, persist],
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
createLeafWorkflow('inventory-workflow', 'Inventory Result', {
|
|
144
|
+
available: 420,
|
|
145
|
+
warehouse: 'us-east-1',
|
|
146
|
+
});
|
|
147
|
+
createLeafWorkflow('shipping-workflow', 'Shipping Quote', {
|
|
148
|
+
carrier: 'GlobalEx',
|
|
149
|
+
service: 'ground',
|
|
150
|
+
etaDays: 4,
|
|
151
|
+
});
|
|
152
|
+
createLeafWorkflow('compliance-workflow', 'Compliance Result', {
|
|
153
|
+
restricted: false,
|
|
154
|
+
licenseRequired: false,
|
|
155
|
+
});
|
|
156
|
+
createCoordinatorAgent();
|
|
157
|
+
createWorkflow();
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import {
|
|
2
|
+
MultiAgentEngine,
|
|
3
|
+
Step,
|
|
4
|
+
Workflow,
|
|
5
|
+
createAgentModelConfigFromRef,
|
|
6
|
+
defineWorkflowTool,
|
|
7
|
+
} from '@culvii/kit';
|
|
8
|
+
|
|
9
|
+
const MODEL = createAgentModelConfigFromRef('anthropic/claude-sonnet-4-5', 'credential-id');
|
|
10
|
+
|
|
11
|
+
// This is the agent -> workflow -> agent shape. The leaf agent has no workflow
|
|
12
|
+
// tools, which keeps the reference graph at the supported maximum depth.
|
|
13
|
+
function createLeafAgent() {
|
|
14
|
+
return new MultiAgentEngine({
|
|
15
|
+
id: 'evidence-reviewer',
|
|
16
|
+
name: 'Evidence Reviewer',
|
|
17
|
+
role: 'primary',
|
|
18
|
+
description: 'Reviews a brief and asks a second agent to check for gaps.',
|
|
19
|
+
systemPrompt: 'Review the brief, delegate a gap check, and return a recommendation.',
|
|
20
|
+
model: MODEL,
|
|
21
|
+
metadata: {
|
|
22
|
+
runtimeDetails: { sandboxProfile: 'default' },
|
|
23
|
+
},
|
|
24
|
+
permissions: { default: { '*': 'deny' } },
|
|
25
|
+
secondaryAgents: [
|
|
26
|
+
{
|
|
27
|
+
id: 'gap-checker',
|
|
28
|
+
name: 'Gap Checker',
|
|
29
|
+
role: 'secondary',
|
|
30
|
+
description: 'Checks a recommendation for missing evidence.',
|
|
31
|
+
systemPrompt: 'Check the recommendation for gaps and report them directly.',
|
|
32
|
+
model: MODEL,
|
|
33
|
+
},
|
|
34
|
+
],
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function createResearchWorkflow() {
|
|
39
|
+
const trigger = new Step({ id: 'trigger', name: 'Manual Trigger', type: 'manualTrigger' });
|
|
40
|
+
const brief = new Step({
|
|
41
|
+
id: 'brief',
|
|
42
|
+
name: 'Research Brief',
|
|
43
|
+
type: 'core.set',
|
|
44
|
+
params: { values: { topic: 'Expansion readiness', audience: 'Leadership' } },
|
|
45
|
+
});
|
|
46
|
+
const reviewer = new Step({
|
|
47
|
+
id: 'reviewer',
|
|
48
|
+
name: 'Evidence Reviewer',
|
|
49
|
+
type: 'core.agent',
|
|
50
|
+
params: {
|
|
51
|
+
agentReferenceKey: 'evidence-reviewer',
|
|
52
|
+
prompt:
|
|
53
|
+
"Review {{ $('Research Brief').json.topic }} for {{ $('Research Brief').json.audience }}.",
|
|
54
|
+
autoCloseSession: true,
|
|
55
|
+
},
|
|
56
|
+
});
|
|
57
|
+
trigger.connectTo(brief);
|
|
58
|
+
brief.connectTo(reviewer);
|
|
59
|
+
return new Workflow({
|
|
60
|
+
id: 'research-workflow',
|
|
61
|
+
name: 'Research Workflow',
|
|
62
|
+
steps: [trigger, brief, reviewer],
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function createRootAgent() {
|
|
67
|
+
return new MultiAgentEngine({
|
|
68
|
+
id: 'strategy-agent',
|
|
69
|
+
name: 'Strategy Agent',
|
|
70
|
+
role: 'primary',
|
|
71
|
+
description: 'Delegates research to a workflow and a second opinion to a specialist.',
|
|
72
|
+
systemPrompt:
|
|
73
|
+
'Call research_readiness first, ask the strategist for a second opinion, then combine both results.',
|
|
74
|
+
model: MODEL,
|
|
75
|
+
metadata: {
|
|
76
|
+
runtimeDetails: {
|
|
77
|
+
sandboxProfile: 'default',
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
permissions: { default: { '*': 'ask', read_file: 'approve', delete_file: 'deny' } },
|
|
81
|
+
tools: {
|
|
82
|
+
research_readiness: defineWorkflowTool({
|
|
83
|
+
name: 'research_readiness',
|
|
84
|
+
description: 'Runs the research workflow.',
|
|
85
|
+
workflowId: 'research-workflow',
|
|
86
|
+
inputSchema: {
|
|
87
|
+
type: 'object',
|
|
88
|
+
properties: { topic: { type: 'string' } },
|
|
89
|
+
additionalProperties: false,
|
|
90
|
+
},
|
|
91
|
+
}),
|
|
92
|
+
},
|
|
93
|
+
secondaryAgents: [
|
|
94
|
+
{
|
|
95
|
+
id: 'strategist',
|
|
96
|
+
name: 'Strategist',
|
|
97
|
+
role: 'secondary',
|
|
98
|
+
description: 'Provides a second opinion on the root agent’s research result.',
|
|
99
|
+
systemPrompt: 'Review the supplied research result and return a concise second opinion.',
|
|
100
|
+
model: MODEL,
|
|
101
|
+
},
|
|
102
|
+
],
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
createLeafAgent();
|
|
107
|
+
createResearchWorkflow();
|
|
108
|
+
createRootAgent();
|
|
@@ -13,17 +13,65 @@ const agent = new MultiAgentEngine({
|
|
|
13
13
|
description: 'Resolves support requests with a research specialist.',
|
|
14
14
|
systemPrompt: 'Solve the request and delegate research when useful.',
|
|
15
15
|
model: MODEL,
|
|
16
|
-
secondaryAgents: [
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
secondaryAgents: [
|
|
17
|
+
{
|
|
18
|
+
id: 'researcher',
|
|
19
|
+
name: 'Researcher',
|
|
20
|
+
role: 'secondary',
|
|
21
|
+
description: 'Finds supporting evidence.',
|
|
22
|
+
systemPrompt: 'Return concise evidence.',
|
|
23
|
+
model: MODEL,
|
|
24
|
+
},
|
|
25
|
+
],
|
|
20
26
|
});
|
|
21
27
|
```
|
|
22
28
|
|
|
23
|
-
|
|
29
|
+
Context-window capacity is platform controlled, not agent authored. It defaults
|
|
30
|
+
to `512_000`; an operator may override an exact provider/model through
|
|
31
|
+
`AGENT_MODEL_CONTEXT_WINDOWS`. The platform includes the current user prompt
|
|
32
|
+
when deciding whether older session turns must be compacted.
|
|
33
|
+
|
|
34
|
+
Workflow-context helpers and delegation tools are available by default. Sandbox
|
|
35
|
+
tools, including `web_fetch` and `git`, follow top-level `permissions.default`.
|
|
36
|
+
Only tools with an explicit rule or `'*'` rule are available. Root `tools`
|
|
37
|
+
contains only configured workflow tools.
|
|
24
38
|
|
|
25
39
|
Workflow tools belong in root `tools` and are created with `defineWorkflowTool({ name, description, workflowId, triggerNodeName?, inputSchema? })`. Omit `tools` when there are no tools. `workflowId` references a local workflow resource ID, not a display name.
|
|
26
40
|
|
|
41
|
+
Choose the sandbox image when authoring the agent with
|
|
42
|
+
`metadata.runtimeDetails.sandboxProfile`. This is a platform-configured profile
|
|
43
|
+
name such as `node`, `go`, or `java`, not a Docker image reference. The platform
|
|
44
|
+
resolves it to an immutable digest and snapshots that choice when the session is
|
|
45
|
+
created:
|
|
46
|
+
|
|
47
|
+
```ts
|
|
48
|
+
metadata: { runtimeDetails: { sandboxProfile: 'go' } },
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Ask the platform operator to publish and configure the profile before using it.
|
|
52
|
+
Agents without this setting use the `default` profile.
|
|
53
|
+
|
|
54
|
+
Sandbox tools use top-level platform-enforced permissions. Missing entries are
|
|
55
|
+
unavailable; exact names override `'*'`:
|
|
56
|
+
|
|
57
|
+
```ts
|
|
58
|
+
metadata: { runtimeDetails: { sandboxProfile: 'go' } },
|
|
59
|
+
permissions: {
|
|
60
|
+
default: {
|
|
61
|
+
'*': 'ask',
|
|
62
|
+
read_file: 'approve',
|
|
63
|
+
delete_file: 'deny',
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
`approve` runs automatically, `deny` removes the tool, and `ask` suspends the
|
|
69
|
+
agent until the user decides in the console. Governed sandbox and workflow tools
|
|
70
|
+
belong to the root agent so durable continuation has one exact model transcript;
|
|
71
|
+
secondary agents return analysis to that root. Workflow tools need no permission;
|
|
72
|
+
each invocation suspends durably until its child workflow finishes, including
|
|
73
|
+
any HITL wait. Workflow-context helpers remain always available.
|
|
74
|
+
|
|
27
75
|
Agent references flow in the other direction through a `core.agent` step's `params.agentReferenceKey`, which must exactly equal the `MultiAgentEngine` ID. Never use `agentId`.
|
|
28
76
|
|
|
29
77
|
Further reading: [Multi-Agent API](https://culvii.com/docs/sdk-reference/api-reference/multi-agent-api/) and [Authentication](https://culvii.com/docs/sdk-reference/guides/authentication/).
|
|
@@ -10,7 +10,7 @@ Safe lifecycle:
|
|
|
10
10
|
6. Run `culvii whoami --json` again and verify that the authenticated identity and active tenant match the user's selection.
|
|
11
11
|
7. Start `culvii dev` as a tracked long-running process and retain its exact process/session handle. If another dev session is already active, do not start or terminate anything; ask the user to close their existing session.
|
|
12
12
|
8. Inspect the initial evaluation and sync output. If it reports evaluation, schema, surface, node, or cross-resource validation errors, fix the authored files and let the running watcher validate them again. Repeat until validation and draft sync succeed.
|
|
13
|
-
9. For a requested workflow, complete the [workflow feedback cycle](feedback-cycle.md), including
|
|
13
|
+
9. For a requested workflow, complete the [workflow feedback cycle](feedback-cycle.md), including the Console [surface review](surface-feedback.md), while this dev session remains active.
|
|
14
14
|
10. In a cleanup step that runs after success, failure, cancellation, or a blocker, send Ctrl-C/SIGINT to the exact `culvii dev` process the agent started and wait for it to exit. Confirm the CLI disconnected and discarded the draft session. If graceful shutdown fails, terminate only that exact process and report that cleanup could not be confirmed. Never use a broad process kill.
|
|
15
15
|
11. Do not present the resources as complete while validation or feedback errors remain or while the dev process is still running.
|
|
16
16
|
12. Never run `culvii deploy`. Deployment is a separate user-operated action outside this skill.
|
|
@@ -128,6 +128,39 @@ Options:
|
|
|
128
128
|
- `--force` — Replace an existing unmanaged Culvii skill directory
|
|
129
129
|
- `--global` — Install globally instead of in the current project
|
|
130
130
|
|
|
131
|
+
## `culvii surface`
|
|
132
|
+
|
|
133
|
+
Surface authoring and review commands
|
|
134
|
+
|
|
135
|
+
Options:
|
|
136
|
+
|
|
137
|
+
- `--env <env>` — Target environment (dev, sandbox, or prod)
|
|
138
|
+
|
|
139
|
+
## `culvii surface review`
|
|
140
|
+
|
|
141
|
+
Review custom runtime surfaces
|
|
142
|
+
|
|
143
|
+
## `culvii surface review create`
|
|
144
|
+
|
|
145
|
+
Create a browser review for selected execution surfaces
|
|
146
|
+
|
|
147
|
+
Options:
|
|
148
|
+
|
|
149
|
+
- `--file <path>` (required) — JSON file with { items: [{ executionId, nodeId }] }
|
|
150
|
+
- `--json` — Print machine-readable JSON
|
|
151
|
+
|
|
152
|
+
## `culvii surface review get <review-id>`
|
|
153
|
+
|
|
154
|
+
Get selected surfaces and the user feedback collected so far
|
|
155
|
+
|
|
156
|
+
Options:
|
|
157
|
+
|
|
158
|
+
- `--json` — Print machine-readable JSON
|
|
159
|
+
|
|
160
|
+
## `culvii surface review open <review-id>`
|
|
161
|
+
|
|
162
|
+
Open a surface review in the Culvii Console
|
|
163
|
+
|
|
131
164
|
## `culvii switch [tenant-slug]`
|
|
132
165
|
|
|
133
166
|
Switch the active tenant context
|
|
@@ -9,7 +9,7 @@ Use this only after `culvii dev` has validated and synced the requested draft re
|
|
|
9
9
|
5. Start the draft workflow with `culvii workflow run <workflow-reference-key> --trigger <manual-node-name> --payload-file <path> --mocks-file <path> --json`.
|
|
10
10
|
6. Fetch `culvii execution get <execution-id> --json` until its status is `success` or `failed`. This status polling is not a workflow wait and must not resume paused nodes.
|
|
11
11
|
7. On failure, inspect the execution error and the failing step's input/output ports. Fix the authored resource or mock fixture, allow `culvii dev` to resync, and rerun. Stop after three failed attempts and report the remaining error unless the user asks to continue.
|
|
12
|
-
8. On success, inspect the final and intermediate step outputs for the requested behavior. If the workflow has custom candidate surfaces, use these outputs to complete
|
|
12
|
+
8. On success, inspect the final and intermediate step outputs for the requested behavior. If the workflow has custom candidate surfaces, use these outputs to complete [surface review](surface-feedback.md#validate-execute-and-review). Return to the development lifecycle only after all surface decisions are resolved; keep `culvii dev` running until then.
|
|
13
13
|
9. In success, failure, cancellation, and blocker cleanup, restore the temporarily converted trigger exactly from the snapshot. Wait for `culvii dev` to validate and sync the restored authored graph before stopping the dev process. Do not modify an originally authored manual trigger.
|
|
14
14
|
|
|
15
15
|
The platform applies these execution-only overrides; the agent must not write them into the authored files:
|
|
@@ -14,7 +14,7 @@ Generated from the public `@culvii/kit` source exports. Import authoring APIs on
|
|
|
14
14
|
|
|
15
15
|
## Agents
|
|
16
16
|
|
|
17
|
-
`AgentBaseConfig`, `AgentMetadata`, `AgentModel`, `AgentModelConfig`, `AgentModelConfigOptions`, `AgentModelRef`, `AgentPermissions`, `AgentRole`, `AgentRuntimeDetails`, `
|
|
17
|
+
`AgentBaseConfig`, `AgentIntegrationConfig`, `AgentMetadata`, `AgentModel`, `AgentModelConfig`, `AgentModelConfigOptions`, `AgentModelRef`, `AgentPermissions`, `AgentRole`, `AgentRuntimeDetails`, `BuiltInModelProvider`, `MultiAgentEngine`, `PrimaryAgentConfig`, `SANDBOX_TOOL_NAMES`, `SandboxToolName`, `SandboxToolPermission`, `SecondaryAgentConfig`, `SecondaryAgentMetadata`, `Tool`, `WorkflowToolConfig`, `createAgentModelConfigFromRef`, `defineWorkflowTool`, `parseAgentModelRef`
|
|
18
18
|
|
|
19
19
|
## Development registry
|
|
20
20
|
|
|
@@ -30,6 +30,6 @@ Generated from the public `@culvii/kit` source exports. Import authoring APIs on
|
|
|
30
30
|
|
|
31
31
|
## Workflows and steps
|
|
32
32
|
|
|
33
|
-
`ConnectStepOptions`, `CredentialedNodeType`, `NodeExpression`, `NodeParams`, `NodeParamsBase`, `NodeType`, `NodeTypeInput`, `NodeTypeParamsMap`, `NodeUiConfig`, `RegisteredNodeType`, `Resolvable`, `SerializedWorkflow`, `SerializedWorkflowStep`, `Step`, `StepCredentials`, `StepSurfaceSelection`, `Workflow`, `WorkflowConfig`, `WorkflowRuntimeConnection`, `WorkflowRuntimeConnections`, `WorkflowRuntimeNode`, `WorkflowRuntimeShape`, `WorkflowStepConfig`, `WorkflowStepConnection`
|
|
33
|
+
`ConnectStepOptions`, `CredentialedNodeType`, `LoopBodyBuilder`, `NodeExpression`, `NodeParams`, `NodeParamsBase`, `NodeType`, `NodeTypeInput`, `NodeTypeParamsMap`, `NodeUiConfig`, `RegisteredNodeType`, `Resolvable`, `SerializedWorkflow`, `SerializedWorkflowStep`, `Step`, `StepCredentials`, `StepSurfaceSelection`, `Workflow`, `WorkflowConfig`, `WorkflowLoopConfig`, `WorkflowRuntimeConnection`, `WorkflowRuntimeConnections`, `WorkflowRuntimeNode`, `WorkflowRuntimeShape`, `WorkflowStepConfig`, `WorkflowStepConnection`
|
|
34
34
|
|
|
35
35
|
Further reading: [Workflow API](https://culvii.com/docs/sdk-reference/api-reference/workflow-api/), [Multi-Agent API](https://culvii.com/docs/sdk-reference/api-reference/multi-agent-api/), and [Authentication](https://culvii.com/docs/sdk-reference/guides/authentication/).
|