Skip to content
Konstera
Docs · Coding agents
Konstera documentation.

Getting started, SDK quickstart, manifest reference, kernel MCP services, deploy guide and FAQ — everything you need to build and run agents on Konstera.

Build with Cursor

Cursor's inline Composer is well-suited to Konstera agent authoring: open the scaffold, give it the project context, describe what you want. Same preamble works for Claude Code / Windsurf / ChatGPT — this page is just the Cursor-specific setup and keybindings.

For the preamble content itself and the SDK's rules, see Build with Claude Code — that page is the single-source-of-truth for what the coding agent needs to know. This page is just about Cursor the editor.

What you'll have at the end
A Cursor project that knows the Konstera rules on every message, and a repeatable scaffold → test → fix loop.
You need
CursorThe Konstera agents repoThe Preamble from Build with Claude Code
ArchitectureWhat Cursor sends the model, and where each piece comes from Interactive — click a block

One-time setup#

  1. Install Cursor

    cursor.com/download. You'll pick a model on first launch — Claude Sonnet 4.6 or GPT-5 are both good choices for Konstera agent authoring.

  2. Clone the agents repo as your scaffold base
    Terminal
    git clone https://github.com/Konstera/agents
    cd agents/hello-world-python
    # or: cs agents/customer-service-agent (richer reference)
    cursor .
    
  3. Add the Konstera preamble to the project

    Cursor reads two files for project context:

    • .cursorrules — project-level system prompt (sent on every message)
    • .cursor/rules/*.md — reusable rule files you can toggle

    Create .cursorrules at the agent repo root with the preamble content from Build with Claude Code § Preamble. Cursor picks it up automatically.

  4. Load the docs as context (optional but helpful)

    In Cursor:

    • Ctrl/Cmd + Shift + P → Add @docs source
    • URL: https://konstera.ai/docs/llms-full.txt (compiled single-file reference)

    Now you can @docs in a prompt and Cursor retrieves relevant Konstera reference material inline.

Three workflows#

WorkflowCursor modeWhat you get
Scaffold from a one-sentence requirementCtrl/Cmd + K or Ctrl/Cmd + Lmain.py, manifest.json, Dockerfile edited in-place
Edit-test-fix loopAgent mode, Ctrl/Cmd + IEdits + test runs until green
Convert manifest from one connector to anotherChatConfirmation that the manifest doesn't change

Scaffold from a one-sentence requirement#

  1. Open the project
    Open the project with .cursorrules set.
  2. Open a prompt
    Ctrl/Cmd + K (inline edit) or Ctrl/Cmd + L (chat panel).
  3. Paste the requirement

    Build a Konstera agent that polls a Zendesk inbox every hour, classifies new tickets by product area, and routes them to the right team's Slack channel.

  4. Review the diff
    Cursor edits main.py, manifest.json, and Dockerfile in-place. Review the diff before accepting.
  5. Local test
    Terminal
    pip install -e .
    python -m main
    # In another shell:
    curl -X POST http://localhost:8080/invoke \
      -H content-type:application/json \
      -d '{"invocationId":"t1","input":"","config":{}}'
    

Edit-test-fix loop#

Cursor's agent mode (Ctrl/Cmd + I) handles multi-file edits + runs commands in a sandboxed terminal. Pattern:

Flow Interactive — click a block
  1. Paste the failure
    Paste the failing invocation's exception + stack trace.
  2. Ask for a fix
    Ask: "Diagnose and fix. Run the tests after."
  3. Let Cursor iterate
    Cursor edits, runs python -m pytest, iterates until green.

Works well for:

  • Missing await in front of ctx.* calls
  • Forgotten await ctx.capability.available(name) guards
  • Manifest needs[] out of sync with code (CapabilityUnbound at runtime)

Convert manifest from one connector to another#

Fast refactor pattern — the capability-indirection layer makes this near-trivial:

Switch this agent from Shopify (orders.lookup_by_email) to BigCommerce (same capability name, different connector binding). What manifest changes are needed on the operator side?

Review before you accept a diff#

  • Every ctx.* call is await-ed
  • Optional capabilities are guarded by await ctx.capability.available(name)
  • The manifest's needs[] matches what the code calls
  • No vendor SDK imports — vendor calls go through ctx.capability.call(...) (catalogue; Pattern gotchas)

Keyboard shortcuts worth memorising#

ShortcutAction
Ctrl/Cmd + KInline edit (replace/edit selected region)
Ctrl/Cmd + LChat panel (open side-by-side chat)
Ctrl/Cmd + IAgent mode (multi-file + terminal)
Ctrl/Cmd + Shift + LAdd selected code to chat context
@file / @docs / @gitAdd context sources inline

Known Cursor quirks that bite coding-agent accuracy#

QuirkWhat happensWhat to do
Agent mode tool loopCursor's agent-mode occasionally retries a failed shell command repeatedly. Watch for infinite pip install konstera-sdk loops when the dev machine has no network.Stop with Esc and switch to the chat panel for the manual pattern.
.cursorrules size limit~15k characters.The Konstera preamble is ~5k; fits comfortably.
Model drift on long contextsCursor's context window handles refactors >1000 lines, but accuracy drops on the SDK's naming conventions (e.g. ctx.capability vs ctx.connector).For refactors >1000 lines, break into smaller tasks.

See also#