Skip to content

feat: Migrate Agentic CLI UI to use REST API client #262

@aarora79

Description

@aarora79

The Agentic CLI UI in cli/src/ should be migrated to use the REST API client library in api/ directory instead of shell scripts like service_mgmt.sh. This will provide a consistent, well-tested interface for all CLI operations.

Background

The api/ directory contains REST API client implementations:

  • api/registry_client.py - Core registry client for API interactions
  • api/registry_management.py - Registry management operations

Current State

The CLI currently relies on shell scripts (e.g., service_mgmt.sh, agent_mgmt.sh) which it should not. Instead, it should use the REST API client directly.

The following functionality is currently available through the REST API client:

  • Server management (register, toggle, remove, health checks)
  • Agent management (register, update, delete, discover)
  • Anthropic Registry API support (list servers, versions)
  • Semantic search across servers, tools, and agents

Blocked By

This issue is dependent on #247 to be completed first.

The following functionality is NOT yet available through the REST API and needs to be added in #247:

  • User management operations
  • Token generation and retrieval (/tokens/generate)
  • Authentication flow handling

Until #247 is complete, the CLI cannot fully migrate to using the REST API client for all operations.

Scope

Once #247 is complete, update cli/src/ to:

  1. Import and use the REST API client from api/registry_client.py
  2. Replace shell script calls with client method calls
  3. Leverage consistent error handling from the client library
  4. Remove dependency on shell scripts for API interactions

Files to Update

  • cli/src/commands/executor.ts
  • cli/src/agent/tools.ts
  • cli/src/agent/agentRunner.ts
  • Other files calling shell scripts for API operations

Acceptance Criteria

  • CLI uses REST API client for all server management operations
  • CLI uses REST API client for all agent management operations
  • CLI uses REST API client for authentication/token operations (after Add management APIs to replace shell scripts #247)
  • No shell script dependencies for API interactions remain in CLI
  • All existing CLI functionality continues to work

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiAPI related issuesenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions