Skip to main content

seed-registry

Seeds the tool registry with built-in tool definitions, retry policies, network policies, and optional composite tool pipelines. Creates an immutable, content-hashed registry version in PostgreSQL.

Key Files

FilePurpose
main.goEntry point: builds tool list, applies policies, computes hash, stores registry

Architecture

The seed process:

  1. Creates a tools.Manager with all built-in executors (HTTP, calculator, KV, memory, models, code execution, simulators)
  2. Discovers MCP tools via the MCP bridge
  3. Applies per-tool retry policies and network policies
  4. Optionally merges composite tool definitions from a JSON file (with cycle detection)
  5. Computes a content hash over all definitions
  6. Stores the immutable registry version in PostgreSQL

Dependencies on Shared Packages

config, llm, mcp, memory, registry, tenant, tools

Configuration

See docs/manual/cli.md for all flags.

FlagDefaultDescription
--iddefaultRegistry ID
--versionv2.0.0Registry version
--tenant__global__Tenant owning this registry
--compositesPath to JSON array of composite tool definitions

Development

Run Locally

go run ./cmd/seed-registry --id default --version v2.0.0
go run ./cmd/seed-registry --composites ./my-composites.json --version v2.1.0

Run Tests

go test ./cmd/seed-registry/...