Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/GH05TCREW/pentestagent
/ functions
Functions
1,344 in github.com/GH05TCREW/pentestagent
⨍
Functions
1,344
◇
Types & classes
243
↳
Endpoints
16
↓ 524 callers
Method
get
Get a cached embedding. Args: text: The text to look up Returns: The cached embedding or None
pentestagent/knowledge/embeddings.py:163
↓ 110 callers
Method
_add_system
(self, content: str)
pentestagent/interface/tui.py:2921
↓ 82 callers
Method
transition_to
Transition to a new state. Args: new_state: The state to transition to reason: Optional reason for the trans
pentestagent/agents/state.py:66
↓ 67 callers
Function
notify
Emit a notification. If UI callback registered, call it; otherwise log.
pentestagent/interface/notifier.py:34
↓ 52 callers
Function
is_target_in_scope
Check whether `candidate` is covered by any entry in `allowed`. Allowed entries may be IPs, CIDRs, or hostnames/labels. Candidate may also be
pentestagent/workspaces/validation.py:53
↓ 39 callers
Method
_set_status
Update status bar
pentestagent/interface/tui.py:2738
↓ 35 callers
Method
create
(self, name: str)
pentestagent/workspaces/manager.py:96
↓ 34 callers
Function
_call
(action: str, **kwargs)
tests/unit/tools/test_notes.py:32
↓ 31 callers
Method
execute
Execute the tool with given arguments. Args: arguments: The arguments for the tool runtime: The runtime envi
pentestagent/tools/registry.py:46
↓ 29 callers
Method
save
Serialize messages to disk and update the index. If conv_id is given and already exists in the index, the file is overwritten and the
pentestagent/interface/conversation_store.py:37
↓ 28 callers
Method
stop
Stop the runtime environment.
pentestagent/runtime/runtime.py:381
↓ 25 callers
Method
__init__
( self, mcp_manager: MCPManager, agent: PentestAgentAgent, tui: "PentestAgentTUI" )
pentestagent/interface/tui.py:940
↓ 23 callers
Function
_make_tool
(name: str = "test_tool", category: str = "general")
tests/unit/tools/test_registry.py:25
↓ 21 callers
Method
get_active
(self)
pentestagent/workspaces/manager.py:183
↓ 20 callers
Function
_make_executor
(timeout: int = 10, max_retries: int = 0)
tests/unit/tools/test_executor.py:30
↓ 20 callers
Function
create_mcp_tool
Create a Tool instance from an MCP tool definition. Args: tool_def: The MCP tool definition server: The MCP server that prov
pentestagent/mcp/tools.py:11
↓ 19 callers
Function
_make_server
(name: str = "test_server")
tests/unit/mcp/test_mcp_tools.py:15
↓ 19 callers
Function
_make_tool
(name: str = "t", success: bool = True, delay: float = 0.0, required: list = None)
tests/unit/tools/test_executor.py:14
↓ 19 callers
Method
normalize_target
(value: str)
pentestagent/workspaces/manager.py:41
↓ 18 callers
Function
_make_manager
(result=None)
tests/unit/mcp/test_mcp_tools.py:21
↓ 17 callers
Function
gather_candidate_targets
Extract candidate target strings from arguments (shallow, non-recursive). This function inspects only the top-level of the provided object (
pentestagent/workspaces/validation.py:15
↓ 17 callers
Method
run
Run the crew on a task.
pentestagent/agents/crew/orchestrator.py:147
↓ 16 callers
Method
_update_header
Compose and update the persistent header widget.
pentestagent/interface/tui.py:4608
↓ 15 callers
Function
_msg
(role: str, content: str)
tests/unit/llm/test_memory.py:13
↓ 15 callers
Function
_user
(content: str)
tests/unit/interface/test_conversation_store.py:16
↓ 15 callers
Method
clear
Clear all documents and embeddings.
pentestagent/knowledge/rag.py:451
↓ 15 callers
Method
generate
Generate a response from the LLM. Args: system_prompt: The system prompt messages: Conversation messages
pentestagent/llm/llm.py:162
↓ 15 callers
Function
print_status
(msg: str, style: str = PA_DIM)
pentestagent/interface/cli.py:125
↓ 15 callers
Function
register_tool_instance
Register a pre-built tool instance (used for MCP tools). Args: tool: The Tool instance to register
pentestagent/tools/registry.py:171
↓ 14 callers
Function
_basic_tool_def
(name: str = "my_tool")
tests/unit/mcp/test_mcp_tools.py:27
↓ 14 callers
Method
start
Start the local runtime.
pentestagent/runtime/runtime.py:455
↓ 13 callers
Method
stop
Stop the local runtime gracefully.
pentestagent/runtime/runtime.py:467
↓ 12 callers
Method
_is_openai_compatible_model
Return True for models that route through an OpenAI-compatible endpoint.
pentestagent/llm/llm.py:94
↓ 12 callers
Function
_log
(msg: str, level: str = "info")
pentestagent/interface/initializer.py:47
↓ 12 callers
Function
_log
(level: str, message: str)
pentestagent/mcp/server/mcp_tools.py:117
↓ 12 callers
Method
set_active
(self, name: str)
pentestagent/workspaces/manager.py:140
↓ 11 callers
Method
_make_llm
(self, model: str)
tests/unit/llm/test_api_base.py:15
↓ 11 callers
Method
cancel
(self)
pentestagent/interface/tui.py:1286
↓ 11 callers
Method
execute_command
Execute a command in the sandbox. Args: command: The shell command to execute timeout: Timeout in seconds
pentestagent/runtime/docker_runtime.py:143
↓ 11 callers
Function
should_use_local_embeddings
Return True when RAG should use local sentence-transformer embeddings. Decision priority: 1. Explicit ``PENTESTAGENT_EMBEDDINGS=local`` → Tru
pentestagent/knowledge/embeddings.py:17
↓ 10 callers
Function
_validate_note_schema
Validate note schema based on declarative rules. Returns: Error message if validation fails, None if valid
pentestagent/tools/notes/__init__.py:116
↓ 10 callers
Method
add_targets
(self, name: str, values: List[str])
pentestagent/workspaces/manager.py:197
↓ 10 callers
Function
format_mcp_result
Format an MCP tool result for display. Args: result: The raw MCP result Returns: Formatted string
pentestagent/mcp/tools.py:86
↓ 10 callers
Function
get_tool
Get a tool by name.
pentestagent/tools/registry.py:166
↓ 10 callers
Method
validate_arguments
Validate arguments against the schema. Args: arguments: The arguments to validate Returns: Tuple of
pentestagent/tools/registry.py:77
↓ 10 callers
Method
validate_name
(self, name: str)
pentestagent/workspaces/manager.py:77
↓ 10 callers
Method
wait_for
Wait for specified agents (or all) to complete. Args: agent_ids: List of agent IDs to wait for. None = wait for all.
pentestagent/agents/crew/worker_pool.py:296
↓ 9 callers
Method
_add_node
Add a node if it doesn't exist.
pentestagent/knowledge/graph.py:161
↓ 9 callers
Method
_emit
Emit event to callback if registered.
pentestagent/agents/crew/worker_pool.py:40
↓ 9 callers
Function
_make_llm
Build a mock LLM that returns pre-set responses. Each response is a dict with optional: - content: str - tool_calls: list of {id
tests/integration/test_agent_loop.py:47
↓ 9 callers
Function
_make_runtime
()
tests/integration/test_agent_loop.py:34
↓ 9 callers
Method
_read_meta
(self, name: str)
pentestagent/workspaces/manager.py:120
↓ 9 callers
Method
index_file
Index a single file. Args: file_path: The file to index Returns: List of Document objects
pentestagent/knowledge/indexer.py:88
↓ 8 callers
Method
_format_for_summary
Format messages as text for summarization.
pentestagent/llm/memory.py:225
↓ 8 callers
Function
detect_environment
Detect the current system environment.
pentestagent/runtime/runtime.py:273
↓ 8 callers
Method
disconnect_all
(self)
pentestagent/mcp/manager.py:422
↓ 8 callers
Function
get_all_tools
Get all registered tools.
pentestagent/tools/registry.py:161
↓ 8 callers
Method
get_messages
Get messages that fit within token limit (sync, no summarization). Falls back to truncation if over budget. Args:
pentestagent/llm/memory.py:85
↓ 8 callers
Method
search
Find relevant documents for a query. Args: query: The search query k: Maximum number of results to return
pentestagent/knowledge/rag.py:260
↓ 7 callers
Method
_add_edge
Add an edge.
pentestagent/knowledge/graph.py:166
↓ 7 callers
Method
_add_user
(self, content: str)
pentestagent/interface/tui.py:2924
↓ 7 callers
Method
_apply_api_base
Attach the configured OpenAI-compatible API base URL to LiteLLM kwargs. Only applied when: - ``config.openai_api_base`` is set (i.e.
pentestagent/llm/llm.py:106
↓ 7 callers
Method
_env
Build a clean env dict with only the keys we care about.
tests/unit/llm/test_embeddings.py:12
↓ 7 callers
Method
_format_messages_for_llm
Format conversation history for LLM.
pentestagent/agents/base_agent.py:497
↓ 7 callers
Method
_parse_arguments
Parse tool call arguments.
pentestagent/agents/base_agent.py:521
↓ 7 callers
Method
_update_crew_stats
Update crew stats panel.
pentestagent/interface/tui.py:4666
↓ 7 callers
Method
clear
(self)
pentestagent/agents/base_agent.py:195
↓ 7 callers
Function
get_all_notes
Get all notes (for TUI /notes command).
pentestagent/tools/notes/__init__.py:55
↓ 7 callers
Method
get_messages_with_summary
Get messages, summarizing older ones if needed. Args: messages: Full conversation history llm_call: Async fu
pentestagent/llm/memory.py:118
↓ 7 callers
Method
get_meta_field
(self, name: str, field: str)
pentestagent/workspaces/manager.py:179
↓ 7 callers
Function
get_openai_api_base
Return the configured OpenAI-compatible API base URL, or None.
pentestagent/config/constants.py:54
↓ 7 callers
Method
get_total_tokens
Get total token count for messages.
pentestagent/llm/memory.py:286
↓ 7 callers
Method
load
Load and deserialize a saved conversation. Returns [] on error.
pentestagent/interface/conversation_store.py:107
↓ 7 callers
Function
send_response
(req_id: Any, result: Any = None, error: Any = None)
pentestagent/mcp/stdio_adapter.py:99
↓ 7 callers
Method
set_operator_note
Append or set operator_notes for a workspace (plain text).
pentestagent/workspaces/manager.py:167
↓ 6 callers
Function
_emit
Deliver a UI event if a hook is registered, swallowing any errors.
pentestagent/mcp/server/mcp_tools.py:38
↓ 6 callers
Method
_load_config
(self)
pentestagent/mcp/manager.py:150
↓ 6 callers
Function
_make_history
(n: int, role: str = "user")
tests/unit/llm/test_memory.py:17
↓ 6 callers
Method
_save_current_conversation
Persist the current conversation history to the active loot store. On first call for a session, creates a new file and stores the id in
pentestagent/interface/tui.py:3245
↓ 6 callers
Method
_update_crew_worker
Update a worker's state.
pentestagent/interface/tui.py:4791
↓ 6 callers
Method
_write_meta
(self, name: str, meta: dict)
pentestagent/workspaces/manager.py:135
↓ 6 callers
Method
execute_command
Execute a command locally.
pentestagent/runtime/runtime.py:593
↓ 6 callers
Function
get_embeddings
Generate embeddings for a list of texts using LiteLLM. Args: texts: List of texts to embed model: The embedding model to use
pentestagent/knowledge/embeddings.py:47
↓ 6 callers
Function
get_embeddings_local
Generate embeddings locally using sentence-transformers. Args: texts: List of texts to embed model: The sentence-transformer
pentestagent/knowledge/embeddings.py:84
↓ 6 callers
Function
get_settings
Get the global settings instance.
pentestagent/config/settings.py:90
↓ 6 callers
Method
list_targets
(self, name: str)
pentestagent/workspaces/manager.py:235
↓ 6 callers
Method
list_workspaces
(self)
pentestagent/workspaces/manager.py:189
↓ 6 callers
Function
resolve_knowledge_paths
Resolve knowledge-related paths, preferring active workspace if present. Returns a dict with keys: base, sources, embeddings, graph, index, using
pentestagent/workspaces/utils.py:73
↓ 6 callers
Method
to_llm_format
Convert to LLM function calling format.
pentestagent/tools/registry.py:62
↓ 5 callers
Method
_add_message
Add a message widget to chat
pentestagent/interface/tui.py:2900
↓ 5 callers
Method
_add_tool_result
Display tool execution result
pentestagent/interface/tui.py:3040
↓ 5 callers
Function
_assistant
(content: str)
tests/unit/interface/test_conversation_store.py:20
↓ 5 callers
Function
_default_tools
()
pentestagent/mcp/stdio_adapter.py:38
↓ 5 callers
Method
_get_dir
(self)
pentestagent/interface/conversation_store.py:135
↓ 5 callers
Method
_hide_sidebar
Hide the sidebar.
pentestagent/interface/tui.py:4642
↓ 5 callers
Method
_sgr_mouse
Write an SGR mouse escape sequence to the PTY. Format: ESC [ < Cb ; Cx ; Cy M (press) ESC [ < Cb ; Cx ; Cy m (release)
pentestagent/interface/widgets/embedded_terminal.py:219
↓ 5 callers
Method
add_tools
(self, tools: List["Tool"])
pentestagent/agents/base_agent.py:958
↓ 5 callers
Method
create_mcp_tools_from_server
( self, server: MCPServer, embedding_model: str = "text-embedding-3-small", ra
pentestagent/mcp/manager.py:278
↓ 5 callers
Method
execute
Execute a tool with the given arguments. Args: tool: The tool to execute arguments: The arguments to pass to
pentestagent/tools/executor.py:49
↓ 5 callers
Method
get_stats
Get memory statistics.
pentestagent/llm/memory.py:299
next →
1–100 of 1,344, ranked by callers