-
Notifications
You must be signed in to change notification settings - Fork 44
Implement Multi-Agent Configuration Dashboard #65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Charu19awasthi
wants to merge
4
commits into
NexGenStudioDev:master
Choose a base branch
from
Charu19awasthi:patch-1
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
4dbc553
Implement Multi-Agent Configuration Dashboard
Charu19awasthi 78e48dc
Update LocalMind-Frontend/src/pages/MultiAgentDashboard.jsx
Charu19awasthi 8932744
Update LocalMind-Frontend/src/pages/MultiAgentDashboard.jsx
Charu19awasthi df628a4
Update LocalMind-Frontend/src/pages/MultiAgentDashboard.jsx
Charu19awasthi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,170 @@ | ||
| import React, { useState } from "react"; | ||
|
|
||
| /** | ||
| * Multi-Agent Configuration Dashboard | ||
| * Allows users to manage up to 7 AI agents | ||
| */ | ||
|
|
||
| const DEFAULT_AGENTS = [ | ||
| { id: 1, name: "Planner Agent", role: "Planner", active: true, priority: 1, systemPrompt: "", task: "" }, | ||
| { id: 2, name: "Research Agent", role: "Researcher", active: true, priority: 2 }, | ||
| { id: 3, name: "Reasoning Agent", role: "Reasoner", active: true, priority: 3 }, | ||
| { id: 4, name: "Execution Agent", role: "Executor", active: true, priority: 4 }, | ||
| { id: 5, name: "Validation Agent", role: "Validator", active: true, priority: 5 }, | ||
| { id: 6, name: "Memory Agent", role: "Memory", active: false, priority: 6 }, | ||
| { id: 7, name: "Observer Agent", role: "Observer", active: false, priority: 7 }, | ||
| ]; | ||
|
|
||
| const ROLES = [ | ||
| "Planner", | ||
| "Researcher", | ||
| "Reasoner", | ||
| "Executor", | ||
| "Validator", | ||
| "Memory", | ||
| "Observer", | ||
| ]; | ||
|
|
||
| export default function MultiAgentDashboard() { | ||
| const [agents, setAgents] = useState(DEFAULT_AGENTS); | ||
|
|
||
| const updateAgent = (id, updates) => { | ||
| setAgents((prev) => | ||
| prev.map((agent) => | ||
| agent.id === id ? { ...agent, ...updates } : agent | ||
| ) | ||
| ); | ||
| }; | ||
|
|
||
| const addAgent = () => { | ||
| if (agents.length >= 7) return; | ||
|
|
||
| setAgents((prev) => [ | ||
| ...prev, | ||
| { | ||
| id: Date.now(), | ||
Charu19awasthi marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| name: "New Agent", | ||
| role: "Planner", | ||
| systemPrompt: "", | ||
| task: "", | ||
| active: true, | ||
| priority: prev.length + 1, | ||
| }, | ||
| ]); | ||
| }; | ||
|
|
||
| const removeAgent = (id) => { | ||
| setAgents((prev) => prev.filter((agent) => agent.id !== id)); | ||
| }; | ||
|
|
||
| return ( | ||
| <div style={{ padding: "24px" }}> | ||
| <h1>🧠 Multi-Agent Task Configuration</h1> | ||
| <p> | ||
| Configure how multiple AI agents collaborate to achieve a single goal. | ||
| </p> | ||
|
|
||
| <div | ||
| style={{ | ||
| display: "grid", | ||
| gridTemplateColumns: "repeat(auto-fill, minmax(320px, 1fr))", | ||
| gap: "16px", | ||
| }} | ||
| > | ||
| {agents.map((agent) => ( | ||
| <div | ||
| key={agent.id} | ||
| style={{ | ||
| background: "#121212", | ||
| padding: "16px", | ||
| borderRadius: "12px", | ||
| border: "1px solid #2a2a2a", | ||
| opacity: agent.active ? 1 : 0.5, | ||
| }} | ||
Charu19awasthi marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| > | ||
| <input | ||
| value={agent.name} | ||
| onChange={(e) => | ||
| updateAgent(agent.id, { name: e.target.value }) | ||
| } | ||
| placeholder="Agent Name" | ||
| style={{ width: "100%", marginBottom: "8px" }} | ||
| /> | ||
|
|
||
| <select | ||
| value={agent.role} | ||
| onChange={(e) => | ||
| updateAgent(agent.id, { role: e.target.value }) | ||
| } | ||
| style={{ width: "100%", marginBottom: "8px" }} | ||
| > | ||
| {ROLES.map((role) => ( | ||
| <option key={role}>{role}</option> | ||
| ))} | ||
| </select> | ||
|
|
||
| <textarea | ||
| value={agent.systemPrompt || ""} | ||
| placeholder="System Prompt" | ||
| onChange={(e) => | ||
| updateAgent(agent.id, { systemPrompt: e.target.value }) | ||
| } | ||
| style={{ width: "100%", marginBottom: "8px" }} | ||
| /> | ||
|
|
||
| <textarea | ||
| placeholder="Task / Instruction" | ||
| onChange={(e) => | ||
| updateAgent(agent.id, { task: e.target.value }) | ||
| } | ||
| style={{ width: "100%", marginBottom: "8px" }} | ||
| /> | ||
|
|
||
| <input | ||
| type="number" | ||
| value={agent.priority} | ||
| onChange={(e) => | ||
| updateAgent(agent.id, { priority: parseInt(e.target.value, 10) || agent.priority }) | ||
| } | ||
| style={{ width: "100%", marginBottom: "8px" }} | ||
| /> | ||
|
|
||
| <label> | ||
| <input | ||
| type="checkbox" | ||
| checked={agent.active} | ||
| onChange={() => | ||
| updateAgent(agent.id, { active: !agent.active }) | ||
| } | ||
| />{" "} | ||
| Active | ||
| </label> | ||
|
|
||
| {agents.length > 1 && ( | ||
| <button | ||
| onClick={() => removeAgent(agent.id)} | ||
| style={{ | ||
| marginTop: "8px", | ||
| background: "#ff4d4d", | ||
| border: "none", | ||
| padding: "6px", | ||
| width: "100%", | ||
| }} | ||
| > | ||
| Remove Agent | ||
| </button> | ||
| )} | ||
| </div> | ||
| ))} | ||
| </div> | ||
|
|
||
| <button | ||
| onClick={addAgent} | ||
| disabled={agents.length >= 7} | ||
| style={{ marginTop: "20px" }} | ||
| > | ||
| ➕ Add Agent | ||
| </button> | ||
| </div> | ||
| ); | ||
| } | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.