Skip to main content

Function: validateAgentExport()

validateAgentExport(config): object

Defined in: packages/agentos/src/api/agentExport.ts:205

Validates an export config object without importing it.

Checks structural correctness: schema version, required fields, type discriminator, and agency-specific field consistency. Does NOT validate the semantic correctness of the config (e.g. whether the model exists).

Parameters​

config​

unknown

Unknown value to validate as an AgentExportConfig.

Returns​

object

Object with valid boolean and an array of error messages.

errors​

errors: string[]

valid​

valid: boolean

Example​

const result = validateAgentExport(someObject);
if (!result.valid) {
console.error('Validation errors:', result.errors);
}