Skip to content

Commit f797b78

Browse files
authored
Improve control plange documentation. (#40)
1 parent c37319a commit f797b78

File tree

1 file changed

+104
-49
lines changed

1 file changed

+104
-49
lines changed

docs/lmos_platform/lmos_control_plane.md

Lines changed: 104 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,16 @@ The LMOS Control Plane extends the Kubernetes control plane to manage and orches
1313

1414
## LMOS Operator
1515

16+
### Custom Resource Definitions
17+
18+
The LMOS operator introduces new Kubernetes resources definitions:
19+
20+
* **Custom Resource Definitions (CRDs) for Agents:** LMOS introduces a new resource type called **Agent**. This allows agents to be treated as first-class citizens within the Kubernetes ecosystem, similar to pods and services, enabling their discovery and lifecycle management. The Agent resource stores agent metadata within the Kubernetes registry, ensuring that essential information about each agent is easily accessible via the Kubernetes API.
21+
22+
* **Custom Resource Definitions (CRDs) for Channels:** LMOS allows agents to form groups, which are called **Channel**. Channels can be tenant-based or task-specific. Agents can be wired to multiple channels.
23+
24+
* **Custom Resource Definitions (CRDs) for ChannelRoutings:** LMOS introduces a new resource type known as **ChannelRouting**. This resource is created by the operator when a channel is successfully resolved. The ChannelRouting resource specifies the agents that are wired to the channel, allowing the LMOS Router to effectively distribute tasks among them.
25+
1626
### Lifecycle Management
1727

1828
The **LMOS Operator** is a Kubernetes operator designed to monitor the deployments of Agents and Tools in the system.
@@ -22,71 +32,116 @@ Whenver an Agent is uninstalled, the resource is deleted.
2232
![LMOS Operator](/img/lmos_operator_discovery-light.png#light-mode-only)
2333
![LMOS Operator](/img/lmos_operator_discovery-dark.png#dark-mode-only)
2434

25-
### Channel Management
2635

27-
In LMOS a “Channel” refers to a digital interface that enables communication between an AI system and its users. Channels can be diverse, such as web, mobile apps, IVR systems, or messaging platforms, each potentially requiring different sets of capabilities.
36+
### Channel Management
2837

29-
The LMOS Operator enables defining which capabilities should be provided through channels and dynamically resolves which Agents are providing these capabilities. This dynamic resolution ensures that the right capabilities are always available in the Kubernetes cluster (environment). If the operator cannot resolve all required capabilities of a channel, the channel would be unresolved and the changes would not be activated. If the channel can be resolved, the operator is created a ChannelRouting resource which can be used by the LMOS Router.
38+
In LMOS, a **Channel** is a digital interface that facilitates communication between an AI system and its users. Channels can vary in type, e.g. web platforms, mobile applications, IVR (Interactive Voice Response) systems, and messaging services. Each channel may require specific capabilities to function effectively.
39+
40+
A DevOps engineer can create channel resource definitions, and the LMOS Operator is dynamically resolving which Agents provide these capabilities.
41+
42+
LMOS Agents provide their capabilities in the following form:
43+
44+
```json
45+
{
46+
"lmos:capabilities": [
47+
{
48+
"id": "urn:telekom:capability:billing:view",
49+
"name": "View Bills",
50+
"version": "1.0",
51+
"description": "Allows a customer to retrieve and view their latest bills.",
52+
"examples": [
53+
"show my bill",
54+
"view my invoice",
55+
"how much do I owe?",
56+
"billing details"
57+
]
58+
},
59+
{
60+
"id": "urn:telekom:capability:billing:change-address",
61+
"name": "Change Address",
62+
"version": "1.0",
63+
"description": "Allows a customer to change their billing address.",
64+
"examples": [
65+
"Update my billing address.",
66+
"Change my address to 123 Main St.",
67+
"Modify my billing details.",
68+
"Where can I update my address?"
69+
]
70+
}
71+
]
72+
}
73+
```
3074

3175
For instance, an App channel might need a comprehensive set of customer support capabilities, while a Web channel might only start with a subset of the customer support capabilities.
3276

3377
![LMOS Channel Management](/img/lmos_channel_management-light.png#light-mode-only)
3478
![LMOS Channel Management](/img/lmos_channel_management-dark.png#dark-mode-only)
3579

80+
A Channel in LMOS is defined as a Kubernetes resource.
81+
Below is an example of the Kubernetes Channel resource file `acme-web-channel.yml`:
82+
83+
```yaml
84+
apiVersion: "lmos.eclipse/v1"
85+
kind: "Channel"
86+
metadata:
87+
name: "acme-web-stable"
88+
labels:
89+
channel: "web"
90+
version: "1.0.0"
91+
tenant: "acme"
92+
subset: "stable"
93+
spec:
94+
requiredCapabilities:
95+
- id: "urn:telekom:capability:billing:view-bill"
96+
version: "1.0.0"
97+
- id: "urn:telekom:capability:billing:change-address"
98+
version: ">=1.0.0"
99+
strategy: HIGHEST
100+
```
36101
37-
When a Channel Resource is applied using [Kubectl](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_apply/), it automatically loads all Agent Resources from the registry and resolves the Channel requirements based on the capabilities of the installed Agents within the Kubernetes cluster. The LMOS Operator then generates a custom resource for channel routing, which is used by the [LMOS Router](/lmos/docs/lmos_platform/lmos_router) component to make routing decisions. This process ensures that tasks are routed to the appropriate agents based on their capabilities and the Channel's requirements.
38-
39-
![LMOS Operator](/img/lmos_operator-light.png#light-mode-only)
40-
![LMOS Operator](/img/lmos_operator-dark.png#dark-mode-only)
41-
42-
The following diagram illustrates the relationship between channels and agents in LMOS. Each tenant can have multiple channels. In the environment, multiple agents can be installed, each providing one or more capabilities to support the required functionalities of the channels.
43-
44-
```mermaid
45-
classDiagram
46-
47-
Tenant --> "0..*" Channel
48-
49-
Agent *--> "1..*" Capability: provides
50-
51-
Channel o--> "1..*" Capability: requires
52-
53-
class App{
54-
<<Channel>>
55-
}
56-
class web{
57-
<<Channel>>
58-
}
59-
class DE{
60-
<<Tenant>>
61-
}
62-
63-
class WeatherAgent{
64-
<<Agent>>
65-
getForecast()
66-
}
67-
class NewsAgent{
68-
<<Agent>>
69-
summarize()
70-
}
102+
The LMOS Operator ensures that the right capabilities are always available in the Kubernetes cluster (environment). If the operator cannot resolve all required capabilities of a channel, the channel would be unresolved and the changes would not be activated. If the channel can be resolved, the operator is created a ChannelRouting resource which can be used by the LMOS Router.
71103
72-
DE --> App
73-
DE --> web
104+
When a Channel Resource is applied using [Kubectl](https://kubernetes.io/docs/reference/kubectl/generated/kubectl_apply/), it automatically loads all Agent Resources from the registry and resolves the Channel requirements based on the capabilities of the installed Agents within the Kubernetes cluster.
74105
75-
App ..> WeatherAgent: requires
76-
web ..> WeatherAgent: requires
77-
web ..> NewsAgent: requires
106+
```
107+
kubectl apply -f acme-web-channel.yml
78108
```
79109

110+
Once the LMOS Operator resolves a channel, it generates a ChannelRouting resource, which the [LMOS Router](/lmos/docs/lmos_platform/lmos_router) uses to route tasks to appropriate Agents. This process ensures that tasks are routed to the appropriate agents based on their capabilities and the Channel's requirements.
80111

81-
### Custom Resource Definitions
82-
83-
The LMOS operator introduces new Kubernetes resources definitions:
84-
85-
* **Custom Resource Definitions (CRDs) for Agents:** LMOS introduces a new resource type called **Agent**. This allows agents to be treated as first-class citizens within the Kubernetes ecosystem, similar to pods and services, enabling their discovery and lifecycle management. The Agent resource stores agent metadata within the Kubernetes registry, ensuring that essential information about each agent is easily accessible via the Kubernetes API.
112+
![LMOS Operator](/img/lmos_operator-light.png#light-mode-only)
113+
![LMOS Operator](/img/lmos_operator-dark.png#dark-mode-only)
86114

87-
* **Custom Resource Definitions (CRDs) for Channels:** LMOS allows agents to form groups, which are called **Channel**. Channels can be tenant-based or task-specific. Agents can be wired to multiple channels.
88115

89-
* **Custom Resource Definitions (CRDs) for ChannelRoutings:** LMOS introduces a new resource type known as **ChannelRouting**. This resource is created by the operator when a channel is successfully resolved. The ChannelRouting resource specifies the agents that are wired to the channel, allowing the LMOS Router to effectively distribute tasks among them.
116+
Below is an example of the generated ChannelRouting resource `acme-web-channel.yml`.
117+
118+
```yaml
119+
apiVersion: "lmos.eclipse/v1"
120+
kind: "ChannelRouting"
121+
metadata:
122+
name: "acme-web-stable"
123+
namespace: "test"
124+
labels:
125+
version: "1.0.0"
126+
tenant: "acme"
127+
channel: "web"
128+
subset: "stable"
129+
spec:
130+
capabilityGroups:
131+
- name: "acme-billing-agent"
132+
description: "This is the billing agent description"
133+
capabilities:
134+
- id: "urn:telekom:capability:billing:view-bill"
135+
requiredVersion: "1.0.0"
136+
providedVersion: "1.0.0"
137+
description: "Capability to view a bill"
138+
host: "acme-billing-agent-stable-svc"
139+
- id: "urn:telekom:capability:billing:change-addres"
140+
requiredVersion: ">=1.0.0"
141+
providedVersion: "1.1.0"
142+
description: "Capability to change the bill address"
143+
host: "acme-billing-agent-stable-svc"
144+
```
90145
91146
### Requirement/Capability Model
92147

0 commit comments

Comments
 (0)