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

# Software Factory quickstart

> Set up a coding agent that turns Slack tickets into GitHub pull requests.

Set up one coding agent that takes tickets from Slack, works in a sandbox and opens pull requests on GitHub, with risky commands waiting for a person. Each step links to the full details.

![Diagram](https://docs.xpander.ai/images/diagrams/use-software-factory-d4fa2014.svg)

## What you need

| Part | What you use |
| - | - |
| Harness | Claude Code, Codex or OpenCode |
| Git host | GitHub on github.com, through the xpander GitHub App or your own token. Your own GitLab or Bitbucket token also works for git. |
| Intake | A Slack channel routed to the agent, or your ticketing system (Jira, Linear, Notion, GitHub Issues and others) connected as a [skill](https://docs.xpander.ai/connectors/add-a-skill.md) |
| Control | Gated commands and approval cards |

## Before you start

* An admin has connected Slack under **Platform > Agents > Channels**. See [Slack workspace](https://docs.xpander.ai/run/integrations/slack.md).
* A model provider is enabled under **Platform > AI governance > Models**.
* You can push to the target GitHub repository.

**1. Create the agent and pick a harness**

Click **New**, open **Harness and model** in the composer, and pick Claude Code, Codex or OpenCode with a model. A choice made before the first conversation becomes the agent's default.

In **Agent settings**, under `PROMPT`, write the rules for every ticket: the repository, base branch, branch and commit naming, and the checks to run before a pull request. Details: [Create and customize an agent](https://docs.xpander.ai/use/agents/create.md#harness-and-model).

**2. Give the agent its computer**

Under **Agent settings > Advanced > Runtime environment**, attach an environment with your toolchain and CLIs in **Packages** and team conventions in **Context**. The GitHub CLI, `gh`, and a Chromium browser are already installed. Details: [Runtime environments](https://docs.xpander.ai/use/agents/runtime-environments.md).

**3. Let the agent push to GitHub**

The agent uses git and `gh`, with access from one of:

* **The xpander GitHub App.** Installed on the repository's owner, it gives each push a one-hour token for that one repository, with nothing stored in the agent's files. It covers only repositories the agent may use, and a self-hosted install may not offer it.
* **Your own GitHub token.** Add it under **Settings > Connections** as `GITHUB_TOKEN`. It works in your own conversations only.

With neither, a push fails with an authentication error. Details: [Credentials](https://docs.xpander.ai/use/agents/credentials.md).

**4. Gate the commands that need a person**

Under **Agent settings > Advanced > Gated commands**, add each command that must wait, for example `git push origin main`, `gh pr merge` or `terraform apply`, and name its approvers (the owner by default). Any shell command containing that text posts an approval card, in both permission modes and on schedules. With no decision within the hold window, four hours by default, the command does not run and the agent continues. Details: [Approvals](https://docs.xpander.ai/use/approvals.md) and [Permissions](https://docs.xpander.ai/use/agents/permissions.md).

**5. Route a Slack channel to the agent**

In **Agent settings**, click **Configure** on the `CHANNEL` row, then **Add a channel to listen to**, for example `#eng-tickets`. For a private channel, run `/invite @xpander` first. Under **Rules**, describe when the agent steps in, such as "A message that links a bug or feature ticket and asks for a fix", and turn on **Also engage in thread replies**. Details: [Agents in Slack](https://docs.xpander.ai/guides/deploy/slack-and-teams.md#route-a-channel-to-an-agent).

**6. Post the first ticket**

Post a small, well-defined ticket. The agent answers in a thread, works in its own sandbox and git working tree, and can run several tickets at once in separate conversations. Approval cards reach approvers in xpander Chat and Slack.

## Check the result

* **The thread:** the agent's questions, progress and the pull request link.
* **The pull request** on GitHub, pushed with the access from step 3.
* **The task** in xpander Chat: every action, each approval and who decided, and the cost. See [Conversations and tasks](https://docs.xpander.ai/use/agents/conversations.md).

## Next steps

> [card] [Approve an agent's actions](https://docs.xpander.ai/use/approvals.md)
>
> What waits and who decides.

> [card] [Let an agent wait without holding capacity](https://docs.xpander.ai/use/agents/resident-processes)
>
> Waiting for a pull request or reply.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.