MCPcopy Create free account

hub / github.com/bytedance/trae-agent / functions

Functions548 in github.com/bytedance/trae-agent

↓ 44 callersMethodprint
Print a message to the console.
trae_agent/utils/cli/cli_console.py:91
↓ 33 callersMethodexecute
Execute the tool with given parameters.
trae_agent/tools/base.py:116
↓ 17 callersMethodreplace
(self, **kwargs)
evaluation/patch_selection/trae_selector/tools/tools/base.py:29
↓ 13 callersMethodprint
Print a message to the console.
trae_agent/utils/cli/simple_console.py:183
↓ 12 callersMethodrun
( self, task: str, extra_args: dict[str, str] | None = None, tool_names: list[
trae_agent/agent/agent.py:59
↓ 12 callersMethodstart
(self)
trae_agent/tools/bash_tool.py:35
↓ 11 callersMethod_insert_entry
Insert entry into db. Args: entry: the entry to insert Returns: None
trae_agent/tools/ckg/ckg_database.py:576
↓ 11 callersMethodupdate
Update the CKG database.
trae_agent/tools/ckg/ckg_database.py:201
↓ 10 callersMethodcreate_from_legacy_config
( cls, *, legacy_config: LegacyConfig | None = None, config_file: str | None =
trae_agent/utils/config.py:325
↓ 7 callersMethod_update_cli_console
( self, step: AgentStep | None = None, agent_execution: AgentExecution | None = None )
trae_agent/agent/base_agent.py:285
↓ 7 callersMethodcreate
( cls, *, config_file: str | None = None, config_string: str | None = None,
trae_agent/utils/config.py:206
↓ 7 callersMethodget_name
Get the tool name.
trae_agent/tools/base.py:101
↓ 7 callersMethodmock_file_read
Helper to mock file reading operations.
tests/tools/test_json_edit_tool.py:26
↓ 7 callersMethodrun
(self)
evaluation/patch_selection/trae_selector/selector_agent.py:190
↓ 6 callersMethodchat
Send chat messages to the LLM.
trae_agent/utils/llm_clients/llm_client.py:72
↓ 6 callersMethodget_input_schema
Get the input schema for the tool.
trae_agent/tools/base.py:127
↓ 6 callersMethodmock_file_system
Helper to mock file system operations
tests/tools/test_edit_tool.py:19
↓ 6 callersMethodrecord_llm_interaction
Record an LLM interaction. Args: messages: Input messages to the LLM response: Response from the LLM prov
trae_agent/utils/trajectory_recorder.py:77
↓ 6 callersMethodrun
Execute a command in the bash shell.
trae_agent/tools/bash_tool.py:87
↓ 6 callersMethodsupports_tool_calling
Check if the current client supports tool calling.
trae_agent/utils/llm_clients/llm_client.py:82
↓ 6 callersMethodupdate_mcp_server_status
(self, mcp_server_name, status: MCPServerStatus)
trae_agent/utils/mcp_client.py:36
↓ 5 callersMethodget_description
Get the tool description.
trae_agent/tools/base.py:106
↓ 5 callersMethodget_mcp_server_status
(self, mcp_server_name: str)
trae_agent/utils/mcp_client.py:33
↓ 5 callersFunctionretry_with
Decorator that adds retry logic with randomized backoff. Args: func: The function to decorate provider_name: The name of the
trae_agent/utils/llm_clients/retry_utils.py:13
↓ 5 callersMethodsave_trajectory
Save the current trajectory data to file.
trae_agent/utils/trajectory_recorder.py:220
↓ 5 callersMethodstop
(self)
evaluation/patch_selection/trae_selector/tools/tools/bash.py:37
↓ 4 callersMethod_load_json_file
Load and parse JSON file.
trae_agent/tools/json_edit_tool.py:157
↓ 4 callersMethod_load_json_file
(self, file_path: Path)
trae_agent/tools/json_edit_tool_cli.py:75
↓ 4 callersMethod_make_output
( self, file_content: str, file_descriptor: str, init_line: int = 1, e
evaluation/patch_selection/trae_selector/tools/tools/edit.py:229
↓ 4 callersMethod_parse_jsonpath
Parse JSONPath expression with error handling.
trae_agent/tools/json_edit_tool.py:186
↓ 4 callersMethod_parse_jsonpath
(self, json_path_str: str)
trae_agent/tools/json_edit_tool_cli.py:101
↓ 4 callersMethod_serialize_tool_call
Serialize a tool call to a dictionary.
trae_agent/utils/trajectory_recorder.py:244
↓ 4 callersMethodcleanup
Clean up resources
trae_agent/utils/mcp_client.py:101
↓ 4 callersMethodexecute
(self, command, timeout=60)
evaluation/patch_selection/trae_selector/sandbox.py:61
↓ 4 callersMethodget_base_config
(self)
tests/utils/test_config.py:143
↓ 4 callersMethodnew_task
Create a new task.
trae_agent/agent/trae_agent.py:103
↓ 4 callersMethodparse_tool_call_result
Parse a ToolResult into a Gemini FunctionResponse Part for history.
trae_agent/utils/llm_clients/google_client.py:203
↓ 4 callersFunctionresolve_config_value
Resolve configuration value with priority: CLI > ENV > Config > Default.
trae_agent/utils/config.py:394
↓ 4 callersMethodresolve_config_values
( self, *, provider: str | None = None, model: str | None = None, mode
trae_agent/utils/config.py:302
↓ 4 callersMethodstop
Terminate the bash shell.
trae_agent/tools/bash_tool.py:63
↓ 4 callersMethodwrite_file
(self, path: Path, file: str)
evaluation/patch_selection/trae_selector/tools/tools/edit.py:223
↓ 3 callersMethod_image_name
Get the Docker image name for a given instance ID. Args: instance_id: Instance identifier. Returns:
evaluation/run_evaluation.py:94
↓ 3 callersMethod_make_output
Generate output for the CLI based on the content of a file.
trae_agent/tools/edit_tool_cli.py:336
↓ 3 callersMethod_make_output
Generate output for the CLI based on the content of a file.
trae_agent/tools/edit_tool.py:292
↓ 3 callersMethod_save_json_file
Save JSON data to file.
trae_agent/tools/json_edit_tool.py:173
↓ 3 callersMethod_save_json_file
( self, file_path: Path, data: dict | list, pretty_print: bool = True )
trae_agent/tools/json_edit_tool_cli.py:89
↓ 3 callersMethodclose
(self)
evaluation/patch_selection/trae_selector/sandbox.py:106
↓ 3 callersMethodclose
Ensure proper tool resource deallocation before task completion.
trae_agent/tools/base.py:177
↓ 3 callersMethodconnect_and_discover
( self, mcp_server_name: str, mcp_server_config: MCPServerConfig, mcp_tools_co
trae_agent/utils/mcp_client.py:39
↓ 3 callersFunctiondocker_exec
Execute a shell command inside a Docker container. Args: container: Docker container object. command: Shell command to execu
evaluation/utils.py:15
↓ 3 callersFunctionget_ckg_database_path
Get the path to the CKG database for a codebase path.
trae_agent/tools/ckg/ckg_database.py:31
↓ 3 callersMethodget_git_diff
Get the git diff of the project.
trae_agent/agent/trae_agent.py:180
↓ 3 callersMethodget_name
(self)
trae_agent/tools/ckg_tool.py:34
↓ 3 callersMethodget_name
(self)
trae_agent/tools/edit_tool_cli.py:82
↓ 3 callersMethodget_parameters
Get the tool parameters.
trae_agent/tools/base.py:111
↓ 3 callersMethodinsert
(self, path: Path, insert_line: int, new_str: str)
evaluation/patch_selection/trae_selector/tools/tools/edit.py:170
↓ 3 callersFunctionmaybe_truncate
(content: str, truncate_after: int | None = MAX_RESPONSE_LEN)
evaluation/patch_selection/trae_selector/tools/tools/run.py:8
↓ 3 callersFunctionmaybe_truncate
Truncate content and append a notice if content exceeds the specified length.
trae_agent/tools/run.py:21
↓ 3 callersMethodparse_messages
Parse the messages to Gemini format, separating system instructions.
trae_agent/utils/llm_clients/google_client.py:171
↓ 3 callersMethodread_file
(self, path: Path)
evaluation/patch_selection/trae_selector/tools/tools/edit.py:217
↓ 3 callersMethodread_file
Read the content of a file from a given path; raise a ToolError if an error occurs.
trae_agent/tools/edit_tool_cli.py:322
↓ 3 callersMethodread_file
Read the content of a file from a given path; raise a ToolError if an error occurs.
trae_agent/tools/edit_tool.py:278
↓ 3 callersFunctionresolve_config_file
Resolve config file with backward compatibility. First tries the specified file, then falls back to JSON if YAML doesn't exist.
trae_agent/cli.py:31
↓ 3 callersMethodrun
(self, command: str)
evaluation/patch_selection/trae_selector/tools/tools/bash.py:44
↓ 3 callersFunctionsave_selection_success
( instance_id: str, statistics_path: str, patch_id: int, is_success: int, group_id=1,
evaluation/patch_selection/trae_selector/utils.py:116
↓ 3 callersMethodset_lakeview
Set the lakeview configuration for the console.
trae_agent/utils/cli/cli_console.py:118
↓ 3 callersMethodwrite_file
Write the content of a file to a given path; raise a ToolError if an error occurs.
trae_agent/tools/edit_tool_cli.py:329
↓ 3 callersMethodwrite_file
Write the content of a file to a given path; raise a ToolError if an error occurs.
trae_agent/tools/edit_tool.py:285
↓ 2 callersMethod_construct_ckg
Initialise the code knowledge graph.
trae_agent/tools/ckg/ckg_database.py:534
↓ 2 callersMethod_create_handler
(self, arguments: ToolCallArguments, _path: Path)
trae_agent/tools/edit_tool_cli.py:366
↓ 2 callersMethod_finalize_step
( self, step: "AgentStep", messages: list["LLMMessage"], execution: "AgentExecution" )
trae_agent/agent/base_agent.py:238
↓ 2 callersMethod_id_generator
Generate a random ID string
trae_agent/utils/llm_clients/ollama_client.py:194
↓ 2 callersMethod_insert_handler
(self, arguments: ToolCallArguments, _path: Path)
trae_agent/tools/edit_tool_cli.py:391
↓ 2 callersMethod_is_task_completed
Enhanced task completion detection.
trae_agent/agent/trae_agent.py:236
↓ 2 callersMethod_normalize_name
Normalize tool name by making it lowercase and removing underscores.
trae_agent/tools/base.py:195
↓ 2 callersMethod_serialize_message
Serialize an LLM message to a dictionary.
trae_agent/utils/trajectory_recorder.py:232
↓ 2 callersMethod_serialize_tool_result
Serialize a tool result to a dictionary.
trae_agent/utils/trajectory_recorder.py:253
↓ 2 callersMethod_start_persistent_shell
Spawns a persistent bash shell inside the container using pexpect.
trae_agent/agent/docker_manager.py:181
↓ 2 callersMethod_str_replace_handler
(self, arguments: ToolCallArguments, _path: Path)
trae_agent/tools/edit_tool_cli.py:376
↓ 2 callersMethod_view
Implement the view command
trae_agent/tools/edit_tool_cli.py:198
↓ 2 callersMethod_view
Implement the view command
trae_agent/tools/edit_tool.py:154
↓ 2 callersMethod_view_handler
(self, arguments: ToolCallArguments, _path: Path)
trae_agent/tools/edit_tool_cli.py:354
↓ 2 callersFunction_write_problem_statement
Helper function to write problem statement using context manager.
evaluation/utils.py:65
↓ 2 callersFunctionanalyze_group
(statistics_folder_path, total_num_instances=500)
evaluation/patch_selection/analysis.py:110
↓ 2 callersMethodcall_tool
(self, name, args)
trae_agent/utils/mcp_client.py:93
↓ 2 callersMethodchat
Send chat messages to Gemini with optional tool support.
trae_agent/utils/llm_clients/google_client.py:50
↓ 2 callersMethodconnect_to_server
Connect to an MCP server Args: server_params: Parameters for connecting to the MCP server.
trae_agent/utils/mcp_client.py:74
↓ 2 callersMethodcreate_console
Create a console instance based on type and mode. Args: console_type: Type of console to create (SIMPLE or RICH) mode
trae_agent/utils/cli/console_factory.py:17
↓ 2 callersMethodexecute_tool_call
Execute a tool call.
trae_agent/tools/base.py:205
↓ 2 callersMethodfinalize_recording
Finalize the trajectory recording. Args: success: Whether the task completed successfully final_result: Final result
trae_agent/utils/trajectory_recorder.py:198
↓ 2 callersFunctiongenerate_agent_step_table
Log an agent step to the console.
trae_agent/utils/cli/cli_console.py:126
↓ 2 callersFunctionget_file_metadata_hash
Get hash based on file metadata (name, mtime, size) for non-git repositories.
trae_agent/tools/ckg/ckg_database.py:83
↓ 2 callersMethodget_max_tokens_param
Get the maximum tokens parameter value.Prioritizes max_completion_tokens, falls back to max_tokens if not available.
trae_agent/utils/config.py:48
↓ 2 callersMethodget_model_provider
Get the model provider.
trae_agent/tools/base.py:96
↓ 2 callersMethodget_name
(self)
trae_agent/tools/edit_tool.py:38
↓ 2 callersMethodget_recommended_console_type
Get the recommended console type for a given mode. Args: mode: Console operation mode Returns: Recommended c
trae_agent/utils/cli/console_factory.py:42
↓ 2 callersMethodget_session
(self)
evaluation/patch_selection/trae_selector/sandbox.py:54
↓ 2 callersFunctionget_trajectory_filename
(instance_id, traj_dir, group_id=1, voting_id=1)
evaluation/patch_selection/trae_selector/utils.py:99
↓ 2 callersFunctionget_unique_filename
(patches_path, trial_index)
evaluation/patch_selection/trae_selector/utils.py:83
↓ 2 callersMethodlist_tools
(self)
trae_agent/utils/mcp_client.py:97
next →1–100 of 548, ranked by callers