Spaces:
Sleeping
Sleeping
Claude Code commited on
Commit Β·
6462ace
1
Parent(s): 948f80e
Claude Code: Create a visual "Lineage Map" in the Gradio dashboard. Add a new tab cal
Browse files
__pycache__/gradio_dashboard.cpython-311.pyc
CHANGED
|
Binary files a/__pycache__/gradio_dashboard.cpython-311.pyc and b/__pycache__/gradio_dashboard.cpython-311.pyc differ
|
|
|
gradio_dashboard.py
CHANGED
|
@@ -668,6 +668,94 @@ def refresh_system_health(log_level="all", log_component="all"):
|
|
| 668 |
return health_json, log_rows, report, timestamp
|
| 669 |
|
| 670 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 671 |
# ========== Chat Interface ==========
|
| 672 |
|
| 673 |
def create_chat_interface():
|
|
@@ -749,6 +837,42 @@ def create_dashboard():
|
|
| 749 |
with gr.Tab("π¬ Chat"):
|
| 750 |
create_chat_interface()
|
| 751 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 752 |
# System Health Tab
|
| 753 |
with gr.Tab("π₯ System Health"):
|
| 754 |
gr.Markdown("### Component Health Overview")
|
|
|
|
| 668 |
return health_json, log_rows, report, timestamp
|
| 669 |
|
| 670 |
|
| 671 |
+
# ========== Agent Lineage Functions ==========
|
| 672 |
+
|
| 673 |
+
def get_agent_lineage_html():
|
| 674 |
+
"""Generate HTML for agent lineage diagram using Mermaid.js"""
|
| 675 |
+
html_content = """
|
| 676 |
+
<!DOCTYPE html>
|
| 677 |
+
<html>
|
| 678 |
+
<head>
|
| 679 |
+
<script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
|
| 680 |
+
</head>
|
| 681 |
+
<body>
|
| 682 |
+
<div class="mermaid">
|
| 683 |
+
graph LR
|
| 684 |
+
ADAM[Adam<br/>Infrastructure Provider]
|
| 685 |
+
EVE[Eve<br/>UX/Interface Designer]
|
| 686 |
+
CAIN[Cain<br/>Demo/Showcase Agent]
|
| 687 |
+
|
| 688 |
+
ADAM -->|provides core services| EVE
|
| 689 |
+
EVE -->|designs UX for| CAIN
|
| 690 |
+
|
| 691 |
+
style ADAM fill:#e1f5ff,stroke:#01579b,stroke-width:3px
|
| 692 |
+
style EVE fill:#fce4ec,stroke:#880e4f,stroke-width:3px
|
| 693 |
+
style CAIN fill:#fff3e0,stroke:#e65100,stroke-width:3px
|
| 694 |
+
</div>
|
| 695 |
+
<script>
|
| 696 |
+
mermaid.initialize({
|
| 697 |
+
startOnLoad: true,
|
| 698 |
+
theme: 'default',
|
| 699 |
+
flowchart: {
|
| 700 |
+
useMaxWidth: true,
|
| 701 |
+
htmlLabels: true,
|
| 702 |
+
curve: 'basis'
|
| 703 |
+
}
|
| 704 |
+
});
|
| 705 |
+
</script>
|
| 706 |
+
</body>
|
| 707 |
+
</html>
|
| 708 |
+
"""
|
| 709 |
+
return html_content
|
| 710 |
+
|
| 711 |
+
|
| 712 |
+
def get_agent_lineage_markdown():
|
| 713 |
+
"""Generate markdown description of agent lineage"""
|
| 714 |
+
return """
|
| 715 |
+
# π³ HuggingClaw Agent Lineage
|
| 716 |
+
|
| 717 |
+
## Agent Hierarchy
|
| 718 |
+
|
| 719 |
+
The HuggingClaw World family consists of three specialized agents, each building upon the capabilities of the previous:
|
| 720 |
+
|
| 721 |
+
### 1. Adam (Infrastructure Provider)
|
| 722 |
+
- **Role:** Foundational infrastructure and core services
|
| 723 |
+
- **Responsibilities:** Base OpenClaw instance, dataset management, sync operations
|
| 724 |
+
- **Capabilities:** Provides the foundational framework for child agents
|
| 725 |
+
|
| 726 |
+
### 2. Eve (UX/Interface Designer)
|
| 727 |
+
- **Role:** User experience and interface design
|
| 728 |
+
- **Dependencies:** Built on Adam's infrastructure
|
| 729 |
+
- **Responsibilities:** Creates user-friendly interfaces, interaction patterns
|
| 730 |
+
- **Capabilities:** Extends Adam with UX-focused features
|
| 731 |
+
|
| 732 |
+
### 3. Cain (Demo/Showcase Agent)
|
| 733 |
+
- **Role:** Interactive demonstration and showcase
|
| 734 |
+
- **Dependencies:** Built on Eve's UX layer
|
| 735 |
+
- **Responsibilities:** Real-time interaction, demos, feature showcase
|
| 736 |
+
- **Capabilities:** The user-facing agent showcasing the full system
|
| 737 |
+
|
| 738 |
+
## Data Flow
|
| 739 |
+
|
| 740 |
+
```
|
| 741 |
+
Adam (Infrastructure)
|
| 742 |
+
β [provides core services]
|
| 743 |
+
Eve (UX/Interface)
|
| 744 |
+
β [designs UX for]
|
| 745 |
+
Cain (Demo/Showcase)
|
| 746 |
+
β [interacts with]
|
| 747 |
+
Users
|
| 748 |
+
```
|
| 749 |
+
|
| 750 |
+
## Technical Details
|
| 751 |
+
|
| 752 |
+
- **Deployment:** All agents run as OpenClaw instances on HuggingFace Spaces
|
| 753 |
+
- **Dataset:** Each agent has its own dataset for persistence
|
| 754 |
+
- **Communication:** Parent agents provide foundational capabilities to children
|
| 755 |
+
- **Evolution:** Each layer adds specialized functionality on top of the previous
|
| 756 |
+
"""
|
| 757 |
+
|
| 758 |
+
|
| 759 |
# ========== Chat Interface ==========
|
| 760 |
|
| 761 |
def create_chat_interface():
|
|
|
|
| 837 |
with gr.Tab("π¬ Chat"):
|
| 838 |
create_chat_interface()
|
| 839 |
|
| 840 |
+
# Agent Lineage Tab (NEW)
|
| 841 |
+
with gr.Tab("π³ Agent Lineage"):
|
| 842 |
+
gr.Markdown("## HuggingClaw World - Agent Family Tree")
|
| 843 |
+
|
| 844 |
+
with gr.Row():
|
| 845 |
+
with gr.Column():
|
| 846 |
+
gr.Markdown("""
|
| 847 |
+
### Visual Lineage Map
|
| 848 |
+
|
| 849 |
+
This diagram shows the hierarchical relationship between the three HuggingClaw agents.
|
| 850 |
+
Each agent builds upon the capabilities of its parent.
|
| 851 |
+
""")
|
| 852 |
+
lineage_html = gr.HTML(
|
| 853 |
+
value=get_agent_lineage_html(),
|
| 854 |
+
label="Agent Lineage Diagram"
|
| 855 |
+
)
|
| 856 |
+
|
| 857 |
+
with gr.Column():
|
| 858 |
+
lineage_markdown = gr.Markdown(
|
| 859 |
+
value=get_agent_lineage_markdown(),
|
| 860 |
+
label="Agent Lineage Details"
|
| 861 |
+
)
|
| 862 |
+
|
| 863 |
+
gr.Markdown("---")
|
| 864 |
+
gr.Markdown("""
|
| 865 |
+
**Key Information:**
|
| 866 |
+
- **Adam** β Provides the foundational OpenClaw infrastructure
|
| 867 |
+
- **Eve** β Extends Adam with UX and interface design capabilities
|
| 868 |
+
- **Cain** β The final user-facing agent for demos and interaction
|
| 869 |
+
|
| 870 |
+
**Connection Types:**
|
| 871 |
+
- Arrows indicate dependency and capability flow
|
| 872 |
+
- Each child agent inherits and extends parent capabilities
|
| 873 |
+
- Data flows from infrastructure (Adam) through UX (Eve) to users (Cain)
|
| 874 |
+
""")
|
| 875 |
+
|
| 876 |
# System Health Tab
|
| 877 |
with gr.Tab("π₯ System Health"):
|
| 878 |
gr.Markdown("### Component Health Overview")
|