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

# GitHub Issues Backlog Agent

> Build a DinoAI agent that picks up Agent Ready GitHub issues, generates dbt™ models with tests and docs, opens a PR per issue, and posts to Slack.

Automate your analytics engineering backlog with a native DinoAI agent that reads every open GitHub issue labelled **Agent Ready**, implements the required dbt™ models with tests and YAML docs, opens a PR per issue and posts the link to Slack.

No custom Python, no SDK glue, no orchestrator. The agent is a single YAML file in your repo, triggered on a schedule by Bolt.

<Info>
  **Before You Start**

  **Paradime**

  * No API keys needed: the agent runs natively from Bolt, so there are no Paradime credentials to configure.

  **GitHub**

  * Write access to the repository you want to review PRs on
  * Ability to add repository secrets and create GitHub Actions workflows

  **Integrations**

  The following must already be connected in Paradime:

  * [**Slack**](/integrations/slack) — the agent posts reviews to `#pr-reviews` via `post_slack_message`

  **Labelling**

  * Issues you want automated must be **open** and carry the label **`agent-ready`**.
</Info>

### What You'll Build

By the end of this guide you'll have:

* A `github-backlog-agent` DinoAI agent YAML committed under `.dinoai/agents/`
* A Bolt schedule that triggers the agent on a cron cadence using the **Run Paradime DinoAI Agent** command — no scripts to maintain, no API keys to manage

#### What the Agent Does Per Issue

Once triggered, the agent works through the backlog and, for each open **Agent Ready** issue:

```
1. Reads the issue
2. Identifies source tables and implied metrics
3. Explores the repo to understand existing models and sources
4. Drafts staging (and mart) dbt™ models with tests and YAML docs
5. Branches + commits + pushes (gh-<number>-…)
6. Opens a PR (Closes #<number>) and posts "✅ Done: <PR URL>" to Slack
```

The agent never invents a column that isn't in the source. When an issue is ambiguous it surfaces explicit **Open questions** in the PR description rather than guessing.

#### Architecture Overview

```mermaid theme={"system"}
flowchart LR
    A[Bolt schedule\nRun Paradime DinoAI Agent]
    B[Paradime API\ntriggerDinoaiAgentRun]
    C[Agent pod\ngithub-backlog-agent]
    D[GitHub\nissues + PRs]
    E[Slack\nstatus updates]
 
    A --> B --> C
    C -->|run_terminal_command| D
    C --> E
```

### How It Works

Bolt runs a single `paradime dinoai` command on your chosen cadence. That spins up one agent pod with a task message telling it to process the **Agent Ready** backlog. The agent list issues, create branch, implement each issue, push, and open a PR - then posts to Slack. Bolt blocks until the agent reaches a terminal state and inherits its success or failure, and the agent's messages stream into the Bolt run logs.

<Steps>
  <Step title="Create the Agent YAML">
    Create the following file in your repository at `.dinoai/agents/github-backlog-agent.yml`. This defines the agent's role, goal, tools, and Slack output channel.

    ```yaml title=".dinoai/agents/github-backlog-agent.yml" lineNumbers theme={"system"}
    name: github-backlog-agent
    version: 1

    role: >
      Analytics Engineer turning GitHub issues into well-scoped dbt model PRs,
      using the gh CLI.

    goal: >
      For each open GitHub issue labelled "agent-ready" — or the specific issue
      number in the trigger message: read it, implement the dbt
      models it needs (staging, plus a mart where appropriate) with tests and YAML
      docs on a new branch, open a PR that closes the issue, and post the PR link
      to Slack. One branch and one PR per issue. Skip any issue that already has an
      open PR.

    backstory: >
      You never invent a column that isn't in the source. When an issue is
      ambiguous, you flag it under "Open questions" in the PR instead of guessing.
      You follow the project's dinorules conventions and implement everything
      yourself — no delegation.

    tools:
      mode: allowlist
      list:
        - read_file
        - write_file
        - replace_in_file
        - search_files_and_directories
        - ripgrep_search
        - run_sql_query
        - run_terminal_command
        - post_slack_message

    slack:
      channel: "#analytics-eng"
    ```
  </Step>

  <Step title="Commit the Agent to Your Repo">
    Commit the YAML to the git branch your Bolt schedule will run against (e.g. `main`):

    ```bash theme={"system"}
    git add .dinoai/agents/github-backlog-agent.yml
    git commit -m "Add github-backlog-agent"
    git push
    ```

    The agent now appears in the **Agent Name** dropdown when you configure a Bolt command - the list is populated from `.dinoai/agents/*.yml` on the configured branch.

    <Info>
      The **Run Paradime DinoAI Agent** command runs natively inside your workspace: no Paradime API keys or environment variables to set on the schedule.
    </Info>
  </Step>

  <Step title="Create the Bolt Schedule">
    Go to **Bolt → Schedules** and click **New Schedule**. Name it something like `GitHub Backlog Agent`, then add a command using the **Run Paradime DinoAI Agent** command type.

    <Frame>
      <img src="https://mintcdn.com/paradime-docs/vrtvqFryCVgm3kAH/images/image-277.png?fit=max&auto=format&n=vrtvqFryCVgm3kAH&q=85&s=d522f649347586fef369e3aff8a3a6d1" alt="" width="2124" height="1492" data-path="images/image-277.png" />
    </Frame>

    **Option 1: From the Bolt UI**

    Click **Add command** → **Run Paradime DinoAI Agent**, then fill in:

    * **Agent Name** — pick `github-backlog-agent` from the dropdown.
    * **Task** — the agent's opening message. For a full backlog sweep:

    ```
    Find every open GitHub issue labelled agent-ready. For each one: read it, implement the required dbt models with tests and YAML docs on a new branch, open a PR with Closes #<number>.
    ```

    **Save Command**, then set the trigger type (cron, on-merge, on-completion) and deploy.

    **Option 2  Schedules as Code**

    If you manage Bolt schedules with YAML, add the same command directly. The UI just writes a `paradime dinoai` invocation under `commands:`:

    ```yaml theme={"system"}
    schedules:
      - name: github backlog agent
        slug: github-backlog-agent-l3m4n5
        description: "Sweep open Agent Ready GitHub issues into dbt PRs"
        owner_email: data-team@acme.io
        environment: production
        git_branch: main
        commands:
          - >-
            paradime dinoai --agent="github-backlog-agent" --message="Find
            every open GitHub issue labelled agent-ready. For each one: read it,
            implement the required dbt models with tests and YAML docs on a new branch,
            open a PR with Closes #<number>." 
        schedule: "0 9 * * 1-5"
        timezone: UTC
    ```

    | UI field   | CLI flag             | Notes                                                                        |
    | ---------- | -------------------- | ---------------------------------------------------------------------------- |
    | Agent Name | `--agent=<name>`     | Must match an existing `.dinoai/agents/<name>.yml` on the schedule's branch. |
    | Task       | `--message="<task>"` | The agent's opening user message. Use a single quoted string.                |
  </Step>

  <Step title="Choose a Schedule Frequency">
    Pick the cadence that matches how often your team labels new issues as **Agent Ready**:

    | Cadence                   | Cron expression | When it runs                 |
    | ------------------------- | --------------- | ---------------------------- |
    | Every day at 9 AM         | `0 9 * * *`     | Monday–Sunday, 9:00 AM       |
    | Weekdays at 9 AM          | `0 9 * * 1-5`   | Monday–Friday, 9:00 AM       |
    | Once a week (Monday 9 AM) | `0 9 * * 1`     | Every Monday, 9:00 AM        |
    | Twice a week (Mon & Thu)  | `0 9 * * 1,4`   | Monday and Thursday, 9:00 AM |
    | Every 6 hours             | `0 */6 * * *`   | 12 AM, 6 AM, 12 PM, 6 PM     |

    <Info>
      For most teams, **weekdays at 9 AM** (`0 9 * * 1-5`) is a good default. If there are no Agent Ready issues, the agent reports an empty backlog and the run completes cleanly.&#x20;
    </Info>
  </Step>
</Steps>

### File Structure

The only file you author lives in your repo:

```
your-repo/
├── dbt_project.yml
└── .dinoai/
    └── agents/
        └── github-backlog-agent.yml
```

Everything else — triggering, polling, notifications — is handled natively by Bolt and the agent runtime.

### Related Docs

* [**Programmable Agents — Quick Start** — getting started with DinoAI agents](/products/dino-ai/programmable-agents/quick-start)
* [**Programmable Agents — YAML Configuration** — full reference for agent config options](/products/dino-ai/programmable-agents/yaml-configuration)
* [**Programmable Agents — Tools Reference** — all available tools including `read_file`, `get_linear_issue`, and `post_slack_message`](/products/dino-ai/programmable-agents/tools-reference)
* [**Running from Bolt** — trigger agents from a Bolt schedule (UI and YAML)\`](/products/bolt/index)
* [**Slack Integration** — connecting Slack to Paradime](/integrations/slack)
* [**Paradime API & Credentials** — where to find your API endpoint, key, and secret](/developers/generate-api-keys-legacy)


## Related topics

- [jira-backlog-agent](/guides/programmable-agents/jira-backlog-agent.md)
- [GitHub Merge Queue](/guides/working-with-git/github-merge-queue.md)
- [Migrate dbt™ jobs from GitHub Actions to Paradime Bolt](/guides/migrations/migrating-dbt-tm-jobs-from-github-actions-to-paradime-bolt.md)
- [GitHub PR Management Tool](/products/dino-ai/tools-and-features/github-pr-management-tool.md)
- [Column-Level Lineage Diff on GitHub](/products/bolt/ci-cd/lineage-diff/github.md)
