feat: add Cursor CLI as a first-class agent type#414
Open
aslakknutsen wants to merge 1 commit intokelos-dev:mainfrom
Open
feat: add Cursor CLI as a first-class agent type#414aslakknutsen wants to merge 1 commit intokelos-dev:mainfrom
aslakknutsen wants to merge 1 commit intokelos-dev:mainfrom
Conversation
Cursor CLI joins claude-code, codex, gemini, and opencode as a natively supported agent. The integration follows the standard agent image interface: Dockerfile with UID 61100, entrypoint that handles AXON_MODEL, AXON_AGENTS_MD, AXON_PLUGIN_DIR (copied into .cursor/skills/), and AXON_MCP_SERVERS (written to ~/.cursor/mcp.json). Usage parsing reuses the claude-code stream-json parser since both CLIs use the same --output-format stream-json output structure. Co-authored-by: Cursor <cursoragent@cursor.com> Signed-off-by: Aslak Knutsen <aslak@4fs.no>
gjkim42
reviewed
Feb 23, 2026
| USER agent | ||
|
|
||
| # Cursor CLI installs to ~/.local/bin | ||
| RUN curl -fsSL https://cursor.com/install | bash |
Collaborator
There was a problem hiding this comment.
can we pin the cursor to a specific version? so that it will not be siliently updated?
| if [ -n "${AXON_AGENTS_MD:-}" ]; then | ||
| mkdir -p ~/.cursor | ||
| printf '%s' "$AXON_AGENTS_MD" >~/.cursor/AGENTS.md | ||
| printf '%s' "$AXON_AGENTS_MD" >/workspace/AGENTS.md |
Collaborator
There was a problem hiding this comment.
do we have to add /workspace/AGENTS.md? I guess ~/.cursor/AGENTS.md already cover it.
Comment on lines
+39
to
+55
| if [ -n "${AXON_PLUGIN_DIR:-}" ] && [ -d "${AXON_PLUGIN_DIR}" ]; then | ||
| for plugindir in "${AXON_PLUGIN_DIR}"/*/; do | ||
| [ -d "$plugindir" ] || continue | ||
| if [ -d "${plugindir}skills" ]; then | ||
| for skilldir in "${plugindir}skills"/*/; do | ||
| [ -d "$skilldir" ] || continue | ||
| skillname=$(basename "$skilldir") | ||
| pluginname=$(basename "$plugindir") | ||
| targetdir="/workspace/.cursor/skills/${pluginname}-${skillname}" | ||
| mkdir -p "$targetdir" | ||
| if [ -f "${skilldir}SKILL.md" ]; then | ||
| cp "${skilldir}SKILL.md" "$targetdir/SKILL.md" | ||
| fi | ||
| done | ||
| fi | ||
| done | ||
| fi |
Collaborator
There was a problem hiding this comment.
what about the agents?
I guess we have to inject plugin.agents as well.
Collaborator
|
@aslakknutsen |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cursor CLI joins claude-code, codex, gemini, and opencode as a natively supported agent. The integration follows the standard agent image interface: Dockerfile with UID 61100, entrypoint that handles AXON_MODEL, AXON_AGENTS_MD, AXON_PLUGIN_DIR (copied into .cursor/skills/), and AXON_MCP_SERVERS (written to ~/.cursor/mcp.json).
Usage parsing reuses the claude-code stream-json parser since both CLIs use the same --output-format stream-json output structure.
Summary by cubic
Adds Cursor CLI as a first-class agent type (type: "cursor") with a native image and entrypoint. Tasks can now run Cursor in Kubernetes with token/cost capture and the standard Axon agent interface.
New Features
Migration
Written for commit 86500dd. Summary will update on new commits.