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

# Repositories

> Give an agent GitHub repositories to work on, cloned where it works with access to those alone.

Repositories are how code reaches an agent. You choose which of the workspace's GitHub repositories each agent gets, and they are cloned in its folder on the computer it works on, with access to those repositories alone.

## Before you start

The workspace needs its GitHub app, connected to your GitHub account or organization, with the repositories picked there. Owners and admins set this up in **Settings**, under **Repositories**. Until then, the agent form says **Connect GitHub in Settings to give agents repositories.** See [GitHub](https://docs.paraston.com/admin/github.md).

## Choose an agent's repositories

In the agent's form, or with its **Repositories** in **Agents**, pick from the connected repositories. The agent's owner chooses them, and so can owners and admins.

## How the agent gets them

* **Each turn clones what is missing.** At the start of each turn, any of its repositories not yet in its folder is cloned there.
* **Access to those alone.** Each turn gets access, through the GitHub app, only to the agent's own repositories, and only while it works.
* **Who commits.** On **This server**, the agent's commits are authored as the agent. On your own computer, they keep you as the author.

## Copies for cards, threads and routines

Some work gets its own copies, so two pieces of work never touch each other's files:

* **A card** gets a fresh copy of each of the agent's repositories, at the latest default branch, not on any branch. The stage's rules say which branch to make and whether to open a pull request. See [Cards](https://docs.paraston.com/board/cards.md).
* **A thread** that works in a folder of its own gets the same: fresh copies at the latest default branch. See [Conversations and threads](https://docs.paraston.com/working/conversations-and-threads.md).
* **A routine** keeps its copies between runs. A copy with nothing to lose moves to the latest default branch at each run; a copy with changes or commits of its own stays as it was left.

## Unsaved work is kept

When a card is done or canceled, or a thread is marked done, its folder is removed, unless it holds work not saved: changes not committed, or commits not pushed. Then the folder stays, and Paraston tells you why:

* A card waits for its person as unsaved work. Move it back and ask the agent to save the work.
* A thread says so on its card and in its done line.

Branches are never deleted.

## When GitHub is disconnected

If an owner or admin disconnects GitHub, its repositories leave every agent. The app stays installed on GitHub, ready to connect again.


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