agentops-cockpit 0.4.0__tar.gz → 0.4.1__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.
Files changed (105) hide show
  1. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/PKG-INFO +6 -4
  2. agentops_cockpit-0.4.1/README.md +153 -0
  3. agentops_cockpit-0.4.1/public/A2A_GUIDE.md +58 -0
  4. agentops_cockpit-0.4.1/public/BE_INTEGRATION_GUIDE.md +35 -0
  5. agentops_cockpit-0.4.1/public/CLI_COMMANDS.md +85 -0
  6. agentops_cockpit-0.4.1/public/DEPLOYMENT.md +84 -0
  7. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/pyproject.toml +1 -1
  8. agentops_cockpit-0.4.1/src/agent_ops_cockpit/ops/swarm.py +71 -0
  9. agentops_cockpit-0.4.1/src/backend/ops/swarm.py +71 -0
  10. agentops_cockpit-0.4.0/public/A2A_GUIDE.md +0 -60
  11. agentops_cockpit-0.4.0/public/BE_INTEGRATION_GUIDE.md +0 -94
  12. agentops_cockpit-0.4.0/public/CLI_COMMANDS.md +0 -65
  13. agentops_cockpit-0.4.0/public/DEPLOYMENT.md +0 -85
  14. agentops_cockpit-0.4.0/public/README.md +0 -104
  15. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/.gitignore +0 -0
  16. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/A2A_GUIDE.md +0 -0
  17. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/BE_INTEGRATION_GUIDE.md +0 -0
  18. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/DEPLOYMENT.md +0 -0
  19. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/Dockerfile +0 -0
  20. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/LICENSE +0 -0
  21. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/Makefile +0 -0
  22. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/firebase.json +0 -0
  23. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/index.html +0 -0
  24. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/package.json +0 -0
  25. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/public/AGENT_OPS_STORY.md +0 -0
  26. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/public/DEVELOPMENT.md +0 -0
  27. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/public/GEMINI.md +0 -0
  28. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/public/GETTING_STARTED.md +0 -0
  29. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1/public}/README.md +0 -0
  30. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/public/cicd-workflow.png +0 -0
  31. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/public/diagrams/agentic-stack.png +0 -0
  32. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/public/diagrams/value-proposition.png +0 -0
  33. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/public/hero.png +0 -0
  34. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/public/og-image.png +0 -0
  35. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/App.tsx +0 -0
  36. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/a2ui/A2UIRenderer.tsx +0 -0
  37. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/a2ui/components/index.tsx +0 -0
  38. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/a2ui/components/lit-component-example.ts +0 -0
  39. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/a2ui/types.ts +0 -0
  40. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/agent_ops_cockpit/__init__.py +0 -0
  41. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/agent_ops_cockpit/cache/__init__.py +0 -0
  42. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/agent_ops_cockpit/cache/semantic_cache.py +0 -0
  43. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/agent_ops_cockpit/cli/__init__.py +0 -0
  44. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/agent_ops_cockpit/cli/main.py +0 -0
  45. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/agent_ops_cockpit/cost_control.py +0 -0
  46. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/agent_ops_cockpit/eval/__init__.py +0 -0
  47. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/agent_ops_cockpit/eval/load_test.py +0 -0
  48. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/agent_ops_cockpit/eval/quality_climber.py +0 -0
  49. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/agent_ops_cockpit/eval/red_team.py +0 -0
  50. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/agent_ops_cockpit/ops/__init__.py +0 -0
  51. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/agent_ops_cockpit/ops/arch_review.py +0 -0
  52. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/agent_ops_cockpit/ops/cost_optimizer.py +0 -0
  53. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/agent_ops_cockpit/ops/evidence.py +0 -0
  54. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/agent_ops_cockpit/ops/frameworks.py +0 -0
  55. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/agent_ops_cockpit/ops/mcp_hub.py +0 -0
  56. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/agent_ops_cockpit/ops/memory_optimizer.py +0 -0
  57. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/agent_ops_cockpit/ops/orchestrator.py +0 -0
  58. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/agent_ops_cockpit/ops/pii_scrubber.py +0 -0
  59. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/agent_ops_cockpit/ops/reliability.py +0 -0
  60. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/agent_ops_cockpit/ops/secret_scanner.py +0 -0
  61. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/agent_ops_cockpit/ops/ui_auditor.py +0 -0
  62. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/agent_ops_cockpit/optimizer.py +0 -0
  63. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/agent_ops_cockpit/shadow/__init__.py +0 -0
  64. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/agent_ops_cockpit/shadow/router.py +0 -0
  65. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/backend/__init__.py +0 -0
  66. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/backend/agent.py +0 -0
  67. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/backend/cache/semantic_cache.py +0 -0
  68. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/backend/cost_control.py +0 -0
  69. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/backend/eval/__init__.py +0 -0
  70. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/backend/eval/load_test.py +0 -0
  71. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/backend/eval/quality_climber.py +0 -0
  72. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/backend/eval/red_team.py +0 -0
  73. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/backend/ops/__init__.py +0 -0
  74. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/backend/ops/arch_review.py +0 -0
  75. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/backend/ops/cost_optimizer.py +0 -0
  76. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/backend/ops/evidence.py +0 -0
  77. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/backend/ops/frameworks.py +0 -0
  78. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/backend/ops/mcp_hub.py +0 -0
  79. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/backend/ops/memory_optimizer.py +0 -0
  80. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/backend/ops/orchestrator.py +0 -0
  81. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/backend/ops/pii_scrubber.py +0 -0
  82. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/backend/ops/reliability.py +0 -0
  83. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/backend/ops/secret_scanner.py +0 -0
  84. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/backend/ops/ui_auditor.py +0 -0
  85. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/backend/optimizer.py +0 -0
  86. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/backend/shadow/router.py +0 -0
  87. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/backend/tests/test_agent.py +0 -0
  88. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/backend/tests/test_arch_review.py +0 -0
  89. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/backend/tests/test_frameworks.py +0 -0
  90. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/backend/tests/test_optimizer.py +0 -0
  91. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/backend/tests/test_quality_climber.py +0 -0
  92. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/backend/tests/test_red_team.py +0 -0
  93. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/backend/tests/test_secret_scanner.py +0 -0
  94. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/components/FlightRecorder.tsx +0 -0
  95. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/components/Home.tsx +0 -0
  96. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/components/OpsDashboard.tsx +0 -0
  97. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/components/Playground.tsx +0 -0
  98. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/components/ThemeToggle.tsx +0 -0
  99. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/docs/DocLayout.tsx +0 -0
  100. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/docs/DocPage.tsx +0 -0
  101. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/index.css +0 -0
  102. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/knowledge/example_policy.txt +0 -0
  103. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/src/main.tsx +0 -0
  104. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/tsconfig.json +0 -0
  105. {agentops_cockpit-0.4.0 → agentops_cockpit-0.4.1}/vite.config.ts +0 -0
@@ -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
 
@@ -0,0 +1,153 @@
1
+ # 🕹️ AgentOps Cockpit
2
+
3
+ <div align="center">
4
+ <img src="https://raw.githubusercontent.com/enriquekalven/agent-cockpit/main/public/og-image.png" alt="AgentOps Cockpit Social Preview" width="100%" />
5
+ </div>
6
+
7
+ <div align="center">
8
+ <br />
9
+ <a href="https://agent-cockpit.web.app" target="_blank"><strong>🌐 Official Website & Live Demo</strong></a>
10
+ <br /><br />
11
+ <a href="https://deploy.cloud.google.com?repo=https://github.com/enriquekalven/agent-cockpit">
12
+ <img src="https://deploy.cloud.google.com/button.svg" alt="Deploy to Google Cloud" />
13
+ </a>
14
+ <br />
15
+ <br />
16
+ <img src="https://img.shields.io/github/stars/enriquekalven/agent-cockpit?style=for-the-badge&color=ffd700" alt="GitHub Stars" />
17
+ <img src="https://img.shields.io/github/license/enriquekalven/agent-cockpit?style=for-the-badge&color=007bff" alt="License" />
18
+ <img src="https://img.shields.io/badge/Google-Well--Architected-4285F4?style=for-the-badge&logo=google-cloud" alt="Google Well-Architected" />
19
+ <img src="https://img.shields.io/badge/A2A_Standard-Enabled-10b981?style=for-the-badge" alt="A2A Standard" />
20
+ </div>
21
+
22
+ <br />
23
+
24
+ <div align="center">
25
+ <h3>"Infrastructure gives you the pipes. We give you the Intelligence."</h3>
26
+ <p>The developer distribution for building, optimizing, and securing AI agents on Google Cloud.</p>
27
+ </div>
28
+
29
+ ---
30
+
31
+ ## 📽️ The Mission
32
+ Most AI agent templates stop at a single Python file and an API key. **The AgentOps Cockpit** is for developers moving into production. It provides framework-agnostic governance, safety, and cost guardrails for the entire agentic ecosystem.
33
+
34
+ ### Key Pillars:
35
+ - **Governance-as-Code**: Audit your agent against [Google Well-Architected](/docs/google-architecture) best practices.
36
+ - **Agentic Trinity**: Dedicated layers for the Engine (Logic), Face (UX), and Cockpit (Ops).
37
+ - **A2A Connectivity**: Implements the [Agent-to-Agent Transmission Standard](/A2A_GUIDE.md) for secure swarm orchestration.
38
+
39
+ ---
40
+
41
+ ## 🏗️ The Agentic Trinity
42
+ We divide the complexity of production agents into three focused pillars:
43
+
44
+ - **⚙️ The Engine**: The reasoning core. Built with **ADK**, FastAPI, and Vertex AI.
45
+ - **🎭 The Face**: The user experience. Adaptive UI surfaces and **GenUI** standards via the A2UI spec.
46
+ - **🕹️ The Cockpit**: The operational brain. Cost control, semantic caching, shadow routing, and adversarial audits.
47
+
48
+ ---
49
+
50
+ ## 🌐 Framework Agnostic Governance
51
+ The Cockpit isn't just for ADK. It provides **Best Practices as Code** across all major agentic frameworks:
52
+
53
+ <div align="center">
54
+ <img src="https://img.shields.io/badge/OpenAI_Agentkit-412991?style=for-the-badge&logo=openai" alt="OpenAI Agentkit" />
55
+ <img src="https://img.shields.io/badge/Anthropic_Claude-D97757?style=for-the-badge&logo=anthropic" alt="Anthropic" />
56
+ <img src="https://img.shields.io/badge/Microsoft_AutoGen-0078d4?style=for-the-badge&logo=microsoft" alt="Microsoft" />
57
+ <img src="https://img.shields.io/badge/AWS_Bedrock-FF9900?style=for-the-badge&logo=amazon-aws" alt="AWS" />
58
+ <img src="https://img.shields.io/badge/CopilotKit.ai-6366f1?style=for-the-badge" alt="CopilotKit" />
59
+ <img src="https://img.shields.io/badge/LangChain-1C3C3C?style=for-the-badge" alt="LangChain" />
60
+ <img src="https://img.shields.io/badge/ADK-4285F4?style=for-the-badge&logo=google-cloud" alt="ADK" />
61
+ </div>
62
+
63
+ <div align="center">
64
+ <img src="https://img.shields.io/badge/Python-3776AB?style=flat-square&logo=python&logoColor=white" alt="Python" />
65
+ <img src="https://img.shields.io/badge/Go-00ADD8?style=flat-square&logo=go&logoColor=white" alt="Go" />
66
+ <img src="https://img.shields.io/badge/NodeJS-339933?style=flat-square&logo=node.js&logoColor=white" alt="NodeJS" />
67
+ <img src="https://img.shields.io/badge/TypeScript-3178C6?style=flat-square&logo=typescript&logoColor=white" alt="TypeScript" />
68
+ <img src="https://img.shields.io/badge/Streamlit-FF4B4B?style=flat-square&logo=streamlit&logoColor=white" alt="Streamlit" />
69
+ <img src="https://img.shields.io/badge/Angular-DD0031?style=flat-square&logo=angular&logoColor=white" alt="Angular" />
70
+ <img src="https://img.shields.io/badge/Lit-324FFF?style=flat-square&logo=lit&logoColor=white" alt="Lit" />
71
+ </div>
72
+
73
+ Whether you are building a swarm in **CrewAI**, a Go-based high-perf engine, or a **Streamlit** dashboard, the Cockpit ensures your agent maps to the **Google Well-Architected Framework**.
74
+
75
+
76
+ ---
77
+
78
+ ## 🚀 Key Innovation: The "Intelligence" Layer
79
+
80
+ ### 🛡️ Red Team Auditor (Self-Hacking)
81
+ Don't wait for your users to find prompt injections. Use the built-in Adversarial Evaluator to launch self-attacks against your agent, testing for PII leaks, instruction overrides, and safety filter bypasses.
82
+
83
+ ### 🧠 Hive Mind (Semantic Caching)
84
+ **Reduce LLM costs by up to 40%.** The Hive Mind checks for semantically similar queries in 10ms, serving cached answers for common questions without calling the LLM.
85
+
86
+ ### 🏛️ Arch Review & Framework Detection
87
+ Every agent in the cockpit is graded against a framework-aware checklist. The Cockpit intelligently detects your stack—**Google ADK**, **OpenAI Agentkit**, **Anthropic Claude**, **Microsoft AutoGen/Semantic Kernel**, **AWS Bedrock Agents**, or **CopilotKit**—and runs a tailored audit against corresponding production standards. Use `make arch-review` to verify your **Governance-as-Code**.
88
+
89
+ ### 🕹️ MCP Connectivity Hub (Model Context Protocol)
90
+ Stop building one-off tool integrations. The Cockpit provides a unified hub for **MCP Servers**. Connect to Google Search, Slack, or your internal databases via the standardized Model Context Protocol for secure, audited tool execution.
91
+
92
+ ### 🧗 Quality Hill Climbing (ADK Evaluation)
93
+ Following **Google ADK Evaluation** best practices, the Cockpit provides an iterative optimization loop. `make quality-baseline` runs your agent against a "Golden Dataset" using **LLM-as-a-Judge** scoring (Response Match & Tool Trajectory), climbing the quality curve until production-grade fidelity is reached.
94
+
95
+ ---
96
+
97
+ ## ⌨️ Quick Start
98
+
99
+ The Cockpit is available as a first-class CLI on PyPI.
100
+
101
+ ```bash
102
+ # 1. Install the Cockpit globally
103
+ pip install agentops-cockpit
104
+
105
+ # 2. Audit your existing agent design
106
+ agent-ops arch-review
107
+
108
+ # 3. Stress test your endpoint
109
+ agent-ops load-test --requests 100 --concurrency 10
110
+
111
+ # 4. Scaffold a new Well-Architected app
112
+ agent-ops create my-agent --ui a2ui
113
+ ```
114
+
115
+ You can also use `uvx` for one-off commands without installation:
116
+ ```bash
117
+ uvx agentops-cockpit arch-review
118
+ ```
119
+
120
+ ---
121
+
122
+ ## 📊 Local Development
123
+ The Cockpit provides a unified "Mission Control" to evaluate your agents instantly.
124
+
125
+ ```bash
126
+ make audit-all # 🕹️ Run ALL audits and generate a Final Report
127
+ make reliability # 🛡️ Run unit tests and regression suite
128
+ make dev # Start the local Engine + Face stack
129
+ make arch-review # 🏛️ Run the Google Well-Architected design review
130
+ make quality-baseline # 🧗 Run iterative 'Hill Climbing' quality audit
131
+ make audit # 🔍 Run the Interactive Agent Optimizer
132
+ make red-team # Execute a white-hat security audit
133
+ make deploy-prod # 🚀 1-click deploy to Google Cloud
134
+ ```
135
+
136
+ ---
137
+
138
+ ## 🧭 Roadmap
139
+ - [x] **One-Click GitHub Action**: Automated governance audits on every PR.
140
+ - [x] **Multi-Agent Orchestrator**: Standardized A2A Swarm/Coordinator patterns.
141
+ - [ ] **Visual Mission Control**: Real-time cockpit observability dashboard.
142
+
143
+ [View full roadmap →](/ROADMAP.md)
144
+
145
+ ---
146
+
147
+ ## 🤝 Community
148
+ - **Star this repo** to help us build the future of AgentOps.
149
+ - **Join the Discussion** for patterns on Google Cloud.
150
+ - **Contribute**: Read our [Contributing Guide](/CONTRIBUTING.md).
151
+
152
+ ---
153
+ *Reference: [Google Cloud Architecture Center - Agentic AI Overview](https://docs.cloud.google.com/architecture/agentic-ai-overview)*
@@ -0,0 +1,58 @@
1
+ # 📡 Agent-to-Agent (A2A) Transmission Standard
2
+
3
+ Building a single agent is easy. Building a **Swarm** of agents that communicate securely and efficiently is the next frontier of AgentOps. The Cockpit implements the **A2A Transmission Standard** to ensure that your "Agent Trinity" remains Well-Architected.
4
+
5
+ ## 🏛️ The A2A Protocol Stack
6
+
7
+ | Layer | Responsibility | Protocol / Spec |
8
+ | :--- | :--- | :--- |
9
+ | **Surface** | Human-Agent Interaction | [A2UI Spec](/docs/a2ui) |
10
+ | **Memory** | Cross-Agent Knowledge | [Vector Workspace (Hive Mind)](/src/backend/cache) |
11
+ | **Logic** | Tool & Reasoning Handshake | [A2P Handshake](#a2p-handshake) |
12
+ | **Security** | Identity & Permissions | [GCP Workload Identity](https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity) |
13
+
14
+ ---
15
+
16
+ ## 🤝 The A2P Handshake (Agent-to-Proxy)
17
+
18
+ When one agent calls another tool, it shouldn't just send raw text. It must send a **Reasoning Evidence Packet**.
19
+
20
+ ### ❌ The "Old" Way (Brittle)
21
+ ```json
22
+ {
23
+ "query": "What is the budget?",
24
+ "output": "The budget is $500k."
25
+ }
26
+ ```
27
+
28
+ ### ✅ The "Cockpit" Way (Well-Architected)
29
+ ```json
30
+ {
31
+ "trace_id": "tr-9942-x",
32
+ "reasoning_path": ["Fetch Schema", "Query BigQuery", "Apply PIIScrubber"],
33
+ "evidence": [
34
+ { "source": "bq://finance.budget_2026", "assurance_score": 0.98 }
35
+ ],
36
+ "content": {
37
+ "text": "The approved budget is $500k.",
38
+ "a2ui_surface": "DynamicBudgetChart"
39
+ }
40
+ }
41
+ ```
42
+
43
+ ## 🛡️ Governance-as-Code for Swarms
44
+
45
+ On the Cockpit, every A2A transmission is automatically:
46
+ 1. **Scrubbed**: PII is removed before leaving the Engine's VPC.
47
+ 2. **Cached**: Similar cross-agent queries hit the **Hive Mind** instead of expensive LLM reasoning.
48
+ 3. **Audited**: The `arch-review` tool verifies that your multi-agent graph doesn't have "Shadow Loops" (recursive infinite spend).
49
+
50
+ ---
51
+
52
+ ## ⚡ Get Started with A2A
53
+ Use the Cockpit CLI to verify your multi-agent communication:
54
+ ```bash
55
+ agent-ops audit --mode swarm --file multi_agent_entry.py
56
+ ```
57
+
58
+ *This standard is being proposed to the Google Well-Architected Framework for AI Agents committee.*
@@ -0,0 +1,35 @@
1
+ # ⚙️ Engine Integration: The Day 0 Brain
2
+
3
+ The **Engine** is the reasoning core of your Agentic Stack. We use **FastAPI** and Google’s **Agent Development Kit (ADK)** to build agents that are fast, tool-capable, and "Well-Architected."
4
+
5
+ ## 🧩 Middleware Components
6
+ The Engine comes pre-installed with the **Cockpit Middleware Stack**:
7
+
8
+ 1. **`CostOptimizer`**: Real-time token tracking and savings recommendations.
9
+ 2. **`PIIScrubber`**: Automatic masking of sensitive user data.
10
+ 3. **`SemanticCache`**: Integrated with the "Hive Mind" for 40%+ cost reduction.
11
+ 4. **`MemoryOptimizer`**: Automates context truncation and summarization.
12
+
13
+ ## 🛠️ Tool Orchestration (ADK)
14
+ We recommend building your tools as **MCP (Model Context Protocol)** or **ADK Extensions**. This ensures that the agent can discover and invoke them with high reliability.
15
+
16
+ ```python
17
+ # Example Tool in src/backend/tools/search.py
18
+ from adk import Tool
19
+
20
+ @Tool
21
+ def search_docs(query: str):
22
+ """Searches the knowledge base for agent-ops documentation."""
23
+ return get_search_results(query)
24
+ ```
25
+
26
+ ## 🏗️ The Agentic Flow
27
+ A "Well-Architected" flow always follows this sequence:
28
+ 1. **Sanitize**: Input passes through the `PIIScrubber`.
29
+ 2. **Cache Check**: `Hive Mind` checks for a semantic hit.
30
+ 3. **Reason**: Gemini 2.0 reasoning loop via Vertex AI.
31
+ 4. **Action**: Tool execution via ADK.
32
+ 5. **Pack**: Final output is wrapped in an `EvidencePacket` for transparency.
33
+
34
+ ## 🏛️ Grounding
35
+ To prevent hallucinations, ensure all tool outputs are grounded in your data sources. Use the `EvidenceNode` class to report the sources used in your final response.
@@ -0,0 +1,85 @@
1
+ # Optimized Agent Stack: CLI & Cockpit Reference
2
+
3
+ The **Optimized Agent Stack** provides a comprehensive set of tools for both building (Scaffolding) and managing (Operations) AI agents.
4
+
5
+ ## 1. Installation & Scaffolding (Day 0)
6
+
7
+ The AgentOps Cockpit is available as a professional CLI on PyPI.
8
+
9
+ ### Install globally:
10
+ ```bash
11
+ pip install agentops-cockpit
12
+ ```
13
+
14
+ ### Scaffold a new project:
15
+ ```bash
16
+ # Creates a new Well-Architected agent repo
17
+ agent-ops create my-agent --ui a2ui
18
+ ```
19
+
20
+ ---
21
+
22
+ ## 2. Operations & Auditing (The Cockpit)
23
+
24
+ Run these commands inside any agent repository to verify governance-as-code.
25
+
26
+ ### `agent-ops arch-review`
27
+ Audits agent design against the **Google Well-Architected Framework**.
28
+ * **Detection**: Automatically detects frameworks (LangGraph, ADK, CrewAI).
29
+ * **Gap Analysis**: Identifies architectural weaknesses in security, cost, and reliability.
30
+
31
+ ### `agent-ops audit`
32
+ Runs the **Interactive Agent Optimizer** on specific logic files.
33
+ * **Scanning**: Checks for token waste, missing cache, or inefficient model routing.
34
+ * **Proposals**: Suggests localized code improvements with an interactive diff viewer.
35
+ * **Optimization**: Defaults to `agent.py`.
36
+
37
+ ### `agent-ops red-team`
38
+ Unleashes adversarial security evaluations.
39
+ * **Stress Test**: Simulates prompt injections, PII leaks, and jailbreak attempts.
40
+ * **Safety Grade**: Provides a pass/fail grade for production readiness.
41
+
42
+ ### `agent-ops report`
43
+ The "Full Mission Sweep". Runs all audits (Arch, Quality, Security, Cost) and generates a comprehensive `cockpit_final_report.md`.
44
+
45
+ ---
46
+
47
+ ### Tool Usage Optimization (MCP Hub)
48
+ Instead of using fragmented Tool APIs, the **Optimized Agent Stack** provides a unified **MCP (Model Context Protocol) Hub**. This allows you to connect to any industry-standard tool server (Google Search, SQL, Slack) with a single interface.
49
+
50
+ ```python
51
+ from agent_ops_cockpit.ops.mcp_hub import global_mcp_hub
52
+
53
+ # 1. Register an MCP server (e.g., Google Search)
54
+ global_mcp_hub.register_server(
55
+ "google-search",
56
+ "npx",
57
+ ["-y", "@modelcontextprotocol/server-google-search"]
58
+ )
59
+
60
+ # 2. Execute tools via standardized MCP protocol
61
+ result = await global_mcp_hub.execute_tool("search", {"q": "Vertex AI updates"})
62
+ ```
63
+ Govern all execution metrics via the Cockpit dashboard.
64
+
65
+ ---
66
+
67
+ ## 3. Operations Dashboard (Cockpit UI)
68
+
69
+ Navigate to `/ops` on your deployed or local instance to access the **Control Plane**.
70
+
71
+ * **Shadow Mode Router**: Compare v1 vs v2 responses in real-time.
72
+ * **Flight Recorder**: Step-through visual scrubber for agent thought chains.
73
+ * **Semantic Cache Stats**: Real-time visualization of cost savings from the "Hive Mind" cache.
74
+ * **MCP Hub Status**: Monitor the health of standardized tool connections.
75
+
76
+ ---
77
+
78
+ ## 4. Google Cloud Setup
79
+
80
+ To initialize the environment for the first time, use the setup script:
81
+ ```bash
82
+ chmod +x setup_gcp.sh
83
+ ./setup_gcp.sh
84
+ ```
85
+ This configures Artifact Registry, enables APIs, and runs the initial security evaluation.
@@ -0,0 +1,84 @@
1
+ # 🚀 Production Deployment
2
+
3
+ Deploying a "Well-Architected" agent requires orchestration across two primary Google Cloud environments.
4
+
5
+ ## ⚙️ The Engine (Cloud Run)
6
+ The Python backend (FastAPI) is deployed as a serverless service.
7
+ - **Scaling**: We default to scale-to-zero to minimize costs during idle time.
8
+ - **Regions**: Always deploy to `us-central1` or your local equivalent for lowest latency to Vertex AI endpoints.
9
+ - **Best Practice**: Enable **Startup CPU Boost** to reduce cold-start latency by up to 50%.
10
+
11
+ ## 🧠 Agent Engine (Vertex AI Reasoning Engine)
12
+ Recommended for agents that require deep integration with the Google Cloud agentic ecosystem.
13
+ - **Why**: Provides a managed runtime that handles serialization, versioning, and built-in tracing.
14
+ - **Best Practice**: Use **Context Caching** for agents with extremely long system instructions (>32k tokens).
15
+
16
+ ## ☸️ Enterprise Engine (GKE)
17
+ Recommended for agents with specialized isolation needs or high-intensity workloads.
18
+ - **Why**: Provides the highest level of control over networking (Service Mesh) and compute resources (GPUs).
19
+ - **Best Practice**: Use **Workload Identity** to assign fine-grained IAM roles to your K8s service accounts.
20
+
21
+ ---
22
+
23
+ ## 📊 Infrastructure Decision Matrix
24
+
25
+ | Feature | Agent Engine | Cloud Run | GKE |
26
+ | :--- | :--- | :--- | :--- |
27
+ | **Orchestration** | Managed (ADK) | Custom (FastAPI) | Custom (K8s) |
28
+ | **Scaling** | Automatic | Scale-to-Zero | Dynamic / GPU |
29
+ | **Observability** | Vertex AI Traces | Cloud Logging/Trace | Prometheus / Istio |
30
+ | **Best Case** | Fast ADK Prototyping | Standard Web Agents | High-Perf Enterprise |
31
+
32
+ ---
33
+
34
+ ## 🎭 The Face (Firebase Hosting)
35
+ The React/Vite frontend is deployed to Firebase for globally distributed edge performance.
36
+ - **Protocol**: Ensure all components use the **A2UI Protocol** for consistent engine-driven rendering.
37
+ - **Responsiveness**: Use mobile-first breakpoints to support iOS and Android high-density displays.
38
+ - **Accessibility**: All interactive elements must have `aria-labels` to support automated testing in the Cockpit.
39
+ - **Performance**: Split large components (>300 lines) to optimize React's virtual DOM reconciliation.
40
+
41
+ ---
42
+
43
+ ## 🏗️ Deployment Workflow
44
+
45
+ We use a **1-click deployment** strategy that builds safety into the process:
46
+
47
+ ```bash
48
+ make deploy-prod
49
+ ```
50
+
51
+ ### The "Safe-Build" Sequence:
52
+ 1. **Audit Phase**: The Cockpit runs `arch-review` (design) and `audit` (cost).
53
+ 2. **Security Phase**: Executes `red-team` to ensure no public breaches exist in the latest code.
54
+ 3. **Build Phase**: Compiles the React application and optimizes static assets.
55
+ 4. **Push Phase**:
56
+ - Containerizes the Engine and pushes to **Artifact Registry**.
57
+ - Deploys the container to **Cloud Run**.
58
+ - Deploys static assets to **Firebase Hosting**.
59
+
60
+ ## 🛡️ Staging & Traffic Splitting
61
+ We recommend using Cloud Run **Revisions** for canary deployments:
62
+ - Deploy 5% of traffic to your new Revision.
63
+ - Monitor the **Cockpit Dashboard** for error rate anomalies.
64
+ - Promote to 100% when satisfied.
65
+
66
+ ## 🤖 Automated CI/CD (GitHub Actions)
67
+
68
+ The AgentOps Cockpit is designed for "Policy-as-Code." Every commit to `main` triggers an automated governance pipeline that ensures your agent never regresses in quality or security.
69
+
70
+ ![CI/CD Workflow](/public/cicd-workflow.png)
71
+
72
+ ### The Automated Pipeline:
73
+ 1. **Architecture Audit**: Scans for design alignment with the detected framework (LangGraph, ADK, etc.).
74
+ 2. **Red Team Evaluation**: Automatically tests for prompt injection and instruction overrides on every PR.
75
+ 3. **Token Optimization**: Identifies non-cached prompts and expensive model routing before deployment.
76
+ 4. **Reliability Suite**: Runs all unit tests and regression checks against the core engine.
77
+
78
+ Refer to `.github/workflows/agent-ops-audit.yml` for the full pipeline definition.
79
+
80
+
81
+ ## 🔑 Secret Management
82
+ Never commit `.env` files. Use **Google Cloud Secret Manager**:
83
+ - Store your `GOOGLE_API_KEY` and third-party tool tokens.
84
+ - Map them as environment variables in your Cloud Run configuration.
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "agentops-cockpit"
7
- version = "0.4.0"
7
+ version = "0.4.1"
8
8
  description = "Production-grade Agent Operations (AgentOps) Platform"
9
9
  readme = "README.md"
10
10
  authors = [
@@ -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()
@@ -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,60 +0,0 @@
1
- # A2A (Agent-to-Agent) Protocol Guide
2
-
3
- The **Agent-to-Agent (A2A) Protocol** is a core part of the ADK ecosystem, enabling distributed agent architectures and seamless communication between different agentic services.
4
-
5
- ## 📡 What is A2A?
6
-
7
- While A2UI focuses on how agents talk to *users*, A2A focuses on how agents talk to *each other*. It provides a standardized way for an agent to:
8
- 1. **Discover** other agents' capabilities.
9
- 2. **Call** other agents as tools.
10
- 3. **Stream** results (including A2UI payloads) back to a controller agent.
11
-
12
- ## 🛠️ Implementation Patterns
13
-
14
- ### 1. Exposing an Agent as an A2A Service
15
- You can wrap any `LlmAgent` into a FastAPI-based A2A server using the `to_a2a` utility.
16
-
17
- ```python
18
- from google.adk.a2a.utils.agent_to_a2a import to_a2a
19
- from my_project.agents import MyExpertAgent
20
-
21
- expert_agent = MyExpertAgent(...)
22
- a2a_app = to_a2a(expert_agent, port=8001)
23
- ```
24
-
25
- ### 2. Communicating via RemoteA2aAgent
26
- A controller agent can interact with a remote A2A service as if it were a local tool.
27
-
28
- ```python
29
- from google.adk.a2a.remote_a2a_agent import RemoteA2aAgent
30
-
31
- # Point to the remote agent's descriptor
32
- remote_expert = RemoteA2aAgent(
33
- name="expert_proxy",
34
- agent_card="http://expert-service:8001/a2a/expert/.well-known/agent.json"
35
- )
36
-
37
- # Add it to your main agent's toolset
38
- orchestrator = LlmAgent(
39
- tools=[remote_expert],
40
- ...
41
- )
42
- ```
43
-
44
- ## 🔄 A2A + A2UI
45
- When a remote agent generates A2UI content, the `A2aAgentExecutor` automatically handles the conversion of tool outputs into A2A parts, ensuring the final client receives a correctly formatted UI.
46
-
47
- ```python
48
- from a2ui.send_a2ui_to_client_toolset import convert_send_a2ui_to_client_genai_part_to_a2a_part
49
-
50
- config = A2aAgentExecutorConfig(
51
- genai_part_converter=convert_send_a2ui_to_client_genai_part_to_a2a_part
52
- )
53
- executor = A2aAgentExecutor(config)
54
- ```
55
-
56
- ## 🌐 Enterprise Mesh & MCP
57
- In a production environment, A2A agents are registered and optimized via the **MCP Tool Hub**. Using the **Model Context Protocol (MCP)** ensures that cross-agent calls are standardized, secure, and audited by the Cockpit.
58
-
59
- * **Discovery**: The MCP Hub automatically discovers registered A2A agents.
60
- * **Optimization**: The Cockpit's Interactive Optimizer flags high-latency A2A calls and suggests tool-caching strategies.