Skip to content

chore: use js-yaml instead of yaml as it's much faster on config read.#255

Merged
kalenkevich merged 1 commit intomainfrom
chore/use_js-yaml_instead_of_yaml
Apr 10, 2026
Merged

chore: use js-yaml instead of yaml as it's much faster on config read.#255
kalenkevich merged 1 commit intomainfrom
chore/use_js-yaml_instead_of_yaml

Conversation

@kalenkevich
Copy link
Copy Markdown
Collaborator

Link to Issue or Description of Change

Problem:
The current YAML parser (yaml package) used in the development tools is slower than alternatives when performing simple configuration reads, which can impact performance during batch loading of agent configurations.

Solution:
Switched from yaml to js-yaml in dev/src/conformance/yaml_agent_loader.ts for parsing YAML files. As discussed in eemeli/yaml#358, js-yaml demonstrates significantly better performance for basic read operations compared to yaml v2.

Testing Plan

Unit Tests:

  • I have added or updated unit tests for my change.
  • All unit tests pass locally.

Please include a summary of passed npm test results.
I ran npm run test and 112 of 113 test files passed. The only failure was a timeout in an E2E test (tests/e2e/routing/auto_routing_agent_test.ts > E2e Auto Routing with RoutedAgent > should route to complex agent for complex request), which appears to be a flakiness or timeout issue unrelated to the YAML parser change.

Manual End-to-End (E2E) Tests:

Existing automated integration and build setup tests cover the functionality of the agent loader and ensure that configurations are still parsed correctly after switching libraries.

Checklist

  • I have read the CONTRIBUTING.md document.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • 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 manually tested my changes end-to-end.
  • Any dependent changes have been merged and published in downstream modules.

@kalenkevich kalenkevich merged commit f7a86e9 into main Apr 10, 2026
8 checks passed
@kalenkevich kalenkevich deleted the chore/use_js-yaml_instead_of_yaml branch April 10, 2026 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants