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

# Inquire

> General purpose agent that watches videos and answers questions about them

## What is Inquire?

Inquire is a general purpose video agent that watches videos and answers questions about them. Inquire has access to tools within Moonshine and uses multiple VLMS behind the scenes. The logs display all actions done by the agent.

The path to use inquire:

```
core/inquire
```

## Running Inquire

To use inquire through run:

<CodeGroup>
  ```python python theme={null}
  resp = moonshine.run(
      flow="core/inquire",
      index="your-index-name",
      prompt="How has the car changed over time?"
  )
  ```
</CodeGroup>

### Images in Inquire

An image can also be put into inquire calls. The image can only be a remote URL and a prompt is still required.

<CodeGroup>
  ```python python theme={null}
  resp = moonshine.run(
      flow="core/inquire",
      index="your-index-name",
      image="https://example.com/image.jpg",
      prompt="How has the car changed over time?",
  )
  ```
</CodeGroup>

### Enforced JSONs

The enfored JSON parameter can be used to reuqire a response structure. To use enforced JSONs:

<CodeGroup>
  ```python python theme={null}
  json = {
      "type": "object",
      "properties": {
          "answer": {"type": "string"},
          "confidence": {"type": "number"}
  }

  resp = moonshine.run(
      flow="core/inquire",
      index="your-index-name",
      prompt="How has the car changed over time?",
      enforced_json=json
  )
  ```
</CodeGroup>

### Sub Indexes

Using a sub index will isolate the inquire call to process a subset of the videos in the index:

<CodeGroup>
  ```python python theme={null}
  resp = moonshine.run(
      flow="core/inquire",
      index="your-index-name",
      prompt="How has the car changed over time?",
      subindex=[
          "FHXYU838JHDWK.mp4",
          "AJDIEUJDKSLW.mp4"
      ],
  )
  ```
</CodeGroup>

## Inquire Response Format

Inquire returns raw text unless otherwise specified. If an enforced JSON is provided, the response will be a JSON object conforming to the enforced JSON schema.

## Inquire JSON

Workflows are in a private beta. Please contact us at [team@usemoonshine.com](mailto:team@usemoonshine.com) to request access.

***

<Accordion title=".run(flow='core/inquire', ...) params" icon="code-simple">
  <ParamField path="index" type="string" required>
    Name/ID of the index.
  </ParamField>

  <ParamField path="prompt" type="string" required>
    Inquire prompt.
  </ParamField>

  <ParamField path="image" type="string">
    Public URL to an image used as referance.
  </ParamField>

  <ParamField path="subindex" type="List[str]">
    An optional list of `file_id`to narrow the search scope.
  </ParamField>

  <ParamField path="json" type="JSON" placeholder="5">
    Enforce the response of inquire into a JSON structure.
  </ParamField>
</Accordion>
