# Class GoalOrientedSearchGraph

java.lang.Object
com.google.adk.planner.goap.GoalOrientedSearchGraph

public final class GoalOrientedSearchGraph extends Object
Transforms `AgentMetadata` into a dependency graph where:

- Each output key maps to the agent that produces it
- Each output key maps to the input keys (dependencies) required to produce it

Used by `DependencyGraphSearch` for backward-chaining dependency resolution.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `GoalOrientedSearchGraph(List<AgentMetadata> metadata)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `contains(String outputKey)`
  Returns true if the given output key is known in this graph.
  `com.google.common.collect.ImmutableList<String>`
  `getDependencies(String outputKey)`
  Returns the input keys (dependencies) needed to produce the given output key.
  `String`
  `getProducerAgent(String outputKey)`
  Returns the agent name that produces the given output key.

  ### Methods inherited from class Object

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

- ## Constructor Details

  - ### GoalOrientedSearchGraph

    public GoalOrientedSearchGraph(List<AgentMetadata> metadata)

- ## Method Details

  - ### getDependencies

    public com.google.common.collect.ImmutableList<String> getDependencies(String outputKey)
    Returns the input keys (dependencies) needed to produce the given output key.

  - ### getProducerAgent

    public String getProducerAgent(String outputKey)
    Returns the agent name that produces the given output key.

  - ### contains

    public boolean contains(String outputKey)
    Returns true if the given output key is known in this graph.