Skip to content
Konstera
Docs · Reference
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.

Error catalog

Every error the Konstera SDK, CLI, or kernel can emit, grouped by source, with the exact message, cause, and recovery pattern. If you're looking at an error that isn't on this page, open an issue or book a call — missing-from-catalog is a bug.

FlowWhere each family of errors surfaces in an agent's life Interactive — click a block

Quick index#

Find your message, jump to the entry. Every entry follows the same shape: When it fires → Why → Fix.

ErrorFires atFix in one line
ValueError … 'purpose' or 'model'InvocationPass purpose= (preferred) or model=
RuntimeError … KONSTERA_KERNEL_MCP_URL is unsetDirect-run (local dev)Set KONSTERA_KERNEL_MCP_URL, or guard direct-run paths
RuntimeError: llm_complete returned no resultInvocationTransient — retried automatically; if repeated, check provider binding + budget cap
CapabilityUnboundInvocationGuard with await ctx.capability.available(name)
CapabilityUpstreamFailedInvocationRetry; on hard failure log + degrade or escalate
CapabilityErrorInvocationCheck platform health; open an issue with the invocation ID
TypeError: AgentResponse.__init__() … 'content'InvocationAlways pass content, even if empty
[VAL-001] Required field missingUpload or installAdd the missing required field
[VAL-002] not in capability catalogueInstallCheck the name against the capability catalogue
[VAL-003] runtime.image unreachableInstallMake the image pullable by the kernel
The agent's image … was not foundStartPush the image; publish with the same name and tag
… keeps stopping (exit code N)StartRead the run's logs; check settings and memoryMi
[VAL-004] input JSON Schema invalidUploadValidate the schema before upload
[VAL-005] Schema version not supportedUploadUse v3 or v3.1
[KERN-001] instance is disabledInvocationRe-enable the instance, or re-deploy elsewhere
[KERN-002] Budget cap exceededInvocationRaise the cap, wait for next cycle, or exclude the agent
[KERN-003] Rate limit exceededInvocationReduce frequency, batch, or raise the limit
[KERN-004] Invocation timeoutInvocationRaise timeoutSeconds or split the work
[KERN-005] Memory limit exceededInvocationRaise memoryMi or stream payloads

Common pitfalls#

Several of the errors below come from a handful of authoring mistakes — avoid these up front. The debugging guide has the before/after code for each.

Do
  • await every ctx.* call — including ctx.capability.available(...).
  • Guard optional capabilities with await ctx.capability.available(name) before calling them.
  • Route LLM calls by purpose= so the tenant admin binds the model.
  • Call external systems through ctx.capability.call(...).
  • Log that you fetched a credential, not the credential.
Avoid
  • Import vendor SDKs (import shopify) in an agent — it couples the agent to one provider.
  • Hard-code model= across tenants — the admin can't swap provider without a redeploy.
  • Return AgentResponse() without content.
  • Over-declare capabilities.needs[].

Python SDK errors#

Raised inside your agent process. They show up in the invocation trace's Exception section with type, message and line numbers.

ValueError: ctx.llm.complete: must supply either 'purpose' or 'model'#

When — You called await ctx.llm.complete(prompt="...") without passing either purpose="name" or model="name".

Why — The kernel needs to know which LLM to route to. Purpose is preferred (portable across tenants); model is an escape hatch for one-off scripts.

Fix

Python
# Preferred: tenant admin binds "narrator" to a concrete model
result = await ctx.llm.complete(prompt="...", purpose="narrator")

# Escape hatch: hard-coded model
result = await ctx.llm.complete(prompt="...", model="claude-sonnet-4-6")

RuntimeError: Cannot call MCP tool '<name>' — KONSTERA_KERNEL_MCP_URL is unset.#

When — Any service that returns data (state.get, vector.query, credentials.get, capability.call, etc.) is called in direct-run mode (no kernel URL set).

Why — Fire-and-forget calls (log.info, log.warn, log.error, cost.record) succeed in direct-run mode as no-ops. Calls that return data can't fabricate the data — they raise so the agent fails fast rather than running with missing state.

In direct-run modeBehaviour
Fire-and-forget: log.info, log.warn, log.error, cost.recordSucceed as no-ops
Returns data: state.get, vector.query, credentials.get, capability.call, …Raise this RuntimeError

Fix — Either run against a live kernel (set KONSTERA_KERNEL_MCP_URL) or guard the call behind an if ctx.<service>._mcp.enabled: check for direct-run paths. See Environment variables.

RuntimeError: llm_complete returned no result#

When — The kernel returned an empty response from llm_complete.

Why — Transient — provider API timed out, rate-limited, or the kernel's cost cap was tripped mid-call.

Fix — Retry with the Temporal activity policy (automatic). If repeated, check the tenant's LLM provider binding + budget cap in the portal.

CapabilityUnbound: Agent has no binding for '<name>'#

When — await ctx.capability.call(name, ...) on a capability the operator hasn't bound to a connection for this agent instance.

Why — Capabilities declared as optional: true in the manifest may or may not be bound at install time. The kernel refuses calls to unbound capabilities.

Fix — Guard with await ctx.capability.available(name) before the call, and route to a fallback (log, degrade gracefully, request human approval):

Python
if await ctx.capability.available("orders.lookup_by_id"):
    order = await ctx.capability.call("orders.lookup_by_id", id=oid)
else:
    await ctx.log.warn("orders.lookup_by_id unbound; skipping order detail")
    order = None

CapabilityUpstreamFailed: <provider> <method> failed (<code>)#

When — The connector or REST recipe backing a capability threw — the upstream API returned 4xx/5xx or the response didn't match the canonical schema.

Why — External system failure (Shopify down, auth token expired, rate limit, malformed response from a buggy recipe).

Fix — Retry (Temporal does this automatically with the manifest's retry policy). For hard failures, log + continue or escalate to human:

Python
try:
    order = await ctx.capability.call("orders.lookup_by_id", id=oid)
except CapabilityUpstreamFailed as e:
    await ctx.log.warn("order lookup failed", error=str(e))
    order = None  # degrade gracefully

CapabilityError: An error occurred invoking 'capability_call'#

When — Base-type error — the kernel didn't surface a specific sub-code.

Why — Usually an internal error (kernel bug, DB unreachable, auth misconfig).

Fix — Check platform health. If reproducible, open an issue with the invocation ID — the kernel log has the full stack.

TypeError: AgentResponse.__init__() missing 1 required positional argument: 'content'#

When — You returned AgentResponse() without a content argument.

Why — content is required — it's the primary agent output.

Fix — Always pass content, even if empty:

Python
return AgentResponse(content="")  # not: return AgentResponse()

Manifest validation errors (platform-side, at upload)#

Raised by the platform when you upload or install an agent — before any of your code runs.

CodeUploadInstall
VAL-001✓✓
VAL-002✓
VAL-003✓
VAL-004✓
VAL-005✓

[VAL-001] Required field '<field>' missing#

When — Agent upload or install.

Fix — Add the field. The 6 required top-level fields are: id, version, name, runtime, input, autonomy. See Manifest reference.

[VAL-002] 'needs[].name' <name> not in capability catalogue#

When — Install (not upload — upload accepts the manifest, install validates against the tenant's capability catalogue).

Fix — Check the capability name against https://github.com/Konstera/sdk/blob/main/schemas/capability-catalog.json.

You wroteShould be
orders.lookuporders.lookup_by_email or orders.lookup_by_id
email.sendtickets.reply (for ticket systems)

[VAL-003] 'runtime.image' is unreachable#

When — Install. The kernel pulled the image + got 404 / 401.

Fix — Push the image and make sure the platform can pull it: a public image on Konstera Cloud, or a registry your cluster can pull from when self-hosted. See Where your agent's image lives.

[VAL-004] 'input' JSON Schema is invalid#

When — Upload.

Fix — Validate the schema with a standalone JSON Schema validator before upload. Common mistakes: "type": "string" for a field that should be "integer"; missing "properties" on an "object" type.

[VAL-005] Schema version <v> not supported — expected v3 or v3.1#

When — Upload.

Fix — The platform supports two major versions at a time. If you're upgrading from v2, see the migration section of the manifest reference. Currently supported: v3, v3.1. See also the versioning policy.

Agent start errors#

Shown on the agent's page when you start it, and kept as the run's error (category agent_start_failed) when a run can't start its agent. The platform stops waiting as soon as the cause is clear, so most of these appear within seconds. Runs that fail this way are not retried: fix the cause, then start the agent again.

The agent's image "<image>" was not found in its registry.#

When — Start. The registry has no image with that name and tag.

Why — The image was never pushed, was pushed under another name or tag, or runtime.image points at localhost:4505 on a hosted workspace.

Fix — Push the image, then publish the manifest with the same reference. See Where your agent's image lives.

The platform is not allowed to pull the agent's image "<image>".#

When — Start. The registry refused the pull (401 / 403).

Fix — Make the image public, or add a Container registry connection for the registry with a read-only token. Self-hosted, you can also give your cluster's nodes pull access to the registry.

The registry refused the login in the Container registry connection "<alias>" when pulling "<image>".#

When — Start. The workspace has a registry connection for that host, but the registry refused its token, or the token can't read this image.

Fix — Open the connection, set Repository to the image's repository and run Test connection. Replace an expired token, or give it read access to the repository, then start the agent again.

This workspace has <N> Container registry connections for <host>.#

Fix — Keep one connection per registry host and delete the others.

The Container registry connection "<alias>" for <host> has no user name or token yet.#

Fix — Add the token on the connection's page, or with konstera connection secret <alias>, then start the agent again.

The agent's image name "<image>" is not a valid image reference.#

Fix — Use <registry>/<repository>:<tag>, lower-case, for example ghcr.io/acme/order-helper:0.1.0.

The agent's container keeps stopping (exit code <N>).#

When — The image pulled, but the container exits at startup again and again.

Fix — Open the run's logs. Common causes: a missing setting or environment variable, or a crash before the agent starts listening. Exit code 137 usually means it ran out of memory: raise memoryMi.

The agent's container started but did not answer its health check (<path>) within <N>s.#

Fix — Check the agent listens on runtime.port on all interfaces (0.0.0.0, not 127.0.0.1) and that runtime.healthPath returns 200.

The agent's container did not start within <N>s.#

When — The image was still being pulled, or the platform was waiting for capacity. This one is retried.

Fix — Try again in a few minutes. Large images take longer on first pull; keep images small.

Kernel errors (runtime, visible in invocation trace)#

Raised by the kernel while an invocation runs. Each one names a limit or state you can change in the portal or the manifest.

CodeLimit or stateWhere to change it
KERN-001Instance state disabledPortal: Instance → Settings → Enable
KERN-002Tenant monthly budget capPortal: Settings → Billing → Caps
KERN-003Connection rate limitPortal: Settings → Connections → <alias> → Rate limit
KERN-004timeoutSecondsManifest
KERN-005memoryMiManifest

[KERN-001] Agent instance <id> is in state 'disabled'#

When — Invocation routed to a disabled instance.

Fix — Re-enable from the portal (Instance → Settings → Enable), or re-deploy to a different instance.

[KERN-002] Budget cap exceeded for tenant <id>: $<spent> / $<cap>#

When — LLM call during an invocation when the tenant's monthly cap was hit.

Fix — Raise the cap in the portal (Settings → Billing → Caps), or wait for the next billing cycle, or exclude a specific agent from the cap.

[KERN-003] Rate limit exceeded for connection '<alias>': <N> req/s#

When — A connector method is called more frequently than the connection's rate limit allows.

Fix — Reduce frequency, batch calls, or raise the limit on the connection (Settings → Connections → <alias> → Rate limit).

[KERN-004] Invocation timeout: <N>s exceeded#

When — Agent handle() ran longer than the manifest's timeoutSeconds.

Fix — Either increase the timeout in the manifest or break the work into smaller invocations (e.g. use a schedule to run every 5 minutes rather than one 30-minute invocation).

[KERN-005] Memory limit <N>Mi exceeded#

When — Agent container's memory consumption hit the manifest's memoryMi.

Fix — Raise memoryMi, or stream large payloads instead of loading them all into memory.

CLI errors (planned — v1 CLI)#

The CLI publishes error codes in the KN-CLI-* namespace. Reference will land with the CLI v0.1.0 release.

When something isn't in this catalog#

That's a bug — this catalog is intended to be exhaustive. Either:

We ship the fix in the next release and update this page.

See also#