# Work with an AI agent

Claude Code, Cursor, and Codex know the rules of your project and talk to the platform directly through the agent plugin.

> Source: https://www.application-platform.com/en/docs/work-with-ai-agents/

In a platform project, an AI agent such as Claude Code, Cursor, or Codex follows the rules placed there and talks to the platform through the agent plugin. Always open it in the parent project folder `~/Documents/application-platform/<organization>/<project>/` so that it finds all repositories and the rules files.

## Install the agent plugin

The prerequisites are Node.js version 18 or newer and the ap CLI. Both are done in the terminal, the CLI with the first command (Windows, in PowerShell: `irm https://www.application-platform.com/install.ps1 | iex`), the plugin with the second:

```bash
curl -fsSL https://www.application-platform.com/install.sh | sh
npx --yes github:doppelt-digital/application-platform-plugin
```

The installer detects the installed agents, places skills and MCP configuration with them, and signs you in with `ap login`; afterwards you reload the editor or restart the agent.

The plugin brings skills, slash commands such as `/create-project`, and the MCP server `application-platform` via `ap mcp serve`; the details and the installation paths for individual tools are in [CLI and agent plugin]({{< relref "cli-and-agent-plugin" >}}).

## What you can ask the agent

- "Import this project into my Application Platform account." The agent detects the stack, creates the project, and pushes your code, see [Bring in an existing project]({{< relref "import-existing-project" >}}).
- "Create a new Application Platform project with a Next.js app and a NestJS backend and clone it." The agent creates the project from a template, waits for the setup, and clones it.
- "Start the backend locally." The agent runs `ap run-local` in the backend repository.

## Which rules the agent follows

The file `AGENTS.md` from `local-configuration` in the project folder requires starting applications with `ap run-local`, never editing `.gitlab-ci.yml` and `env/*.generated.env` by hand, writing your own values to `env/*.custom.env`, never committing or printing secrets, working in the application repository instead of `local-configuration`, taking runtimes from `.tool-versions`, and storing backend uploads under `./upload`. Agents do not commit and push on their own.

## Add your own rules

Your own rules, such as preferred libraries, go into `local-configuration/AGENTS.md`; after a commit and push they apply to everyone on the team, see [Your own rules for AI agents]({{< relref "ai-instructions" >}}).

## Limits

The MCP server runs locally through the ap CLI, so cloud agents cannot use it; if the agent reports that you are not signed in, type `ap login`. If creating or importing fails, the agent does not work around the error with its own Git commands.

You [save and publish]({{< relref "save-and-publish" >}}) the agent's changes.

