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

# Codex++ Integration Guide

> Codex++ Agnes Model Configuration Guide

# Codex++ Agnes Model Configuration Guide

## 1. Overview

This guide explains how to configure the Agnes model in **Codex++**.

After configuration, you can use the Agnes model directly in Codex++ for chat, code generation, and agent tasks without logging in to a GPT account.

## 2. Prerequisites

<Note>
  Before you start, make sure you have:

  1. An Agnes API Key.
  2. A network connection that can access the Agnes API Gateway.
  3. The target model name.
  4. Codex++ downloaded or ready to install.
</Note>

Recommended model:

<span class="field-row"><code>agnes-2.0-flash</code></span>

API Base URL:

<span class="field-row"><code>[https://apihub.agnes-ai.com/v1](https://apihub.agnes-ai.com/v1)</code></span>

## 3. Download Codex++

Open the Codex++ download page:

<span class="field-row"><code>[https://github.com/BigPizzaV3/CodexPlusPlus](https://github.com/BigPizzaV3/CodexPlusPlus)</code></span>

You can also open the latest release page directly:

<span class="field-row"><code>[https://github.com/BigPizzaV3/CodexPlusPlus/releases/latest](https://github.com/BigPizzaV3/CodexPlusPlus/releases/latest)</code></span>

Download the version that matches your device:

| Device Type         | Download File         |
| ------------------- | --------------------- |
| Windows             | windows-x64-setup.exe |
| Mac with Intel chip | macos-x64.dmg         |
| Mac with Apple chip | macos-arm64.dmg       |

If you are not sure whether your Mac uses an Intel chip or an Apple chip, click the Apple icon in the top-left corner and select **About This Mac**.

## 4. Install Codex++

After downloading, install Codex++ normally.

If you are using macOS and see the following error:

```text theme={null}
"Codex++" is damaged and can’t be opened.
```

Open **Terminal** and run the following commands:

```bash theme={null}
sudo xattr -rd com.apple.quarantine "/Applications/Codex++.app"
sudo xattr -rd com.apple.quarantine "/Applications/Codex++ 管理工具.app"
```

After running the commands, reopen the Codex++ Management Tool.

## 5. Open the Codex++ Management Tool

After installation, open:

```text theme={null}
Codex++ Management Tool
```

In the left sidebar, click:

```text theme={null}
Provider Configuration
```

Then click:

```text theme={null}
Add Provider
```

Next, fill in the Agnes provider information according to the configuration below.

## 6. Add the Agnes Provider

Fill in the following fields:

| Field             | Value                                                            |
| ----------------- | ---------------------------------------------------------------- |
| Name              | Agnes                                                            |
| Access Mode       | API Only                                                         |
| Test Model        | agnes-2.0-flash                                                  |
| Base URL          | [https://apihub.agnes-ai.com/v1](https://apihub.agnes-ai.com/v1) |
| Key               | Enter your Agnes API Key                                         |
| Upstream Protocol | Chat Completions                                                 |

Configuration example:

```text theme={null}
Name:
Agnes

Access Mode:
API Only

Test Model:
agnes-2.0-flash

Base URL:
https://apihub.agnes-ai.com/v1

Key:
Enter your Agnes API Key

Upstream Protocol:
Chat Completions
```

## 7. Configuration Notes

Please check the following carefully:

1. **Only enter the API key starting with** **`sk-`**. Do not include `Bearer`.
2. **The Base URL should only end with** **`/v1`**. Do not enter `/chat/completions`.
3. **The upstream protocol must be** **`Chat Completions`**.
4. The model name should be:

<span class="field-row"><code>agnes-2.0-flash</code></span>

1. After completing the configuration, click:

```text theme={null}
Save
```

## 8. Enable the Agnes Provider

After saving the configuration, return to the provider list and select:

```text theme={null}
Agnes
```

If you see any of the following buttons, click it to enable the Agnes provider:

```text theme={null}
Use
```

```text theme={null}
In Use
```

```text theme={null}
Switch to This Provider
```

After it is enabled successfully, Agnes will become the current active provider.

## 9. Start Codex++

Return to the left sidebar and click:

```text theme={null}
Overview
```

Then click:

```text theme={null}
Start Codex++
```

You can also click the button in the top-right corner:

```text theme={null}
Restart Codex
```

After startup, you can use Codex++ normally, and requests will be routed through the Agnes model.

## 10. Verify the Configuration

Open Codex++ and create a new session.

Enter a simple test message, for example:

```text theme={null}
Hello, please introduce yourself.
```

If Codex++ responds normally, the Agnes model configuration is successful.

## 11. FAQ

### 1. What should I do if Codex does not respond properly?

Please check the following:

* Make sure you started Codex from **Codex++** or the **Codex++ Management Tool**, instead of opening the original Codex.
* Make sure the Base URL is:

<span class="field-row"><code>[https://apihub.agnes-ai.com/v1](https://apihub.agnes-ai.com/v1)</code></span>

* Make sure the Key only contains the API key starting with `sk-`.
* Make sure the upstream protocol is:

```text theme={null}
Chat Completions
```

* Make sure the model is:

<span class="field-row"><code>agnes-2.0-flash</code></span>

* Make sure the Agnes provider has been enabled after saving the configuration.

### 2. How should I enter the API Key?

Only enter the Agnes API Key itself, for example:

```text theme={null}
sk-xxxxxxxxxxxxxxxx
```

Do not enter:

```text theme={null}
Bearer sk-xxxxxxxxxxxxxxxx
```

### 3. How should I enter the Base URL?

Correct:

<span class="field-row"><code>[https://apihub.agnes-ai.com/v1](https://apihub.agnes-ai.com/v1)</code></span>

Incorrect:

<span class="field-row"><code>[https://apihub.agnes-ai.com/v1/chat/completions](https://apihub.agnes-ai.com/v1/chat/completions)</code></span>

### 4. Do I need to log in to a GPT account?

No.

After configuration, you can use Codex++ directly with the Agnes model.

## 12. Recommended Configuration Summary

<span class="field-kv"><span class="field-key">Provider Name:</span> <code>Agnes</code></span>
<span class="field-kv"><span class="field-key">Mode:</span> <code>API Only</code></span>
<span class="field-kv"><span class="field-key">Model:</span> <code>agnes-2.0-flash</code></span>
<span class="field-kv"><span class="field-key">Base URL:</span> <code>[https://apihub.agnes-ai.com/v1](https://apihub.agnes-ai.com/v1)</code></span>
<span class="field-kv"><span class="field-key">API Key:</span> <code>YOUR\_AGNES\_API\_KEY</code></span>
<span class="field-kv"><span class="field-key">Protocol:</span> <code>Chat Completions</code></span>

## 13. Full Setup Summary

1. Download and install Codex++.
2. Open the Codex++ Management Tool.
3. Go to Provider Configuration.
4. Add the Agnes provider.
5. Enter the model, Base URL, API Key, and upstream protocol.
6. Save the configuration.
7. Enable the Agnes provider.
8. Start or restart Codex++.
9. Create a new session to test whether Codex++ responds normally.
10. After configuration, you can use the Agnes model in Codex++.
