agentops-cockpit 0.4.0__py3-none-any.whl → 0.4.1__py3-none-any.whl

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.
@@ -0,0 +1,71 @@
1
+ import asyncio
2
+ from typing import List, Dict, Any, Optional
3
+ from dataclasses import dataclass
4
+ from rich.console import Console
5
+ from rich.panel import Panel
6
+
7
+ console = Console()
8
+
9
+ @dataclass
10
+ class SwarmMessage:
11
+ sender: str
12
+ recipient: str
13
+ content: str
14
+ evidence_packet: Optional[Dict[str, Any]] = None
15
+
16
+ class MultiAgentOrchestrator:
17
+ """
18
+ Standardizes Swarm/Coordinator patterns using the A2A spec.
19
+ """
20
+
21
+ def __init__(self):
22
+ self.agents: Dict[str, Any] = {}
23
+ self.history: List[SwarmMessage] = []
24
+
25
+ def register_agent(self, name: str, agent_func):
26
+ self.agents[name] = agent_func
27
+ console.print(f"🤖 Agent [bold cyan]{name}[/bold cyan] registered in swarm.")
28
+
29
+ async def dispatch(self, sender: str, recipient: str, message: str):
30
+ """Dispatches a message with an A2A Reasoning Evidence Packet."""
31
+ console.print(f"\n📡 [dim]A2A Transmission:[/dim] [bold]{sender}[/bold] -> [bold]{recipient}[/bold]")
32
+
33
+ # Simulated Evidence Packet for Governance
34
+ evidence = {
35
+ "assurance_score": 0.99,
36
+ "origin_vpc": "secure-engine-zone",
37
+ "pii_scrubbed": True
38
+ }
39
+
40
+ swarm_msg = SwarmMessage(sender, recipient, message, evidence)
41
+ self.history.append(swarm_msg)
42
+
43
+ if recipient in self.agents:
44
+ response = await self.agents[recipient](message, evidence)
45
+ return response
46
+ else:
47
+ return {"error": f"Agent {recipient} not found."}
48
+
49
+ def get_swarm_report(self):
50
+ console.print(Panel.fit("🐝 [bold]Swarm Orchestration Trace[/bold]", border_style="yellow"))
51
+ for msg in self.history:
52
+ console.print(f"[blue]{msg.sender}[/blue] -> [green]{msg.recipient}[/green]: {msg.content}")
53
+
54
+ def run_swarm_demo():
55
+ orchestrator = MultiAgentOrchestrator()
56
+
57
+ async def researcher(query, evidence):
58
+ return f"Research results for {query} (Evidence verified: {evidence['assurance_score']})"
59
+
60
+ async def writer(query, evidence):
61
+ return f"Professional summary of {query}"
62
+
63
+ orchestrator.register_agent("Researcher", researcher)
64
+ orchestrator.register_agent("Writer", writer)
65
+
66
+ loop = asyncio.get_event_loop()
67
+ loop.run_until_complete(orchestrator.dispatch("Orchestrator", "Researcher", "Analyze market trends"))
68
+ orchestrator.get_swarm_report()
69
+
70
+ if __name__ == "__main__":
71
+ run_swarm_demo()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agentops-cockpit
3
- Version: 0.4.0
3
+ Version: 0.4.1
4
4
  Summary: Production-grade Agent Operations (AgentOps) Platform
5
5
  Project-URL: Homepage, https://github.com/enriquekalven/agent-ops-cockpit
6
6
  Project-URL: Bug Tracker, https://github.com/enriquekalven/agent-ops-cockpit/issues
@@ -24,6 +24,8 @@ Description-Content-Type: text/markdown
24
24
 
25
25
  <div align="center">
26
26
  <br />
27
+ <a href="https://agent-cockpit.web.app" target="_blank"><strong>🌐 Official Website & Live Demo</strong></a>
28
+ <br /><br />
27
29
  <a href="https://deploy.cloud.google.com?repo=https://github.com/enriquekalven/agent-cockpit">
28
30
  <img src="https://deploy.cloud.google.com/button.svg" alt="Deploy to Google Cloud" />
29
31
  </a>
@@ -152,9 +154,9 @@ make deploy-prod # 🚀 1-click deploy to Google Cloud
152
154
  ---
153
155
 
154
156
  ## 🧭 Roadmap
155
- - [ ] **One-Click GitHub Action**: Automated audits on every PR.
156
- - [ ] **Multi-Agent Orchestrator**: Support for Swarm/Coordinator patterns.
157
- - [ ] **Visual Mission Control**: Real-time observability dashboard.
157
+ - [x] **One-Click GitHub Action**: Automated governance audits on every PR.
158
+ - [x] **Multi-Agent Orchestrator**: Standardized A2A Swarm/Coordinator patterns.
159
+ - [ ] **Visual Mission Control**: Real-time cockpit observability dashboard.
158
160
 
159
161
  [View full roadmap →](/ROADMAP.md)
160
162
 
@@ -20,11 +20,12 @@ agent_ops_cockpit/ops/orchestrator.py,sha256=WnJ7nv99Ir7lvkWq0EIOEHE2rRzgJv2E4iR
20
20
  agent_ops_cockpit/ops/pii_scrubber.py,sha256=HBRzzYv97f8VqIx2Gse9o6UVf6QWXSuop-xF-wVhuKU,1524
21
21
  agent_ops_cockpit/ops/reliability.py,sha256=Vuh7ZShjZQkXI8CWhL67LeacwEE75JNM6HgRTGLmt7o,2003
22
22
  agent_ops_cockpit/ops/secret_scanner.py,sha256=OKojiW8umarrp5ywS4InCTnzzky1hcdBmOfGa-uVIuE,3124
23
+ agent_ops_cockpit/ops/swarm.py,sha256=wptxkdz-ORr4hqmMeQ3tiqw93U4y4XDBtu4xdVToqeQ,2457
23
24
  agent_ops_cockpit/ops/ui_auditor.py,sha256=3Cmc8i3oMQ9Wa0hSkeR0t_J8_s1c-u1_kj2PwxDGD6o,5542
24
25
  agent_ops_cockpit/shadow/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
25
26
  agent_ops_cockpit/shadow/router.py,sha256=HRsgrrd3sQeabi58Ub8pOaDL9c7j4WpayeT9D8zPvOo,2725
26
- agentops_cockpit-0.4.0.dist-info/METADATA,sha256=nNpVEjWuXzZupMXp2i0upE_RxTlj8FvInjCvDDBu2Hs,8319
27
- agentops_cockpit-0.4.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
28
- agentops_cockpit-0.4.0.dist-info/entry_points.txt,sha256=SOGYPNtUGhMVgxLQ9dEYo7L3M_dvhWEU2eQz2zhaTkY,112
29
- agentops_cockpit-0.4.0.dist-info/licenses/LICENSE,sha256=XNJEk4bvf88tBnKqHdGBGi10l9yJWv2yLWPJvvVie1c,1071
30
- agentops_cockpit-0.4.0.dist-info/RECORD,,
27
+ agentops_cockpit-0.4.1.dist-info/METADATA,sha256=mgrusibi7Cx9GwdqPkenRC--OmNMFV9KqZWce4Vsfo4,8471
28
+ agentops_cockpit-0.4.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
29
+ agentops_cockpit-0.4.1.dist-info/entry_points.txt,sha256=SOGYPNtUGhMVgxLQ9dEYo7L3M_dvhWEU2eQz2zhaTkY,112
30
+ agentops_cockpit-0.4.1.dist-info/licenses/LICENSE,sha256=XNJEk4bvf88tBnKqHdGBGi10l9yJWv2yLWPJvvVie1c,1071
31
+ agentops_cockpit-0.4.1.dist-info/RECORD,,