Skip to content

armgit / strix

Public Imported from GitHub
0

Open-source AI penetration testing tool to find and fix your app’s vulnerabilities.

fix(agent): use correct agent name in identity instead of class name

0xallam47faeb1ef321
diff --git a/strix/agents/base_agent.py b/strix/agents/base_agent.py
index ded04c60..89051979 100644
--- a/strix/agents/base_agent.py
+++ b/strix/agents/base_agent.py
@@ -65,19 +65,19 @@ class BaseAgent(metaclass=AgentMeta):
self.llm_config = config.get("llm_config", self.default_llm_config)
if self.llm_config is None:
raise ValueError("llm_config is required but not provided")
- self.llm = LLM(self.llm_config, agent_name=self.agent_name)
-
state_from_config = config.get("state")
if state_from_config is not None:
self.state = state_from_config
else:
self.state = AgentState(
- agent_name=self.agent_name,
+ agent_name="Root Agent",
max_iterations=self.max_iterations,
)
+ self.llm = LLM(self.llm_config, agent_name=self.agent_name)
+
with contextlib.suppress(Exception):
- self.llm.set_agent_identity(self.agent_name, self.state.agent_id)
+ self.llm.set_agent_identity(self.state.agent_name, self.state.agent_id)
self._current_task: asyncio.Task[Any] | None = None
from strix.telemetry.tracer import get_global_tracer