> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ag2.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# autogen.agents.experimental.document_agent.document_conditions.SummaryTaskAvailableCondition

<h2 id="autogen.agents.experimental.document_agent.document_conditions.SummaryTaskAvailableCondition" class="doc doc-heading">
  <code class="doc-symbol doc-symbol-heading doc-symbol-class" />

  <span class="doc doc-object-name doc-class-name">SummaryTaskAvailableCondition</span>
</h2>

```python theme={null}
SummaryTaskAvailableCondition(**data: Any)
```

Available condition for determining if a summary task should be performed.<br />This condition checks if: <br />1. There are no documents left to ingest
2\. There are no queries left to run
3\. The completed task count is truthy

If all conditions are met, the agent is ready for a summary task.<br />Create a new model by parsing and validating input data from keyword arguments.<br />Raises \[`ValidationError`]\[pydantic\_core.ValidationError] if the input data cannot be
validated to form a valid model.<br />`self` is explicitly positional-only to allow `self` as a field name.

<b>Parameters:</b>

| Name     | Description   |
| -------- | ------------- |
| `**data` | **Type:** Any |

### Class Attributes

<code class="doc-symbol doc-symbol-heading doc-symbol-attribute" />

#### completed\_var

<br />

<br />

<code class="doc-symbol doc-symbol-heading doc-symbol-attribute" />

#### documents\_var

<br />

<br />

<code class="doc-symbol doc-symbol-heading doc-symbol-attribute" />

#### model\_config

<br />

<br />

<code class="doc-symbol doc-symbol-heading doc-symbol-attribute" />

#### queries\_var

<br />

<br />

### Instance Methods

<code class="doc-symbol doc-symbol-heading doc-symbol-method" />

#### is\_available

```python theme={null}
is_available(
    self,
    agent: ConversableAgent,
    messages: list[dict[str, Any]]
) -> bool
```

Check if all task conditions are met.<br />

<b>Parameters:</b>

| Name       | Description                                                                            |
| ---------- | -------------------------------------------------------------------------------------- |
| `agent`    | The agent with context variables<br /><br />**Type:** ConversableAgent                 |
| `messages` | The conversation history (not used)<br /><br />**Type:** list\[dict\[str, typing.Any]] |

<b>Returns:</b>

| Type | Description                                                         |
| ---- | ------------------------------------------------------------------- |
| bool | True if all conditions are met (ready for summary), False otherwise |

<br />
