> For the complete documentation index, see [llms.txt](https://help.genesis.autify.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.genesis.autify.com/resources-context/codebase.md).

# Codebase

This article explains the **Codebase** feature in the **Resources and Context** tab. By archiving source code as a ZIP file and uploading it, you can register source code in a workspace so the AI can reference code content when answering questions or running workflows. For GitHub integration, see [GitHub integration](/resources-context/github-integration.md).

## Prerequisites

| Action           | Required role |
| ---------------- | ------------- |
| Upload ZIP files | All members   |
| Delete codebase  | Admin / Owner |

## Uploading as a ZIP file

<figure><img src="/files/NCTXGAEVNmt38j3Rta6d" alt="Screenshot of the codebase upload area"><figcaption><p>Codebase upload area</p></figcaption></figure>

1. On the workspace page, select the **Resources and Context** tab.
2. Select **Codebase**.
3. Drag and drop a ZIP file into the upload area, or click the area to choose a file.
4. Upload progress is shown as a percentage. After upload, indexing starts automatically.
5. When the status changes to **{n} indexed**, the codebase is available.

{% hint style="info" %}
The only supported format is ZIP (`.zip`). Limits: ZIP file up to 200 MB, total extracted size up to 5 GB, and up to 100,000 files in the archive.
{% endhint %}

{% hint style="info" %}
Uploading a ZIP file consumes AI usage. Uploads are blocked when the usage limit is reached. A warning appears when storage usage reaches 80% of the limit, and new uploads are disabled when the limit is exceeded.
{% endhint %}

### Supported file formats

The following file extensions are included in indexing:

**Code files**: `.ts` / `.tsx` / `.js` / `.jsx` / `.py` / `.go` / `.java` / `.rb` / `.rs` / `.c` / `.h` / `.cpp` / `.hpp` / `.cc` / `.cxx` / `.cs` / `.kt` / `.kts` / `.swift` / `.php` / `.sh` / `.sql`

**Config and document files**: `.yml` / `.yaml` / `.toml` / `.json` / `.md` / `.txt`

Directories such as `node_modules/`, `.git/`, `dist/`, and `build/`, along with test files and lock files, are automatically excluded.

### Indexing status

| Status                         | Description                                                                    |
| ------------------------------ | ------------------------------------------------------------------------------ |
| Ready                          | Extraction is complete.                                                        |
| Queued for indexing            | Waiting for indexing to start.                                                 |
| Indexing ({processed}/{total}) | Files are being analyzed and indexed. The processed/total file count is shown. |
| {n} indexed                    | Indexing is complete and the codebase is available.                            |
| Indexing failed                | An error occurred during indexing.                                             |
| Failed                         | An error occurred during upload or extraction.                                 |

## Deleting a codebase

Delete a codebase registered as a ZIP archive. To delete a codebase from a GitHub repository, see [GitHub integration](/resources-context/github-integration.md).

1. On the workspace page, select the **Resources and Context** tab.
2. Select **Codebase**.
3. Click the **menu** (<img src="/files/LcbwQkXW0dl3jAZZqltK" alt="" data-size="line">) at the right end of the codebase you want to delete.
4. Click **Delete**.

## Troubleshooting

### Upload errors

| Error message                                                          | Resolution                                                                                                                                                     |
| ---------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Please upload a .zip file                                              | Compress your source code as `.zip` before uploading.                                                                                                          |
| File size exceeds maximum allowed size of 200MB                        | Recreate the ZIP excluding unnecessary directories such as `node_modules/` and `dist/` so the archive stays within 200 MB.                                     |
| Failed to fetch                                                        | Reload the page and upload again.                                                                                                                              |
| Storage limit exceeded                                                 | Your organization's storage is at the limit. Free up space by deleting unused codebases. If you need a higher limit, contact your organization Admin or Owner. |
| Usage limit reached. Contact your administrator to increase the limit. | Your organization has reached its AI usage limit. Contact your organization Admin or Owner.                                                                    |

### Extraction errors

When the status becomes **Indexing failed** or **Failed** after upload, the following causes are possible. Delete the codebase once, fix the ZIP based on the cause, and upload it again.

| Cause                                                                    | Resolution                                                                       |
| ------------------------------------------------------------------------ | -------------------------------------------------------------------------------- |
| ZIP contains more than 100,000 files                                     | Exclude test and cache files and recreate the ZIP with fewer than 100,000 files. |
| ZIP contains individual files larger than 200 MB                         | Exclude the large files and recreate the ZIP.                                    |
| Total extracted size exceeds 5 GB                                        | Split the codebase or exclude unnecessary files and recreate the ZIP.            |
| ZIP created with a Windows tool includes drive letters (`C:\` and so on) | Recreate the ZIP in Unix/Linux or with a standard ZIP tool.                      |
| ZIP contains symbolic links                                              | Replace symlinks with actual files and recreate the ZIP.                         |

### Indexing errors

| Situation                                        | Cause                              | Resolution                                                                            |
| ------------------------------------------------ | ---------------------------------- | ------------------------------------------------------------------------------------- |
| Status stays at **Indexing failed**              | An error occurred during embedding | Delete the codebase and upload it again. If this happens repeatedly, contact support. |
| **Queued for indexing** persists for a long time | The processing queue is congested  | Wait and check again later. If the issue does not clear, contact support.             |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.genesis.autify.com/resources-context/codebase.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
