75 lines
1.4 KiB
Plaintext
75 lines
1.4 KiB
Plaintext
@startuml
|
|
skinparam classAttributeIconSize 0
|
|
|
|
class AgentCore {
|
|
- LLMEngine llmEngine
|
|
- List<CoreAction> actions
|
|
+ run()
|
|
+ templateActions(): List[Element]
|
|
+ systemInfo(): Element
|
|
+ buildContext(systemInfo: Element, actions: List[Element]): str
|
|
+ parseResponse(response: str): List[CoreAction], List[int]
|
|
+ deleteActions(List[int])
|
|
+ deleteAction(id: int)
|
|
+ stop()
|
|
}
|
|
|
|
class ServerCore {
|
|
- WebSystem webSystem
|
|
+ run()
|
|
}
|
|
|
|
class WebSystem {
|
|
+ updateContext(context: str)
|
|
+ getUpdatedContext(): str
|
|
+ updateActions(actions: List[CoreAction])
|
|
+ getUpdatedActions(): List[CoreAction]
|
|
}
|
|
|
|
class LLMEngine {
|
|
+ infer(context: str): Iterator[str]
|
|
}
|
|
|
|
class CoreAction {
|
|
+ id: str
|
|
+ template(id: str): Element
|
|
+ execute()
|
|
}
|
|
|
|
class SingleShotAction extends CoreAction {
|
|
}
|
|
|
|
class RepeatAction extends CoreAction {
|
|
}
|
|
|
|
class BackgroundAction extends CoreAction {
|
|
}
|
|
|
|
class DeleteAction {
|
|
+ execute(context: Context)
|
|
}
|
|
|
|
class InferenceResult {
|
|
+ reasoning: str
|
|
+ actions: List[CoreAction]
|
|
+ {static} parse(llmOutput: str): InferenceResult
|
|
}
|
|
|
|
Agent o-- LLMEngine
|
|
Agent o-- AgentCore
|
|
Agent o-- ServerCore
|
|
Agent o-- CoreAction
|
|
|
|
AgentCore o-- Context
|
|
AgentCore o-- InferenceResult
|
|
AgentCore o-- CoreAction
|
|
|
|
ServerCore o-- WebSystem
|
|
ServerCore o-- InferenceResult
|
|
ServerCore o-- CoreAction
|
|
|
|
CoreAction <|-- SingleShotAction
|
|
CoreAction <|-- RepeatAction
|
|
CoreAction <|-- BackgroundAction
|
|
CoreAction o-- DeleteAction
|
|
@enduml |