TZambellis commited on
Commit
06bd07e
·
verified ·
1 Parent(s): 75ea8b3

Add requirements

Browse files
Files changed (3) hide show
  1. Makefile +8 -0
  2. demo_agents/custom_agent.py +57 -0
  3. requirements.txt +3 -0
Makefile ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ venv:
2
+ python3 -m venv .venv
3
+
4
+ develop:
5
+ pip install -r requirements.txt
6
+
7
+ dev:
8
+ python app.py
demo_agents/custom_agent.py ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from smolagents import CodeAgent, DuckDuckGoSearchTool, InferenceClientModel, OpenAIServerModel
2
+
3
+ model = InferenceClientModel()
4
+ tools = [DuckDuckGoSearchTool()]
5
+
6
+ detection_agent = CodeAgent(
7
+ name="detection_agent",
8
+ description="Analyzes logs and identifies intrusions using fast AI classification.",
9
+ tools=tools,
10
+ model=model,
11
+ )
12
+
13
+ containment_agent = CodeAgent(
14
+ name="containment_agent",
15
+ description="Executes emergency actions like blocking IPs, killing processes, or isolating the system.",
16
+ tools=tools,
17
+ model=model,
18
+ )
19
+
20
+ forensics_agent = CodeAgent(
21
+ name="forensics_agent",
22
+ description="Inspects filesystem and logs to identify attack vectors and changes.",
23
+ tools=tools,
24
+ model=model,
25
+ )
26
+
27
+ recovery_agent = CodeAgent(
28
+ name="recovery_agent",
29
+ description="Restores system stability by creating new users, restarting services, and cleaning up.",
30
+ tools=tools,
31
+ model=model,
32
+ )
33
+
34
+ audit_agent = CodeAgent(
35
+ name="audit_agent",
36
+ description="Generates a full post-incident report with recommendations and timelines.",
37
+ tools=tools,
38
+ model=model,
39
+ )
40
+
41
+
42
+ manager_agent = CodeAgent(
43
+ model=model,
44
+ name="manager_agent",
45
+ description="You ara a manager for an escilation sutation, you need to help the user detect arnomalies in a system and provide information on how to prevent more damage, remove the intruder, recovery and auditing. currently do it as a simulation " \
46
+ ", create a random detection and provide steps on how to remove the thread.",
47
+ tools=tools,
48
+ planning_interval=4,
49
+ max_steps=15,
50
+ managed_agents=[
51
+ detection_agent,
52
+ containment_agent,
53
+ forensics_agent,
54
+ recovery_agent,
55
+ audit_agent,
56
+ ]
57
+ )
requirements.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ gradio
2
+ gradio-agentvisualizer==0.0.1
3
+ gradio-mcp-tools-visualizer==0.0.1