Overrides an existing swarm schema in the swarm system with a new or partial schema.
This function updates the configuration of a swarm identified by its swarmName, applying the provided schema properties.
It operates outside any existing method or execution contexts to ensure isolation, leveraging beginContext for a clean execution scope.
Logs the override operation if logging is enabled in the global configuration.
If the swarm schema service encounters an error during the override operation (e.g., invalid swarmName or schema).
Example
// Override a swarm’s schema with new properties overrideSwarm({ swarmName:"MainSwarm", defaultAgent:"WeatherAgent", policies: ["ContentFilter"], }); // Logs the operation (if enabled) and updates the swarm schema in the swarm system.
Overrides an existing swarm schema in the swarm system with a new or partial schema. This function updates the configuration of a swarm identified by its
swarmName
, applying the provided schema properties. It operates outside any existing method or execution contexts to ensure isolation, leveragingbeginContext
for a clean execution scope. Logs the override operation if logging is enabled in the global configuration.