agentic-team-orchestrator 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- agentic_team_orchestrator-0.2.0/LICENSE +21 -0
- agentic_team_orchestrator-0.2.0/MANIFEST.in +7 -0
- agentic_team_orchestrator-0.2.0/PKG-INFO +47 -0
- agentic_team_orchestrator-0.2.0/README.md +25 -0
- agentic_team_orchestrator-0.2.0/pyproject.toml +34 -0
- agentic_team_orchestrator-0.2.0/setup.cfg +4 -0
- agentic_team_orchestrator-0.2.0/src/agentic_team_orchestrator/__init__.py +0 -0
- agentic_team_orchestrator-0.2.0/src/agentic_team_orchestrator/app.py +138 -0
- agentic_team_orchestrator-0.2.0/src/agentic_team_orchestrator/controller.py +14 -0
- agentic_team_orchestrator-0.2.0/src/agentic_team_orchestrator/orchestrator.py +132 -0
- agentic_team_orchestrator-0.2.0/src/agentic_team_orchestrator/planner.py +54 -0
- agentic_team_orchestrator-0.2.0/src/agentic_team_orchestrator.egg-info/PKG-INFO +47 -0
- agentic_team_orchestrator-0.2.0/src/agentic_team_orchestrator.egg-info/SOURCES.txt +15 -0
- agentic_team_orchestrator-0.2.0/src/agentic_team_orchestrator.egg-info/dependency_links.txt +1 -0
- agentic_team_orchestrator-0.2.0/src/agentic_team_orchestrator.egg-info/entry_points.txt +2 -0
- agentic_team_orchestrator-0.2.0/src/agentic_team_orchestrator.egg-info/requires.txt +8 -0
- agentic_team_orchestrator-0.2.0/src/agentic_team_orchestrator.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Parth Bisht
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: agentic-team-orchestrator
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: A JIT Agent Factory that manifests multi-agent teams using Agno, LangGraph, and CrewAI on the fly.
|
|
5
|
+
Author-email: Parth Bisht <parth@example.com>
|
|
6
|
+
Project-URL: Homepage, https://github.com/parthbisht/agentic-team-orchestrator
|
|
7
|
+
Classifier: Programming Language :: Python :: 3
|
|
8
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
9
|
+
Classifier: Operating System :: OS Independent
|
|
10
|
+
Requires-Python: >=3.9
|
|
11
|
+
Description-Content-Type: text/markdown
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Requires-Dist: streamlit
|
|
14
|
+
Requires-Dist: openai
|
|
15
|
+
Requires-Dist: duckduckgo-search
|
|
16
|
+
Requires-Dist: requests
|
|
17
|
+
Requires-Dist: python-dotenv
|
|
18
|
+
Requires-Dist: agno
|
|
19
|
+
Requires-Dist: crewai
|
|
20
|
+
Requires-Dist: langgraph
|
|
21
|
+
Dynamic: license-file
|
|
22
|
+
|
|
23
|
+
# 🚀 JIT Agentic Team Orchestrator
|
|
24
|
+
|
|
25
|
+
**Understand. Manifest. Architect.**
|
|
26
|
+
|
|
27
|
+
The `agentic-team-orchestrator` is a Meta-Agent platform that dynamically manifests specialized multi-agent teams on-the-fly based on a user mission.
|
|
28
|
+
|
|
29
|
+
## 🌟 Key Features
|
|
30
|
+
- **Dynamic Framework Selection**: Automatically picks the best engine (**Agno, LangGraph, CrewAI, AutoGen**) for your task.
|
|
31
|
+
- **JIT Tool Generation**: Generates real, functional Python tools using `duckduckgo_search` instead of mock logic.
|
|
32
|
+
- **Specialized Team Planner**: Designs Roles, Goals, and Workflows specifically for your mission.
|
|
33
|
+
- **Wonderful UI Visualization**: A Streamlit-based dashboard to visualize agent roles, mission strategy, and generated code.
|
|
34
|
+
|
|
35
|
+
## 🚀 Quick Start
|
|
36
|
+
```bash
|
|
37
|
+
pip install agentic-team-orchestrator
|
|
38
|
+
streamlit run app.py
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## 🛠️ Performance
|
|
42
|
+
- Architect missions in seconds.
|
|
43
|
+
- Manifest complete framework-based source codes instantly.
|
|
44
|
+
- Toggle between functional automation and strategic planning.
|
|
45
|
+
|
|
46
|
+
## 📜 License
|
|
47
|
+
MIT
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# 🚀 JIT Agentic Team Orchestrator
|
|
2
|
+
|
|
3
|
+
**Understand. Manifest. Architect.**
|
|
4
|
+
|
|
5
|
+
The `agentic-team-orchestrator` is a Meta-Agent platform that dynamically manifests specialized multi-agent teams on-the-fly based on a user mission.
|
|
6
|
+
|
|
7
|
+
## 🌟 Key Features
|
|
8
|
+
- **Dynamic Framework Selection**: Automatically picks the best engine (**Agno, LangGraph, CrewAI, AutoGen**) for your task.
|
|
9
|
+
- **JIT Tool Generation**: Generates real, functional Python tools using `duckduckgo_search` instead of mock logic.
|
|
10
|
+
- **Specialized Team Planner**: Designs Roles, Goals, and Workflows specifically for your mission.
|
|
11
|
+
- **Wonderful UI Visualization**: A Streamlit-based dashboard to visualize agent roles, mission strategy, and generated code.
|
|
12
|
+
|
|
13
|
+
## 🚀 Quick Start
|
|
14
|
+
```bash
|
|
15
|
+
pip install agentic-team-orchestrator
|
|
16
|
+
streamlit run app.py
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## 🛠️ Performance
|
|
20
|
+
- Architect missions in seconds.
|
|
21
|
+
- Manifest complete framework-based source codes instantly.
|
|
22
|
+
- Toggle between functional automation and strategic planning.
|
|
23
|
+
|
|
24
|
+
## 📜 License
|
|
25
|
+
MIT
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61.0"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "agentic-team-orchestrator"
|
|
7
|
+
version = "0.2.0"
|
|
8
|
+
authors = [
|
|
9
|
+
{ name="Parth Bisht", email="parth@example.com" },
|
|
10
|
+
]
|
|
11
|
+
description = "A JIT Agent Factory that manifests multi-agent teams using Agno, LangGraph, and CrewAI on the fly."
|
|
12
|
+
readme = "README.md"
|
|
13
|
+
requires-python = ">=3.9"
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Programming Language :: Python :: 3",
|
|
16
|
+
"License :: OSI Approved :: MIT License",
|
|
17
|
+
"Operating System :: OS Independent",
|
|
18
|
+
]
|
|
19
|
+
dependencies = [
|
|
20
|
+
"streamlit",
|
|
21
|
+
"openai",
|
|
22
|
+
"duckduckgo-search",
|
|
23
|
+
"requests",
|
|
24
|
+
"python-dotenv",
|
|
25
|
+
"agno",
|
|
26
|
+
"crewai",
|
|
27
|
+
"langgraph"
|
|
28
|
+
]
|
|
29
|
+
|
|
30
|
+
[project.urls]
|
|
31
|
+
"Homepage" = "https://github.com/parthbisht/agentic-team-orchestrator"
|
|
32
|
+
|
|
33
|
+
[project.scripts]
|
|
34
|
+
agentic-factory = "agentic_team_orchestrator.app:main"
|
|
File without changes
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import streamlit as st
|
|
2
|
+
import os
|
|
3
|
+
from .controller import Controller
|
|
4
|
+
from dotenv import load_dotenv
|
|
5
|
+
|
|
6
|
+
# Load env
|
|
7
|
+
load_dotenv()
|
|
8
|
+
|
|
9
|
+
# Page config
|
|
10
|
+
st.set_page_config(
|
|
11
|
+
page_title="🚀 Multi-Agent Factory",
|
|
12
|
+
layout="wide"
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
# ---------- UI STYLES ----------
|
|
16
|
+
st.markdown("""
|
|
17
|
+
<style>
|
|
18
|
+
.main { background-color: #0e0e0e; }
|
|
19
|
+
.agent-card {
|
|
20
|
+
background-color: #1e1e2d;
|
|
21
|
+
border-radius: 12px;
|
|
22
|
+
padding: 20px;
|
|
23
|
+
border-left: 5px solid #3b82f6;
|
|
24
|
+
margin-bottom: 20px;
|
|
25
|
+
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
|
|
26
|
+
}
|
|
27
|
+
.task-step {
|
|
28
|
+
background-color: #2d2d3d;
|
|
29
|
+
border-radius: 8px;
|
|
30
|
+
padding: 15px;
|
|
31
|
+
margin-top: 10px;
|
|
32
|
+
border: 1px solid #444;
|
|
33
|
+
}
|
|
34
|
+
.mission-banner {
|
|
35
|
+
background: linear-gradient(90deg, #1e3a8a 0%, #3b82f6 100%);
|
|
36
|
+
padding: 20px;
|
|
37
|
+
border-radius: 10px;
|
|
38
|
+
color: white;
|
|
39
|
+
}
|
|
40
|
+
</style>
|
|
41
|
+
""", unsafe_allow_html=True)
|
|
42
|
+
|
|
43
|
+
# ---------- SESSION STATE ----------
|
|
44
|
+
if "controller" not in st.session_state:
|
|
45
|
+
st.session_state.controller = None
|
|
46
|
+
|
|
47
|
+
if "ui_schema" not in st.session_state:
|
|
48
|
+
st.session_state.ui_schema = []
|
|
49
|
+
|
|
50
|
+
if "plan" not in st.session_state:
|
|
51
|
+
st.session_state.plan = {}
|
|
52
|
+
|
|
53
|
+
# ---------- HEADER ----------
|
|
54
|
+
st.title("🚀 JIT Multi-Agent Factory")
|
|
55
|
+
st.caption("Architect specialized teams and watch them build tools and execute missions.")
|
|
56
|
+
|
|
57
|
+
# ---------- SIDEBAR ----------
|
|
58
|
+
st.sidebar.subheader("Configuration")
|
|
59
|
+
api_key = st.sidebar.text_input(
|
|
60
|
+
"OpenAI API Key",
|
|
61
|
+
type="password",
|
|
62
|
+
value=os.getenv("OPENAI_API_KEY", "")
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
# ---------- INPUT ----------
|
|
66
|
+
user_prompt = st.text_area(
|
|
67
|
+
"What mission should the factory architect?",
|
|
68
|
+
placeholder="e.g. Conduct a deep research on the current AI chip market and generate a summary report.",
|
|
69
|
+
height=120
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
# ---------- BUILD AGENT ----------
|
|
73
|
+
if st.button("🏗️ Architect Mission"):
|
|
74
|
+
if not api_key:
|
|
75
|
+
st.error("❌ API key missing")
|
|
76
|
+
st.stop()
|
|
77
|
+
|
|
78
|
+
try:
|
|
79
|
+
st.session_state.controller = Controller(api_key)
|
|
80
|
+
|
|
81
|
+
with st.status("🏗️ Architecting Multi-Agent System...") as status:
|
|
82
|
+
st.write("Generating Team Mission and Roles...")
|
|
83
|
+
res = st.session_state.controller.build_agent(user_prompt)
|
|
84
|
+
st.session_state.plan = res
|
|
85
|
+
st.session_state.ui_schema = res["ui_schema"]
|
|
86
|
+
st.write("Developing JIT Tool Code for each agent...")
|
|
87
|
+
status.update(label="✅ Team Architected!", state="complete")
|
|
88
|
+
|
|
89
|
+
except Exception as e:
|
|
90
|
+
st.error(f"Error in architecture: {str(e)}")
|
|
91
|
+
|
|
92
|
+
# ---------- RENDER MISSION ----------
|
|
93
|
+
if st.session_state.plan:
|
|
94
|
+
st.markdown(f"""
|
|
95
|
+
<div class="mission-banner">
|
|
96
|
+
<h3>🚀 Automation Objective: {st.session_state.plan['mission']}</h3>
|
|
97
|
+
<p><b>Strategy:</b> {st.session_state.plan.get('execution_strategy', 'Standard Processing')}</p>
|
|
98
|
+
</div>
|
|
99
|
+
""", unsafe_allow_html=True)
|
|
100
|
+
|
|
101
|
+
tab1, tab2, tab3 = st.tabs(["👥 Agent Team", "🔄 Workflow", "💻 Generated Code"])
|
|
102
|
+
|
|
103
|
+
# ---------- TEAM TAB ----------
|
|
104
|
+
with tab1:
|
|
105
|
+
st.subheader("Specialized Agent Team")
|
|
106
|
+
cols = st.columns(len(st.session_state.plan["agents"]))
|
|
107
|
+
for i, agent in enumerate(st.session_state.plan["agents"]):
|
|
108
|
+
with cols[i]:
|
|
109
|
+
st.markdown(f"""
|
|
110
|
+
<div class="agent-card">
|
|
111
|
+
<h4>{agent['name']}</h4>
|
|
112
|
+
<p><small>{agent['role']}</small></p>
|
|
113
|
+
<p><b>Goal:</b> {agent['goal']}</p>
|
|
114
|
+
<p><b>Tools:</b> {', '.join(agent['tools'])}</p>
|
|
115
|
+
</div>
|
|
116
|
+
""", unsafe_allow_html=True)
|
|
117
|
+
|
|
118
|
+
# ---------- WORKFLOW TAB ----------
|
|
119
|
+
with tab2:
|
|
120
|
+
st.subheader("Multi-Step Task Execution Strategy")
|
|
121
|
+
for task in st.session_state.plan["tasks"]:
|
|
122
|
+
st.markdown(f"""
|
|
123
|
+
<div class="task-step">
|
|
124
|
+
<b>Step {task['step']}: {task['name']}</b><br>
|
|
125
|
+
Assigned Agent: <code>{task['agent']}</code><br>
|
|
126
|
+
<i>Description: {task['description']}</i><br>
|
|
127
|
+
Tools utilized: {', '.join(task.get('tools', []))}
|
|
128
|
+
</div>
|
|
129
|
+
""", unsafe_allow_html=True)
|
|
130
|
+
|
|
131
|
+
# ---------- CODE TAB ----------
|
|
132
|
+
with tab3:
|
|
133
|
+
st.subheader("🛠️ Component Source Code")
|
|
134
|
+
st.caption("This is the self-contained Python code for the JIT-generated tools.")
|
|
135
|
+
if "full_code" in st.session_state.plan:
|
|
136
|
+
st.code(st.session_state.plan["full_code"], language="python")
|
|
137
|
+
else:
|
|
138
|
+
st.info("Code not yet architected.")
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
from .orchestrator import Orchestrator
|
|
2
|
+
|
|
3
|
+
class Controller:
|
|
4
|
+
def __init__(self, api_key):
|
|
5
|
+
self.orch = Orchestrator(api_key)
|
|
6
|
+
|
|
7
|
+
def build_agent(self, prompt):
|
|
8
|
+
return self.orch.architect(prompt)
|
|
9
|
+
|
|
10
|
+
def run_agent(self, inputs):
|
|
11
|
+
return self.orch.execute(inputs)
|
|
12
|
+
|
|
13
|
+
def run_tool(self, tool_name, args):
|
|
14
|
+
return self.orch.execute_tool(tool_name, args)
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import json
|
|
2
|
+
import os
|
|
3
|
+
import inspect
|
|
4
|
+
from typing import Dict, Any, List, Optional
|
|
5
|
+
from agno.agent import Agent
|
|
6
|
+
from agno.tools.duckduckgo import DuckDuckGo
|
|
7
|
+
from .planner import Planner
|
|
8
|
+
|
|
9
|
+
class MCPToolDiscovery:
|
|
10
|
+
"""Simulates an MCP Server that provides 'Best Practices' for agent tools."""
|
|
11
|
+
def get_tool_definitions(self, task_type: str) -> str:
|
|
12
|
+
"""Returns the 'Best Practice' code pattern for a given task type."""
|
|
13
|
+
# This acts as an MCP Resource Provider
|
|
14
|
+
patterns = {
|
|
15
|
+
"search": "Use DDGS to find information. Return structured dictionaries.",
|
|
16
|
+
"compare": "Identify key metrics (price, features) and return a sorted JSON list.",
|
|
17
|
+
"automate": "Use requests to simulate interaction or fetch API data."
|
|
18
|
+
}
|
|
19
|
+
return patterns.get(task_type.lower(), "Write clean, self-contained Python functions.")
|
|
20
|
+
|
|
21
|
+
class Orchestrator:
|
|
22
|
+
def __init__(self, api_key: str):
|
|
23
|
+
self.api_key = api_key
|
|
24
|
+
# Ensure the key is available for the Agno Agents
|
|
25
|
+
os.environ["OPENAI_API_KEY"] = api_key
|
|
26
|
+
|
|
27
|
+
# THE ARCHITECT: An autonomous agent instead of just a prompt.
|
|
28
|
+
self.architect_agent = Agent(
|
|
29
|
+
name="Meta-Architect",
|
|
30
|
+
role="Expert Systems Designer & Programmer",
|
|
31
|
+
description="You architect multi-agent systems. Use MCP discovery to find best practices before coding.",
|
|
32
|
+
tools=[MCPToolDiscovery().get_tool_definitions],
|
|
33
|
+
show_tool_calls=True,
|
|
34
|
+
markdown=True
|
|
35
|
+
)
|
|
36
|
+
self.planner = Planner(api_key)
|
|
37
|
+
self.tools: Dict[str, Any] = {}
|
|
38
|
+
self.ui_schema: List[Dict[str, Any]] = []
|
|
39
|
+
|
|
40
|
+
def architect(self, task: str) -> Dict[str, Any]:
|
|
41
|
+
"""Architects the tools and UI using an autonomous reasoning loop."""
|
|
42
|
+
# Step 1: Design the Initial Strategy
|
|
43
|
+
plan_data = self.planner.create_plan(task)
|
|
44
|
+
|
|
45
|
+
# Step 2: The Architect uses its own agentic loop to manifest the manifestation
|
|
46
|
+
# It discovers best practices (MCP) and then generates the JSON
|
|
47
|
+
agent_mission = f"""
|
|
48
|
+
Mission: {plan_data.get('mission')}
|
|
49
|
+
Framework: {plan_data.get('framework')}
|
|
50
|
+
Architecture Strategy: {plan_data.get('execution_strategy')}
|
|
51
|
+
|
|
52
|
+
Your task is to manifest the tools and the full Python source code for this system.
|
|
53
|
+
Manifest it as a valid JSON object with: 'tools', 'full_code', and 'ui_schema'.
|
|
54
|
+
"""
|
|
55
|
+
|
|
56
|
+
# Autonomous execution instead of static prompt
|
|
57
|
+
res = self.architect_agent.run(agent_mission)
|
|
58
|
+
|
|
59
|
+
# Extract JSON from agentic response (Agent returns response.content)
|
|
60
|
+
content = res.content
|
|
61
|
+
# Basic JSON extraction logic
|
|
62
|
+
json_start = content.find('{')
|
|
63
|
+
json_end = content.rfind('}') + 1
|
|
64
|
+
data = json.loads(content[json_start:json_end])
|
|
65
|
+
|
|
66
|
+
self.ui_schema = data["ui_schema"]
|
|
67
|
+
self.full_source_code = data.get("full_code", "# No code generated")
|
|
68
|
+
|
|
69
|
+
# Register tools for local execution
|
|
70
|
+
for t in data["tools"]:
|
|
71
|
+
local_env = {}
|
|
72
|
+
try:
|
|
73
|
+
exec(t["code"], local_env)
|
|
74
|
+
self.tools[t["name"]] = local_env[t["name"]]
|
|
75
|
+
except Exception as e:
|
|
76
|
+
print(f"Error compiling tool {t['name']}: {e}")
|
|
77
|
+
|
|
78
|
+
return {
|
|
79
|
+
"mission": plan_data.get("mission"),
|
|
80
|
+
"agents": plan_data.get("agents"),
|
|
81
|
+
"tasks": plan_data.get("tasks"),
|
|
82
|
+
"ui_schema": self.ui_schema,
|
|
83
|
+
"full_code": self.full_source_code,
|
|
84
|
+
"framework": plan_data.get("framework")
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
def execute(self, inputs: Dict[str, Any]) -> Dict[str, Any]:
|
|
88
|
+
"""Executes the specialized agents sequentially through the tasks."""
|
|
89
|
+
results = {}
|
|
90
|
+
context = inputs.copy() # Shared memory for agents
|
|
91
|
+
|
|
92
|
+
# Sort tasks by step
|
|
93
|
+
sorted_tasks = sorted(self.tasks, key=lambda x: x.get("step", 0))
|
|
94
|
+
|
|
95
|
+
for task in sorted_tasks:
|
|
96
|
+
# Each task uses one or more tools owned by its agent
|
|
97
|
+
step_tools = task.get("tools", [])
|
|
98
|
+
task_results = {}
|
|
99
|
+
|
|
100
|
+
for tool_name in step_tools:
|
|
101
|
+
func = self.tools.get(tool_name)
|
|
102
|
+
if not func:
|
|
103
|
+
continue
|
|
104
|
+
|
|
105
|
+
# Automatically extract valid arguments from context
|
|
106
|
+
sig = inspect.signature(func)
|
|
107
|
+
valid_args = {k: v for k, v in context.items() if k in sig.parameters}
|
|
108
|
+
|
|
109
|
+
try:
|
|
110
|
+
output = func(**valid_args)
|
|
111
|
+
task_results[tool_name] = output
|
|
112
|
+
# Feed output back into context for next agent
|
|
113
|
+
if isinstance(output, dict):
|
|
114
|
+
context.update(output)
|
|
115
|
+
else:
|
|
116
|
+
context[f"{tool_name}_output"] = str(output)
|
|
117
|
+
except Exception as e:
|
|
118
|
+
task_results[tool_name] = {"error": str(e)}
|
|
119
|
+
|
|
120
|
+
results[task["name"]] = task_results
|
|
121
|
+
|
|
122
|
+
return results
|
|
123
|
+
|
|
124
|
+
def execute_tool(self, tool_name: str, args: Dict[str, Any]) -> Any:
|
|
125
|
+
"""Utility to call a single tool."""
|
|
126
|
+
func = self.tools.get(tool_name)
|
|
127
|
+
if not func:
|
|
128
|
+
return f"Tool {tool_name} not found"
|
|
129
|
+
|
|
130
|
+
sig = inspect.signature(func)
|
|
131
|
+
valid_args = {k: v for k, v in args.items() if k in sig.parameters}
|
|
132
|
+
return func(**valid_args)
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import json
|
|
2
|
+
import os
|
|
3
|
+
from typing import Dict, Any, List
|
|
4
|
+
from agno.agent import Agent
|
|
5
|
+
|
|
6
|
+
class MCPMissionDiscovery:
|
|
7
|
+
"""Simulates an MCP Server that provides 'Strategic Blueprints' for missions."""
|
|
8
|
+
def get_mission_patterns(self, mission_type: str) -> str:
|
|
9
|
+
"""Returns the 'Strategic Blueprint' for a given mission type."""
|
|
10
|
+
blueprints = {
|
|
11
|
+
"flight": "Step 1: Discover sites. Step 2: Map parameters. Step 3: Compare results.",
|
|
12
|
+
"research": "Step 1: Scrape data. Step 2: Extract findings. Step 3: Summarize report.",
|
|
13
|
+
"automation": "Step 1: Identify triggers. Step 2: Run loop. Step 3: Format output."
|
|
14
|
+
}
|
|
15
|
+
return blueprints.get(mission_type.lower(), "Design a robust, multi-agent operational flow.")
|
|
16
|
+
|
|
17
|
+
class Planner:
|
|
18
|
+
def __init__(self, api_key: str):
|
|
19
|
+
# Ensure key is available for the Strategy Architect
|
|
20
|
+
os.environ["OPENAI_API_KEY"] = api_key
|
|
21
|
+
|
|
22
|
+
# THE STRATEGY ARCHITECT: A highly technical mission designer.
|
|
23
|
+
self.strategy_agent = Agent(
|
|
24
|
+
name="Strategy-Architect",
|
|
25
|
+
role="Expert Multi-Agent Workflow Architect",
|
|
26
|
+
description="""
|
|
27
|
+
You design deep, functional automation blueprints.
|
|
28
|
+
DO NOT provide generic or short descriptions.
|
|
29
|
+
Each task's 'description' must technically detail how data is being transformed and what logic is applied.
|
|
30
|
+
Tools names must be precise and functional (e.g. 'mmt_expedia_search_aggregator').
|
|
31
|
+
Always aim for production-grade technical detail.
|
|
32
|
+
""",
|
|
33
|
+
tools=[MCPMissionDiscovery().get_mission_patterns],
|
|
34
|
+
markdown=True
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
def create_plan(self, task: str) -> Dict[str, Any]:
|
|
38
|
+
"""Designs a structured multi-agent configuration using an agentic loop."""
|
|
39
|
+
|
|
40
|
+
agent_mission = f"""
|
|
41
|
+
Objective: {task}
|
|
42
|
+
|
|
43
|
+
Design a detailed mission plan.
|
|
44
|
+
Output MUST be a valid JSON with: 'mission', 'framework', 'execution_strategy', 'agents', and 'tasks'.
|
|
45
|
+
"""
|
|
46
|
+
|
|
47
|
+
# Autonomous execution
|
|
48
|
+
res = self.strategy_agent.run(agent_mission)
|
|
49
|
+
|
|
50
|
+
# Extract JSON from agentic response
|
|
51
|
+
content = res.content
|
|
52
|
+
json_start = content.find('{')
|
|
53
|
+
json_end = content.rfind('}') + 1
|
|
54
|
+
return json.loads(content[json_start:json_end])
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: agentic-team-orchestrator
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: A JIT Agent Factory that manifests multi-agent teams using Agno, LangGraph, and CrewAI on the fly.
|
|
5
|
+
Author-email: Parth Bisht <parth@example.com>
|
|
6
|
+
Project-URL: Homepage, https://github.com/parthbisht/agentic-team-orchestrator
|
|
7
|
+
Classifier: Programming Language :: Python :: 3
|
|
8
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
9
|
+
Classifier: Operating System :: OS Independent
|
|
10
|
+
Requires-Python: >=3.9
|
|
11
|
+
Description-Content-Type: text/markdown
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Requires-Dist: streamlit
|
|
14
|
+
Requires-Dist: openai
|
|
15
|
+
Requires-Dist: duckduckgo-search
|
|
16
|
+
Requires-Dist: requests
|
|
17
|
+
Requires-Dist: python-dotenv
|
|
18
|
+
Requires-Dist: agno
|
|
19
|
+
Requires-Dist: crewai
|
|
20
|
+
Requires-Dist: langgraph
|
|
21
|
+
Dynamic: license-file
|
|
22
|
+
|
|
23
|
+
# 🚀 JIT Agentic Team Orchestrator
|
|
24
|
+
|
|
25
|
+
**Understand. Manifest. Architect.**
|
|
26
|
+
|
|
27
|
+
The `agentic-team-orchestrator` is a Meta-Agent platform that dynamically manifests specialized multi-agent teams on-the-fly based on a user mission.
|
|
28
|
+
|
|
29
|
+
## 🌟 Key Features
|
|
30
|
+
- **Dynamic Framework Selection**: Automatically picks the best engine (**Agno, LangGraph, CrewAI, AutoGen**) for your task.
|
|
31
|
+
- **JIT Tool Generation**: Generates real, functional Python tools using `duckduckgo_search` instead of mock logic.
|
|
32
|
+
- **Specialized Team Planner**: Designs Roles, Goals, and Workflows specifically for your mission.
|
|
33
|
+
- **Wonderful UI Visualization**: A Streamlit-based dashboard to visualize agent roles, mission strategy, and generated code.
|
|
34
|
+
|
|
35
|
+
## 🚀 Quick Start
|
|
36
|
+
```bash
|
|
37
|
+
pip install agentic-team-orchestrator
|
|
38
|
+
streamlit run app.py
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## 🛠️ Performance
|
|
42
|
+
- Architect missions in seconds.
|
|
43
|
+
- Manifest complete framework-based source codes instantly.
|
|
44
|
+
- Toggle between functional automation and strategic planning.
|
|
45
|
+
|
|
46
|
+
## 📜 License
|
|
47
|
+
MIT
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
MANIFEST.in
|
|
3
|
+
README.md
|
|
4
|
+
pyproject.toml
|
|
5
|
+
src/agentic_team_orchestrator/__init__.py
|
|
6
|
+
src/agentic_team_orchestrator/app.py
|
|
7
|
+
src/agentic_team_orchestrator/controller.py
|
|
8
|
+
src/agentic_team_orchestrator/orchestrator.py
|
|
9
|
+
src/agentic_team_orchestrator/planner.py
|
|
10
|
+
src/agentic_team_orchestrator.egg-info/PKG-INFO
|
|
11
|
+
src/agentic_team_orchestrator.egg-info/SOURCES.txt
|
|
12
|
+
src/agentic_team_orchestrator.egg-info/dependency_links.txt
|
|
13
|
+
src/agentic_team_orchestrator.egg-info/entry_points.txt
|
|
14
|
+
src/agentic_team_orchestrator.egg-info/requires.txt
|
|
15
|
+
src/agentic_team_orchestrator.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
agentic_team_orchestrator
|