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, the config fails validation, or it holds a value import cannot restore.

    Example

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