MCPcopy Create free account

hub / github.com/china-qijizhifeng/agentic-harness-engineering / functions

Functions607 in github.com/china-qijizhifeng/agentic-harness-engineering

↓ 63 callersMethodsearch
( self, query: str, search_type: str = "search", num_results: int = 10,
agents/evolve_agent/tools/web_tools/web_tool.py:49
↓ 43 callersMethodread_text
Read text files
agents/evolve_agent/tools/llm_friendly.py:236
↓ 13 callersFunctionget_sandbox
Get sandbox from agent_state, or raise SandboxError.
agents/evolve_agent/tools/_sandbox_utils.py:17
↓ 12 callersFunctionresolve_path
Resolve relative paths against sandbox work_dir (string resolution only).
agents/evolve_agent/tools/_sandbox_utils.py:26
↓ 10 callersFunction_clean_shell_token
(token: str)
experiments/evolved_harness/tools/shell_tools/run_shell_command.py:168
↓ 10 callersFunction_emit_failure
(command: str, exc: Exception, output_format: str)
agents/evolve_agent/skills/agent-debugger-cli/_source/agent_debugger_core/cli/adb.py:26
↓ 10 callersFunctionget_llm_config
Get LLM config for the specified role. role='agent': read from config.llm role='evolve': fields in evolve_agent.llm_config take priority, fall
evolve.py:228
↓ 10 callersFunctionrun_agent
( *, trace_paths: List[Path], mode: str, question: Optional[str] = None, )
agents/evolve_agent/skills/agent-debugger-cli/_source/agent_debugger_core/runtime/runner.py:165
↓ 9 callersFunction_fmt_tasks
(tasks: list)
evolve.py:1896
↓ 8 callersFunctionnormalize_trace
( trace_path: Path | str, *, trace_type: str = "openai_messages", runtime_dir: Path | None = N
agents/evolve_agent/skills/agent-debugger-cli/_source/agent_debugger_core/trace_io.py:126
↓ 7 callersMethod_emit_compaction_finished
( self, *, agent_state: Any | None, phase: CompactionPhase, mode: Comp
agents/evolve_agent/middleware/context_compaction/middleware.py:172
↓ 7 callersFunctionadd_note
(note: str)
experiments/evolved_harness/tools/shell_tools/run_shell_command.py:126
↓ 6 callersFunction_avg
(items: list[dict], key: str)
evolve.py:1074
↓ 6 callersFunction_eq_fmt_list
(tasks)
evolve.py:2715
↓ 6 callersFunctionfind_latest_job_dir
Find the latest job directory.
evolve.py:332
↓ 6 callersFunctionis_llm_span
Identify spans that correspond to LLM calls.
trace_converter.py:361
↓ 5 callersFunction_ensure_adb_installed
Install adb from bundled _source/ if not already available. Returns True on success.
evolve.py:1193
↓ 5 callersFunction_error_result
Return a standardized tool error payload.
agents/evolve_agent/tools/file_tools/apply_patch.py:127
↓ 5 callersMethod_estimate_tokens
Estimate tokens for diagnostics; never raise from middleware paths.
agents/evolve_agent/middleware/context_compaction/middleware.py:308
↓ 5 callersMethod_make_request
( self, method: str, params: dict[str,
agents/evolve_agent/tools/mcp_client.py:807
↓ 5 callersFunctionsend_feishu_notification
Send notification via Feishu custom bot Webhook. Config requires: notify: feishu_webhook: "https://open.feishu.cn/open-apis/bot/v2/
evolve.py:61
↓ 5 callersFunctionsort_observations
(observations: List[Dict[str, Any]])
trace_converter.py:398
↓ 4 callersFunction_build_parser
()
agents/evolve_agent/skills/agent-debugger-cli/_source/agent_debugger_core/cli/adb.py:214
↓ 4 callersMethod_count_tokens
(self, messages: list[Message])
agents/evolve_agent/middleware/context_compaction/compact_stratigies/user_model_full_trace_adaptive.py:314
↓ 4 callersFunction_extract_one_liner
Extract a short plain-text summary for overview lines (single line). adb replies are often Markdown (## 回答, numbered sections). The old `. `
evolve.py:1546
↓ 4 callersFunction_flatten_nested_list_attrs
(args: argparse.Namespace, attrs: Sequence[str])
agents/evolve_agent/skills/agent-debugger-cli/_source/agent_debugger_core/cli/adb.py:19
↓ 4 callersMethod_get_next_id
(self)
agents/evolve_agent/tools/mcp_client.py:732
↓ 4 callersMethod_initialize_session
Initialize the MCP session, with fallback to HTTP+SSE transport.
agents/evolve_agent/tools/mcp_client.py:84
↓ 4 callersFunction_prep_env
(tmp_path, monkeypatch)
agents/evolve_agent/skills/agent-debugger-cli/_source/tests/test_runner_check_and_retry.py:10
↓ 4 callersFunction_resolve_patch_path
Resolve a validated patch path inside the sandbox.
agents/evolve_agent/tools/file_tools/apply_patch.py:360
↓ 4 callersFunctionbuild_agent_turns_from_observations
Build assistant turns and attach following tool calls.
trace_converter.py:463
↓ 4 callersFunctiondeep_merge
Deep merge two dicts, overlay overrides base.
evolve.py:126
↓ 4 callersFunctionensure_tools_importable
Locate AHE root and prepend its evolve_agent/ dir to sys.path so import tools.file_tools etc. resolve. Returns the added path. Resolution ord
agents/evolve_agent/skills/agent-debugger-cli/_source/agent_debugger_core/runtime/bootstrap.py:17
↓ 4 callersFunctionextract_text_from_message
Extract plain text from a message payload.
trace_converter.py:127
↓ 4 callersMethodparse
(self, url: str)
agents/evolve_agent/tools/web_tools/web_tool.py:132
↓ 4 callersFunctionresolve_llm_settings
()
agents/evolve_agent/skills/agent-debugger-cli/_source/agent_debugger_core/cli/llm_resolver.py:13
↓ 3 callersFunction_contains_tools_pkg
(candidate: Path)
agents/evolve_agent/skills/agent-debugger-cli/_source/agent_debugger_core/runtime/bootstrap.py:13
↓ 3 callersMethod_emit_compaction_started
( self, *, agent_state: Any | None, phase: CompactionPhase, mode: Comp
agents/evolve_agent/middleware/context_compaction/middleware.py:144
↓ 3 callersFunction_find_trial_dir
Find the corresponding trial directory by task name.
evolve.py:924
↓ 3 callersFunction_generate_diff
Generate a unified diff for UI display.
agents/evolve_agent/tools/file_tools/apply_patch.py:418
↓ 3 callersMethod_generate_summary
Generate summary using LLM. Raises: Exception: If LLM call fails.
agents/evolve_agent/middleware/context_compaction/compact_stratigies/sliding_window.py:519
↓ 3 callersFunction_has_env_var
(value: str)
agents/evolve_agent/skills/nexau-evolution-guide/scripts/validate_agent.py:72
↓ 3 callersFunction_read_text_file
Read a full text file from the sandbox without sandbox text truncation.
agents/evolve_agent/tools/file_tools/apply_patch.py:383
↓ 3 callersMethod_record_full_trace_messages
Append newly-seen messages to full trace in agent context.
agents/evolve_agent/middleware/context_compaction/middleware.py:692
↓ 3 callersFunction_resolve
(yaml_dir: Path, rel: str)
agents/evolve_agent/skills/nexau-evolution-guide/scripts/validate_agent.py:67
↓ 3 callersFunction_restore_trailing_newline
Restore original trailing newline state.
agents/evolve_agent/tools/file_tools/replace.py:27
↓ 3 callersFunction_run
(args, env=None)
agents/evolve_agent/skills/agent-debugger-cli/_source/tests/test_config.py:8
↓ 3 callersFunction_scripted
(sequence)
agents/evolve_agent/skills/agent-debugger-cli/_source/tests/test_runner_check_and_retry.py:29
↓ 3 callersFunction_seek_sequence
Find a sequence of lines with progressively more permissive matching.
agents/evolve_agent/tools/file_tools/apply_patch.py:144
↓ 3 callersMethod_send_json_rpc_via_sse
Send JSON-RPC payload over HTTP+SSE transport.
agents/evolve_agent/tools/mcp_client.py:504
↓ 3 callersFunction_truncate
(s: str, max_len: int = 200)
evolve.py:932
↓ 3 callersFunction_write_text_file
Write a text file through the sandbox API.
agents/evolve_agent/tools/file_tools/apply_patch.py:391
↓ 3 callersFunctionapply_agent_yaml_patch
Deep merge a patch dict into the specified agent yaml file.
evolve.py:177
↓ 3 callersFunctioncompute_stats
Compute detailed evaluation statistics from harbor raw job_dir. When k>1, groups trials by task name: a task passes only if ALL k rollouts pass.
evolve.py:599
↓ 3 callersFunctiondownload_langfuse_trace
(*, url: str, ak: str, sk: str)
agents/evolve_agent/skills/agent-debugger-cli/_source/agent_debugger_core/download.py:49
↓ 3 callersMethodestimate_size
Estimate the size of an object in bytes. Args: obj: Object to estimate size for Returns: Estimated
agents/evolve_agent/tools/llm_friendly.py:520
↓ 3 callersFunctionload_config
()
agents/evolve_agent/skills/agent-debugger-cli/_source/agent_debugger_core/cli/config_store.py:21
↓ 3 callersFunctionnormalize_generation_input
Normalize generation input payload into a dict.
trace_converter.py:317
↓ 3 callersFunctionpick
(cfg_key: str, qa_env: str, llm_env: str)
agents/evolve_agent/skills/agent-debugger-cli/_source/agent_debugger_core/cli/llm_resolver.py:16
↓ 3 callersFunctionregister_explore_agent_skills
将 explore-agent 产出的 skill 注册到实验副本的 evolve_agent.yaml, 并在实验副本的 evolve_prompt.md 追加 skill 引导。
agents/explore_agent/run.py:433
↓ 3 callersFunctionset_llm_env
Write LLM config to environment variables for ${env.LLM_*} references.
evolve.py:247
↓ 3 callersFunctiontask_alias
E2B aliases reject ``.``; replace with ``-`` to derive a stable alias.
scripts/build_templates.py:153
↓ 2 callersMethod_build_initialize_request
Construct the MCP initialize request payload.
agents/evolve_agent/tools/mcp_client.py:104
↓ 2 callersMethod_compact_messages
Compact messages using the configured strategy.
agents/evolve_agent/middleware/context_compaction/middleware.py:658
↓ 2 callersMethod_count_tokens
Count tokens for the current prompt using configured token counter.
agents/evolve_agent/middleware/round_and_token_reminder.py:93
↓ 2 callersFunction_dump_agent_to_disk
将 agent 的 history 和 tracer 保存到磁盘。
agents/explore_agent/run.py:43
↓ 2 callersFunction_dump_evolve_tracer_to_disk
Write current InMemoryTracer snapshot to disk in cleaned format (atomic via tmp+rename).
evolve.py:2941
↓ 2 callersMethod_extract_content
(self, tool_output: Any)
experiments/evolved_harness/middleware/execution_risk_hints.py:397
↓ 2 callersFunction_extract_evolve_changes_summary
Extract a short summary of what changes were made from evolve agent output.
evolve.py:3228
↓ 2 callersFunction_extract_exception_type
Extract Python exception class name from exception.txt content. Strategy: 1. Prefer regex matching standard exception names (ending with Erro
evolve.py:529
↓ 2 callersFunction_extract_trace_data_impl
( trace: Dict[str, Any], *, coerce_observation_payloads: bool, include_system_prompt_message:
trace_converter.py:734
↓ 2 callersFunction_extract_trace_timing
Extract per-turn timing summary from a trace JSON for timeout analysis.
evolve.py:1348
↓ 2 callersFunction_find_adb
Locate the adb executable, checking common pip script directories.
evolve.py:1178
↓ 2 callersMethod_get_next_id
Get the next request ID.
agents/evolve_agent/tools/mcp_client.py:79
↓ 2 callersFunction_get_publish_guard
(agent_state: AgentState | None)
experiments/evolved_harness/tools/shell_tools/run_shell_command.py:211
↓ 2 callersMethod_group_into_iterations
Group messages into conversation iterations. An iteration is bounded by ASSISTANT messages: [USER or FRAMEWORK](optional) -> [ASSISTA
agents/evolve_agent/middleware/context_compaction/compact_stratigies/sliding_window.py:436
↓ 2 callersMethod_handle_sse_event
Process individual SSE events.
agents/evolve_agent/tools/mcp_client.py:427
↓ 2 callersMethod_hard_truncation_fallback
Fallback by keeping the newest messages within token limit.
agents/evolve_agent/middleware/context_compaction/compact_stratigies/sliding_window.py:380
↓ 2 callersMethod_initialize_connection
Initialize the MCP connection with proper handshake.
agents/evolve_agent/tools/mcp_client.py:736
↓ 2 callersMethod_load_state
(self, raw_state: Any)
experiments/evolved_harness/middleware/execution_risk_hints.py:326
↓ 2 callersFunction_log
(msg: str)
agents/explore_agent/run.py:265
↓ 2 callersMethod_looks_timed_out
(self, content: str, exit_code: int | None)
experiments/evolved_harness/middleware/execution_risk_hints.py:417
↓ 2 callersMethod_make_request
Make a direct HTTP request to the MCP server.
agents/evolve_agent/tools/mcp_client.py:334
↓ 2 callersFunction_nexau_steps
Append the standard install chain (apt + uv + venv + packages) to ``tpl``. The resulting image has ``uv`` available, a fresh Python venv at `
scripts/build_templates.py:89
↓ 2 callersFunction_normalize_unicode_line
Normalize common unicode punctuation to ASCII equivalents.
agents/evolve_agent/tools/file_tools/apply_patch.py:139
↓ 2 callersFunction_parse_run_output
Parse nexau.Agent.run() string output into the inner JSON payload. Raises BudgetExceeded when the agent hit max_iterations without calling co
agents/evolve_agent/skills/agent-debugger-cli/_source/agent_debugger_core/runtime/runner.py:92
↓ 2 callersMethod_parse_streamable_http_payload
Parse responses that may include SSE-formatted messages.
agents/evolve_agent/tools/mcp_client.py:148
↓ 2 callersFunction_prep
(tmp_path, monkeypatch)
agents/evolve_agent/skills/agent-debugger-cli/_source/tests/test_runner_llm_retry.py:9
↓ 2 callersFunction_prepare_agent_config
读取 base agent yaml,应用 patch,写入同目录临时文件并返回。 使用 tempfile 生成唯一文件名,避免并发实验写同一文件的竞争。 临时文件与 base 同目录,确保 yaml 内的相对路径仍能正确解析。 如果没有 patch,直接返回 base_c
agents/explore_agent/run.py:214
↓ 2 callersFunction_register_tracer
(key: str, agent, log_dir: Path)
evolve.py:2929
↓ 2 callersMethod_resolve_run_id
(agent_state: Any | None)
agents/evolve_agent/middleware/context_compaction/middleware.py:138
↓ 2 callersFunction_run_single_adb_ask
Run `adb ask` for one task and return result dict.
evolve.py:1403
↓ 2 callersFunction_run_with_retry
(agent, user_message: str, *, attempts: int = 3)
agents/evolve_agent/skills/agent-debugger-cli/_source/agent_debugger_core/runtime/runner.py:153
↓ 2 callersMethod_send_initialized_notification
Send the initialized notification as per MCP protocol.
agents/evolve_agent/tools/mcp_client.py:296
↓ 2 callersFunction_setup_env
(tmp_path, monkeypatch)
agents/evolve_agent/skills/agent-debugger-cli/_source/tests/test_cli_ask.py:9
↓ 2 callersFunction_setup_env
(tmp_path, monkeypatch)
agents/evolve_agent/skills/agent-debugger-cli/_source/tests/test_cli_check.py:12
↓ 2 callersMethod_summarize_segment
(self, segment: list[Message], summarize_fn: SummaryFn, output_max_tokens: int)
agents/evolve_agent/middleware/context_compaction/compact_stratigies/user_model_full_trace_adaptive.py:131
↓ 2 callersFunction_target_variants
(target: str)
experiments/evolved_harness/tools/shell_tools/run_shell_command.py:280
↓ 2 callersMethod_truncate_segment_to_budget
( self, segment: list[Message], budget_tokens: int, )
agents/evolve_agent/middleware/context_compaction/compact_stratigies/user_model_full_trace_adaptive.py:186
↓ 2 callersFunction_unregister_tracer
(key: str)
evolve.py:2935
next →1–100 of 607, ranked by callers