Skip to content

perf(skills): parallelize user+agent skill search - #3011

Merged
qin-ctx merged 1 commit into
volcengine:mainfrom
xiaochen-zhou:perf/skills-find-parallel
Jul 8, 2026
Merged

perf(skills): parallelize user+agent skill search#3011
qin-ctx merged 1 commit into
volcengine:mainfrom
xiaochen-zhou:perf/skills-find-parallel

Conversation

@xiaochen-zhou

Copy link
Copy Markdown
Contributor

Description

Parallelize user and agent skill space search in find_skills from sequential to concurrent execution.

Related Issue

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvement
  • Test update

Changes Made

Testing

  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have tested this on the following platforms:
    • Linux
    • macOS
    • Windows

Checklist

  • My code follows the project's coding style
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

Screenshots (if applicable)

Additional Notes

Previously find_skills queried user_root and agent_root sequentially
when no target_uri was given, making latency T_user + T_agent.
Replace with parallel execution so latency becomes max(T_user, T_agent).

Safety:
- ContextVar-based telemetry is per-task isolated under asyncio.gather.
- RequestContext is a read-only dataclass, safe to share across tasks.
- service.search.find is a read-only vector query with no shared
  mutable state.
- Same pattern already used in observability/usage_audit/inventory.py.

Behavior preserved:
- First-exception propagation (either failure raises, same as serial).
- telemetry payload from user_execution returned (agent's discarded).
- Result merging and score-descending sort unchanged.
@xiaochen-zhou

Copy link
Copy Markdown
Contributor Author

Please review my code when you have time. Thanks! @qin-ctx

@qin-ctx
qin-ctx merged commit fa35e8d into volcengine:main Jul 8, 2026
3 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in OpenViking project Jul 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants