Function exportAgentConfigYAML

  • Exports an agent's configuration as a YAML string.

    Uses the yaml npm package for consistent, human-readable output.

    Parameters

    • agentInstance: Agent

      The agent (or agency) instance to export.

    • Optional metadata: {
          name?: string;
          description?: string;
          author?: string;
          tags?: string[];
      }

      Optional human-readable metadata to attach.

      • Optional name?: string
      • Optional description?: string
      • Optional author?: string
      • Optional tags?: string[]

    Returns string

    YAML-formatted string.

    Example

    const yamlStr = exportAgentConfigYAML(myAgent);
    fs.writeFileSync('agent.yaml', yamlStr);