Skip to content

feat: Implement FileBasedAgentRegistryService #167

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

bharatnpti
Copy link
Contributor

This commit introduces a new implementation of AgentRegistryService, FileBasedAgentRegistryService, which reads agent routing information from a YAML file.

Key changes:

  • Added FileBasedAgentRegistryService in lmos-runtime-core that parses an agent-registry.yaml file.
  • Introduced configuration properties in lmos-runtime-spring-boot-starter to switch between API and FILE based registry types (lmos.runtime.agent-registry.type) and to specify the YAML file path (lmos.runtime.agent-registry.file-path).
  • Updated LmosRuntimeAutoConfiguration to conditionally instantiate the configured AgentRegistryService implementation.
  • Refactored agent registry data models to a common location in lmos-runtime-core.model.registry and made necessary adjustments for YAML deserialization (e.g., nullable fields).
  • Added kaml library for YAML parsing in lmos-runtime-core.
  • Implemented comprehensive unit tests for FileBasedAgentRegistryService in lmos-runtime-core.
  • Implemented integration tests in lmos-runtime-spring-boot-starter to verify the correct service instantiation and functionality within the Spring context.

The choice of AgentRegistryService is now configurable via properties:

  • lmos.runtime.agent-registry.type: Set to FILE to use the new service, or API (default) for the existing LMOS Operator based service.
  • lmos.runtime.agent-registry.file-path: Specifies the path to the agent-registry.yaml file when type is FILE.

The lmos-runtime-core and lmos-runtime-spring-boot-starter modules build and pass all their tests. An unrelated issue with Helm setup was noted in the lmos-runtime-graphql-service module but does not affect this feature.

This commit introduces a new implementation of AgentRegistryService,
`FileBasedAgentRegistryService`, which reads agent routing information
from a YAML file.

Key changes:
- Added `FileBasedAgentRegistryService` in `lmos-runtime-core` that
  parses an `agent-registry.yaml` file.
- Introduced configuration properties in `lmos-runtime-spring-boot-starter`
  to switch between `API` and `FILE` based registry types
  (lmos.runtime.agent-registry.type) and to specify the YAML file path
  (lmos.runtime.agent-registry.file-path).
- Updated `LmosRuntimeAutoConfiguration` to conditionally instantiate the
  configured `AgentRegistryService` implementation.
- Refactored agent registry data models to a common location in
  `lmos-runtime-core.model.registry` and made necessary adjustments
  for YAML deserialization (e.g., nullable fields).
- Added `kaml` library for YAML parsing in `lmos-runtime-core`.
- Implemented comprehensive unit tests for `FileBasedAgentRegistryService`
  in `lmos-runtime-core`.
- Implemented integration tests in `lmos-runtime-spring-boot-starter` to
  verify the correct service instantiation and functionality within the
  Spring context.

The choice of `AgentRegistryService` is now configurable via properties:
- `lmos.runtime.agent-registry.type`: Set to `FILE` to use the new
  service, or `API` (default) for the existing LMOS Operator based service.
- `lmos.runtime.agent-registry.file-path`: Specifies the path to the
  `agent-registry.yaml` file when type is `FILE`.

The `lmos-runtime-core` and `lmos-runtime-spring-boot-starter` modules
build and pass all their tests. An unrelated issue with Helm setup was
noted in the `lmos-runtime-graphql-service` module but does not affect
this feature.
@bharatnpti bharatnpti marked this pull request as draft June 1, 2025 04:45
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.

1 participant