Class BetaManagedAgentsMultiagentParams

    • Constructor Detail

    • Method Detail

      • multiagent20261001

         final Optional<BetaManagedAgentsMultiagent20261001Params> multiagent20261001()

        Multiagent configuration with three members, each enabled or disabled on its own. On an update, if the agent's stored multiagent also has type multiagent_20261001, this configuration is merged into the stored one, level by level, instead of replacing it. A key that the update omits keeps its stored value. A key sent as null takes its default, on create as well, so "workflows": null enables workflows. An object sent with a type other than the stored one replaces the stored object, and the keys that it omits take their defaults. A predefined_agents list that is sent replaces the stored list. Every object that is sent needs its type, and an enabled advisor needs its model. Other validation applies to the merged result.

      • asCoordinator

         final BetaManagedAgentsMultiagentCoordinatorParams asCoordinator()

        Recommendation: use multiagent_20261001 instead of coordinator. A coordinator topology: the session's primary thread orchestrates work by spawning session threads, each running an agent drawn from the agents roster.

      • asMultiagent20261001

         final BetaManagedAgentsMultiagent20261001Params asMultiagent20261001()

        Multiagent configuration with three members, each enabled or disabled on its own. On an update, if the agent's stored multiagent also has type multiagent_20261001, this configuration is merged into the stored one, level by level, instead of replacing it. A key that the update omits keeps its stored value. A key sent as null takes its default, on create as well, so "workflows": null enables workflows. An object sent with a type other than the stored one replaces the stored object, and the keys that it omits take their defaults. A predefined_agents list that is sent replaces the stored list. Every object that is sent needs its type, and an enabled advisor needs its model. Other validation applies to the merged result.

      • accept

         final <T extends Any> T accept(BetaManagedAgentsMultiagentParams.Visitor<T> visitor)

        Maps this instance's current variant to a value of type T using the given visitor.

        Note that this method is not forwards compatible with new variants from the API, unless visitor overrides Visitor.unknown. To handle variants not known to this version of the SDK gracefully, consider overriding Visitor.unknown:

        import com.anthropic.core.JsonValue;
        import java.util.Optional;
        
        Optional<String> result = betaManagedAgentsMultiagentParams.accept(new BetaManagedAgentsMultiagentParams.Visitor<Optional<String>>() {
            @Override
            public Optional<String> visitCoordinator(BetaManagedAgentsMultiagentCoordinatorParams coordinator) {
                return Optional.of(coordinator.toString());
            }
        
            // ...
        
            @Override
            public Optional<String> unknown(JsonValue json) {
                // Or inspect the `json`.
                return Optional.empty();
            }
        });
      • validate

         final BetaManagedAgentsMultiagentParams validate()

        Validates that the types of all values in this object match their expected types recursively.

        This method is not forwards compatible with new types from the API for existing fields.

      • ofMultiagent20261001

         final static BetaManagedAgentsMultiagentParams ofMultiagent20261001(BetaManagedAgentsMultiagent20261001Params multiagent20261001)

        Multiagent configuration with three members, each enabled or disabled on its own. On an update, if the agent's stored multiagent also has type multiagent_20261001, this configuration is merged into the stored one, level by level, instead of replacing it. A key that the update omits keeps its stored value. A key sent as null takes its default, on create as well, so "workflows": null enables workflows. An object sent with a type other than the stored one replaces the stored object, and the keys that it omits take their defaults. A predefined_agents list that is sent replaces the stored list. Every object that is sent needs its type, and an enabled advisor needs its model. Other validation applies to the merged result.