Repositories
Give an agent your code: SSH keys, adding a repository, the scan, the reference it writes and your approval.
An agent knows your code through the repositories it holds. You add a repository's SSH address to the agent. Entropix fetches it with a read-only key, reads its layout and main files, and drafts two documents: a reference (what the repository is and how it is built) and a skill (when and how to use that knowledge). A person reads the draft and approves it. Only then does any agent see it. From that point the agent can also read the repository's code and history while it answers.
Before you start
- Entropix reads Git over SSH only, and only fetches. It never pushes or writes to a repository.
- Make a read-only deploy key for the portal on your Git host. Never use your personal key.
- The key must have no passphrase. For example:
ssh-keygen -t ed25519 -N '' -f entropix-deploy. - The scan is drafted by a model, so your organisation needs one set up. See Models.
Add an SSH key
- Add the public half of the key to your Git host as a read-only deploy key (on each repository, or as a machine user's key).
- Open Settings and go to SSH keys.
- Enter a Name (1 to 80 characters).
- Paste the whole Private key, from
-----BEGINto-----END. - Paste the Host keys: the output of
ssh-keyscan -t ed25519 <host>. For github.com or gitlab.com, choose the link above the form to fill in their published host keys. - Choose Add the key.
The table then shows the key's name, the hosts it covers, its fingerprint, its public key and who added it. The private key is stored encrypted and never shown again. When Entropix fetches a repository, it uses the key whose host keys cover that repository's host, and it checks the host key strictly.
Remove deletes the key from Entropix. It does not revoke it: revoke the deploy key on your Git host too.
If the form is replaced by A key can't be saved — see the notice above., secret storage is not turned on for your portal. Ask whoever runs it. See Self-host.
Add a repository
- Open Agents › your agent › Connections and go to Repositories.
- Choose Add repository.
- Enter the SSH URL, for example
git@github.com:acme/payments.gitor anssh://address (at most 512 bytes). - Add a Description if you like: one line, at most 500 bytes, without
|. - Choose Add repository. The scan starts. The row reads Scanning. This page refreshes when the draft is ready.
If your organisation has no SSH key yet, the form says Repositories are read over SSH. Add a read-only deploy key first.
The same repository can be on several agents. Your organisation holds it once, and each agent's row shows also on the others. An organisation holds at most 500 repositories.
Add many at once
Choose As a list above the repositories. Each line is ssh_url | description. Edit the list and choose Add all. The result reads N added · N already on this agent · N not added, with the reason for each line that failed. Removing a line from the list removes nothing. A list holds at most 500 lines.
From your coding session
With the Entropix plugin, run /entropix:add-repo <agent>. The add-repo skill finds the agent, takes the SSH URL from you or from the current directory's origin, and asks before it calls the add_repository MCP tool. It needs an admin's token. The portal then scans the repository as usual. The Repositories section shows the same command under Or add one from your editor. See Plugin skills.
What the scan reads
The scan fetches the repository's default branch and reads:
- the file tree;
- the top-level
README.mdandAGENTS.md; - build manifests such as
go.mod,package.json,pom.xml,Cargo.toml,requirements.txtandpyproject.toml.
The repository scanner, one of the background job agents Entropix gives every organisation, then drafts the reference and the skill with its model. The skill opens with a When to use: line, and the team's conventions go into it. Each document is at most 256 KiB. The scan suggests no rules; you add rules separately (see Rules).
Repository status
| Status | Means | What to do |
|---|---|---|
| Scanning | The scan is queued or running. | Wait. The page refreshes. |
| Ready to review | A first draft waits for a person. | Open it and approve, edit or ask for changes. |
| Approved | The reference and skill reach every agent that holds it. | Nothing. |
| Update ready | A rescan drafted changes to an approved repository. | Review the diff. The approved version stays live meanwhile. |
| Approved (reference only) | An approved reference with no skill yet. | Rescan drafts a skill. |
| Scan failed | The scan stopped with an error. The filter calls this Stopped. | Read the error on the row, fix it, then Rescan. |
The chips above the list filter it: All, Needs you, Ready to review, Update ready, Approved, Scanning and Stopped, each with a count. Each row shows when it was scanned and on which branch, how many rules it has, and how many suggestions wait. Rescan all rescans the agent's repositories.
Approve a draft
- Choose Review on the row to open the repository's page.
- Read Draft reference and Draft skill. AGENTS.md as scanned (read-only) shows what the repository says about itself. Reference as written and Skill as written show the raw text.
- To change the draft first, open Edit before approving and edit Reference and Skill. Keep the
When to use:first line. - Choose Approve. The repository's line appears in the agent's main skill and a From <repository> row in its Skills table.
Instead of approving, open Request changes…, say What should change? and choose Request changes. The next scan is told your comment, and the row reads Rescanning with your comment: ….
With several drafts ready, Approve all ready (N) on the Connections tab approves them in one go. It skips updates, local drafts and drafts with hidden text; open those and approve each by hand.
A draft with text the rendered view hides says This draft contains hidden text or HTML, which the rendered view hides. Read it as written above before you approve it. Read the raw text first.
Rescan and updates
Choose Rescan to read the default branch again. On an approved repository the scan drafts an update, and The approved version stays live until you approve the update. The update shows line-by-line diffs of the reference, the skill and AGENTS.md. Choose Approve update, or Discard update, which keeps what is approved.
Each approved repository is also rescanned on a schedule, weekly by default; see Scans. A rescan with no new commits since the approved scan drafts nothing and leaves a note. Choose Redraft anyway on the page (or Rescan anyway under More on the row) to draft again from the same commit.
While a first scan runs you can stop it with Cancel scan; the page then reads Scan cancelled — Rescan to start it again. Cancel rescan drops a rescan and keeps what is approved.
The repository page
Each repository on an agent has its own page. It shows the name, status, SSH URL and when it was last scanned, then:
- <repository>'s rules: the repository's active rules, which reach every agent that holds it, and any Suggested rules (N) with Approve, Edit then approve, Dismiss and Approve all shown (N). See Rules.
- The draft, when one waits, with the approve, edit and request-changes controls above.
- Approved reference and skill, folded, with AGENTS.md as approved.
- Rescan and Remove from this agent. Removing takes the repository off this agent only.
Drafts from a coding session
A coding session can draft a repository's reference and skill itself, with the build-agent plugin skill and the submit_repository_draft MCP tool. The draft lands on the same page, marked drafted locally by <name>, with the note Written by a local coding session with the token of <name>, not by the portal scan. Check its evidence before you approve. No tool can approve a draft: a person always does, on the page. See MCP tools and Import an agent.
How agents read the code
In chats and goals, an agent with repositories can read them at the head of the default branch. The portal fetches a repository the first time it is read. These are the main tools; Built-in tools has the full list.
| Tool | What it does | Limits |
|---|---|---|
read_repo_file | Reads a file with numbered lines, optionally from a start to an end line. | A file over 200 lines read without a range shows its first 120. |
search_repo | Finds fixed text, ignoring case, and other spellings of the same name (paymentUri also finds payment_uri). Can stay under one path. | At least 2 characters; up to 8 files and 20 lines. |
repo_history | Lists the latest commits: id, date, author name and title. Can filter by path. | 10 by default, at most 30. |
show_commit | Shows one commit by its id or a prefix of 7 or more characters: author, date, message, files changed and the diff. | Up to 100 files and 300 diff lines. Only commits on the default branch. |
who_changed | Shows who last changed each line of a file (git blame). | 60 lines by default, at most 120. |
Every answer names the commit it read, so the agent can say how fresh it is. The history tools show author names only, never email addresses. Values that look like secrets, such as private keys and known token shapes, are masked in what the tools return.
What you can and can't do
- See every repository, its drafts, its approved content and its rules, whatever your role.
- As an admin, add keys and repositories, approve or edit drafts, request changes, rescan, cancel and remove.
- Share one repository across several agents.
- Add repositories from your coding session with an admin's token.
- Give the portal write access to a repository. It only fetches.
- Use a key with a passphrase, or see a stored private key again.
- Let a draft reach an agent before a person approves it. No tool approves.
- Put two repositories with the same name, or a repository and a skill with the same name, on one agent.
Troubleshooting
| You see | What to do |
|---|---|
no SSH key covers <host> — add one on Settings | Add a key whose Host keys include that host, then Rescan. |
the SSH key covering <host> was removed — add one on Settings | Add a new key for that host. |
the key could not be read — use an unencrypted key made for this, e.g. ssh-keygen -t ed25519 -N '' | The key has a passphrase or is damaged. Make a new key without a passphrase. |
paste the whole private key, from -----BEGIN to -----END | Paste the key again, including both marker lines. |
the private key is larger than 16 KiB | That is not a deploy key. Make an ed25519 key. |
this agent already has a repository named "x" | Two repositories whose URLs end in the same name can't be on one agent. |
this agent has a skill named "x" — rename the skill before adding a repository of that name | Rename the skill on the Know-how tab first. |
a draft already awaits a decision — approve it, request changes or discard it first | Decide the waiting draft before you rescan. |
| The last scan failed; Entropix retries it. | Wait for the retry. If it reads Scan stopped — fix it, then Rescan., fix the cause shown and choose Rescan. |
the repository is larger than the portal's limit | The repository is bigger than your portal allows. Ask whoever runs your portal to raise the limit. |