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

SDK quickstart

Konstera agents are OCI containers that speak the Model Context Protocol (MCP). The SDK is a thin wrapper around an MCP server: your agent receives invocations from the kernel, calls kernel services (LLM, state, credentials, tools), and returns a result or requests a reviewer approval.

SequenceWhere your code sits: the kernel invokes you, you call back to the kernel
KernelYour agent (SDK)Kernel services1invocation2LLM · state · credentials · tools3results4result — or reviewer approval request

Two first-class SDK languages today: Python and .NET. A TypeScript SDK follows. Any language that can speak MCP over stdio or HTTP works — these two just have idiomatic wrappers.

What you'll have at the end
A hello-world agent that greets a customer via the kernel LLM service, plus its Dockerfile and manifest — the three files every agent ships with.
Level
Beginner
You need
Python 3.11+ or .NET 10 SDKDocker

Hello world#

  1. Install the SDK

    Python — install the konstera-sdk wheel (private PyPI during beta; public PyPI on v1.0). .NET — add the Konstera.Sdk NuGet package (private feed during beta; public NuGet on v1.0).

    Terminal
    python -m venv .venv
    source .venv/bin/activate   # Windows: .venv\Scripts\activate
    pip install konstera-sdk
    
  2. Write the handler

    main.py (Python) or Program.cs (.NET):

    Python
    from konstera_sdk import Agent
    
    agent = Agent("hello-world")
    
    @agent.on_invoke
    async def handle(ctx):
        name = ctx.input["name"]
    
        # Kernel LLM service — same shape as .NET, no provider SDK required.
        reply = await ctx.llm.complete(
            system="You are a cheerful retail assistant.",
            user=f"Greet the customer: {name}",
        )
    
        return {"greeting": reply.text}
    
    if __name__ == "__main__":
        agent.run()
    

The same shape in both languages:

PiecePython.NETWhat it does
Entry pointAgent("hello-world")new Agent("hello-world")Creates the agent
Handler@agent.on_invokeagent.OnInvoke(...)Registers the function the kernel invokes
Contextctxctx (an AgentContext)Exposes every kernel service — strongly-typed facades in .NET
LLM callctx.llm.complete(...)ctx.Llm.CompleteAsync(...)Kernel resolves to the tenant's configured model + key
Runagent.run()await agent.RunAsync()Starts the agent

See Kernel MCP services for the full list of services on ctx.

Dockerfile#

Agents ship as containers. Multi-stage builds are the common pattern — build in one image, publish a small runtime image. The kernel spawns one container instance per invocation.

Dockerfile
# Python
FROM python:3.12-slim AS runtime
WORKDIR /app
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . .
CMD ["python", "main.py"]

Manifest#

Every agent ships with a manifest.json that declares what it is, what it needs, and how it behaves.

FlowThe platform reads the manifest to… Interactive — click a block
JSON
{
  "$schema": "https://schemas.konstera.ai/agent-manifest.v3.json",
  "id": "hello-world",
  "version": "0.1.0",
  "name": "Hello World",
  "description": "Greets the customer by name.",
  "runtime": {
    "kind": "container",
    "image": "ghcr.io/your-org/hello-world:0.1.0"
  },
  "input": {
    "type": "object",
    "properties": {
      "name": { "type": "string" }
    },
    "required": ["name"]
  },
  "autonomy": "autonomous",
  "needs": ["llm"]
}

Full field reference in Manifest reference.

Human-in-the-loop#

Agents that draft customer-visible content (emails, support replies, PO approvals) typically return their output as a reviewer request instead of sending it directly:

SequenceDraft → reviewer → send only on approval
Your agentReviewer inboxEmail tool1ctx.Human.RequestAsync(draft)send · edit · redraft · reject2decision3if approved: SendEmailAsync
C#
// .NET
var decision = await ctx.Human.RequestAsync(new ReviewerRequest {
    Draft = reply.Text,
    Rationale = "Loyalty tier: gold, 2nd return this month",
    Thread = ctx.Thread,
});

if (decision.Approved) {
    await ctx.Tool.SendEmailAsync(decision.FinalText);
}

The reviewer sees the draft in their inbox with four actions — send, edit, redraft, reject. See the platform overview for the inbox UX and kernel services for the full ctx.human API.

What next#