iflow-mcp-m507_ai-soc-agent 1.0.0__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.
Files changed (85) hide show
  1. iflow_mcp_m507_ai_soc_agent-1.0.0.dist-info/METADATA +410 -0
  2. iflow_mcp_m507_ai_soc_agent-1.0.0.dist-info/RECORD +85 -0
  3. iflow_mcp_m507_ai_soc_agent-1.0.0.dist-info/WHEEL +5 -0
  4. iflow_mcp_m507_ai_soc_agent-1.0.0.dist-info/entry_points.txt +2 -0
  5. iflow_mcp_m507_ai_soc_agent-1.0.0.dist-info/licenses/LICENSE +21 -0
  6. iflow_mcp_m507_ai_soc_agent-1.0.0.dist-info/top_level.txt +1 -0
  7. src/__init__.py +8 -0
  8. src/ai_controller/README.md +139 -0
  9. src/ai_controller/__init__.py +12 -0
  10. src/ai_controller/agent_executor.py +596 -0
  11. src/ai_controller/cli/__init__.py +2 -0
  12. src/ai_controller/cli/main.py +243 -0
  13. src/ai_controller/session_manager.py +409 -0
  14. src/ai_controller/web/__init__.py +2 -0
  15. src/ai_controller/web/server.py +1181 -0
  16. src/ai_controller/web/static/css/README.md +102 -0
  17. src/api/__init__.py +13 -0
  18. src/api/case_management.py +271 -0
  19. src/api/edr.py +187 -0
  20. src/api/kb.py +136 -0
  21. src/api/siem.py +308 -0
  22. src/core/__init__.py +10 -0
  23. src/core/config.py +242 -0
  24. src/core/config_storage.py +684 -0
  25. src/core/dto.py +50 -0
  26. src/core/errors.py +36 -0
  27. src/core/logging.py +128 -0
  28. src/integrations/__init__.py +8 -0
  29. src/integrations/case_management/__init__.py +5 -0
  30. src/integrations/case_management/iris/__init__.py +11 -0
  31. src/integrations/case_management/iris/iris_client.py +885 -0
  32. src/integrations/case_management/iris/iris_http.py +274 -0
  33. src/integrations/case_management/iris/iris_mapper.py +263 -0
  34. src/integrations/case_management/iris/iris_models.py +128 -0
  35. src/integrations/case_management/thehive/__init__.py +8 -0
  36. src/integrations/case_management/thehive/thehive_client.py +193 -0
  37. src/integrations/case_management/thehive/thehive_http.py +147 -0
  38. src/integrations/case_management/thehive/thehive_mapper.py +190 -0
  39. src/integrations/case_management/thehive/thehive_models.py +125 -0
  40. src/integrations/cti/__init__.py +6 -0
  41. src/integrations/cti/local_tip/__init__.py +10 -0
  42. src/integrations/cti/local_tip/local_tip_client.py +90 -0
  43. src/integrations/cti/local_tip/local_tip_http.py +110 -0
  44. src/integrations/cti/opencti/__init__.py +10 -0
  45. src/integrations/cti/opencti/opencti_client.py +101 -0
  46. src/integrations/cti/opencti/opencti_http.py +418 -0
  47. src/integrations/edr/__init__.py +6 -0
  48. src/integrations/edr/elastic_defend/__init__.py +6 -0
  49. src/integrations/edr/elastic_defend/elastic_defend_client.py +351 -0
  50. src/integrations/edr/elastic_defend/elastic_defend_http.py +162 -0
  51. src/integrations/eng/__init__.py +10 -0
  52. src/integrations/eng/clickup/__init__.py +8 -0
  53. src/integrations/eng/clickup/clickup_client.py +513 -0
  54. src/integrations/eng/clickup/clickup_http.py +156 -0
  55. src/integrations/eng/github/__init__.py +8 -0
  56. src/integrations/eng/github/github_client.py +169 -0
  57. src/integrations/eng/github/github_http.py +158 -0
  58. src/integrations/eng/trello/__init__.py +8 -0
  59. src/integrations/eng/trello/trello_client.py +207 -0
  60. src/integrations/eng/trello/trello_http.py +162 -0
  61. src/integrations/kb/__init__.py +12 -0
  62. src/integrations/kb/fs_kb_client.py +313 -0
  63. src/integrations/siem/__init__.py +6 -0
  64. src/integrations/siem/elastic/__init__.py +6 -0
  65. src/integrations/siem/elastic/elastic_client.py +3319 -0
  66. src/integrations/siem/elastic/elastic_http.py +165 -0
  67. src/mcp/README.md +183 -0
  68. src/mcp/TOOLS.md +2827 -0
  69. src/mcp/__init__.py +13 -0
  70. src/mcp/__main__.py +18 -0
  71. src/mcp/agent_profiles.py +408 -0
  72. src/mcp/flow_agent_profiles.py +424 -0
  73. src/mcp/mcp_server.py +4086 -0
  74. src/mcp/rules_engine.py +487 -0
  75. src/mcp/runbook_manager.py +264 -0
  76. src/orchestrator/__init__.py +11 -0
  77. src/orchestrator/incident_workflow.py +244 -0
  78. src/orchestrator/tools_case.py +1085 -0
  79. src/orchestrator/tools_cti.py +359 -0
  80. src/orchestrator/tools_edr.py +315 -0
  81. src/orchestrator/tools_eng.py +378 -0
  82. src/orchestrator/tools_kb.py +156 -0
  83. src/orchestrator/tools_siem.py +1709 -0
  84. src/web/__init__.py +8 -0
  85. src/web/config_server.py +511 -0
@@ -0,0 +1,410 @@
1
+ Metadata-Version: 2.4
2
+ Name: iflow-mcp-m507_ai-soc-agent
3
+ Version: 1.0.0
4
+ Summary: AI-powered security investigation and incident response platform through MCP
5
+ Author: M507
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/M507/ai-soc-agent
8
+ Project-URL: Documentation, https://github.com/M507/ai-soc-agent#readme
9
+ Project-URL: Repository, https://github.com/M507/ai-soc-agent
10
+ Project-URL: Issues, https://github.com/M507/ai-soc-agent/issues
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Intended Audience :: System Administrators
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.9
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Topic :: Security
20
+ Classifier: Topic :: System :: Systems Administration
21
+ Requires-Python: >=3.9
22
+ Description-Content-Type: text/markdown
23
+ License-File: LICENSE
24
+ Requires-Dist: requests>=2.31.0
25
+ Requires-Dist: fastapi>=0.104.0
26
+ Requires-Dist: uvicorn[standard]>=0.24.0
27
+ Requires-Dist: python-multipart>=0.0.6
28
+ Requires-Dist: websockets>=12.0
29
+ Provides-Extra: dev
30
+ Requires-Dist: pytest>=7.4.0; extra == "dev"
31
+ Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
32
+ Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
33
+ Dynamic: license-file
34
+
35
+ # SamiGPT
36
+
37
+ **SamiGPT** is an AI-powered security investigation and incident response platform that provides security operations teams with intelligent automation for case management, SIEM analysis, and CTI enrichment through the Model Context Protocol (MCP).
38
+
39
+ > **Note:** This project is currently under active development. Features, APIs, and documentation may change as development progresses.
40
+
41
+ ## Demo
42
+
43
+ Watch the demo video to see SamiGPT in action:
44
+
45
+ [Demo Video](https://youtu.be/usd8ed-7AQg)
46
+
47
+ ### Performance & Cost
48
+
49
+ **Key Metrics:**
50
+ - ~ $0.18 per alert
51
+ - ~ 50 seconds to investigate an alert per agent/tab
52
+
53
+ For detailed cost and usage data, see: [Cost Data CSV](usage-events/cost_all.csv)
54
+
55
+ For detailed documentation and presentation materials:
56
+
57
+ [AI Agents Presentation PDF](demo/BHMEA25_AI_Agents.pdf)
58
+
59
+ ### Quick Start
60
+
61
+ SamiGPT can be used in two ways:
62
+
63
+ #### Method 1: AI Controller (Web Interface)
64
+
65
+ The AI Controller provides a web-based interface and uses the Cursor IDE `cursor-agent` binary for command execution.
66
+
67
+ **Prerequisites:**
68
+ - Cursor IDE must be installed (download from [cursor.sh](https://cursor.sh))
69
+ - Verify `cursor-agent` binary is available:
70
+ ```bash
71
+ which cursor-agent
72
+ # Should show path like: /usr/local/bin/cursor-agent or ~/.local/bin/cursor-agent
73
+ ```
74
+
75
+ **Steps:**
76
+
77
+ 1. **Activate virtual environment:**
78
+ ```bash
79
+ source venv/bin/activate # On Windows: venv\Scripts\activate
80
+ ```
81
+
82
+ 2. **Start the AI Controller web interface:**
83
+ ```bash
84
+ python3 cursor_agent.py --web --port 8081 --host 127.0.0.1
85
+ ```
86
+
87
+ 3. **Open your browser:**
88
+ Navigate to `http://127.0.0.1:8081` to access the web interface.
89
+
90
+ #### Method 2: MCP Server (Direct Integration)
91
+
92
+ Use the MCP server directly to connect SamiGPT tools to Cursor, Claude Desktop, or other MCP-compatible tools.
93
+
94
+ **Steps:**
95
+
96
+ 1. **Activate virtual environment:**
97
+ ```bash
98
+ source venv/bin/activate # On Windows: venv\Scripts\activate
99
+ ```
100
+
101
+ 2. **Start the MCP server:**
102
+ ```bash
103
+ python -m src.mcp.mcp_server
104
+ ```
105
+
106
+ 3. **Configure your AI tool** (see "Connect MCP Server to AI Tools" section below for detailed instructions)
107
+
108
+ **Note:** The MCP server method doesn't require the Cursor IDE `cursor-agent` binary - it works directly with any MCP-compatible tool.
109
+
110
+ ## Overview
111
+
112
+ SamiGPT acts as an MCP server that exposes security investigation and response capabilities as tools that can be used by AI agents, LLM tools, and automated workflows. It provides a unified, vendor-neutral API layer that connects to:
113
+
114
+ - **Case Management Systems** (TheHive, IRIS)
115
+ - **SIEM Platforms** (Elastic)
116
+ - **EDR Solutions** (Elastic Defend)
117
+ - **Threat Intelligence** (OpenCTI, Local TIP)
118
+
119
+ The platform enables automated triage, investigation, correlation, and response workflows through intelligent agent profiles organized by SOC tier (SOC1, SOC2).
120
+
121
+ ## Features
122
+
123
+ ### Core Capabilities
124
+
125
+ - **Automated Alert Triage**: Intelligent initial assessment and classification of security alerts
126
+ - **Case Management**: Create, update, and manage security cases with observables, comments, and timeline tracking
127
+ - **SIEM Integration**: Search security events, pivot on indicators, and correlate activities across environments
128
+ - **EDR Response**: Endpoint isolation, process termination, and forensic artifact collection
129
+ - **Threat Intelligence**: IOC enrichment and reputation analysis
130
+ - **Multi-Tier SOC Workflows**: Structured workflows for SOC1 (triage) and SOC2 (investigation)
131
+
132
+ ### Agent Profiles & Runbooks
133
+
134
+ SamiGPT includes pre-configured agent profiles with specialized runbooks:
135
+
136
+ - **SOC1 Agents**: Initial alert triage, enrichment, and false positive identification
137
+ - **SOC2 Agents**: Deep investigation, correlation, and case analysis
138
+
139
+ ## Workflows
140
+
141
+ SamiGPT uses structured workflows organized by SOC tier. The following diagrams illustrate the execution flow:
142
+
143
+ ### Agent Profiles Flow
144
+
145
+ This diagram shows how agent profiles are organized and how routing rules direct cases to the appropriate SOC tier agents.
146
+
147
+ ![Agent Profiles Flow](execution_flow/agent_profiles_flow.svg)
148
+
149
+ ### Initial Alert Triage (SOC1)
150
+
151
+ The initial alert triage workflow handles new security alerts, performs quick assessment, enrichment, and determines whether to create a case or close as false positive.
152
+
153
+ ![Initial Alert Triage](execution_flow/initial_alert_triage.svg)
154
+
155
+ ### Case Analysis (SOC2)
156
+
157
+ The SOC2 case analysis workflow performs deep investigation, SIEM analysis, CTI enrichment, correlation, and prepares cases for SOC3 escalation.
158
+
159
+ ![Case Analysis](execution_flow/case_analysis.svg)
160
+
161
+ ## Installation
162
+
163
+ ### Prerequisites
164
+
165
+ - Python 3.9 or higher
166
+ - pip package manager
167
+
168
+ ### Setup
169
+
170
+ 1. **Clone the repository**:
171
+ ```bash
172
+ git clone <repository-url>
173
+ cd SamiGPT
174
+ ```
175
+
176
+ 2. **Create and activate virtual environment**:
177
+ ```bash
178
+ python3 -m venv venv
179
+ source venv/bin/activate # On Windows: venv\Scripts\activate
180
+ ```
181
+
182
+ 3. **Install dependencies**:
183
+ ```bash
184
+ pip install --upgrade pip
185
+ pip install -r requirements.txt
186
+ ```
187
+
188
+ 4. **Configure integrations** (see Configuration section below)
189
+
190
+ ### Connect MCP Server to AI Tools
191
+
192
+ If you're using **Method 2: MCP Server** (see Quick Start above), configure your AI tool to connect to the MCP server:
193
+
194
+ #### Cursor Integration
195
+
196
+ 1. Open Cursor Settings → Features → Model Context Protocol
197
+ 2. Add SamiGPT server configuration:
198
+ ```json
199
+ {
200
+ "mcpServers": {
201
+ "sami-gpt": {
202
+ "command": "python",
203
+ "args": ["-m", "src.mcp.mcp_server"],
204
+ "cwd": "/absolute/path/to/SamiGPT"
205
+ }
206
+ }
207
+ }
208
+ ```
209
+ 3. Restart Cursor and start using SamiGPT tools in chat
210
+
211
+ #### Claude Desktop Integration
212
+
213
+ Edit `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows):
214
+
215
+ ```json
216
+ {
217
+ "mcpServers": {
218
+ "sami-gpt": {
219
+ "command": "python",
220
+ "args": ["-m", "src.mcp.mcp_server"],
221
+ "cwd": "/absolute/path/to/SamiGPT"
222
+ }
223
+ }
224
+ }
225
+ ```
226
+
227
+ #### Other MCP-Compatible Tools
228
+
229
+ The MCP server can also be connected to:
230
+ - **Open WebUI** (via MCP configuration)
231
+ - **Other LLM tools** that support the Model Context Protocol
232
+
233
+ ## Architecture
234
+
235
+ ### Infrastructure Overview
236
+
237
+ ![Infrastructure Diagram](execution_flow/infrastructure_diagram.png)
238
+
239
+ ### Directory Structure
240
+
241
+ ```
242
+ SamiGPT/
243
+ ├── src/
244
+ │ ├── api/ # Generic interfaces (CaseManagementClient, SIEMClient, EDRClient)
245
+ │ ├── core/ # Configuration, logging, errors, DTOs
246
+ │ ├── integrations/ # Vendor-specific implementations
247
+ │ │ ├── case_management/ # TheHive, IRIS integrations
248
+ │ │ ├── siem/ # Elastic integration
249
+ │ │ ├── edr/ # EDR platform integrations
250
+ │ │ ├── cti/ # Threat intelligence integrations
251
+ │ │ └── eng/ # Engineering board integrations
252
+ │ ├── mcp/ # MCP server, runbook manager, agent profiles
253
+ │ ├── orchestrator/ # Workflow orchestration
254
+ │ └── web/ # Web UI for configuration
255
+ ├── run_books/ # SOC tier runbooks and workflows
256
+ ├── config/ # Agent profiles and configuration
257
+ └── client_env/ # Client-specific infrastructure data
258
+ ```
259
+
260
+ ### Design Principles
261
+
262
+ - **Vendor-Neutral APIs**: All integrations implement generic interfaces, allowing easy swapping of security tools
263
+ - **Separation of Concerns**: AI/orchestrator layer only interacts with generic APIs, never vendor-specific code
264
+ - **Modular Integration**: Each vendor integration is self-contained with HTTP client, models, mappers, and client implementation
265
+
266
+ ## Configuration
267
+
268
+ Configuration is managed through `config.json` and can be edited via the web interface or directly.
269
+
270
+
271
+ ### Configuration File Structure
272
+
273
+ See `config.json.example` for the complete configuration schema. Key sections:
274
+
275
+ - `iris` / `thehive`: Case management configuration
276
+ - `elastic`: SIEM configuration
277
+ - `edr`: EDR platform configuration
278
+ - `cti`: Threat intelligence configuration
279
+ - `eng`: Engineering board configuration (ClickUp, Trello, GitHub)
280
+ - `ai_controller`: AI controller web interface settings
281
+ - `logging`: Logging configuration
282
+
283
+ ## Usage Examples
284
+
285
+ ### Basic Case Operations
286
+
287
+ ```python
288
+ # List all open cases
289
+ cases = list_cases(status="open")
290
+
291
+ # Review a specific case
292
+ case = review_case(case_id="123")
293
+
294
+ # Add an observable to a case
295
+ attach_observable_to_case(
296
+ case_id="123",
297
+ observable_type="ip",
298
+ observable_value="192.168.1.100",
299
+ description="Suspicious source IP"
300
+ )
301
+ ```
302
+
303
+ ### SIEM Investigation
304
+
305
+ ```python
306
+ # Search for security events
307
+ events = search_security_events(
308
+ query="source.ip: 192.168.1.100",
309
+ hours_back=24
310
+ )
311
+
312
+ # Get file report
313
+ report = get_file_report(file_hash="abc123...")
314
+
315
+ # Pivot on an indicator
316
+ related_events = pivot_on_indicator("192.168.1.100")
317
+ ```
318
+
319
+ ### EDR Response
320
+
321
+ ```python
322
+ # Get endpoint summary
323
+ endpoint = get_endpoint_summary(endpoint_id="host-123")
324
+
325
+ # Isolate an endpoint
326
+ isolate_endpoint(endpoint_id="host-123")
327
+
328
+ # Collect forensic artifacts
329
+ collect_forensic_artifacts(
330
+ endpoint_id="host-123",
331
+ artifact_types=["processes", "network", "filesystem"]
332
+ )
333
+ ```
334
+
335
+ ### Agent Profile Execution
336
+
337
+ ```python
338
+ # Execute as SOC1 triage agent
339
+ execute_as_agent(
340
+ agent_id="soc1_triage_agent",
341
+ alert_id="alert-123"
342
+ )
343
+
344
+ # Execute specific runbook
345
+ execute_runbook(
346
+ runbook_name="initial_alert_triage",
347
+ alert_id="alert-123",
348
+ case_id="case-456"
349
+ )
350
+ ```
351
+
352
+ ## Logging
353
+
354
+ SamiGPT provides comprehensive logging:
355
+
356
+ - **MCP Server Logs**: `logs/mcp/mcp_all.log`, `mcp_requests.log`, `mcp_responses.log`, `mcp_errors.log`
357
+ - **Application Logs**: `logs/debug.log`, `logs/error.log`, `logs/warning.log`
358
+
359
+ ## Development
360
+
361
+ ### Adding a New Integration
362
+
363
+ 1. **Create integration directory** under `src/integrations/`
364
+ 2. **Implement generic interface** from `src/api/`
365
+ 3. **Add HTTP client, models, and mappers**
366
+ 4. **Register in configuration**
367
+
368
+ Example structure:
369
+ ```
370
+ src/integrations/case_management/new_vendor/
371
+ ├── __init__.py
372
+ ├── client.py # HTTP client
373
+ ├── models.py # Vendor-specific models
374
+ ├── mapper.py # Vendor ↔ Generic DTO mapping
375
+ └── case_client.py # Implements CaseManagementClient
376
+ ```
377
+
378
+ ### Running Tests
379
+
380
+ ```bash
381
+ # Run all tests
382
+ pytest tests/
383
+
384
+ # Run specific integration tests
385
+ pytest tests/integrations/case_management/
386
+ ```
387
+
388
+ ## Contributing
389
+
390
+ When contributing:
391
+
392
+ 1. Keep all vendor-specific code under `src/integrations/`
393
+ 2. Ensure all integrations implement the generic APIs in `src/api/`
394
+ 3. Add tests for new integrations
395
+ 4. Update documentation as needed
396
+
397
+ ## License
398
+
399
+ MIT
400
+
401
+ ## Support
402
+
403
+ For issues, questions, or contributions, please open an issue on the repository.
404
+
405
+ ## Acknowledgments
406
+
407
+ The following projects helped and inspired us during the literature review:
408
+
409
+ - [AI-Powered SOC Detection System](https://github.com/cyberarber/ai-soc-detection-system/tree/main) - ML-powered SOC platform with autonomous threat detection
410
+ - [ADK Runbooks](https://github.com/dandye/adk_runbooks/tree/main) - Security investigation runbooks and workflows
@@ -0,0 +1,85 @@
1
+ iflow_mcp_m507_ai_soc_agent-1.0.0.dist-info/licenses/LICENSE,sha256=6Faa4UyQBk9ogkuttSn8dyg85s4W7_BXUsC_2THsX20,1059
2
+ src/__init__.py,sha256=H9OmLj0fzL4TOXMKUS6yOTSvKhutygz2avvu2vpQ5u4,169
3
+ src/ai_controller/README.md,sha256=D5QasBEKcocL4k7CF5JkiPAVqYMTJ6TK75erqytW2mw,4179
4
+ src/ai_controller/__init__.py,sha256=MHeuEv5FqmwhOYMXzPRLU2QYtHKZd-1xR2sFvv2UEVQ,329
5
+ src/ai_controller/agent_executor.py,sha256=iYOJoQ03B0smefrRbt8cerzTcVIg9fnA-_9leiIq7Gk,23146
6
+ src/ai_controller/session_manager.py,sha256=Ue3msGlyPt9WfYrIMS0evTV76t1c9ONvmuIcbsnrhQI,15101
7
+ src/ai_controller/cli/__init__.py,sha256=hxZHL-ilgUNHmTQYMJLEVrhd0BjGZ9ep-CddbEMLOzc,30
8
+ src/ai_controller/cli/main.py,sha256=QK8xuW0ey94llkYg_a3RLZ2eURSUnz5GNuGAGye-Zuc,7844
9
+ src/ai_controller/web/__init__.py,sha256=no2bfNr99wBisJoRt8Xpd2c0QGJyV-3Rvmin5_31D2s,37
10
+ src/ai_controller/web/server.py,sha256=hXeeWysdK9XhHqxRMoHXqPb6Aq6hWnTDIRgfxudWVoc,51469
11
+ src/ai_controller/web/static/css/README.md,sha256=R4J96jMMQvDfX_oEIJMEfVWYl2GcPEdhG5UITwQMYbA,3639
12
+ src/api/__init__.py,sha256=aPyU4qJOTH-536On6lC6q71lGhlPiuOGmHrUC-4lC_o,277
13
+ src/api/case_management.py,sha256=I_vu6sZRyHPzfKxJoIMuJvFYss-Ytm4JumtS-dmF2gk,5859
14
+ src/api/edr.py,sha256=BwcRqyqmEjhRyJyVoWK5LuSMPrOQ56QNddp9E7URPXg,3978
15
+ src/api/kb.py,sha256=LvQfnqJ-5MI898ULPJcvNzW_vNkRGrYTNSMtxzNe-U4,3671
16
+ src/api/siem.py,sha256=oy5jVeqEQGJQPrl28XVZ8P2t_fFBqTL2vm947y9ojlA,7442
17
+ src/core/__init__.py,sha256=geOghYrbqKR1dSbAFowV11PItE0r7OB8vaDfe8eSY5o,165
18
+ src/core/config.py,sha256=KkKGd0rM2xGPZUlI6EFt55_w4_AZfQBg9ffpnpAEoBg,6195
19
+ src/core/config_storage.py,sha256=OU4KnSOqtcUlvMK8GQKsDVFRycvBxEtxpBBkH6K-1QE,25575
20
+ src/core/dto.py,sha256=-0YqXp6MhCFz0LHsBSJkwxSksygSCcXKPy2qDjz9jXc,1301
21
+ src/core/errors.py,sha256=PeTEoCcvnxIkLBUCuwCBoCiWt8msKEDOh7qVSBTq3_E,757
22
+ src/core/logging.py,sha256=CRqo-J05Xn6khkB9NO-8hXXPe1dbx5g5VyxE-GaZ44U,4423
23
+ src/integrations/__init__.py,sha256=8A-XzrgC-PrK4lr5z6arrk57M9SyINCz9lHWgfakuyI,180
24
+ src/integrations/case_management/__init__.py,sha256=9L99pAyRBycps5q_fz1HhuBwTjzkexvxKccz9rIENHo,74
25
+ src/integrations/case_management/iris/__init__.py,sha256=NztGqgyBNuPdOImp84B6mE26y_3STLE1bupA4BCSznY,286
26
+ src/integrations/case_management/iris/iris_client.py,sha256=VftbiHAG77OcW3WxUOaXaL0HtUV83MgqYHZkpJ898Hs,32978
27
+ src/integrations/case_management/iris/iris_http.py,sha256=EEJ0Fq1WBv7Fzx7KOmEmkuy3OynCacDkH-RKCpC1OCE,9930
28
+ src/integrations/case_management/iris/iris_mapper.py,sha256=3mldhZ9qvDEJxrXDxp0uuqHAeC1OKgfCg6lX1YAbe0g,8163
29
+ src/integrations/case_management/iris/iris_models.py,sha256=lwUJfkOARv1q62eY2eG0U10qPDFkk2MP9V5pHB9aRlU,3758
30
+ src/integrations/case_management/thehive/__init__.py,sha256=qhXsaDQKBJxF8ico2sDfWwisMrrKY3QCxnLB28HB7bk,199
31
+ src/integrations/case_management/thehive/thehive_client.py,sha256=r7ni9veLXGs8VcknV_zeuEoqv9TOcoWvkdht_2XC304,5998
32
+ src/integrations/case_management/thehive/thehive_http.py,sha256=wUvfSxHYz0zUA7fHgk2Pfg4ctYC7caGu7qQMlhbmjxw,3627
33
+ src/integrations/case_management/thehive/thehive_mapper.py,sha256=u_thp8Rvp1NZM1fwHxwqu3hoHsIUSqQOboX76tbnwrI,5271
34
+ src/integrations/case_management/thehive/thehive_models.py,sha256=cTy9P08H9_gicXrDN8YATpL9sAsyAuM-PxYQmkTHBdg,2997
35
+ src/integrations/cti/__init__.py,sha256=AU5V9ss9CdPKr8RD2jWG-u2Za8LxxGSXlZuthTGC5y4,127
36
+ src/integrations/cti/local_tip/__init__.py,sha256=UfIBwHUSTwXnvfLpDICWa9fusaapiZBEMS8oaG8g0o0,214
37
+ src/integrations/cti/local_tip/local_tip_client.py,sha256=1gPUOFabZNzC3B05KJOeK02VfXRxGKWjp5Ti1CC9vJE,2754
38
+ src/integrations/cti/local_tip/local_tip_http.py,sha256=WG9Pf0GDM_ofJbcJOSDc8QwuxLcLHix3ylQpQZRI61g,3523
39
+ src/integrations/cti/opencti/__init__.py,sha256=WQyZobvE-h2TiJUzrWGVM6AVQ6wsMcrY7p1f5FAtF98,233
40
+ src/integrations/cti/opencti/opencti_client.py,sha256=FNOD_lBcaiqcSl2uevVXKkx3lzUmIFKikoZgk579dvA,3146
41
+ src/integrations/cti/opencti/opencti_http.py,sha256=riHhbWk0xRv5eb3K2QLsreOz4zkAUfCeU9Xa_venGGk,16500
42
+ src/integrations/edr/__init__.py,sha256=K0I_pMj7iwSWN0rKxoqGo07YixCFbn7XyzYvHn2QDzk,149
43
+ src/integrations/edr/elastic_defend/__init__.py,sha256=-ywxadkvpGVv47cNXOQcULUiKeN9Gv-oMDgGVSztUFY,136
44
+ src/integrations/edr/elastic_defend/elastic_defend_client.py,sha256=DFMUDRJHVxw5OcM8shgsr8sKNoaXeQPbQuZPhwVR6ug,13332
45
+ src/integrations/edr/elastic_defend/elastic_defend_http.py,sha256=AYxp2sUFJ9ZsUP-TGkh6wsXjWVyi08eWqJZ_vUk6o5w,5070
46
+ src/integrations/eng/__init__.py,sha256=pUjFb2zmiL8qlwEbFGx2-pgPGesXk7KHm-KX9oNzJYs,273
47
+ src/integrations/eng/clickup/__init__.py,sha256=w7EmZS5uyxnDidX78UchMfQEKdtpo5ocOO0R7pfS4IM,134
48
+ src/integrations/eng/clickup/clickup_client.py,sha256=1LgvSZNgPGTUpXxQZRYD-ZQ9bymqOooKV3PrPM3rMSM,18665
49
+ src/integrations/eng/clickup/clickup_http.py,sha256=hjQeEDk209YBbrsNHs-xNKWXdfuROy1NfgK7fPNbRyU,5010
50
+ src/integrations/eng/github/__init__.py,sha256=khch8ivfdXCgeldrLFb7wpvK_nC1XKeb0qNgYVRAFvo,130
51
+ src/integrations/eng/github/github_client.py,sha256=vcGJsJgqbvsllq25GgIZubYcHzUbQyEya8IGorQOMHg,5576
52
+ src/integrations/eng/github/github_http.py,sha256=G4uyH_FpZlsWLyn_FhEJ4mf4xZwLpKS1hImQgBmLHPU,5059
53
+ src/integrations/eng/trello/__init__.py,sha256=DiKZZvko2a7fimAs3X_N36cIlhV-D2XfZZxOxiflW7c,130
54
+ src/integrations/eng/trello/trello_client.py,sha256=DXueB5pMWh8eBFGDrLRAyaoHNm73OtzSaaH6sWPCu88,7451
55
+ src/integrations/eng/trello/trello_http.py,sha256=08iR21tjtra4sFbkHTs0h9aHGT6FeW5zqkAHUnfiTlw,5127
56
+ src/integrations/kb/__init__.py,sha256=XdR6ks65N7DrsR5ou92_cwZHivJCqNcO30oLZojXp8I,275
57
+ src/integrations/kb/fs_kb_client.py,sha256=0RQv_nwiUvTILdbHckFS-kG79t68MyltXdUaICsYX1s,11345
58
+ src/integrations/siem/__init__.py,sha256=S4hN0IkAvEXgTdqDyzWfvZikSzeX68vK0uYWV3mfTOM,126
59
+ src/integrations/siem/elastic/__init__.py,sha256=xEl3BU3kDwTT9RheGMOq_eNQ2n-DhdYrzzvPlIVzOu8,113
60
+ src/integrations/siem/elastic/elastic_client.py,sha256=zZIq-mJSF01uFGTvwaLJzKgUhYbtvP-pyo1EuM-1-0A,145498
61
+ src/integrations/siem/elastic/elastic_http.py,sha256=mldvzRmpykPMwnjB6w6Pd7CTMRKcA6-AeZuuvn7Zuew,5253
62
+ src/mcp/README.md,sha256=w4RHz2R74vGDUb0txPeGziaHLeXxt7DgKuRIoPbGFuQ,5517
63
+ src/mcp/TOOLS.md,sha256=gIP0eVQR5mj3WMogwP8K-1Hs9hAm90Ew9OBhuS3IQyY,94635
64
+ src/mcp/__init__.py,sha256=Vz4r7lPnsjsIDe591w-U_EJpUr5Gl1jtOj4COquH0sQ,424
65
+ src/mcp/__main__.py,sha256=jsazaLTcHkOTsAnHGp1iCI7LYtfob2DoFIVAZv3NQR8,287
66
+ src/mcp/agent_profiles.py,sha256=jov0zCC2gm5tVaKwu8myOZI4lskNWIqI6NtbASzyvZ8,16351
67
+ src/mcp/flow_agent_profiles.py,sha256=dhBWLw6XxjKq8pPQcSfX-DnRuES3ou2_jeL0drn35Q0,16031
68
+ src/mcp/mcp_server.py,sha256=NpjMPlJC8RM39BQiyxMvBnD3jQrEUZEn3FcognJ7W_8,179580
69
+ src/mcp/rules_engine.py,sha256=seVx47MqyXbFE2mU932KOtEgImJ3pF4GgiSOuvrAbJM,17572
70
+ src/mcp/runbook_manager.py,sha256=l8QgliBNDWdX_GYxeFsYDQN4cxAVJxox8xjdcDn0_8U,9701
71
+ src/orchestrator/__init__.py,sha256=TMqPpBL_SFwfV66jFuV24b8Kozsn6QaxQjSW_WK-AtI,380
72
+ src/orchestrator/incident_workflow.py,sha256=A1aBX8h8tjmwEBTQYceuEArfHXWDOBdMzPHqilYTt8U,8164
73
+ src/orchestrator/tools_case.py,sha256=kv00QRwPIpF-DuEV14dCqMgJjO4BZ4KgPtC2pgVpXgs,35091
74
+ src/orchestrator/tools_cti.py,sha256=XCMLZ_Pk2SxXuLvy2ZQ_br74dFKriU-sgXNSw12Rnpc,14065
75
+ src/orchestrator/tools_edr.py,sha256=Rhilxsp0sRBOc1vh8Z1nwCu7qC4dQRzCPmZ2PkEDZAM,9546
76
+ src/orchestrator/tools_eng.py,sha256=2rmCplXpzLnn7y5TdhAy1CJctFnLEzvCQvmaxH-C2Hs,14022
77
+ src/orchestrator/tools_kb.py,sha256=UkBraiRf8MzvMi4J32N70jjETXw8oUMagi5kSOYx3Ac,5145
78
+ src/orchestrator/tools_siem.py,sha256=YlIxz2eY7bsRYAqWFxbPx7vRCX7uRXX5wD8pPTa6szM,58919
79
+ src/web/__init__.py,sha256=A8n7SXh086W7X3WQIkY96D_7DjF89MoAdIMq_b-sLWk,222
80
+ src/web/config_server.py,sha256=KsCq4ISckC4Cb_DbI6_ooTdlYMYV5L17pEUgDsxlQ9g,17826
81
+ iflow_mcp_m507_ai_soc_agent-1.0.0.dist-info/METADATA,sha256=cS_JAvTa-udnGRFwUNzAPEjyuUyJapac5cRoqQqZUyc,12549
82
+ iflow_mcp_m507_ai_soc_agent-1.0.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
83
+ iflow_mcp_m507_ai_soc_agent-1.0.0.dist-info/entry_points.txt,sha256=rVtm8hiOwU96BAY4RURxnVfPtrW13JLAYdUsqqY2O_I,60
84
+ iflow_mcp_m507_ai_soc_agent-1.0.0.dist-info/top_level.txt,sha256=74rtVfumQlgAPzR5_2CgYN24MB0XARCg0t-gzk6gTrM,4
85
+ iflow_mcp_m507_ai_soc_agent-1.0.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.10.2)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ samigpt-mcp-server = src.mcp.__main__:cli
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 M
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.
src/__init__.py ADDED
@@ -0,0 +1,8 @@
1
+ """
2
+ Top-level package for SamiGPT.
3
+
4
+ This package contains the core, API, integration, orchestrator, and web
5
+ modules used to implement the incident response agent.
6
+ """
7
+
8
+
@@ -0,0 +1,139 @@
1
+ # AI Controller
2
+
3
+ Web-based controller for managing and executing SamiGPT agent commands.
4
+
5
+ ## Setup
6
+
7
+ ```bash
8
+ # Create and activate virtual environment
9
+ python3 -m venv venv
10
+ source venv/bin/activate # On Windows: venv\Scripts\activate
11
+
12
+ # Install dependencies (includes websockets for WebSocket support)
13
+ pip install -r requirements.txt
14
+ ```
15
+
16
+ The `cursor-agent` wrapper script in `venv/bin/cursor-agent` passes commands directly to the Cursor IDE `cursor-agent` binary. When the venv is activated, use:
17
+ ```bash
18
+ # With venv activated - passes through to Cursor IDE cursor-agent
19
+ venv/bin/cursor-agent "your prompt here"
20
+ venv/bin/cursor-agent --help
21
+
22
+ # Or add to PATH explicitly
23
+ export PATH="venv/bin:$PATH"
24
+ cursor-agent "your prompt"
25
+ ```
26
+
27
+ **Note:** For the SamiGPT AI Controller web interface, use `python cursor_agent.py --web` (not the wrapper).
28
+
29
+ ## Features
30
+
31
+ - **Web Interface**: Modern web UI with tabs for managing sessions and autoruns
32
+ - **CLI Interface**: Command-line interface for executing commands directly
33
+ - **Session Management**: Track and manage agent execution sessions
34
+ - **Autorun Support**: Structure ready for scheduled/recurring agent executions
35
+ - **Real-time Updates**: WebSocket support for live command output
36
+ - **Terminal-like UI**: Terminal-style interface for viewing command results
37
+
38
+ ## Structure
39
+
40
+ ```
41
+ src/ai_controller/
42
+ ├── __init__.py # Package initialization
43
+ ├── agent_executor.py # Command parsing and execution
44
+ ├── session_manager.py # Session and autorun storage management
45
+ ├── cli/
46
+ │ ├── __init__.py
47
+ │ └── main.py # CLI entry point
48
+ └── web/
49
+ ├── __init__.py
50
+ ├── server.py # FastAPI web server
51
+ ├── templates/
52
+ │ └── index.html # Web UI
53
+ └── static/
54
+ ├── app.js # Frontend JavaScript
55
+ └── css/ # Frontend styles (organized by purpose)
56
+ ├── base.css # Base styles, reset, body
57
+ ├── layout.css # Main layout, sidebar, header
58
+ ├── buttons.css # Button components
59
+ ├── tabs.css # Tab components
60
+ ├── status.css # Status badges
61
+ ├── terminal.css # Terminal display
62
+ ├── autorun.css # Autorun-specific styles
63
+ ├── modal.css # Modal dialogs
64
+ ├── settings.css # Settings page
65
+ └── scrollbar.css # Custom scrollbar
66
+ ```
67
+
68
+ ## Usage
69
+
70
+ ### CLI Usage
71
+
72
+ Execute commands directly from the command line:
73
+
74
+ ```bash
75
+ # With venv activated
76
+ python cursor_agent.py "run lookup_hash_ti on 973f777723d315e0bee0fb9e81e943bb3440be7d2de7bf582419ae47479bc15d"
77
+
78
+ # With session tracking
79
+ python cursor_agent.py "run get_security_alerts" --session "Alert Check"
80
+
81
+ # Start web server
82
+ python cursor_agent.py --web
83
+
84
+ # Specify port/host
85
+ python cursor_agent.py --web --port 8081 --host 0.0.0.0
86
+ ```
87
+
88
+ ### Web Interface
89
+
90
+ ```bash
91
+ # Start web server (with venv activated)
92
+ python cursor_agent.py --web
93
+ ```
94
+
95
+ Open browser to `http://localhost:8081` (or configured port).
96
+
97
+ ### Command Format
98
+
99
+ Commands follow a simple format:
100
+
101
+ - `run <tool_name> on <value>` - Execute a tool with a single value
102
+ - `run <tool_name> with <key>=<value>` - Execute a tool with named parameters
103
+ - `run <agent_name> agent on <target>` - Execute an agent (future)
104
+ - `run <runbook_name> runbook on <target>` - Execute a runbook (future)
105
+
106
+ Examples:
107
+ - `run lookup_hash_ti on 973f777723d315e0bee0fb9e81e943bb3440be7d2de7bf582419ae47479bc15d`
108
+ - `run get_security_alerts`
109
+ - `run get_ip_address_report with ip=10.10.10.1`
110
+
111
+ ## Configuration
112
+
113
+ Add the following to `config.json`:
114
+
115
+ ```json
116
+ {
117
+ "ai_controller": {
118
+ "storage_dir": "data/ai_controller",
119
+ "web_port": 8081,
120
+ "web_host": "0.0.0.0"
121
+ }
122
+ }
123
+ ```
124
+
125
+ ## Storage
126
+
127
+ Sessions and autoruns stored as JSON in `storage_dir`:
128
+
129
+ - `sessions/` - Session files
130
+ - `autoruns/` - Autorun configs
131
+
132
+ ## Future Enhancements
133
+
134
+ - Autorun scheduling and execution
135
+ - Agent and runbook execution support
136
+ - Session sharing and collaboration
137
+ - Command history and favorites
138
+ - Advanced filtering and search
139
+