Function: exportAgentConfigYAML()
exportAgentConfigYAML(
agentInstance,metadata?,options?):string
Defined in: packages/agentos/src/api/agentExport.ts:76
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.
metadata?
Optional human-readable metadata to attach.
author?
string
description?
string
name?
string
tags?
string[]
options?
Redaction options; secrets are redacted unless redactSecrets is false.
Returns
string
YAML-formatted string (class instances always as <<instance>> markers).
Example
const yamlStr = exportAgentConfigYAML(myAgent);
fs.writeFileSync('agent.yaml', yamlStr);