Spaces:
Sleeping
Sleeping
File size: 3,674 Bytes
fb0045e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 |
@startuml Architecture Diagram
' Define color variables
!define CANVAS_COLOR #FAEBD7
!define DEFAULT_NODE_COLOR #Gold
!define TODO_COLOR #FireBrick
!define ARROW_COLOR #666666
!define BORDER_COLOR #999999
!define TOOLBOX_MATH_COLOR #LightBlue
!define TOOLBOX_WEBSEARCH_COLOR #LightGreen
!define TOOLBOX_ENCRYPTION_COLOR #PaleVioletRed
!define POWERS_ARROW_COLOR #4285F4
!define TRIGGER_ARROW_COLOR #OrangeRed
!define FINAL_ANSWER_COLOR #Orange
' Style settings
skinparam handwritten true
skinparam backgroundColor white
skinparam componentStyle uml2
skinparam defaultFontName Arial
skinparam arrowColor ARROW_COLOR
skinparam componentBorderColor BORDER_COLOR
skinparam component {
BackgroundColor DEFAULT_NODE_COLOR
}
' Custom style for toolbox functions
skinparam label {
FontSize 10
FontColor black
}
' Components
package "app.py" {
[UI] as UI
[Application] as Application
}
package "alfred.py" {
[Alfred] as Alfred
[GraphBuilder] as GraphBuilder
}
package "management.py" {
[Assistant] as Assistant
[Manager] as Manager
}
' Relationships
UI -d-> Application
Application -d-> Alfred
Alfred -d-> GraphBuilder
GraphBuilder -d-> Assistant
GraphBuilder -d-> Manager
' LangGraph Flow and LlamaIndex Flow positioning
component "LangGraph Flow" as LangGraphFlow CANVAS_COLOR {
[Query] as Query
[Assistant Node] as AssistantNode
[Manager Node] as ManagerNode
[<b>Final Answer</b>] as FinalAnswer FINAL_ANSWER_COLOR
Query -r-> AssistantNode
AssistantNode -r-> ManagerNode : requests
ManagerNode -l-> AssistantNode : solution
ManagerNode -d-> break_up_recursion
break_up_recursion -u-> ManagerNode
AssistantNode -d-> FinalAnswer : problem solved
}
' Position LlamaIndex Flow with solver.py and toolbox.py - more compact
component "LlamaIndex Flow" as LlamaIndexFlow CANVAS_COLOR {
package "solver.py" {
[Solver] as Solver TODO_COLOR
[Summarizer] as Summarizer
[Researcher] as Researcher TODO_COLOR
[EncryptionExpert] as EncryptionExpert TODO_COLOR
[MathExpert] as MathExpert TODO_COLOR
[Reasoner] as Reasoner TODO_COLOR
[ImageHandler] as ImageHandler TODO_COLOR
[VideoHandler] as VideoHandler TODO_COLOR
}
package "toolbox.py" {
node Math TOOLBOX_MATH_COLOR [
<b>Math</b>
----
symbolic_calc
____
unit_converter
]
node WebSearch TOOLBOX_WEBSEARCH_COLOR [
<b>WebSearch</b>
----
duck_duck_go_tools
]
node Encryption TOOLBOX_ENCRYPTION_COLOR [
<b>Encryption</b>
----
<font color=FireBrick><b>ascii_encode/decode</b></font>
____
<font color=FireBrick><b>chr_to_int/int_to_chr</b></font>
____
base64_encode/decode
____
caesar_cipher_encode/decode/<font color=FireBrick><b>brute_force</b></font>
____
reverse_string
]
}
Solver -r-> Summarizer
Solver -d-> Researcher
Solver -d-> EncryptionExpert
Solver -d-> MathExpert
Solver -d-> Reasoner
Solver -d-> ImageHandler
Solver -d-> VideoHandler
Researcher -d-> WebSearch
MathExpert -d-> Math
EncryptionExpert -d-> Encryption
}
' Adjust the label position to avoid overlap
GraphBuilder -d-> LangGraphFlow : builds
' Curved connections from Manager to Solver/Summarizer
Manager -d-> Solver
Manager -d-> Summarizer
' Bidirectional connection between ManagerNode and Solver
ManagerNode -r-> Solver : requests
Solver -l-> ManagerNode : provides solution
' Agents powering the Nodes (dashed, blue color)
Assistant -[POWERS_ARROW_COLOR,dashed]d-> AssistantNode : powers
Manager -[POWERS_ARROW_COLOR,dashed]d-> ManagerNode : powers
' Adding a direct connection from Alfred to Query
Alfred -[TRIGGER_ARROW_COLOR]d..> Query
@enduml
|