Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/china-qijizhifeng/agentic-harness-engineering
/ functions
Functions
607 in github.com/china-qijizhifeng/agentic-harness-engineering
⨍
Functions
607
◇
Types & classes
69
↓ 63 callers
Method
search
( self, query: str, search_type: str = "search", num_results: int = 10,
agents/evolve_agent/tools/web_tools/web_tool.py:49
↓ 43 callers
Method
read_text
Read text files
agents/evolve_agent/tools/llm_friendly.py:236
↓ 13 callers
Function
get_sandbox
Get sandbox from agent_state, or raise SandboxError.
agents/evolve_agent/tools/_sandbox_utils.py:17
↓ 12 callers
Function
resolve_path
Resolve relative paths against sandbox work_dir (string resolution only).
agents/evolve_agent/tools/_sandbox_utils.py:26
↓ 10 callers
Function
_clean_shell_token
(token: str)
experiments/evolved_harness/tools/shell_tools/run_shell_command.py:168
↓ 10 callers
Function
_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 callers
Function
get_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 callers
Function
run_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 callers
Function
_fmt_tasks
(tasks: list)
evolve.py:1896
↓ 8 callers
Function
normalize_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 callers
Method
_emit_compaction_finished
( self, *, agent_state: Any | None, phase: CompactionPhase, mode: Comp
agents/evolve_agent/middleware/context_compaction/middleware.py:172
↓ 7 callers
Function
add_note
(note: str)
experiments/evolved_harness/tools/shell_tools/run_shell_command.py:126
↓ 6 callers
Function
_avg
(items: list[dict], key: str)
evolve.py:1074
↓ 6 callers
Function
_eq_fmt_list
(tasks)
evolve.py:2715
↓ 6 callers
Function
find_latest_job_dir
Find the latest job directory.
evolve.py:332
↓ 6 callers
Function
is_llm_span
Identify spans that correspond to LLM calls.
trace_converter.py:361
↓ 5 callers
Function
_ensure_adb_installed
Install adb from bundled _source/ if not already available. Returns True on success.
evolve.py:1193
↓ 5 callers
Function
_error_result
Return a standardized tool error payload.
agents/evolve_agent/tools/file_tools/apply_patch.py:127
↓ 5 callers
Method
_estimate_tokens
Estimate tokens for diagnostics; never raise from middleware paths.
agents/evolve_agent/middleware/context_compaction/middleware.py:308
↓ 5 callers
Method
_make_request
( self, method: str, params: dict[str,
agents/evolve_agent/tools/mcp_client.py:807
↓ 5 callers
Function
send_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 callers
Function
sort_observations
(observations: List[Dict[str, Any]])
trace_converter.py:398
↓ 4 callers
Function
_build_parser
()
agents/evolve_agent/skills/agent-debugger-cli/_source/agent_debugger_core/cli/adb.py:214
↓ 4 callers
Method
_count_tokens
(self, messages: list[Message])
agents/evolve_agent/middleware/context_compaction/compact_stratigies/user_model_full_trace_adaptive.py:314
↓ 4 callers
Function
_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 callers
Function
_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 callers
Method
_get_next_id
(self)
agents/evolve_agent/tools/mcp_client.py:732
↓ 4 callers
Method
_initialize_session
Initialize the MCP session, with fallback to HTTP+SSE transport.
agents/evolve_agent/tools/mcp_client.py:84
↓ 4 callers
Function
_prep_env
(tmp_path, monkeypatch)
agents/evolve_agent/skills/agent-debugger-cli/_source/tests/test_runner_check_and_retry.py:10
↓ 4 callers
Function
_resolve_patch_path
Resolve a validated patch path inside the sandbox.
agents/evolve_agent/tools/file_tools/apply_patch.py:360
↓ 4 callers
Function
build_agent_turns_from_observations
Build assistant turns and attach following tool calls.
trace_converter.py:463
↓ 4 callers
Function
deep_merge
Deep merge two dicts, overlay overrides base.
evolve.py:126
↓ 4 callers
Function
ensure_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 callers
Function
extract_text_from_message
Extract plain text from a message payload.
trace_converter.py:127
↓ 4 callers
Method
parse
(self, url: str)
agents/evolve_agent/tools/web_tools/web_tool.py:132
↓ 4 callers
Function
resolve_llm_settings
()
agents/evolve_agent/skills/agent-debugger-cli/_source/agent_debugger_core/cli/llm_resolver.py:13
↓ 3 callers
Function
_contains_tools_pkg
(candidate: Path)
agents/evolve_agent/skills/agent-debugger-cli/_source/agent_debugger_core/runtime/bootstrap.py:13
↓ 3 callers
Method
_emit_compaction_started
( self, *, agent_state: Any | None, phase: CompactionPhase, mode: Comp
agents/evolve_agent/middleware/context_compaction/middleware.py:144
↓ 3 callers
Function
_find_trial_dir
Find the corresponding trial directory by task name.
evolve.py:924
↓ 3 callers
Function
_generate_diff
Generate a unified diff for UI display.
agents/evolve_agent/tools/file_tools/apply_patch.py:418
↓ 3 callers
Method
_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 callers
Function
_has_env_var
(value: str)
agents/evolve_agent/skills/nexau-evolution-guide/scripts/validate_agent.py:72
↓ 3 callers
Function
_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 callers
Method
_record_full_trace_messages
Append newly-seen messages to full trace in agent context.
agents/evolve_agent/middleware/context_compaction/middleware.py:692
↓ 3 callers
Function
_resolve
(yaml_dir: Path, rel: str)
agents/evolve_agent/skills/nexau-evolution-guide/scripts/validate_agent.py:67
↓ 3 callers
Function
_restore_trailing_newline
Restore original trailing newline state.
agents/evolve_agent/tools/file_tools/replace.py:27
↓ 3 callers
Function
_run
(args, env=None)
agents/evolve_agent/skills/agent-debugger-cli/_source/tests/test_config.py:8
↓ 3 callers
Function
_scripted
(sequence)
agents/evolve_agent/skills/agent-debugger-cli/_source/tests/test_runner_check_and_retry.py:29
↓ 3 callers
Function
_seek_sequence
Find a sequence of lines with progressively more permissive matching.
agents/evolve_agent/tools/file_tools/apply_patch.py:144
↓ 3 callers
Method
_send_json_rpc_via_sse
Send JSON-RPC payload over HTTP+SSE transport.
agents/evolve_agent/tools/mcp_client.py:504
↓ 3 callers
Function
_truncate
(s: str, max_len: int = 200)
evolve.py:932
↓ 3 callers
Function
_write_text_file
Write a text file through the sandbox API.
agents/evolve_agent/tools/file_tools/apply_patch.py:391
↓ 3 callers
Function
apply_agent_yaml_patch
Deep merge a patch dict into the specified agent yaml file.
evolve.py:177
↓ 3 callers
Function
compute_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 callers
Function
download_langfuse_trace
(*, url: str, ak: str, sk: str)
agents/evolve_agent/skills/agent-debugger-cli/_source/agent_debugger_core/download.py:49
↓ 3 callers
Method
estimate_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 callers
Function
load_config
()
agents/evolve_agent/skills/agent-debugger-cli/_source/agent_debugger_core/cli/config_store.py:21
↓ 3 callers
Function
normalize_generation_input
Normalize generation input payload into a dict.
trace_converter.py:317
↓ 3 callers
Function
pick
(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 callers
Function
register_explore_agent_skills
将 explore-agent 产出的 skill 注册到实验副本的 evolve_agent.yaml, 并在实验副本的 evolve_prompt.md 追加 skill 引导。
agents/explore_agent/run.py:433
↓ 3 callers
Function
set_llm_env
Write LLM config to environment variables for ${env.LLM_*} references.
evolve.py:247
↓ 3 callers
Function
task_alias
E2B aliases reject ``.``; replace with ``-`` to derive a stable alias.
scripts/build_templates.py:153
↓ 2 callers
Method
_build_initialize_request
Construct the MCP initialize request payload.
agents/evolve_agent/tools/mcp_client.py:104
↓ 2 callers
Method
_compact_messages
Compact messages using the configured strategy.
agents/evolve_agent/middleware/context_compaction/middleware.py:658
↓ 2 callers
Method
_count_tokens
Count tokens for the current prompt using configured token counter.
agents/evolve_agent/middleware/round_and_token_reminder.py:93
↓ 2 callers
Function
_dump_agent_to_disk
将 agent 的 history 和 tracer 保存到磁盘。
agents/explore_agent/run.py:43
↓ 2 callers
Function
_dump_evolve_tracer_to_disk
Write current InMemoryTracer snapshot to disk in cleaned format (atomic via tmp+rename).
evolve.py:2941
↓ 2 callers
Method
_extract_content
(self, tool_output: Any)
experiments/evolved_harness/middleware/execution_risk_hints.py:397
↓ 2 callers
Function
_extract_evolve_changes_summary
Extract a short summary of what changes were made from evolve agent output.
evolve.py:3228
↓ 2 callers
Function
_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 callers
Function
_extract_trace_data_impl
( trace: Dict[str, Any], *, coerce_observation_payloads: bool, include_system_prompt_message:
trace_converter.py:734
↓ 2 callers
Function
_extract_trace_timing
Extract per-turn timing summary from a trace JSON for timeout analysis.
evolve.py:1348
↓ 2 callers
Function
_find_adb
Locate the adb executable, checking common pip script directories.
evolve.py:1178
↓ 2 callers
Method
_get_next_id
Get the next request ID.
agents/evolve_agent/tools/mcp_client.py:79
↓ 2 callers
Function
_get_publish_guard
(agent_state: AgentState | None)
experiments/evolved_harness/tools/shell_tools/run_shell_command.py:211
↓ 2 callers
Method
_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 callers
Method
_handle_sse_event
Process individual SSE events.
agents/evolve_agent/tools/mcp_client.py:427
↓ 2 callers
Method
_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 callers
Method
_initialize_connection
Initialize the MCP connection with proper handshake.
agents/evolve_agent/tools/mcp_client.py:736
↓ 2 callers
Method
_load_state
(self, raw_state: Any)
experiments/evolved_harness/middleware/execution_risk_hints.py:326
↓ 2 callers
Function
_log
(msg: str)
agents/explore_agent/run.py:265
↓ 2 callers
Method
_looks_timed_out
(self, content: str, exit_code: int | None)
experiments/evolved_harness/middleware/execution_risk_hints.py:417
↓ 2 callers
Method
_make_request
Make a direct HTTP request to the MCP server.
agents/evolve_agent/tools/mcp_client.py:334
↓ 2 callers
Function
_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 callers
Function
_normalize_unicode_line
Normalize common unicode punctuation to ASCII equivalents.
agents/evolve_agent/tools/file_tools/apply_patch.py:139
↓ 2 callers
Function
_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 callers
Method
_parse_streamable_http_payload
Parse responses that may include SSE-formatted messages.
agents/evolve_agent/tools/mcp_client.py:148
↓ 2 callers
Function
_prep
(tmp_path, monkeypatch)
agents/evolve_agent/skills/agent-debugger-cli/_source/tests/test_runner_llm_retry.py:9
↓ 2 callers
Function
_prepare_agent_config
读取 base agent yaml,应用 patch,写入同目录临时文件并返回。 使用 tempfile 生成唯一文件名,避免并发实验写同一文件的竞争。 临时文件与 base 同目录,确保 yaml 内的相对路径仍能正确解析。 如果没有 patch,直接返回 base_c
agents/explore_agent/run.py:214
↓ 2 callers
Function
_register_tracer
(key: str, agent, log_dir: Path)
evolve.py:2929
↓ 2 callers
Method
_resolve_run_id
(agent_state: Any | None)
agents/evolve_agent/middleware/context_compaction/middleware.py:138
↓ 2 callers
Function
_run_single_adb_ask
Run `adb ask` for one task and return result dict.
evolve.py:1403
↓ 2 callers
Function
_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 callers
Method
_send_initialized_notification
Send the initialized notification as per MCP protocol.
agents/evolve_agent/tools/mcp_client.py:296
↓ 2 callers
Function
_setup_env
(tmp_path, monkeypatch)
agents/evolve_agent/skills/agent-debugger-cli/_source/tests/test_cli_ask.py:9
↓ 2 callers
Function
_setup_env
(tmp_path, monkeypatch)
agents/evolve_agent/skills/agent-debugger-cli/_source/tests/test_cli_check.py:12
↓ 2 callers
Method
_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 callers
Function
_target_variants
(target: str)
experiments/evolved_harness/tools/shell_tools/run_shell_command.py:280
↓ 2 callers
Method
_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 callers
Function
_unregister_tracer
(key: str)
evolve.py:2935
next →
1–100 of 607, ranked by callers