JSON string containing an AgentExportConfig.
Optional options: ImportAgentOptionsValues for what the export redacted or replaced.
A new Agent instance.
If the JSON is malformed.
If the parsed config fails validation or holds a value import cannot restore.
const agent = importAgentFromJSON(fs.readFileSync('agent.json', 'utf-8'));
Imports an agent from a JSON string.
Parses the string and delegates to importAgent.