> ## 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 takes tickets from a Slack channel, works in a sandbox on Claude Code, Codex or OpenCode, opens pull requests on GitHub, and waits for approval before risky commands.

A Software Factory is one coding agent with four parts in place: work arrives in a Slack channel, the agent runs on a coding harness, it pushes to GitHub, and gated commands wait for a named person. This page sets up each part in order. Each step links to the page with the full details.

What this page covers today:

| Part | Supported | Not supported yet |
| - | - | - |
| Harness | Claude Code, Codex, OpenCode | Cursor (connects only as a desktop client) |
| 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 | GitHub Enterprise Server, and pull request flows outside github.com |
| Intake | A Slack channel routed to the agent | Tickets that start the agent directly from Jira, Linear, Notion or GitHub Issues |
| Control | Gated commands and approval cards | |

## Before you start

* An admin has connected your Slack workspace under **Platform > Agents > Channels**. See [Slack workspace](https://docs.xpander.ai/run/integrations/slack.md).
* Your organization has a model provider enabled under **Platform > AI governance > Models**.
* You can push to the GitHub repository the agent will work on.

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

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

Open **Agent settings** from the gear in the conversation header. Under `PROMPT`, write the rules the agent follows on every ticket: which repository it works in, the base branch, the branch and commit naming, and the checks it runs before it opens 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 a runtime environment. Put the language toolchain and the CLIs your build needs in **Packages**, and the team's conventions in **Context**. The GitHub CLI, `gh`, and a Chromium browser for UI checks are already installed for Claude Code, Codex and OpenCode sessions.

Details: [Runtime environments](https://docs.xpander.ai/use/agents/runtime-environments.md).

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

The agent clones, pushes and opens pull requests with git and `gh`. It gets GitHub access in one of two ways:

* **The xpander GitHub App.** When the App is installed on the repository's owner, every push in a session carries a token that lasts one hour and covers that one repository. No token is stored in the agent's files. The App covers only the repositories the agent is allowed to use, and a self-hosted install may not offer it.
* **Your own GitHub token.** Add it under **Settings > Connections** as a GitHub credential, `GITHUB_TOKEN`. git and `gh` use it in your own conversations only; other people's conversations do not see it.

With neither in place, 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 the text of each command that must wait for approval, for example `git push origin main`, `gh pr merge` or `terraform apply`. A shell command that contains one of these strings stops and posts an approval card. Name the approvers on each entry; with no approvers named, the agent's owner is asked.

Gated commands apply in both permission modes, on schedules too. A held command does not run until someone clicks **Approve**. If nobody decides within the agent's hold window, four hours by default, the command does not run and the agent continues with the rest of the task.

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**. Pick the channel where tickets are posted, for example `#eng-tickets`. For a private channel, run `/invite @xpander` in Slack first.

Expand **Rules** on the channel row and describe when the agent steps in, for example: "A message that links a bug or feature ticket and asks for a fix." Turn on **Also engage in thread replies** so that answers to the agent's questions in the ticket thread reach it.

Details: [Agents in Slack](https://docs.xpander.ai/guides/deploy/slack.md#route-a-channel-to-an-agent).

**6. Post the first ticket**

Post a small, well-defined ticket in the channel. The agent answers in a thread. It works in its own sandbox, with its own git working tree for that conversation, and it can run several tickets at the same time in separate conversations. It posts progress notes and questions in the thread, and it waits there when it needs your answer.

When a command matches a gated entry, the approval card reaches the approvers in Xpander Chat and in Slack. After approval, the command runs and the agent continues.

## Check the result

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

## Next

* [Approvals](https://docs.xpander.ai/use/approvals.md): what waits, who decides, and what happens meanwhile.
* [Resident processes](https://docs.xpander.ai/use/agents/resident-processes): how a coding agent waits for a pull request or a reply without holding capacity.
* [Desktop AI clients](https://docs.xpander.ai/run/integrations/desktop-clients.md): which clients run as harnesses and which connect from a laptop.


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