Skip to main content

Overview

The Agents API provides the foundation for building autonomous security testing agents. The BaseAgent class handles the agent lifecycle, tool execution, and interaction with the LLM.

BaseAgent

The base class for all Strix agents. Manages the agent loop, tool execution, and state management.

Constructor

dict[str, Any]
required
Configuration dictionary for the agent.

Properties

str
The name of the agent class
int
default:"300"
Maximum number of iterations allowed
AgentState
Current agent state including messages and context
LLM
The LLM instance used by the agent
dict[str, Any]
Agent configuration dictionary

Methods

agent_loop

Runs the main agent loop until completion or max iterations.
str
required
The task for the agent to accomplish
dict[str, Any]
Final result containing success status and any output
Example:

cancel_current_execution

Cancels the currently running execution task. Example:

set_agent_identity

Sets the agent’s identity metadata.
str | None
Human-readable agent name
str | None
Unique agent identifier

AgentState

Manages the state of an agent including messages, context, and execution status.

Constructor

str
default:"'Strix Agent'"
Name of the agent
int
default:"300"
Maximum iterations allowed

Properties

str
Unique identifier (auto-generated)
str
Agent name
str | None
Parent agent ID for sub-agents
str | None
Docker container ID for the sandbox
str
Current task description
int
Current iteration count
bool
Whether the task is completed
list[dict[str, Any]]
Conversation history
dict[str, Any]
Additional context storage

Methods

add_message

Adds a message to the conversation history.
str
required
Message role: “user” or “assistant”
Any
required
Message content
list[dict[str, Any]] | None
Optional thinking blocks from reasoning models

increment_iteration

Increments the iteration counter.

set_completed

Marks the agent as completed.
dict[str, Any] | None
Final result data

get_conversation_history

Returns the full conversation history.
list[dict[str, Any]]
List of message dictionaries

get_execution_summary

Returns a summary of the agent’s execution.
dict[str, Any]
Dictionary containing agent_id, task, iteration count, completion status, etc.
Example:

Usage Example