Class BetaManagedAgentsMultiagentParams
-
- All Implemented Interfaces:
public final class BetaManagedAgentsMultiagentParamsMultiagent orchestration configuration.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceBetaManagedAgentsMultiagentParams.VisitorAn interface that defines how to map each variant of BetaManagedAgentsMultiagentParams to a value of type T.
public final classBetaManagedAgentsMultiagentParams.Type
-
Method Summary
Modifier and Type Method Description final Optional<BetaManagedAgentsMultiagentCoordinatorParams>coordinator()Recommendation: use multiagent_20261001instead ofcoordinator.final Optional<BetaManagedAgentsMultiagent20261001Params>multiagent20261001()Multiagent configuration with three members, each enabled or disabled on its own. final Optional<JsonValue>_json()final BetaManagedAgentsMultiagentParams.Typetype()final BooleanisCoordinator()final BooleanisMultiagent20261001()final BetaManagedAgentsMultiagentCoordinatorParamsasCoordinator()Recommendation: use multiagent_20261001instead ofcoordinator.final BetaManagedAgentsMultiagent20261001ParamsasMultiagent20261001()Multiagent configuration with three members, each enabled or disabled on its own. final <T extends Any> Taccept(BetaManagedAgentsMultiagentParams.Visitor<T> visitor)Maps this instance's current variant to a value of type T using the given visitor. final BetaManagedAgentsMultiagentParamsvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaManagedAgentsMultiagentParamsofCoordinator(BetaManagedAgentsMultiagentCoordinatorParams coordinator)Recommendation: use multiagent_20261001instead ofcoordinator.final static BetaManagedAgentsMultiagentParamsofCoordinator(List<BetaManagedAgentsMultiagentRosterEntryParams> agents)Returns an immutable instance of BetaManagedAgentsMultiagentParams whose ofCoordinator variant is built from the given required agents. final static BetaManagedAgentsMultiagentParamsofMultiagent20261001(BetaManagedAgentsMultiagent20261001Params multiagent20261001)Multiagent configuration with three members, each enabled or disabled on its own. -
-
Method Detail
-
coordinator
final Optional<BetaManagedAgentsMultiagentCoordinatorParams> coordinator()
Recommendation: use
multiagent_20261001instead ofcoordinator. A coordinator topology: the session's primary thread orchestrates work by spawning session threads, each running an agent drawn from theagentsroster.
-
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
multiagentalso has typemultiagent_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": nullenables workflows. An object sent with atypeother than the stored one replaces the stored object, and the keys that it omits take their defaults. Apredefined_agentslist that is sent replaces the stored list. Every object that is sent needs itstype, and an enabledadvisorneeds itsmodel. Other validation applies to the merged result.
-
type
final BetaManagedAgentsMultiagentParams.Type type()
-
isCoordinator
final Boolean isCoordinator()
-
isMultiagent20261001
final Boolean isMultiagent20261001()
-
asCoordinator
final BetaManagedAgentsMultiagentCoordinatorParams asCoordinator()
Recommendation: use
multiagent_20261001instead ofcoordinator. A coordinator topology: the session's primary thread orchestrates work by spawning session threads, each running an agent drawn from theagentsroster.
-
asMultiagent20261001
final BetaManagedAgentsMultiagent20261001Params asMultiagent20261001()
Multiagent configuration with three members, each enabled or disabled on its own. On an update, if the agent's stored
multiagentalso has typemultiagent_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": nullenables workflows. An object sent with atypeother than the stored one replaces the stored object, and the keys that it omits take their defaults. Apredefined_agentslist that is sent replaces the stored list. Every object that is sent needs itstype, and an enabledadvisorneeds itsmodel. 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.
-
ofCoordinator
final static BetaManagedAgentsMultiagentParams ofCoordinator(BetaManagedAgentsMultiagentCoordinatorParams coordinator)
Recommendation: use
multiagent_20261001instead ofcoordinator. A coordinator topology: the session's primary thread orchestrates work by spawning session threads, each running an agent drawn from theagentsroster.
-
ofCoordinator
final static BetaManagedAgentsMultiagentParams ofCoordinator(List<BetaManagedAgentsMultiagentRosterEntryParams> agents)
Returns an immutable instance of BetaManagedAgentsMultiagentParams whose ofCoordinator variant is built from the given required agents.
-
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
multiagentalso has typemultiagent_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": nullenables workflows. An object sent with atypeother than the stored one replaces the stored object, and the keys that it omits take their defaults. Apredefined_agentslist that is sent replaces the stored list. Every object that is sent needs itstype, and an enabledadvisorneeds itsmodel. Other validation applies to the merged result.
-
-
-
-