# Class AgentStaticLoader

java.lang.Object
com.google.adk.web.AgentStaticLoader

All Implemented Interfaces:
  `AgentLoader`

public class AgentStaticLoader extends Object implements AgentLoader
Static Agent Loader for programmatically provided agents.

This loader takes a static list of pre-created agent instances and makes them available through the AgentLoader interface. Perfect for cases where you already have agent instances and just need a convenient way to wrap them in an AgentLoader.

This class is not a Spring component by itself - instances are created programmatically and then registered as beans via factory methods.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AgentStaticLoader(BaseAgent... agents)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `com.google.common.collect.ImmutableList<String>`
  `listAgents()`
  Returns a list of available agent names.
  `BaseAgent`
  `loadAgent(String name)`
  Loads the BaseAgent instance for the specified agent name.

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### AgentStaticLoader

    public AgentStaticLoader(BaseAgent... agents)

- ## Method Details

  - ### listAgents

    @Nonnull public com.google.common.collect.ImmutableList<String> listAgents()
    Description copied from interface: `AgentLoader`
    Returns a list of available agent names.
    Specified by:
      `listAgents` in interface `AgentLoader`
    Returns:
      ImmutableList of agent names. Must not return null - return an empty list if no agents are available.

  - ### loadAgent

    public BaseAgent loadAgent(String name)
    Description copied from interface: `AgentLoader`
    Loads the BaseAgent instance for the specified agent name.
    Specified by:
      `loadAgent` in interface `AgentLoader`
    Parameters:
      `name` - the name of the agent to load
    Returns:
      BaseAgent instance for the given name