iflow-mcp-m507_ai-soc-agent 1.0.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.
Files changed (90) hide show
  1. iflow_mcp_m507_ai_soc_agent-1.0.0/LICENSE +21 -0
  2. iflow_mcp_m507_ai_soc_agent-1.0.0/PKG-INFO +410 -0
  3. iflow_mcp_m507_ai_soc_agent-1.0.0/README.md +376 -0
  4. iflow_mcp_m507_ai_soc_agent-1.0.0/iflow_mcp_m507_ai_soc_agent.egg-info/PKG-INFO +410 -0
  5. iflow_mcp_m507_ai_soc_agent-1.0.0/iflow_mcp_m507_ai_soc_agent.egg-info/SOURCES.txt +88 -0
  6. iflow_mcp_m507_ai_soc_agent-1.0.0/iflow_mcp_m507_ai_soc_agent.egg-info/dependency_links.txt +1 -0
  7. iflow_mcp_m507_ai_soc_agent-1.0.0/iflow_mcp_m507_ai_soc_agent.egg-info/entry_points.txt +2 -0
  8. iflow_mcp_m507_ai_soc_agent-1.0.0/iflow_mcp_m507_ai_soc_agent.egg-info/requires.txt +10 -0
  9. iflow_mcp_m507_ai_soc_agent-1.0.0/iflow_mcp_m507_ai_soc_agent.egg-info/top_level.txt +1 -0
  10. iflow_mcp_m507_ai_soc_agent-1.0.0/pyproject.toml +56 -0
  11. iflow_mcp_m507_ai_soc_agent-1.0.0/setup.cfg +4 -0
  12. iflow_mcp_m507_ai_soc_agent-1.0.0/src/__init__.py +8 -0
  13. iflow_mcp_m507_ai_soc_agent-1.0.0/src/ai_controller/README.md +139 -0
  14. iflow_mcp_m507_ai_soc_agent-1.0.0/src/ai_controller/__init__.py +12 -0
  15. iflow_mcp_m507_ai_soc_agent-1.0.0/src/ai_controller/agent_executor.py +596 -0
  16. iflow_mcp_m507_ai_soc_agent-1.0.0/src/ai_controller/cli/__init__.py +2 -0
  17. iflow_mcp_m507_ai_soc_agent-1.0.0/src/ai_controller/cli/main.py +243 -0
  18. iflow_mcp_m507_ai_soc_agent-1.0.0/src/ai_controller/session_manager.py +409 -0
  19. iflow_mcp_m507_ai_soc_agent-1.0.0/src/ai_controller/web/__init__.py +2 -0
  20. iflow_mcp_m507_ai_soc_agent-1.0.0/src/ai_controller/web/server.py +1181 -0
  21. iflow_mcp_m507_ai_soc_agent-1.0.0/src/ai_controller/web/static/css/README.md +102 -0
  22. iflow_mcp_m507_ai_soc_agent-1.0.0/src/api/__init__.py +13 -0
  23. iflow_mcp_m507_ai_soc_agent-1.0.0/src/api/case_management.py +271 -0
  24. iflow_mcp_m507_ai_soc_agent-1.0.0/src/api/edr.py +187 -0
  25. iflow_mcp_m507_ai_soc_agent-1.0.0/src/api/kb.py +136 -0
  26. iflow_mcp_m507_ai_soc_agent-1.0.0/src/api/siem.py +308 -0
  27. iflow_mcp_m507_ai_soc_agent-1.0.0/src/core/__init__.py +10 -0
  28. iflow_mcp_m507_ai_soc_agent-1.0.0/src/core/config.py +242 -0
  29. iflow_mcp_m507_ai_soc_agent-1.0.0/src/core/config_storage.py +684 -0
  30. iflow_mcp_m507_ai_soc_agent-1.0.0/src/core/dto.py +50 -0
  31. iflow_mcp_m507_ai_soc_agent-1.0.0/src/core/errors.py +36 -0
  32. iflow_mcp_m507_ai_soc_agent-1.0.0/src/core/logging.py +128 -0
  33. iflow_mcp_m507_ai_soc_agent-1.0.0/src/integrations/__init__.py +8 -0
  34. iflow_mcp_m507_ai_soc_agent-1.0.0/src/integrations/case_management/__init__.py +5 -0
  35. iflow_mcp_m507_ai_soc_agent-1.0.0/src/integrations/case_management/iris/__init__.py +11 -0
  36. iflow_mcp_m507_ai_soc_agent-1.0.0/src/integrations/case_management/iris/iris_client.py +885 -0
  37. iflow_mcp_m507_ai_soc_agent-1.0.0/src/integrations/case_management/iris/iris_http.py +274 -0
  38. iflow_mcp_m507_ai_soc_agent-1.0.0/src/integrations/case_management/iris/iris_mapper.py +263 -0
  39. iflow_mcp_m507_ai_soc_agent-1.0.0/src/integrations/case_management/iris/iris_models.py +128 -0
  40. iflow_mcp_m507_ai_soc_agent-1.0.0/src/integrations/case_management/thehive/__init__.py +8 -0
  41. iflow_mcp_m507_ai_soc_agent-1.0.0/src/integrations/case_management/thehive/thehive_client.py +193 -0
  42. iflow_mcp_m507_ai_soc_agent-1.0.0/src/integrations/case_management/thehive/thehive_http.py +147 -0
  43. iflow_mcp_m507_ai_soc_agent-1.0.0/src/integrations/case_management/thehive/thehive_mapper.py +190 -0
  44. iflow_mcp_m507_ai_soc_agent-1.0.0/src/integrations/case_management/thehive/thehive_models.py +125 -0
  45. iflow_mcp_m507_ai_soc_agent-1.0.0/src/integrations/cti/__init__.py +6 -0
  46. iflow_mcp_m507_ai_soc_agent-1.0.0/src/integrations/cti/local_tip/__init__.py +10 -0
  47. iflow_mcp_m507_ai_soc_agent-1.0.0/src/integrations/cti/local_tip/local_tip_client.py +90 -0
  48. iflow_mcp_m507_ai_soc_agent-1.0.0/src/integrations/cti/local_tip/local_tip_http.py +110 -0
  49. iflow_mcp_m507_ai_soc_agent-1.0.0/src/integrations/cti/opencti/__init__.py +10 -0
  50. iflow_mcp_m507_ai_soc_agent-1.0.0/src/integrations/cti/opencti/opencti_client.py +101 -0
  51. iflow_mcp_m507_ai_soc_agent-1.0.0/src/integrations/cti/opencti/opencti_http.py +418 -0
  52. iflow_mcp_m507_ai_soc_agent-1.0.0/src/integrations/edr/__init__.py +6 -0
  53. iflow_mcp_m507_ai_soc_agent-1.0.0/src/integrations/edr/elastic_defend/__init__.py +6 -0
  54. iflow_mcp_m507_ai_soc_agent-1.0.0/src/integrations/edr/elastic_defend/elastic_defend_client.py +351 -0
  55. iflow_mcp_m507_ai_soc_agent-1.0.0/src/integrations/edr/elastic_defend/elastic_defend_http.py +162 -0
  56. iflow_mcp_m507_ai_soc_agent-1.0.0/src/integrations/eng/__init__.py +10 -0
  57. iflow_mcp_m507_ai_soc_agent-1.0.0/src/integrations/eng/clickup/__init__.py +8 -0
  58. iflow_mcp_m507_ai_soc_agent-1.0.0/src/integrations/eng/clickup/clickup_client.py +513 -0
  59. iflow_mcp_m507_ai_soc_agent-1.0.0/src/integrations/eng/clickup/clickup_http.py +156 -0
  60. iflow_mcp_m507_ai_soc_agent-1.0.0/src/integrations/eng/github/__init__.py +8 -0
  61. iflow_mcp_m507_ai_soc_agent-1.0.0/src/integrations/eng/github/github_client.py +169 -0
  62. iflow_mcp_m507_ai_soc_agent-1.0.0/src/integrations/eng/github/github_http.py +158 -0
  63. iflow_mcp_m507_ai_soc_agent-1.0.0/src/integrations/eng/trello/__init__.py +8 -0
  64. iflow_mcp_m507_ai_soc_agent-1.0.0/src/integrations/eng/trello/trello_client.py +207 -0
  65. iflow_mcp_m507_ai_soc_agent-1.0.0/src/integrations/eng/trello/trello_http.py +162 -0
  66. iflow_mcp_m507_ai_soc_agent-1.0.0/src/integrations/kb/__init__.py +12 -0
  67. iflow_mcp_m507_ai_soc_agent-1.0.0/src/integrations/kb/fs_kb_client.py +313 -0
  68. iflow_mcp_m507_ai_soc_agent-1.0.0/src/integrations/siem/__init__.py +6 -0
  69. iflow_mcp_m507_ai_soc_agent-1.0.0/src/integrations/siem/elastic/__init__.py +6 -0
  70. iflow_mcp_m507_ai_soc_agent-1.0.0/src/integrations/siem/elastic/elastic_client.py +3319 -0
  71. iflow_mcp_m507_ai_soc_agent-1.0.0/src/integrations/siem/elastic/elastic_http.py +165 -0
  72. iflow_mcp_m507_ai_soc_agent-1.0.0/src/mcp/README.md +183 -0
  73. iflow_mcp_m507_ai_soc_agent-1.0.0/src/mcp/TOOLS.md +2827 -0
  74. iflow_mcp_m507_ai_soc_agent-1.0.0/src/mcp/__init__.py +13 -0
  75. iflow_mcp_m507_ai_soc_agent-1.0.0/src/mcp/__main__.py +18 -0
  76. iflow_mcp_m507_ai_soc_agent-1.0.0/src/mcp/agent_profiles.py +408 -0
  77. iflow_mcp_m507_ai_soc_agent-1.0.0/src/mcp/flow_agent_profiles.py +424 -0
  78. iflow_mcp_m507_ai_soc_agent-1.0.0/src/mcp/mcp_server.py +4086 -0
  79. iflow_mcp_m507_ai_soc_agent-1.0.0/src/mcp/rules_engine.py +487 -0
  80. iflow_mcp_m507_ai_soc_agent-1.0.0/src/mcp/runbook_manager.py +264 -0
  81. iflow_mcp_m507_ai_soc_agent-1.0.0/src/orchestrator/__init__.py +11 -0
  82. iflow_mcp_m507_ai_soc_agent-1.0.0/src/orchestrator/incident_workflow.py +244 -0
  83. iflow_mcp_m507_ai_soc_agent-1.0.0/src/orchestrator/tools_case.py +1085 -0
  84. iflow_mcp_m507_ai_soc_agent-1.0.0/src/orchestrator/tools_cti.py +359 -0
  85. iflow_mcp_m507_ai_soc_agent-1.0.0/src/orchestrator/tools_edr.py +315 -0
  86. iflow_mcp_m507_ai_soc_agent-1.0.0/src/orchestrator/tools_eng.py +378 -0
  87. iflow_mcp_m507_ai_soc_agent-1.0.0/src/orchestrator/tools_kb.py +156 -0
  88. iflow_mcp_m507_ai_soc_agent-1.0.0/src/orchestrator/tools_siem.py +1709 -0
  89. iflow_mcp_m507_ai_soc_agent-1.0.0/src/web/__init__.py +8 -0
  90. iflow_mcp_m507_ai_soc_agent-1.0.0/src/web/config_server.py +511 -0
@@ -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.
@@ -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