Version: 6.3.3

Skill Patterns

This is a guide to configuring several types of patterns that Skills may be configured to support within Agents.

After Skills are developed and deployed with named inputs and outputs, you configure the skill pattern in Agent Composer.

In general the output of a Skill is mapped by the agent to provide the input for another Skill through the synapse. The Skill output names are used to orchestrate the pattern or flow through a Skill.

Simple Chain

In this Skill pattern all the Skill outputs names may be the same or different. The three Skills are executed once each in sequence. A single output is generated by the Agent.

Skill pattern simple chain

Two Skills without Routing

In this Skill pattern the Skills are executed simultaneously. The Skill outputs may have the same or different names. Each Skill produces a different output, so the Agent output generated is in the form of an array with both outputs returned.

Skill pattern without routing - 2 Skills

Four Skills without Routing

In this pattern the Skill output names are all the same name, so there is no routing. Skills A, B, and C execute once and Skill D executes twice, producing two outputs in the form of an array with both outputs present.

Skill pattern without routing - 4 Skills

Four Skills with Routing

In this pattern Skill A produces two outputs: left and right. Skills A, B, and D execute once each, and Skill C is NOT executed. Only one output is produced by this Agent.

Skill pattern with routing - 4 Skills

Skills with Conditions

In this pattern, Skill A is executed if a condition is met. If Skill A is executed and a second condition is met, Skill B is executed. If Skill B is executed, then Skill C is executed, and the Agent produces a single output. If the conditions are not met then the Agent is COMPLETED with no output.

Skill pattern with conditions

Many other Skill patterns are possible using Skill output names and mapping the flow through the Agent in Agent Composer.

Merge skills

This Agent uses the system-skill "Merge Skill" to combine the outputs of two Skills into a single results set. The "Merge Skill" comes loaded in Agent Composer.

Skill pattern with Merge-skill

The Skill pattern can be better understood by looking at the inputs an outputs of an example Agent.

{
"camel": "1.0.0",
"name": "merge-test",
"title": "merge-test",
"tags": [],
"inputs": [
{
"signalType": "Service",
"name": "input",
"title": "Text",
"signalId": "931d80d5-0ed0-491a-ba94-f74a786b5527",
"parameters": {
"$ref": "cortex/text"
},
"output": "input"
}
],
"outputs": [
{
"signalType": "Service",
"name": "input",
"title": "Text",
"signalId": "17ab4d89-b0eb-49ca-8c94-17f4601aa89a",
"parameters": {
"$ref": "cortex/text"
}
}
],
"skills": [
{
"skillName": "daemonGood",
"title": "busybox daemon",
"description": "...",
"refId": "c0552eaf-7c37-4f66-adcd-6a8c5aeb0dd9",
"_layout": {
"cellIndex": 68
},
"properties": []
},
{
"skillName": "daemonGood",
"title": "busybox daemon",
"description": "...",
"refId": "0051aa7b-5231-46bc-9762-5eec2693677d",
"_layout": {
"cellIndex": 67
},
"properties": []
},
{
"skillName": "merge",
"title": "Merge results",
"refId": "6a6e945b-9cb3-4d79-9f6d-ef6132b9aa13",
"_layout": {
"cellIndex": 74
},
"properties": [
{"name": "items", "value": "2"}
]
}
],
"mappings": [
{
"from": {
"input": {
"signalId": "931d80d5-0ed0-491a-ba94-f74a786b5527"
}
},
"to": {
"skill": {
"refId": "0051aa7b-5231-46bc-9762-5eec2693677d",
"input": "input"
}
},
"rules": []
},
{
"from": {
"input": {
"signalId": "931d80d5-0ed0-491a-ba94-f74a786b5527"
}
},
"to": {
"skill": {
"refId": "c0552eaf-7c37-4f66-adcd-6a8c5aeb0dd9",
"input": "input"
}
},
"rules": []
},
{
"from": {
"skill": {
"refId": "c0552eaf-7c37-4f66-adcd-6a8c5aeb0dd9",
"output": "output"
}
},
"to": {
"skill": {
"refId": "6a6e945b-9cb3-4d79-9f6d-ef6132b9aa13",
"input": "input"
}
},
"rules": []
},
{
"from": {
"skill": {
"refId": "0051aa7b-5231-46bc-9762-5eec2693677d",
"output": "output"
}
},
"to": {
"skill": {
"refId": "6a6e945b-9cb3-4d79-9f6d-ef6132b9aa13",
"input": "input"
}
},
"rules": []
},
{
"from": {
"skill": {
"refId": "6a6e945b-9cb3-4d79-9f6d-ef6132b9aa13",
"output": "output"
}
},
"to": {
"output": {
"signalId": "17ab4d89-b0eb-49ca-8c94-17f4601aa89a"
}
},
"rules": []
}
],
"properties": []
}