# Codex

Codex runs as a CLI, desktop app or VS Code extension, reads AGENTS.md from local-configuration directly, and gets the agent plugin through its marketplace.

> Source: https://www.application-platform.com/en/docs/codex/

Codex is OpenAI's AI agent. You can use it in three ways: as a CLI in the terminal, as a desktop app, or as the ChatGPT/Codex extension in VS Code, which the welcome page of the Application Platform extension links to directly. The [setup app]({{< relref "local-app" >}}) installs the CLI and the desktop variant during developer setup.

## Starting

For the CLI, change into the project folder and run `codex`. As with every agent, open the parent project folder so that all repositories and the shared configuration are visible.

```bash
cd ~/Documents/application-platform/<organization-slug>/<project-slug>
codex
```

## Preconfiguration

Unlike Claude Code, Codex needs no instruction file of its own; it reads `AGENTS.md` directly. In the project folder it is a symlink to `local-configuration/AGENTS.md`, accompanied by the `.codex/` directory with Codex-specific configuration from the same repository. Codex therefore knows the platform conventions from the start: applications start via `ap run-local`, `.gitlab-ci.yml` and `env/*.generated.env` are managed by the platform, and custom values belong in `env/*.custom.env`. Because `AGENTS.md` applies to all agents, your own additions for Codex go in the same place; how that works is described in [Your own rules for AI agents]({{< relref "ai-instructions" >}}).

## Agent plugin through the marketplace

Codex manages plugins through marketplaces and the `/plugins` dialog. First register the plugin's marketplace:

```bash
codex plugin marketplace add doppelt-digital/application-platform-plugin
```

Then open `/plugins` in Codex, select **Application Platform** and install it. The plugin connects the MCP server `application-platform`, which runs through `ap mcp serve`, and provides the skills for sign-in, project creation, import and local start. If the ap CLI is not signed in yet, run `ap login` and restart Codex. All other installation routes, the list of MCP tools and the typical failure cases are described in [CLI and agent plugin]({{< relref "cli-and-agent-plugin" >}}).

A prompt such as "Create a new Application Platform project with a Flutter app and a FastAPI backend and clone it." is enough from then on; the flow behind it is described in [Create a new project]({{< relref "create-project" >}}).

