| fix(autoresearch): address PR #1912 review
- .gitignore: scope scratch patterns under .akg/ so the unqualified
reference.py / *_kernel.py / *_ref.py globs stop masking legit
files; drop the stale RemoteWorker_AutoResearch.md entry.
- op/autoresearch/agent/llm_client.py (ConversationAdapter) removed;
the agent loop now drives LLM access exclusively through
AkgLLMAdapter on top of LLMClient. Retry + backoff logic moved
into the adapter so long-running runs stay resilient; loop.py's
__init__ tightened to a single llm_adapter injection path, and
the debug __main__ entry builds its client via create_llm_client
with CLI overrides mapped onto AKG_AGENTS_* env vars.
- Drop the suppress_extra_body kwarg from LLMProvider; compact /
keyword-generation calls route to a fast_client bound to the
"fast" model level via create_llm_client, keeping "no thinking"
as a settings.json concern.
- Add Apache 2.0 copyright headers to the new py / yaml files.
- tests/op/ut/autoresearch/: move the 19 autoresearch-specific
unit suites into their own package so tests/op/ut/ stays for
shared op/skill / verifier / adapter coverage.
- Autopep8 pass on op/autoresearch/ and tests/op/ut/autoresearch/.
| 1 个月前 |
| refactor: rename project from aikg to akg_agents
Complete project renaming:
- Renamed main directory: aikg/ -> akg_agents/
- Renamed Python package: ai_kernel_generator -> akg_agents
- Renamed benchmark: aikgbench -> akg_kernels_bench
- Updated client API: AIKGClient -> AKGAgentsClient
- Updated all import paths and module references
- Updated environment variables: AIKG_* -> AKG_AGENTS_*
- Updated output directories and log paths
- Updated all documentation and configuration files
- Fixed Git submodules paths
Breaking changes:
- All Python imports need to update to 'from akg_agents'
- Environment variable names changed: AIKG_* -> AKG_AGENTS_*
- Package name changed from ai_kernel_generator to akg_agents
- Client class renamed: AIKGClient -> AKGAgentsClient
Co-authored-by: Cursor <cursoragent@cursor.com>
| 3 个月前 |
| Refactor: remove legacy code, standardize test structure, and enhance core module test coverage
| 2 个月前 |
| refactor: rename project from aikg to akg_agents
Complete project renaming:
- Renamed main directory: aikg/ -> akg_agents/
- Renamed Python package: ai_kernel_generator -> akg_agents
- Renamed benchmark: aikgbench -> akg_kernels_bench
- Updated client API: AIKGClient -> AKGAgentsClient
- Updated all import paths and module references
- Updated environment variables: AIKG_* -> AKG_AGENTS_*
- Updated output directories and log paths
- Updated all documentation and configuration files
- Fixed Git submodules paths
Breaking changes:
- All Python imports need to update to 'from akg_agents'
- Environment variable names changed: AIKG_* -> AKG_AGENTS_*
- Package name changed from ai_kernel_generator to akg_agents
- Client class renamed: AIKGClient -> AKGAgentsClient
Co-authored-by: Cursor <cursoragent@cursor.com>
| 3 个月前 |
| feat(code_checker): implement YAML-based policy loading for static analysis
| 1 个月前 |
| Remove deprecated files
| 3 个月前 |
| Remove deprecated files
| 3 个月前 |
| Remove deprecated files
| 3 个月前 |
| Remove deprecated files
| 3 个月前 |
| feat(autoresearch): build out the kernel-optimization agent workflow
Since c72a9735 the autoresearch module has been a minimal ReAct skeleton
(loop / turn / feedback / evaluator / runner + a handful of prompts).
This commit turns it into the full kernel-optimization agent documented
in docs/v2/AutoResearch.md.
Agent architecture
- Structured plan state: FeedbackBuilder owns plan.md, enforces rationale
validation + min_items_per_plan + diversity checks, renders plan +
optimization history + skill state across versions.
- Three-layer skill model: Layer 0 fundamentals embedded in the system
prompt from task_dir/skills/; Layer 1 SKILL.md mirrored per task, read
on demand, elided at settle; Layer 2 compact skill index in the
initial message.
- System-owned skill binding: agent submits keywords per plan item, the
framework matches them against SkillPool and assigns backing_skill;
agent-emitted bindings are stripped at the TurnExecutor trust
boundary. SkillBuilder tier() ranks bindings applied (0) / fresh (1) /
previously-unbound (2). No terminal state — a later KEEP promotes an
unbound skill back to tier 0.
- New acknowledge_skill tool gates the first patch_file / write_file on
any bound item (valuable_aspects / kernel_application / apply|unbind),
doubling as the audit trail.
- SkillPool auto-widens on keyword-miss; search_skills tool exposes the
widen path to the agent.
- Diagnose subagent post-eval; require_replan tags one item abandoned
and enters replace-mode on next update_plan.
Context management
- ConversationBuffer owns skill injection (synthetic user message, not
raw tool_result) and settle-time unload of both synthetic markers and
voluntary read_file tool_results, with tracking maps rebuilt after
compact.
- Multi-step auto_compact pipeline: two concurrent LLM calls
(op_summary + 5-section plan_analysis.md), force_rebuild fallback
with char-capped degraded bodies.
Runtime / tooling
- run_autoresearch.py accepts --worker-url (host:port[,...]) to
forward eval to a remote Worker Service, mutually exclusive with
--device-id.
- AST-aware patch_file + Markdown helpers + forbidden-pattern validator
(edit_guardrails.yaml); better patch_file diagnostics with
anchor_line.
- Hardware family registry + hardware_aliases.yaml for arch
normalisation across Huawei product lines.
- Unified Python logger; SkillBuilder state transitions and diagnose
decisions surface in agent.log.
- Session resume gates on HEAD sha + dirty state; pool rehydration from
plan_items; v4→v5 skill-state migration.
Docs
- Clean-room rewrite of docs/v2/AutoResearch.md + docs/v2/CN/
AutoResearch.md to describe the post-supervisor architecture; CLI
usage as the single production entry point, debug entry points
consolidated.
Tests
- End-to-end autoresearch suite stays green; new unit coverage:
SkillBuilder transitions, SkillPool refill / match, keyword pipeline,
acknowledge_skill schema + wiring, fundamentals layout, ConversationBuffer
injection lifecycle, session resume, scaffold round-trip, compact
pipeline, patch_file diagnostics, patch_validator, edit tool,
git_repo, operator_skill_catalog, run_counters.
| 1 个月前 |
| Remove deprecated files
| 3 个月前 |
| | 3 个月前 |
| integrate solar roofline without source tree dependency
| 1 个月前 |
| refactor: rename project from aikg to akg_agents
Complete project renaming:
- Renamed main directory: aikg/ -> akg_agents/
- Renamed Python package: ai_kernel_generator -> akg_agents
- Renamed benchmark: aikgbench -> akg_kernels_bench
- Updated client API: AIKGClient -> AKGAgentsClient
- Updated all import paths and module references
- Updated environment variables: AIKG_* -> AKG_AGENTS_*
- Updated output directories and log paths
- Updated all documentation and configuration files
- Fixed Git submodules paths
Breaking changes:
- All Python imports need to update to 'from akg_agents'
- Environment variable names changed: AIKG_* -> AKG_AGENTS_*
- Package name changed from ai_kernel_generator to akg_agents
- Client class renamed: AIKGClient -> AKGAgentsClient
Co-authored-by: Cursor <cursoragent@cursor.com>
| 3 个月前 |
| refactor: update documentation and comments to replace references to MainOpAgent with '调用方' in task builder workflow and related files; mark deprecated modules and tests for migration to new structure
| 3 个月前 |
| Refactor: remove legacy code, standardize test structure, and enhance core module test coverage
| 2 个月前 |
| Enhance skill categorization and metadata handling
- Added new categories "improvement" and "fix" to the skill metadata for better classification of skills.
- Updated the KernelGen agent to handle skills categorized as "fix" and "improvement" in the selection process.
- Refactored the _infer_case_type method to support the new categorization while maintaining compatibility with existing "case" categories.
- Revised related tests to ensure proper recognition and handling of the new categories in skill selection and assembly.
These changes aim to improve the organization and usability of skills within the system.
| 1 个月前 |
| fix(config): remove implicit defaults to prevent silent config errors
- Replace implicit default values (torch/cuda/a100) with empty strings
in op_task_builder, base_workflow, orchestrator, nodes, and batch_adaptive_search
- Require dsl to be explicitly provided in job_manager submit API
- The existing check_task_config in LangGraphTask.__init__ now catches
empty values with clear error messages, eliminating silent fallback
to incorrect defaults
Files changed:
op_task_builder.py - Remove 'torch'/'cuda'/'a100' defaults from state.get()
base_workflow.py - Use empty string defaults for dsl/framework/backend/arch
orchestrator.py - Replace 'torch' default with empty string
nodes.py - Replace 'torch' default with None + explicit check
job_manager.py - Require dsl parameter for job submission
batch_adaptive_search - Restore explicit env_config loading
config_validator.py - Remove unused blank line
test_task_config.py - Add test_empty_values_for_each_param coverage
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
| 1 个月前 |
| Refactor: remove legacy code, standardize test structure, and enhance core module test coverage
| 2 个月前 |
| docs: split triton api references and add aggregator
| 2 个月前 |
| fix autotune
| 1 个月前 |