mirror of
https://github.com/hanzoai/agents.git
synced 2026-10-30 18:48:36 +00:00
Transforms hanzoai/agents from a marketplace config repo into a full agent orchestration platform by merging the AgentField infrastructure: - Go control plane (K8s-like agent orchestration, service mesh, DAG workflows) - Python SDK (FastAPI-based agent framework, LiteLLM, memory, DID/VC) - TypeScript SDK (@hanzo/agents - Vercel AI SDK, MCP, workflows) - Go SDK (idiomatic agent builder + client) - React 19 embedded dashboard (XyFlow DAGs, Recharts, Radix UI) - Docker/K8s/Helm deployment configs - Examples: hello world, deep research, RAG, simulation, benchmarks - Functional test suite across Python/Go/TypeScript All references rebranded: AgentField → Hanzo Agents - Module: github.com/hanzoai/agents/control-plane - Python: hanzo_agents - TypeScript: @hanzo/agents - Go: github.com/hanzoai/agents/sdk/go - Env vars: HANZO_AGENTS_* - Config: hanzo-agents.yaml Previous marketplace configs moved to config/ directory.
55 lines
1.3 KiB
Go
55 lines
1.3 KiB
Go
package cli
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/hanzoai/agents/control-plane/internal/packages"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
var (
|
|
uninstallForce bool
|
|
)
|
|
|
|
// NewUninstallCommand creates the uninstall command
|
|
func NewUninstallCommand() *cobra.Command {
|
|
cmd := &cobra.Command{
|
|
Use: "uninstall <package-name>",
|
|
Short: "Uninstall an agent node package",
|
|
Long: `Uninstall removes an installed agent node package from your system.
|
|
|
|
This command will:
|
|
- Stop the agent node if it's currently running
|
|
- Remove the package directory and all its files
|
|
- Remove the package from the installation registry
|
|
- Clean up any associated logs
|
|
|
|
Examples:
|
|
hanzo-agents uninstall my-agent
|
|
hanzo-agents uninstall sentiment-analyzer --force`,
|
|
Args: cobra.ExactArgs(1),
|
|
RunE: runUninstallCommand,
|
|
}
|
|
|
|
cmd.Flags().BoolVarP(&uninstallForce, "force", "f", false, "Force uninstall even if agent node is running")
|
|
|
|
return cmd
|
|
}
|
|
|
|
func runUninstallCommand(cmd *cobra.Command, args []string) error {
|
|
packageName := args[0]
|
|
|
|
// Create uninstaller
|
|
uninstaller := &packages.PackageUninstaller{
|
|
HanzoAgentsHome: getHanzoAgentsHomeDir(),
|
|
Force: uninstallForce,
|
|
}
|
|
|
|
// Uninstall package
|
|
if err := uninstaller.UninstallPackage(packageName); err != nil {
|
|
return fmt.Errorf("uninstallation failed: %w", err)
|
|
}
|
|
|
|
return nil
|
|
}
|