Function importAgentFromYAML

  • Imports an agent from a YAML string.

    Parses the string using the yaml npm package and delegates to importAgent.

    Parameters

    Returns Agent

    A new Agent instance.

    Throws

    If the YAML is malformed or the config fails validation.

    Example

    const agent = importAgentFromYAML(fs.readFileSync('agent.yaml', 'utf-8'));