Updated working principles

This commit is contained in:
Niels Geens
2024-10-30 16:48:20 +01:00
parent 705f17c47b
commit bd5c5911af
3 changed files with 239 additions and 159 deletions

View File

@@ -0,0 +1,75 @@
@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