Imports an agent from a JSON string.
Parses the string and delegates to importAgent.
JSON string containing an AgentExportConfig.
A new Agent instance.
If the JSON is malformed.
If the parsed config fails validation.
const agent = importAgentFromJSON(fs.readFileSync('agent.json', 'utf-8')); Copy
const agent = importAgentFromJSON(fs.readFileSync('agent.json', 'utf-8'));
Imports an agent from a JSON string.
Parses the string and delegates to importAgent.