# Kompisar

> Kontiga is document fraud detection by Bynn Intelligence for insurers, letting agents, lenders and HR screening teams: every document is compared with a proprietary library of more than 300 million original documents, gathered over 20 years.

Documentation index: https://kontiga.com/llms.txt

Section: Reference. URL: https://kontiga.com/docs/kompisar

A Kompis is a teammate that does one job on its own, written in plain words: chase missing documents, triage flagged payslips, prepare screening matches. It starts on an event or a schedule, acts within its role and its limits, and asks a person before anything it may not do alone, such as free text to an end customer or a decision on a screening match. Every Kompis shares one team memory. It is charged by the tokens it reads and writes; a sandbox run is never charged.

Updated November 29, 2026

## Contents

- [How a Kompis works](https://kontiga.com/docs/kompisar#how-a-kompis-works)
- [The team](https://kontiga.com/docs/kompisar#the-team)
- [List the Kompisar](https://kontiga.com/docs/kompisar#list-the-kompisar)
- [Read a Kompis](https://kontiga.com/docs/kompisar#read-a-kompis)
- [Read the team](https://kontiga.com/docs/kompisar#read-the-team)
- [Read what a Kompis can use](https://kontiga.com/docs/kompisar#read-what-a-kompis-can-use)
- [Create a Kompis](https://kontiga.com/docs/kompisar#create-a-kompis)
- [Change a Kompis](https://kontiga.com/docs/kompisar#change-a-kompis)
- [Give a Kompis new instructions](https://kontiga.com/docs/kompisar#give-a-kompis-new-instructions)
- [Start a Kompis](https://kontiga.com/docs/kompisar#start-a-kompis)
- [Pause a Kompis](https://kontiga.com/docs/kompisar#pause-a-kompis)
- [Resume a Kompis](https://kontiga.com/docs/kompisar#resume-a-kompis)
- [Archive a Kompis](https://kontiga.com/docs/kompisar#archive-a-kompis)
- [Pause the team](https://kontiga.com/docs/kompisar#pause-the-team)
- [Resume the team](https://kontiga.com/docs/kompisar#resume-the-team)
- [Runs](https://kontiga.com/docs/kompisar#runs)
- [Run a Kompis now](https://kontiga.com/docs/kompisar#run-a-kompis-now)
- [Test run a Kompis](https://kontiga.com/docs/kompisar#test-run-a-kompis)
- [List Kompis runs](https://kontiga.com/docs/kompisar#list-kompis-runs)
- [Read a Kompis run](https://kontiga.com/docs/kompisar#read-a-kompis-run)
- [Stop a Kompis run](https://kontiga.com/docs/kompisar#stop-a-kompis-run)
- [Proposals and timers](https://kontiga.com/docs/kompisar#proposals-and-timers)
- [List what waits for approval](https://kontiga.com/docs/kompisar#list-what-waits-for-approval)
- [Confirm a proposal](https://kontiga.com/docs/kompisar#confirm-a-proposal)
- [Reject a proposal](https://kontiga.com/docs/kompisar#reject-a-proposal)
- [List timers and schedules](https://kontiga.com/docs/kompisar#list-timers-and-schedules)
- [Cancel a timer](https://kontiga.com/docs/kompisar#cancel-a-timer)
- [The team memory](https://kontiga.com/docs/kompisar#the-team-memory)
- [List the team memory](https://kontiga.com/docs/kompisar#list-the-team-memory)
- [Search the team memory](https://kontiga.com/docs/kompisar#search-the-team-memory)
- [Add to the team memory](https://kontiga.com/docs/kompisar#add-to-the-team-memory)
- [Edit a memory entry](https://kontiga.com/docs/kompisar#edit-a-memory-entry)
- [Pin a memory entry](https://kontiga.com/docs/kompisar#pin-a-memory-entry)
- [Delete a memory entry](https://kontiga.com/docs/kompisar#delete-a-memory-entry)

## How a Kompis works

- Its job is plain words. A change of job is a new version; a run under way keeps the version it started with.
- It acts with a role, never above its creator's. It may decide a case only when it is allowed to and only within its decision rules, which are checked when it decides.
- What it may not do alone becomes a proposal for a person to confirm. A proposal waits 24 hours, then does nothing.
- It pauses itself at its actions a day (200 by default), at its monthly token budget, after three failed runs in a row, or when the workspace's Kompisar budget is reached. One switch pauses the whole team.
- It finds what the team taught it by searching the team memory before it works. A pinned entry is read on every run.

**The Kompis object**
- `id` (string): The Kompis's id, starting with `kmp_`.
- `job` (string): Its job in plain words, the current version. `versions` holds every earlier one, with who wrote it.
- `role` (enum): The role it acts with: `analyst`, `admin`, `developer` or `viewer`.
- `status` (enum): `draft`, `active`, `paused` or `archived`; `paused_reason` says why it paused.
- `triggers` (array): The events and schedules that start it, each with its filters, such as `{"document_type": "payslip,bank_statement", "tag_kind": "fraud"}`.
- `decision_rules` (object): With `may_decide`: the outcomes it may set, whether every document must be Trusted and every requirement met, and the largest amount.
- `limits` (object): `actions_per_day` and `monthly_token_budget`.
- `month` (object): Its runs, actions, tokens and cost this month.

**A Kompis**

```json
{
  "id": "kmp_4Tq8Rn2",
  "object": "kompis",
  "name": "Payslip triage",
  "description": "Makes sure a person sees every flagged payslip and bank statement the same day.",
  "job": "When a payslip or a bank statement is checked with a fraud finding, give its case to the fraud lead and note the findings in plain words. If there is no case yet, flag the document for review.",
  "job_version": 2,
  "versions": [
    {
      "version": 1,
      "job": "When a payslip is checked with a fraud finding, give its case to the fraud lead.",
      "at": "2026-10-16T09:00:00Z",
      "by": "Maria Lind"
    },
    {
      "version": 2,
      "job": "When a payslip or a bank statement is checked with a fraud finding, give its case to the fraud lead and note the findings in plain words. If there is no case yet, flag the document for review.",
      "at": "2026-11-02T13:20:00Z",
      "by": "Maria Lind"
    }
  ],
  "color": "orange",
  "role": "analyst",
  "owner_id": "mem_9Wd2Hc5",
  "owner_name": "Maria Lind",
  "status": "active",
  "paused_reason": null,
  "triggers": [
    {
      "id": "ktr_1Hs6Wd3",
      "on": "document.checked",
      "filters": {
        "document_type": "payslip,bank_statement",
        "tag_kind": "fraud"
      },
      "schedule": null,
      "label": "A payslip or bank statement is checked with a fraud finding"
    }
  ],
  "may_decide": false,
  "decision_rules": {
    "outcomes": [
      "approved"
    ],
    "all_documents_trusted": true,
    "all_requirements_met": true,
    "max_amount": null
  },
  "message_templates": [],
  "policy_ids": [],
  "limits": {
    "actions_per_day": 200,
    "monthly_token_budget": 2000000
  },
  "created_at": "2026-10-16T09:00:00Z",
  "updated_at": "2026-11-02T13:20:00Z",
  "activity": "Waiting for the next flagged payslip",
  "last_run": {
    "id": "krun_9Bc3Lx7",
    "at": "2026-11-26T09:42:05Z",
    "status": "completed",
    "result": "done",
    "summary": "Gave BW-4463 to Elif Kaya and noted the payslip's two findings."
  },
  "next_at": null,
  "month": {
    "runs": 31,
    "actions": 58,
    "tokens": 214880,
    "cost": 2.15
  },
  "pending_proposals": 0
}
```

## The team

## List the Kompisar

Every Kompis of the workspace with its job, triggers, state, last run, and its runs and token cost this month.

`GET /v1/kompisar`. Who may: Owner, Admin, Analyst and Viewer; Developer in test mode. CLI: `kontiga kompisar list [--status <draft|active|paused|archived>]`. MCP tool: `list_kompisar`.

**Parameters**
- `status` (enum): Only Kompisar in this state. One of `draft`, `active`, `paused`, `archived`.

**Returns** list of Kompisar: The Kompisar, each with what it is doing now and its use this month.

API:

```bash
curl -X GET "https://api.kontiga.com/v1/kompisar?status=active" \
  -H "Authorization: Bearer $KONTIGA_API_KEY"
```

CLI:

```bash
kontiga kompisar list --status active
```

MCP tool `list_kompisar`:

```json
{
  "name": "list_kompisar",
  "arguments": {
    "status": "active"
  }
}
```

TypeScript:

```typescript
import Kontiga from "@kontiga/sdk";

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.kompisar.list({
  status: "active",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.kompisar.list(status="active")
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.Kompisar.List(ctx, &kontiga.KompisarListParams{
	Status: "active",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.kompisar().list(KompisarListParams.builder()
    .status("active")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.Kompisar.ListAsync(new KompisarListOptions
{
    Status = "active",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->kompisar->list([
    'status' => 'active',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.kompisar.list(status: "active")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .kompisar()
    .list(kontiga::kompisar::ListParams {
        status: "active".into(),
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "items": [
    {
      "id": "kmp_4Tq8Rn2",
      "object": "kompis",
      "name": "Payslip triage",
      "color": "orange",
      "role": "analyst",
      "status": "active",
      "activity": "Waiting for the next flagged payslip",
      "month": {
        "runs": 31,
        "actions": 58,
        "tokens": 214880,
        "cost": 2.15
      }
    },
    {
      "id": "kmp_7Wn2Cs5",
      "object": "kompis",
      "name": "Chaser",
      "color": "teal",
      "role": "analyst",
      "status": "active",
      "activity": "Asleep until Fri 08:00",
      "month": {
        "runs": 64,
        "actions": 41,
        "tokens": 188420,
        "cost": 1.88
      }
    },
    {
      "id": "kmp_2Dk9Hv1",
      "object": "kompis",
      "name": "Duplicate hunter",
      "color": "moss",
      "role": "analyst",
      "status": "paused",
      "paused_reason": "failures",
      "activity": "Paused after three failed runs in a row",
      "month": {
        "runs": 9,
        "actions": 4,
        "tokens": 61200,
        "cost": 0.61
      }
    }
  ],
  "next_cursor": null
}
```

## Read a Kompis

One Kompis: its job and every earlier version of it, its triggers, role, decision rules, templates, limits and what it is doing now.

`GET /v1/kompisar/{kompis_id}`. Who may: Owner, Admin, Analyst and Viewer; Developer in test mode. CLI: `kontiga kompisar get <kompis_id>`. MCP tool: `get_kompis`.

**Parameters**
- `kompis_id` (id (kmp_), required): The Kompis to read. In the path.

**Returns** Kompis: The Kompis as it stands.

API:

```bash
curl -X GET https://api.kontiga.com/v1/kompisar/kmp_4Tq8Rn2 \
  -H "Authorization: Bearer $KONTIGA_API_KEY"
```

CLI:

```bash
kontiga kompisar get kmp_4Tq8Rn2
```

MCP tool `get_kompis`:

```json
{
  "name": "get_kompis",
  "arguments": {
    "kompis_id": "kmp_4Tq8Rn2"
  }
}
```

TypeScript:

```typescript
import Kontiga from "@kontiga/sdk";

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.kompisar.get("kmp_4Tq8Rn2");
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.kompisar.get("kmp_4Tq8Rn2")
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.Kompisar.Get(ctx, "kmp_4Tq8Rn2")
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.kompisar().get("kmp_4Tq8Rn2");
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.Kompisar.GetAsync("kmp_4Tq8Rn2");
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->kompisar->get('kmp_4Tq8Rn2');
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.kompisar.get("kmp_4Tq8Rn2")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .kompisar()
    .get("kmp_4Tq8Rn2".into())
    .await?;
```

Response, 200 OK:

```json
{
  "id": "kmp_4Tq8Rn2",
  "object": "kompis",
  "name": "Payslip triage",
  "description": "Makes sure a person sees every flagged payslip and bank statement the same day.",
  "job": "When a payslip or a bank statement is checked with a fraud finding, give its case to the fraud lead and note the findings in plain words. If there is no case yet, flag the document for review.",
  "job_version": 2,
  "versions": [
    {
      "version": 1,
      "job": "When a payslip is checked with a fraud finding, give its case to the fraud lead.",
      "at": "2026-10-16T09:00:00Z",
      "by": "Maria Lind"
    },
    {
      "version": 2,
      "job": "When a payslip or a bank statement is checked with a fraud finding, give its case to the fraud lead and note the findings in plain words. If there is no case yet, flag the document for review.",
      "at": "2026-11-02T13:20:00Z",
      "by": "Maria Lind"
    }
  ],
  "color": "orange",
  "role": "analyst",
  "owner_id": "mem_9Wd2Hc5",
  "owner_name": "Maria Lind",
  "status": "active",
  "paused_reason": null,
  "triggers": [
    {
      "id": "ktr_1Hs6Wd3",
      "on": "document.checked",
      "filters": {
        "document_type": "payslip,bank_statement",
        "tag_kind": "fraud"
      },
      "schedule": null,
      "label": "A payslip or bank statement is checked with a fraud finding"
    }
  ],
  "may_decide": false,
  "decision_rules": {
    "outcomes": [
      "approved"
    ],
    "all_documents_trusted": true,
    "all_requirements_met": true,
    "max_amount": null
  },
  "message_templates": [],
  "policy_ids": [],
  "limits": {
    "actions_per_day": 200,
    "monthly_token_budget": 2000000
  },
  "created_at": "2026-10-16T09:00:00Z",
  "updated_at": "2026-11-02T13:20:00Z",
  "activity": "Waiting for the next flagged payslip",
  "last_run": {
    "id": "krun_9Bc3Lx7",
    "at": "2026-11-26T09:42:05Z",
    "status": "completed",
    "result": "done",
    "summary": "Gave BW-4463 to Elif Kaya and noted the payslip's two findings."
  },
  "next_at": null,
  "month": {
    "runs": 31,
    "actions": 58,
    "tokens": 214880,
    "cost": 2.15
  },
  "pending_proposals": 0
}
```

## Read the team

The team's pause switch, its monthly token budget, its runs, actions, tokens and cost this month, and how many Kompisar are working or waiting for you.

`GET /v1/kompisar/team`. Who may: Owner, Admin, Analyst and Viewer; Developer in test mode. CLI: `kontiga kompisar team`. MCP tool: `get_kompis_team`.

**Parameters**

**Returns** Kompisar team: The team's switch, budget and use this month, with the sample price per token.

API:

```bash
curl -X GET https://api.kontiga.com/v1/kompisar/team \
  -H "Authorization: Bearer $KONTIGA_API_KEY"
```

CLI:

```bash
kontiga kompisar team
```

MCP tool `get_kompis_team`:

```json
{
  "name": "get_kompis_team",
  "arguments": {}
}
```

TypeScript:

```typescript
import Kontiga from "@kontiga/sdk";

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.kompisar.team();
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.kompisar.team()
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.Kompisar.Team(ctx)
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.kompisar().team();
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.Kompisar.TeamAsync();
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->kompisar->team();
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.kompisar.team
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .kompisar()
    .team()
    .await?;
```

Response, 200 OK:

```json
{
  "object": "kompisar_team",
  "paused": false,
  "paused_by": null,
  "paused_at": null,
  "monthly_token_budget": 14000000,
  "month": {
    "runs": 162,
    "actions": 241,
    "tokens": 739009,
    "cost": 7.4
  },
  "counts": {
    "total": 7,
    "active": 5,
    "paused": 1,
    "draft": 1,
    "working": 1,
    "waiting": 2
  },
  "price_per_million_tokens": 10,
  "currency": "USD",
  "prices_are_samples": true
}
```

## Read what a Kompis can use

The events and schedules that can start a Kompis, the brand kit's templates it may send, the roles it may act with and the ready jobs to start from.

`GET /v1/kompisar/catalog`. Who may: Owner, Admin, Analyst and Viewer; Developer in test mode. CLI: `kontiga kompisar catalog`. MCP tool: `get_kompis_catalog`.

**Parameters**

**Returns** Kompis catalogue: Every trigger with its filters, every template, every role and every ready job.

API:

```bash
curl -X GET https://api.kontiga.com/v1/kompisar/catalog \
  -H "Authorization: Bearer $KONTIGA_API_KEY"
```

CLI:

```bash
kontiga kompisar catalog
```

MCP tool `get_kompis_catalog`:

```json
{
  "name": "get_kompis_catalog",
  "arguments": {}
}
```

TypeScript:

```typescript
import Kontiga from "@kontiga/sdk";

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.kompisar.catalog();
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.kompisar.catalog()
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.Kompisar.Catalog(ctx)
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.kompisar().catalog();
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.Kompisar.CatalogAsync();
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->kompisar->catalog();
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.kompisar.catalog
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .kompisar()
    .catalog()
    .await?;
```

Response, 200 OK:

```json
{
  "object": "kompis_catalog",
  "triggers": [
    {
      "on": "document.checked",
      "group": "documents",
      "label": "A document is checked",
      "filters": [
        {
          "key": "document_type",
          "label": "Type of document"
        },
        {
          "key": "verdict",
          "label": "Verdict"
        },
        {
          "key": "tag_kind",
          "label": "Has"
        }
      ]
    },
    {
      "on": "request.sent",
      "group": "requests",
      "label": "A request is sent",
      "filters": []
    },
    {
      "on": "schedule",
      "group": "time",
      "label": "On a schedule",
      "filters": []
    }
  ],
  "templates": [
    {
      "id": "tpl_reminder",
      "name": "Reminder: documents still missing",
      "body": "We are still waiting for a few documents. Open your link to upload them; it takes a couple of minutes."
    },
    {
      "id": "tpl_ask_again",
      "name": "Ask again for a document, with the reason",
      "body": "Thank you for your document. We need it again: {reason}. Open your link to upload a new one."
    }
  ],
  "roles": [
    {
      "value": "analyst",
      "label": "Analyst",
      "can": "Reads and works cases, people, documents and requests, and decides cases within its rules"
    },
    {
      "value": "viewer",
      "label": "Viewer",
      "can": "Reads everything and changes nothing; it can still tell your team"
    }
  ],
  "ready_jobs": [
    {
      "name": "Chaser",
      "description": "Gets the missing documents in without anyone chasing by hand."
    },
    {
      "name": "Morning digest",
      "description": "Tells the team what needs attention before the day starts."
    }
  ]
}
```

## Create a Kompis

A new Kompis from a name, a one-line description and its job in plain words, with its role, triggers, limits and, if it decides cases, the rules it decides within. Once started it acts on its own within its role.

`POST /v1/kompisar`. Who may: Owner and Admin. CLI: `kontiga kompisar create --name <name> --job <text> --role <analyst|admin|developer|viewer> [--description <text>] [--color <orange|teal|cobalt|gold|raspberry|sky|moss>] [--triggers <json>] [--may-decide] [--decision-rules <json>] [--message-templates <template_id,...>] [--policy-ids <policy_id,...>] [--actions-per-day <n>] [--monthly-token-budget <tokens>] [--start <true|false>]`. MCP tool: `create_kompis`.

**Parameters**
- `name` (string, required): Its name, as the team sees it. At most 40 characters.
- `description` (string, default ""): One line: what it is for. At most 160 characters.
- `job` (string, required): Its job in plain words: when it acts, what it does, and when it hands over. At most 2,000 characters.
- `color` (enum): Its colour on avatars and in lists. One of `orange`, `teal`, `cobalt`, `gold`, `raspberry`, `sky`, `moss`.
- `role` (enum, required): The role it acts with, never above yours. One of `analyst`, `admin`, `developer`, `viewer`.
- `triggers` (array of object, default []): What starts it: each an event of the catalogue as `on` with its `filters`, or `on: "schedule"` with a `schedule` (`days` and `at`, or `every_hours`, at least 15 minutes apart).
- `may_decide` (boolean, default false): Whether it may decide cases, within `decision_rules`.
- `decision_rules` (object): `outcomes` it may set, `all_documents_trusted`, `all_requirements_met`, and `max_amount` in the workspace's currency or `null`.
- `message_templates` (array of id (tpl_), default []): The brand kit's templates it may send end customers on its own, by id such as `tpl_reminder`. At most 10 items.
- `policy_ids` (array of id (pol_), default []): The policies it consults. At most 5 items.
- `actions_per_day` (integer, default 200): Actions a day before it pauses until the next day. At least 1, at most 5,000.
- `monthly_token_budget` (integer, default 2000000): Tokens a month before it pauses until the next month or a raised budget. At least 10,000, at most 500,000,000.
- `start` (boolean, default true): Start it at once. `false` keeps it a draft.

**Returns** Kompis: The Kompis, active or a draft.

API:

```bash
curl -X POST https://api.kontiga.com/v1/kompisar \
  -H "Authorization: Bearer $KONTIGA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Payslip triage",
    "description": "Makes sure a person sees every flagged payslip and bank statement the same day.",
    "job": "When a payslip or a bank statement is checked with a fraud finding, give its case to the fraud lead and note the findings in plain words. If there is no case yet, flag the document for review.",
    "color": "orange",
    "role": "analyst",
    "triggers": [
      {
        "on": "document.checked",
        "filters": {
          "document_type": "payslip,bank_statement",
          "tag_kind": "fraud"
        }
      }
    ]
  }'
```

CLI:

```bash
kontiga kompisar create \
  --name 'Payslip triage' \
  --description 'Makes sure a person sees every flagged payslip and bank statement the same day.' \
  --job 'When a payslip or a bank statement is checked with a fraud finding, give its case to the fraud lead and note the findings in plain words. If there is no case yet, flag the document for review.' \
  --color orange \
  --role analyst \
  --triggers '[{"on":"document.checked","filters":{"document_type":"payslip,bank_statement","tag_kind":"fraud"}}]'
```

MCP tool `create_kompis`:

```json
{
  "name": "create_kompis",
  "arguments": {
    "name": "Payslip triage",
    "description": "Makes sure a person sees every flagged payslip and bank statement the same day.",
    "job": "When a payslip or a bank statement is checked with a fraud finding, give its case to the fraud lead and note the findings in plain words. If there is no case yet, flag the document for review.",
    "color": "orange",
    "role": "analyst",
    "triggers": [
      {
        "on": "document.checked",
        "filters": {
          "document_type": "payslip,bank_statement",
          "tag_kind": "fraud"
        }
      }
    ]
  }
}
```

TypeScript:

```typescript
import Kontiga from "@kontiga/sdk";

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.kompisar.create({
  name: "Payslip triage",
  description: "Makes sure a person sees every flagged payslip and bank statement the same day.",
  job: "When a payslip or a bank statement is checked with a fraud finding, give its case to the fraud lead and note the findings in plain words. If there is no case yet, flag the document for review.",
  color: "orange",
  role: "analyst",
  triggers: [{ on: "document.checked", filters: { document_type: "payslip,bank_statement", tag_kind: "fraud" } }],
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.kompisar.create(
    name="Payslip triage",
    description="Makes sure a person sees every flagged payslip and bank statement the same day.",
    job="When a payslip or a bank statement is checked with a fraud finding, give its case to the fraud lead and note the findings in plain words. If there is no case yet, flag the document for review.",
    color="orange",
    role="analyst",
    triggers=[{"on": "document.checked", "filters": {"document_type": "payslip,bank_statement", "tag_kind": "fraud"}}],
)
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.Kompisar.Create(ctx, &kontiga.KompisarCreateParams{
	Name:        "Payslip triage",
	Description: "Makes sure a person sees every flagged payslip and bank statement the same day.",
	Job:         "When a payslip or a bank statement is checked with a fraud finding, give its case to the fraud lead and note the findings in plain words. If there is no case yet, flag the document for review.",
	Color:       "orange",
	Role:        "analyst",
	Triggers:    []any{map[string]any{"on": "document.checked", "filters": map[string]any{"document_type": "payslip,bank_statement", "tag_kind": "fraud"}}},
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.kompisar().create(KompisarCreateParams.builder()
    .name("Payslip triage")
    .description("Makes sure a person sees every flagged payslip and bank statement the same day.")
    .job("When a payslip or a bank statement is checked with a fraud finding, give its case to the fraud lead and note the findings in plain words. If there is no case yet, flag the document for review.")
    .color("orange")
    .role("analyst")
    .triggers(List.of(Map.of("on", "document.checked", "filters", Map.of("document_type", "payslip,bank_statement", "tag_kind", "fraud"))))
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.Kompisar.CreateAsync(new KompisarCreateOptions
{
    Name = "Payslip triage",
    Description = "Makes sure a person sees every flagged payslip and bank statement the same day.",
    Job = "When a payslip or a bank statement is checked with a fraud finding, give its case to the fraud lead and note the findings in plain words. If there is no case yet, flag the document for review.",
    Color = "orange",
    Role = "analyst",
    Triggers = new object[] { new Dictionary<string, object> { ["on"] = "document.checked", ["filters"] = new Dictionary<string, object> { ["document_type"] = "payslip,bank_statement", ["tag_kind"] = "fraud" } } },
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->kompisar->create([
    'name' => 'Payslip triage',
    'description' => 'Makes sure a person sees every flagged payslip and bank statement the same day.',
    'job' => 'When a payslip or a bank statement is checked with a fraud finding, give its case to the fraud lead and note the findings in plain words. If there is no case yet, flag the document for review.',
    'color' => 'orange',
    'role' => 'analyst',
    'triggers' => [['on' => 'document.checked', 'filters' => ['document_type' => 'payslip,bank_statement', 'tag_kind' => 'fraud']]],
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.kompisar.create(
  name: "Payslip triage",
  description: "Makes sure a person sees every flagged payslip and bank statement the same day.",
  job: "When a payslip or a bank statement is checked with a fraud finding, give its case to the fraud lead and note the findings in plain words. If there is no case yet, flag the document for review.",
  color: "orange",
  role: "analyst",
  triggers: [{ on: "document.checked", filters: { document_type: "payslip,bank_statement", tag_kind: "fraud" } }]
)
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .kompisar()
    .create(kontiga::kompisar::CreateParams {
        name: "Payslip triage".into(),
        description: "Makes sure a person sees every flagged payslip and bank statement the same day.".into(),
        job: "When a payslip or a bank statement is checked with a fraud finding, give its case to the fraud lead and note the findings in plain words. If there is no case yet, flag the document for review.".into(),
        color: "orange".into(),
        role: "analyst".into(),
        triggers: vec![serde_json::json!({"on":"document.checked","filters":{"document_type":"payslip,bank_statement","tag_kind":"fraud"}})],
        ..Default::default()
    })
    .await?;
```

Response, 201 Created:

```json
{
  "id": "kmp_4Tq8Rn2",
  "object": "kompis",
  "name": "Payslip triage",
  "description": "Makes sure a person sees every flagged payslip and bank statement the same day.",
  "job": "When a payslip or a bank statement is checked with a fraud finding, give its case to the fraud lead and note the findings in plain words. If there is no case yet, flag the document for review.",
  "job_version": 2,
  "versions": [
    {
      "version": 1,
      "job": "When a payslip is checked with a fraud finding, give its case to the fraud lead.",
      "at": "2026-10-16T09:00:00Z",
      "by": "Maria Lind"
    },
    {
      "version": 2,
      "job": "When a payslip or a bank statement is checked with a fraud finding, give its case to the fraud lead and note the findings in plain words. If there is no case yet, flag the document for review.",
      "at": "2026-11-02T13:20:00Z",
      "by": "Maria Lind"
    }
  ],
  "color": "orange",
  "role": "analyst",
  "owner_id": "mem_9Wd2Hc5",
  "owner_name": "Maria Lind",
  "status": "active",
  "paused_reason": null,
  "triggers": [
    {
      "id": "ktr_1Hs6Wd3",
      "on": "document.checked",
      "filters": {
        "document_type": "payslip,bank_statement",
        "tag_kind": "fraud"
      },
      "schedule": null,
      "label": "A payslip or bank statement is checked with a fraud finding"
    }
  ],
  "may_decide": false,
  "decision_rules": {
    "outcomes": [
      "approved"
    ],
    "all_documents_trusted": true,
    "all_requirements_met": true,
    "max_amount": null
  },
  "message_templates": [],
  "policy_ids": [],
  "limits": {
    "actions_per_day": 200,
    "monthly_token_budget": 2000000
  },
  "created_at": "2026-10-16T09:00:00Z",
  "updated_at": "2026-11-02T13:20:00Z",
  "activity": "Waiting for the next flagged payslip",
  "last_run": {
    "id": "krun_9Bc3Lx7",
    "at": "2026-11-26T09:42:05Z",
    "status": "completed",
    "result": "done",
    "summary": "Gave BW-4463 to Elif Kaya and noted the payslip's two findings."
  },
  "next_at": null,
  "month": {
    "runs": 31,
    "actions": 58,
    "tokens": 214880,
    "cost": 2.15
  },
  "pending_proposals": 0
}
```

## Change a Kompis

Change a Kompis's name, colour, role, triggers, decision rules, templates or limits. A run under way keeps the settings it started with.

`PATCH /v1/kompisar/{kompis_id}`. Who may: Owner and Admin. CLI: `kontiga kompisar update <kompis_id> [--name <name>] [--description <text>] [--color <orange|teal|cobalt|gold|raspberry|sky|moss>] [--role <analyst|admin|developer|viewer>] [--triggers <json>] [--may-decide <true|false>] [--decision-rules <json>] [--message-templates <template_id,...>] [--policy-ids <policy_id,...>] [--actions-per-day <n>] [--monthly-token-budget <tokens>]`. MCP tool: `update_kompis`.

**Parameters**
- `kompis_id` (id (kmp_), required): The Kompis to change. In the path.
- `name` (string): Its new name. At most 40 characters.
- `description` (string): Its new one-line description. At most 160 characters.
- `color` (enum): Its colour. One of `orange`, `teal`, `cobalt`, `gold`, `raspberry`, `sky`, `moss`.
- `role` (enum): The role it acts with, never above yours. One of `analyst`, `admin`, `developer`, `viewer`.
- `triggers` (array of object): What starts it. The whole list is given. At most 10 items.
- `may_decide` (boolean): Whether it may decide cases.
- `decision_rules` (object): The rules it decides within.
- `message_templates` (array of id (tpl_)): The templates it may send on its own. At most 10 items.
- `policy_ids` (array of id (pol_)): The policies it consults. At most 5 items.
- `actions_per_day` (integer): Actions a day before it pauses. At least 1, at most 5,000.
- `monthly_token_budget` (integer): Tokens a month before it pauses. At least 10,000, at most 500,000,000.

**Returns** Kompis: The Kompis as it now stands.

API:

```bash
curl -X PATCH https://api.kontiga.com/v1/kompisar/kmp_4Tq8Rn2 \
  -H "Authorization: Bearer $KONTIGA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "actions_per_day": 100
  }'
```

CLI:

```bash
kontiga kompisar update kmp_4Tq8Rn2 --actions-per-day 100
```

MCP tool `update_kompis`:

```json
{
  "name": "update_kompis",
  "arguments": {
    "kompis_id": "kmp_4Tq8Rn2",
    "actions_per_day": 100
  }
}
```

TypeScript:

```typescript
import Kontiga from "@kontiga/sdk";

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.kompisar.update("kmp_4Tq8Rn2", {
  actions_per_day: 100,
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.kompisar.update("kmp_4Tq8Rn2", actions_per_day=100)
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.Kompisar.Update(ctx, "kmp_4Tq8Rn2", &kontiga.KompisarUpdateParams{
	ActionsPerDay: 100,
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.kompisar().update("kmp_4Tq8Rn2", KompisarUpdateParams.builder()
    .actionsPerDay(100)
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.Kompisar.UpdateAsync("kmp_4Tq8Rn2", new KompisarUpdateOptions
{
    ActionsPerDay = 100,
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->kompisar->update('kmp_4Tq8Rn2', [
    'actions_per_day' => 100,
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.kompisar.update("kmp_4Tq8Rn2", actions_per_day: 100)
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .kompisar()
    .update("kmp_4Tq8Rn2".into(), kontiga::kompisar::UpdateParams {
        actions_per_day: 100,
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "id": "kmp_4Tq8Rn2",
  "object": "kompis",
  "name": "Payslip triage",
  "limits": {
    "actions_per_day": 100,
    "monthly_token_budget": 2000000
  },
  "updated_at": "2026-11-26T09:48:00Z"
}
```

## Give a Kompis new instructions

Its job in plain words, rewritten or added to. It becomes the next version of the job; a run under way keeps the version it started with.

`POST /v1/kompisar/{kompis_id}/instructions`. Who may: Owner and Admin. CLI: `kontiga kompisar instruct <kompis_id> --job <text>`. MCP tool: `instruct_kompis`.

**Parameters**
- `kompis_id` (id (kmp_), required): The Kompis. In the path.
- `job` (string, required): Its whole job in plain words, rewritten or added to. At most 2,000 characters.

**Returns** Kompis: The Kompis with its new version of the job.

API:

```bash
curl -X POST https://api.kontiga.com/v1/kompisar/kmp_4Tq8Rn2/instructions \
  -H "Authorization: Bearer $KONTIGA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "job": "When a payslip or a bank statement is checked with a fraud finding, give its case to the fraud lead and note the findings in plain words. If there is no case yet, flag the document for review. On a case over 50,000, give it to Jonas Eriksen instead."
  }'
```

CLI:

```bash
kontiga kompisar instruct kmp_4Tq8Rn2 \
  --job 'When a payslip or a bank statement is checked with a fraud finding, give its case to the fraud lead and note the findings in plain words. If there is no case yet, flag the document for review. On a case over 50,000, give it to Jonas Eriksen instead.'
```

MCP tool `instruct_kompis`:

```json
{
  "name": "instruct_kompis",
  "arguments": {
    "kompis_id": "kmp_4Tq8Rn2",
    "job": "When a payslip or a bank statement is checked with a fraud finding, give its case to the fraud lead and note the findings in plain words. If there is no case yet, flag the document for review. On a case over 50,000, give it to Jonas Eriksen instead."
  }
}
```

TypeScript:

```typescript
import Kontiga from "@kontiga/sdk";

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.kompisar.instruct("kmp_4Tq8Rn2", {
  job: "When a payslip or a bank statement is checked with a fraud finding, give its case to the fraud lead and note the findings in plain words. If there is no case yet, flag the document for review. On a case over 50,000, give it to Jonas Eriksen instead.",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.kompisar.instruct("kmp_4Tq8Rn2", job="When a payslip or a bank statement is checked with a fraud finding, give its case to the fraud lead and note the findings in plain words. If there is no case yet, flag the document for review. On a case over 50,000, give it to Jonas Eriksen instead.")
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.Kompisar.Instruct(ctx, "kmp_4Tq8Rn2", &kontiga.KompisarInstructParams{
	Job: "When a payslip or a bank statement is checked with a fraud finding, give its case to the fraud lead and note the findings in plain words. If there is no case yet, flag the document for review. On a case over 50,000, give it to Jonas Eriksen instead.",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.kompisar().instruct("kmp_4Tq8Rn2", KompisarInstructParams.builder()
    .job("When a payslip or a bank statement is checked with a fraud finding, give its case to the fraud lead and note the findings in plain words. If there is no case yet, flag the document for review. On a case over 50,000, give it to Jonas Eriksen instead.")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.Kompisar.InstructAsync("kmp_4Tq8Rn2", new KompisarInstructOptions
{
    Job = "When a payslip or a bank statement is checked with a fraud finding, give its case to the fraud lead and note the findings in plain words. If there is no case yet, flag the document for review. On a case over 50,000, give it to Jonas Eriksen instead.",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->kompisar->instruct('kmp_4Tq8Rn2', [
    'job' => 'When a payslip or a bank statement is checked with a fraud finding, give its case to the fraud lead and note the findings in plain words. If there is no case yet, flag the document for review. On a case over 50,000, give it to Jonas Eriksen instead.',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.kompisar.instruct("kmp_4Tq8Rn2", job: "When a payslip or a bank statement is checked with a fraud finding, give its case to the fraud lead and note the findings in plain words. If there is no case yet, flag the document for review. On a case over 50,000, give it to Jonas Eriksen instead.")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .kompisar()
    .instruct("kmp_4Tq8Rn2".into(), kontiga::kompisar::InstructParams {
        job: "When a payslip or a bank statement is checked with a fraud finding, give its case to the fraud lead and note the findings in plain words. If there is no case yet, flag the document for review. On a case over 50,000, give it to Jonas Eriksen instead.".into(),
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "id": "kmp_4Tq8Rn2",
  "object": "kompis",
  "name": "Payslip triage",
  "job": "When a payslip or a bank statement is checked with a fraud finding, give its case to the fraud lead and note the findings in plain words. If there is no case yet, flag the document for review. On a case over 50,000, give it to Jonas Eriksen instead.",
  "job_version": 3
}
```

## Start a Kompis

A draft starts acting on its own, within its role, on the next event or schedule that starts it.

`POST /v1/kompisar/{kompis_id}/activate`. Who may: Owner and Admin. CLI: `kontiga kompisar activate <kompis_id>`. MCP tool: `activate_kompis`.

**Parameters**
- `kompis_id` (id (kmp_), required): The draft to start. In the path.

**Returns** Kompis: The Kompis, active.

API:

```bash
curl -X POST https://api.kontiga.com/v1/kompisar/kmp_6Ys1Rb3/activate \
  -H "Authorization: Bearer $KONTIGA_API_KEY"
```

CLI:

```bash
kontiga kompisar activate kmp_6Ys1Rb3
```

MCP tool `activate_kompis`:

```json
{
  "name": "activate_kompis",
  "arguments": {
    "kompis_id": "kmp_6Ys1Rb3"
  }
}
```

TypeScript:

```typescript
import Kontiga from "@kontiga/sdk";

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.kompisar.activate("kmp_6Ys1Rb3");
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.kompisar.activate("kmp_6Ys1Rb3")
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.Kompisar.Activate(ctx, "kmp_6Ys1Rb3")
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.kompisar().activate("kmp_6Ys1Rb3");
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.Kompisar.ActivateAsync("kmp_6Ys1Rb3");
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->kompisar->activate('kmp_6Ys1Rb3');
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.kompisar.activate("kmp_6Ys1Rb3")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .kompisar()
    .activate("kmp_6Ys1Rb3".into())
    .await?;
```

Response, 200 OK:

```json
{
  "id": "kmp_6Ys1Rb3",
  "object": "kompis",
  "name": "Policy watcher",
  "status": "active"
}
```

## Pause a Kompis

It starts no run until it is resumed. A run under way stops after its current step; its timers and proposals wait, and events that arrive meanwhile are skipped.

`POST /v1/kompisar/{kompis_id}/pause`. Who may: Owner, Admin and Analyst; Developer in test mode. CLI: `kontiga kompisar pause <kompis_id>`. MCP tool: `pause_kompis`.

**Parameters**
- `kompis_id` (id (kmp_), required): The Kompis to pause. In the path.

**Returns** Kompis: The Kompis, paused.

API:

```bash
curl -X POST https://api.kontiga.com/v1/kompisar/kmp_4Tq8Rn2/pause \
  -H "Authorization: Bearer $KONTIGA_API_KEY"
```

CLI:

```bash
kontiga kompisar pause kmp_4Tq8Rn2
```

MCP tool `pause_kompis`:

```json
{
  "name": "pause_kompis",
  "arguments": {
    "kompis_id": "kmp_4Tq8Rn2"
  }
}
```

TypeScript:

```typescript
import Kontiga from "@kontiga/sdk";

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.kompisar.pause("kmp_4Tq8Rn2");
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.kompisar.pause("kmp_4Tq8Rn2")
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.Kompisar.Pause(ctx, "kmp_4Tq8Rn2")
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.kompisar().pause("kmp_4Tq8Rn2");
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.Kompisar.PauseAsync("kmp_4Tq8Rn2");
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->kompisar->pause('kmp_4Tq8Rn2');
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.kompisar.pause("kmp_4Tq8Rn2")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .kompisar()
    .pause("kmp_4Tq8Rn2".into())
    .await?;
```

Response, 200 OK:

```json
{
  "id": "kmp_4Tq8Rn2",
  "object": "kompis",
  "name": "Payslip triage",
  "status": "paused",
  "paused_reason": "member",
  "paused_at": "2026-11-26T09:49:00Z",
  "paused_by": "Maria Lind"
}
```

## Resume a Kompis

A paused Kompis acts again on the next event or schedule. What was skipped meanwhile stays skipped; run it by hand if it still matters.

`POST /v1/kompisar/{kompis_id}/resume`. Who may: Owner and Admin. CLI: `kontiga kompisar resume <kompis_id>`. MCP tool: `resume_kompis`.

**Parameters**
- `kompis_id` (id (kmp_), required): The paused Kompis. In the path.

**Returns** Kompis: The Kompis, active again.

API:

```bash
curl -X POST https://api.kontiga.com/v1/kompisar/kmp_4Tq8Rn2/resume \
  -H "Authorization: Bearer $KONTIGA_API_KEY"
```

CLI:

```bash
kontiga kompisar resume kmp_4Tq8Rn2
```

MCP tool `resume_kompis`:

```json
{
  "name": "resume_kompis",
  "arguments": {
    "kompis_id": "kmp_4Tq8Rn2"
  }
}
```

TypeScript:

```typescript
import Kontiga from "@kontiga/sdk";

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.kompisar.resume("kmp_4Tq8Rn2");
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.kompisar.resume("kmp_4Tq8Rn2")
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.Kompisar.Resume(ctx, "kmp_4Tq8Rn2")
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.kompisar().resume("kmp_4Tq8Rn2");
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.Kompisar.ResumeAsync("kmp_4Tq8Rn2");
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->kompisar->resume('kmp_4Tq8Rn2');
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.kompisar.resume("kmp_4Tq8Rn2")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .kompisar()
    .resume("kmp_4Tq8Rn2".into())
    .await?;
```

Response, 200 OK:

```json
{
  "id": "kmp_4Tq8Rn2",
  "object": "kompis",
  "name": "Payslip triage",
  "status": "active",
  "paused_reason": null,
  "paused_at": null,
  "paused_by": null
}
```

## Archive a Kompis

It stops for good and leaves the team. Its runs and the memory entries it wrote are kept.

`POST /v1/kompisar/{kompis_id}/archive`. Who may: Owner and Admin. CLI: `kontiga kompisar archive <kompis_id>`. MCP tool: `archive_kompis`.

**Parameters**
- `kompis_id` (id (kmp_), required): The Kompis to archive. In the path.

**Returns** Kompis: The Kompis, archived.

API:

```bash
curl -X POST https://api.kontiga.com/v1/kompisar/kmp_2Dk9Hv1/archive \
  -H "Authorization: Bearer $KONTIGA_API_KEY"
```

CLI:

```bash
kontiga kompisar archive kmp_2Dk9Hv1
```

MCP tool `archive_kompis`:

```json
{
  "name": "archive_kompis",
  "arguments": {
    "kompis_id": "kmp_2Dk9Hv1"
  }
}
```

TypeScript:

```typescript
import Kontiga from "@kontiga/sdk";

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.kompisar.archive("kmp_2Dk9Hv1");
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.kompisar.archive("kmp_2Dk9Hv1")
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.Kompisar.Archive(ctx, "kmp_2Dk9Hv1")
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.kompisar().archive("kmp_2Dk9Hv1");
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.Kompisar.ArchiveAsync("kmp_2Dk9Hv1");
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->kompisar->archive('kmp_2Dk9Hv1');
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.kompisar.archive("kmp_2Dk9Hv1")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .kompisar()
    .archive("kmp_2Dk9Hv1".into())
    .await?;
```

Response, 200 OK:

```json
{
  "id": "kmp_2Dk9Hv1",
  "object": "kompis",
  "name": "Duplicate hunter",
  "status": "archived"
}
```

## Pause the team

Every Kompis stops starting runs at once, whatever its own switch says. Timers and proposals wait.

`POST /v1/kompisar/pause`. Who may: Owner, Admin and Analyst; Developer in test mode. CLI: `kontiga kompisar pause-team`. MCP tool: `pause_kompis_team`.

**Parameters**

**Returns** Kompisar team: The team, paused.

API:

```bash
curl -X POST https://api.kontiga.com/v1/kompisar/pause \
  -H "Authorization: Bearer $KONTIGA_API_KEY"
```

CLI:

```bash
kontiga kompisar pause-team
```

MCP tool `pause_kompis_team`:

```json
{
  "name": "pause_kompis_team",
  "arguments": {}
}
```

TypeScript:

```typescript
import Kontiga from "@kontiga/sdk";

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.kompisar.pauseTeam();
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.kompisar.pause_team()
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.Kompisar.PauseTeam(ctx)
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.kompisar().pauseTeam();
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.Kompisar.PauseTeamAsync();
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->kompisar->pauseTeam();
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.kompisar.pause_team
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .kompisar()
    .pause_team()
    .await?;
```

Response, 200 OK:

```json
{
  "object": "kompisar_team",
  "paused": true,
  "paused_by": "Maria Lind",
  "paused_at": "2026-11-26T09:50:00Z"
}
```

## Resume the team

The team switch is off again: each Kompis acts as its own switch says.

`POST /v1/kompisar/resume`. Who may: Owner and Admin. CLI: `kontiga kompisar resume-team`. MCP tool: `resume_kompis_team`.

**Parameters**

**Returns** Kompisar team: The team, running again.

API:

```bash
curl -X POST https://api.kontiga.com/v1/kompisar/resume \
  -H "Authorization: Bearer $KONTIGA_API_KEY"
```

CLI:

```bash
kontiga kompisar resume-team
```

MCP tool `resume_kompis_team`:

```json
{
  "name": "resume_kompis_team",
  "arguments": {}
}
```

TypeScript:

```typescript
import Kontiga from "@kontiga/sdk";

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.kompisar.resumeTeam();
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.kompisar.resume_team()
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.Kompisar.ResumeTeam(ctx)
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.kompisar().resumeTeam();
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.Kompisar.ResumeTeamAsync();
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->kompisar->resumeTeam();
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.kompisar.resume_team
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .kompisar()
    .resume_team()
    .await?;
```

Response, 200 OK:

```json
{
  "object": "kompisar_team",
  "paused": false,
  "paused_by": null,
  "paused_at": null
}
```

## Runs

A run is one go at the job: what started it, its subject, each step with the registry call it made, the memory it read and wrote, its proposals, its tokens and its cost. A Kompis can hand over to another; a chain stops after three.

## Run a Kompis now

Start a run by hand, on a case, a person, a document or a request, or with nothing named so it looks for its own work. It acts within its role and is charged by its tokens.

`POST /v1/kompisar/{kompis_id}/runs`. Who may: Owner, Admin and Analyst; Developer in test mode. CLI: `kontiga kompisar run <kompis_id> [--subject-id <case_id|person_id|document_id|request_id>]`. MCP tool: `run_kompis`.

**Parameters**
- `kompis_id` (id (kmp_), required): The Kompis to run. In the path.
- `subject_id` (string): What to run it on: a case (`case_`), a person (`per_`), a document (`doc_`) or a request (`rqs_`). Left out, it looks for its own work.

**Returns** Kompis run: The run, queued (202): read it again for its steps.

API:

```bash
curl -X POST https://api.kontiga.com/v1/kompisar/kmp_4Tq8Rn2/runs \
  -H "Authorization: Bearer $KONTIGA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "subject_id": "case_7Kq2Xw9"
  }'
```

CLI:

```bash
kontiga kompisar run kmp_4Tq8Rn2 --subject-id case_7Kq2Xw9
```

MCP tool `run_kompis`:

```json
{
  "name": "run_kompis",
  "arguments": {
    "kompis_id": "kmp_4Tq8Rn2",
    "subject_id": "case_7Kq2Xw9"
  }
}
```

TypeScript:

```typescript
import Kontiga from "@kontiga/sdk";

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.kompisar.run("kmp_4Tq8Rn2", {
  subject_id: "case_7Kq2Xw9",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.kompisar.run("kmp_4Tq8Rn2", subject_id="case_7Kq2Xw9")
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.Kompisar.Run(ctx, "kmp_4Tq8Rn2", &kontiga.KompisarRunParams{
	SubjectId: "case_7Kq2Xw9",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.kompisar().run("kmp_4Tq8Rn2", KompisarRunParams.builder()
    .subjectId("case_7Kq2Xw9")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.Kompisar.RunAsync("kmp_4Tq8Rn2", new KompisarRunOptions
{
    SubjectId = "case_7Kq2Xw9",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->kompisar->run('kmp_4Tq8Rn2', [
    'subject_id' => 'case_7Kq2Xw9',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.kompisar.run("kmp_4Tq8Rn2", subject_id: "case_7Kq2Xw9")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .kompisar()
    .run("kmp_4Tq8Rn2".into(), kontiga::kompisar::RunParams {
        subject_id: "case_7Kq2Xw9".into(),
        ..Default::default()
    })
    .await?;
```

Response, 202 Accepted:

```json
{
  "id": "krun_5Tm8Wq3",
  "object": "kompis_run",
  "kompis_id": "kmp_4Tq8Rn2",
  "mode": "live",
  "sandbox": false,
  "trigger": {
    "kind": "manual",
    "label": "Run by hand",
    "by": "Maria Lind"
  },
  "subject": {
    "kind": "case",
    "id": "case_7Kq2Xw9",
    "label": "APP-20418"
  },
  "status": "queued",
  "steps": []
}
```

## Test run a Kompis

A sandbox run in test mode: it reads and plans as it would, every change switched off, and shows what it would have done. Never charged.

`POST /v1/kompisar/{kompis_id}/test_runs`. Who may: Owner, Admin and Analyst; Developer in test mode. CLI: `kontiga kompisar test-run <kompis_id> [--subject-id <case_id|person_id|document_id|request_id>]`. MCP tool: `test_run_kompis`.

**Parameters**
- `kompis_id` (id (kmp_), required): The Kompis to try. In the path.
- `subject_id` (string): What to run it on, as for a run.

**Returns** Kompis run: The sandbox run, queued: nothing it plans is carried out.

API:

```bash
curl -X POST https://api.kontiga.com/v1/kompisar/kmp_4Tq8Rn2/test_runs \
  -H "Authorization: Bearer $KONTIGA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "subject_id": "case_7Kq2Xw9"
  }'
```

CLI:

```bash
kontiga kompisar test-run kmp_4Tq8Rn2 --subject-id case_7Kq2Xw9
```

MCP tool `test_run_kompis`:

```json
{
  "name": "test_run_kompis",
  "arguments": {
    "kompis_id": "kmp_4Tq8Rn2",
    "subject_id": "case_7Kq2Xw9"
  }
}
```

TypeScript:

```typescript
import Kontiga from "@kontiga/sdk";

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.kompisar.testRun("kmp_4Tq8Rn2", {
  subject_id: "case_7Kq2Xw9",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.kompisar.test_run("kmp_4Tq8Rn2", subject_id="case_7Kq2Xw9")
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.Kompisar.TestRun(ctx, "kmp_4Tq8Rn2", &kontiga.KompisarTestRunParams{
	SubjectId: "case_7Kq2Xw9",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.kompisar().testRun("kmp_4Tq8Rn2", KompisarTestRunParams.builder()
    .subjectId("case_7Kq2Xw9")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.Kompisar.TestRunAsync("kmp_4Tq8Rn2", new KompisarTestRunOptions
{
    SubjectId = "case_7Kq2Xw9",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->kompisar->testRun('kmp_4Tq8Rn2', [
    'subject_id' => 'case_7Kq2Xw9',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.kompisar.test_run("kmp_4Tq8Rn2", subject_id: "case_7Kq2Xw9")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .kompisar()
    .test_run("kmp_4Tq8Rn2".into(), kontiga::kompisar::TestRunParams {
        subject_id: "case_7Kq2Xw9".into(),
        ..Default::default()
    })
    .await?;
```

Response, 202 Accepted:

```json
{
  "id": "krun_6Nd2Bv8",
  "object": "kompis_run",
  "kompis_id": "kmp_4Tq8Rn2",
  "mode": "test",
  "sandbox": true,
  "trigger": {
    "kind": "manual",
    "label": "Sandbox run",
    "by": "Maria Lind"
  },
  "subject": {
    "kind": "case",
    "id": "case_7Kq2Xw9",
    "label": "APP-20418"
  },
  "status": "queued",
  "steps": [],
  "billed": false
}
```

## List Kompis runs

Runs of the team or of one Kompis, newest first: what started each, its subject, its result, its tokens and cost.

`GET /v1/kompis_runs`. Who may: Owner, Admin, Analyst and Viewer; Developer in test mode. CLI: `kontiga kompis-runs list [--kompis-id <kompis_id>] [--status <queued|running|waiting|completed|failed|cancelled|skipped>] [--limit <n>]`. MCP tool: `list_kompis_runs`.

**Parameters**
- `kompis_id` (id (kmp_)): Only this Kompis's runs.
- `status` (enum): Only runs in this state. One of `queued`, `running`, `waiting`, `completed`, `failed`, `cancelled`, `skipped`.
- `limit` (integer): How many to answer, newest first. At least 1, at most 200.

**Returns** list of Kompis runs: The runs, each with its steps, proposals, tokens and cost.

API:

```bash
curl -X GET "https://api.kontiga.com/v1/kompis_runs?kompis_id=kmp_4Tq8Rn2&limit=20" \
  -H "Authorization: Bearer $KONTIGA_API_KEY"
```

CLI:

```bash
kontiga kompis-runs list --kompis-id kmp_4Tq8Rn2 --limit 20
```

MCP tool `list_kompis_runs`:

```json
{
  "name": "list_kompis_runs",
  "arguments": {
    "kompis_id": "kmp_4Tq8Rn2",
    "limit": 20
  }
}
```

TypeScript:

```typescript
import Kontiga from "@kontiga/sdk";

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.kompisRuns.list({
  kompis_id: "kmp_4Tq8Rn2",
  limit: 20,
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.kompis_runs.list(kompis_id="kmp_4Tq8Rn2", limit=20)
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.KompisRuns.List(ctx, &kontiga.KompisRunsListParams{
	KompisId: "kmp_4Tq8Rn2",
	Limit:    20,
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.kompisRuns().list(KompisRunsListParams.builder()
    .kompisId("kmp_4Tq8Rn2")
    .limit(20)
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.KompisRuns.ListAsync(new KompisRunsListOptions
{
    KompisId = "kmp_4Tq8Rn2",
    Limit = 20,
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->kompisRuns->list([
    'kompis_id' => 'kmp_4Tq8Rn2',
    'limit' => 20,
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.kompis_runs.list(kompis_id: "kmp_4Tq8Rn2", limit: 20)
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .kompis_runs()
    .list(kontiga::kompis_runs::ListParams {
        kompis_id: "kmp_4Tq8Rn2".into(),
        limit: 20,
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "items": [
    {
      "id": "krun_9Bc3Lx7",
      "object": "kompis_run",
      "kompis_name": "Payslip triage",
      "status": "completed",
      "result": "done",
      "subject": {
        "kind": "case",
        "id": "case_9Rw2Kc4",
        "label": "BW-4463"
      },
      "started_at": "2026-11-26T09:42:01Z",
      "summary": "Gave BW-4463 to Elif Kaya and noted the payslip's two findings.",
      "tokens": {
        "input": 4630,
        "output": 1230
      },
      "cost": 0.06
    },
    {
      "id": "krun_3Wf6Ty9",
      "object": "kompis_run",
      "kompis_name": "Payslip triage",
      "status": "completed",
      "result": "no_change",
      "subject": {
        "kind": "document",
        "id": "doc_8Hn1Xk4",
        "label": "Payslip, September 2026"
      },
      "started_at": "2026-11-25T16:15:30Z",
      "summary": "The finding was answered already; nothing to do.",
      "tokens": {
        "input": 2210,
        "output": 180
      },
      "cost": 0.02
    }
  ],
  "next_cursor": "eyJpZCI6ImtydW5fM1dmNlR5OSJ9"
}
```

## Read a Kompis run

One run: what started it, the version of the job it ran, each step with the action it called, the memory it read and wrote, its proposals, tokens and cost.

`GET /v1/kompis_runs/{run_id}`. Who may: Owner, Admin, Analyst and Viewer; Developer in test mode. CLI: `kontiga kompis-runs get <run_id>`. MCP tool: `get_kompis_run`.

**Parameters**
- `run_id` (id (krun_), required): The run to read. In the path.

**Returns** Kompis run: The run as it stands.

API:

```bash
curl -X GET https://api.kontiga.com/v1/kompis_runs/krun_9Bc3Lx7 \
  -H "Authorization: Bearer $KONTIGA_API_KEY"
```

CLI:

```bash
kontiga kompis-runs get krun_9Bc3Lx7
```

MCP tool `get_kompis_run`:

```json
{
  "name": "get_kompis_run",
  "arguments": {
    "run_id": "krun_9Bc3Lx7"
  }
}
```

TypeScript:

```typescript
import Kontiga from "@kontiga/sdk";

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.kompisRuns.get("krun_9Bc3Lx7");
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.kompis_runs.get("krun_9Bc3Lx7")
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.KompisRuns.Get(ctx, "krun_9Bc3Lx7")
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.kompisRuns().get("krun_9Bc3Lx7");
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.KompisRuns.GetAsync("krun_9Bc3Lx7");
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->kompisRuns->get('krun_9Bc3Lx7');
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.kompis_runs.get("krun_9Bc3Lx7")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .kompis_runs()
    .get("krun_9Bc3Lx7".into())
    .await?;
```

Response, 200 OK:

```json
{
  "id": "krun_9Bc3Lx7",
  "object": "kompis_run",
  "kompis_id": "kmp_4Tq8Rn2",
  "kompis_name": "Payslip triage",
  "mode": "live",
  "sandbox": false,
  "trigger": {
    "kind": "event",
    "label": "A payslip is checked with a fraud finding",
    "event": "document.checked",
    "event_id": "evt_6Fh2Xq2",
    "by": null
  },
  "subject": {
    "kind": "case",
    "id": "case_9Rw2Kc4",
    "label": "BW-4463",
    "href": "/console/cases/case_9Rw2Kc4"
  },
  "status": "completed",
  "result": "done",
  "job_version": 2,
  "started_at": "2026-11-26T09:42:01Z",
  "ended_at": "2026-11-26T09:42:05Z",
  "summary": "Gave BW-4463 to Elif Kaya and noted the payslip's two findings.",
  "steps": [
    {
      "id": "kst_1",
      "at": "2026-11-26T09:42:01Z",
      "kind": "read",
      "tool": "cases.get",
      "title": "Read BW-4463",
      "detail": null,
      "outcome": "done",
      "tokens": 3120
    },
    {
      "id": "kst_2",
      "at": "2026-11-26T09:42:02Z",
      "kind": "search",
      "tool": "search_memory",
      "title": "Looked up who leads fraud review",
      "detail": "Elif Kaya takes payslip fraud on weekdays.",
      "outcome": "done",
      "tokens": 840
    },
    {
      "id": "kst_3",
      "at": "2026-11-26T09:42:04Z",
      "kind": "action",
      "tool": "cases.assign",
      "title": "Gave BW-4463 to Elif Kaya",
      "detail": null,
      "outcome": "done",
      "tokens": 610
    },
    {
      "id": "kst_4",
      "at": "2026-11-26T09:42:05Z",
      "kind": "action",
      "tool": "notes.create",
      "title": "Noted the payslip's findings",
      "detail": "The net pay was changed after the payslip was issued.",
      "outcome": "done",
      "tokens": 1290
    }
  ],
  "proposal_ids": [],
  "memory_read": [
    "kmem_3Lq7Pd1"
  ],
  "memory_written": [],
  "tokens": {
    "input": 4630,
    "output": 1230
  },
  "cost": 0.06,
  "billed": true,
  "failure": null,
  "depth": 0
}
```

## Stop a Kompis run

A queued run never starts; a running one stops after its current step. What it already did stays done and listed.

`POST /v1/kompis_runs/{run_id}/cancel`. Who may: Owner, Admin and Analyst; Developer in test mode. CLI: `kontiga kompis-runs cancel <run_id>`. MCP tool: `cancel_kompis_run`.

**Parameters**
- `run_id` (id (krun_), required): The run to stop. In the path.

**Returns** Kompis run: The run, stopped.

API:

```bash
curl -X POST https://api.kontiga.com/v1/kompis_runs/krun_5Tm8Wq3/cancel \
  -H "Authorization: Bearer $KONTIGA_API_KEY"
```

CLI:

```bash
kontiga kompis-runs cancel krun_5Tm8Wq3
```

MCP tool `cancel_kompis_run`:

```json
{
  "name": "cancel_kompis_run",
  "arguments": {
    "run_id": "krun_5Tm8Wq3"
  }
}
```

TypeScript:

```typescript
import Kontiga from "@kontiga/sdk";

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.kompisRuns.cancel("krun_5Tm8Wq3");
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.kompis_runs.cancel("krun_5Tm8Wq3")
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.KompisRuns.Cancel(ctx, "krun_5Tm8Wq3")
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.kompisRuns().cancel("krun_5Tm8Wq3");
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.KompisRuns.CancelAsync("krun_5Tm8Wq3");
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->kompisRuns->cancel('krun_5Tm8Wq3');
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.kompis_runs.cancel("krun_5Tm8Wq3")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .kompis_runs()
    .cancel("krun_5Tm8Wq3".into())
    .await?;
```

Response, 200 OK:

```json
{
  "id": "krun_5Tm8Wq3",
  "object": "kompis_run",
  "kompis_id": "kmp_4Tq8Rn2",
  "status": "cancelled",
  "result": null,
  "ended_at": "2026-11-26T09:51:10Z",
  "summary": "Stopped by Maria Lind before it started."
}
```

## Proposals and timers

## List what waits for approval

The actions Kompisar proposed that a person must confirm: free text to an end customer, a decision on a screening match, anything they may not do alone.

`GET /v1/kompis_proposals`. Who may: Owner, Admin, Analyst and Viewer; Developer in test mode. CLI: `kontiga kompis-proposals list [--kompis-id <kompis_id>] [--status <pending|confirmed|rejected|expired>]`. MCP tool: `list_kompis_proposals`.

**Parameters**
- `kompis_id` (id (kmp_)): Only this Kompis's proposals.
- `status` (enum): Only proposals in this state. One of `pending`, `confirmed`, `rejected`, `expired`.

**Returns** list of Kompis proposals: The proposals, newest first, each with what it would do and why it needs a person.

API:

```bash
curl -X GET "https://api.kontiga.com/v1/kompis_proposals?status=pending" \
  -H "Authorization: Bearer $KONTIGA_API_KEY"
```

CLI:

```bash
kontiga kompis-proposals list --status pending
```

MCP tool `list_kompis_proposals`:

```json
{
  "name": "list_kompis_proposals",
  "arguments": {
    "status": "pending"
  }
}
```

TypeScript:

```typescript
import Kontiga from "@kontiga/sdk";

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.kompisProposals.list({
  status: "pending",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.kompis_proposals.list(status="pending")
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.KompisProposals.List(ctx, &kontiga.KompisProposalsListParams{
	Status: "pending",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.kompisProposals().list(KompisProposalsListParams.builder()
    .status("pending")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.KompisProposals.ListAsync(new KompisProposalsListOptions
{
    Status = "pending",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->kompisProposals->list([
    'status' => 'pending',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.kompis_proposals.list(status: "pending")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .kompis_proposals()
    .list(kontiga::kompis_proposals::ListParams {
        status: "pending".into(),
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "items": [
    {
      "id": "kprp_8Vs3Hn6",
      "object": "kompis_proposal",
      "run_id": "krun_7Gq1Zd5",
      "kompis_id": "kmp_7Wn2Cs5",
      "kompis_name": "Chaser",
      "tool": "requests.remind",
      "params": {
        "request_id": "rqs_4Mb9Kt2",
        "note": "Your October payslip is the last thing we need. A photo of the paper copy is fine."
      },
      "title": "Remind Lotte de Vries, with a note",
      "detail": "An email to Lotte de Vries: the reminder with a fresh link, and the note \"Your October payslip is the last thing we need. A photo of the paper copy is fine.\"",
      "why": "Free text to an end customer needs a person.",
      "subject": {
        "kind": "request",
        "id": "rqs_4Mb9Kt2",
        "label": "Lotte de Vries, Personal loan",
        "href": "/console/requests/rqs_4Mb9Kt2"
      },
      "status": "pending",
      "created_at": "2026-11-26T08:00:12Z",
      "expires_at": "2026-11-27T08:00:12Z",
      "decided_by": null,
      "decided_at": null
    }
  ],
  "next_cursor": null
}
```

## Confirm a proposal

Run the proposed action exactly as proposed, as you, within your own role. The run it came from then finishes.

`POST /v1/kompis_proposals/{proposal_id}/confirm`. Who may: Owner, Admin and Analyst; Developer in test mode. CLI: `kontiga kompis-proposals confirm <proposal_id>`. MCP tool: `confirm_kompis_proposal`.

**Parameters**
- `proposal_id` (id (kprp_), required): The proposal to carry out, exactly as proposed. In the path.

**Returns** Kompis proposal: The proposal, confirmed and carried out.

API:

```bash
curl -X POST https://api.kontiga.com/v1/kompis_proposals/kprp_8Vs3Hn6/confirm \
  -H "Authorization: Bearer $KONTIGA_API_KEY"
```

CLI:

```bash
kontiga kompis-proposals confirm kprp_8Vs3Hn6
```

MCP tool `confirm_kompis_proposal`:

```json
{
  "name": "confirm_kompis_proposal",
  "arguments": {
    "proposal_id": "kprp_8Vs3Hn6"
  }
}
```

TypeScript:

```typescript
import Kontiga from "@kontiga/sdk";

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.kompisProposals.confirm("kprp_8Vs3Hn6");
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.kompis_proposals.confirm("kprp_8Vs3Hn6")
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.KompisProposals.Confirm(ctx, "kprp_8Vs3Hn6")
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.kompisProposals().confirm("kprp_8Vs3Hn6");
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.KompisProposals.ConfirmAsync("kprp_8Vs3Hn6");
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->kompisProposals->confirm('kprp_8Vs3Hn6');
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.kompis_proposals.confirm("kprp_8Vs3Hn6")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .kompis_proposals()
    .confirm("kprp_8Vs3Hn6".into())
    .await?;
```

Response, 200 OK:

```json
{
  "id": "kprp_8Vs3Hn6",
  "object": "kompis_proposal",
  "run_id": "krun_7Gq1Zd5",
  "kompis_id": "kmp_7Wn2Cs5",
  "kompis_name": "Chaser",
  "tool": "requests.remind",
  "params": {
    "request_id": "rqs_4Mb9Kt2",
    "note": "Your October payslip is the last thing we need. A photo of the paper copy is fine."
  },
  "title": "Remind Lotte de Vries, with a note",
  "detail": "An email to Lotte de Vries: the reminder with a fresh link, and the note \"Your October payslip is the last thing we need. A photo of the paper copy is fine.\"",
  "why": "Free text to an end customer needs a person.",
  "subject": {
    "kind": "request",
    "id": "rqs_4Mb9Kt2",
    "label": "Lotte de Vries, Personal loan",
    "href": "/console/requests/rqs_4Mb9Kt2"
  },
  "status": "confirmed",
  "created_at": "2026-11-26T08:00:12Z",
  "expires_at": "2026-11-27T08:00:12Z",
  "decided_by": "Maria Lind",
  "decided_at": "2026-11-26T09:52:40Z"
}
```

## Reject a proposal

The proposed action is not run. The Kompis's run finishes with nothing changed by it.

`POST /v1/kompis_proposals/{proposal_id}/reject`. Who may: Owner, Admin and Analyst; Developer in test mode. CLI: `kontiga kompis-proposals reject <proposal_id>`. MCP tool: `reject_kompis_proposal`.

**Parameters**
- `proposal_id` (id (kprp_), required): The proposal to turn down. In the path.

**Returns** Kompis proposal: The proposal, rejected.

API:

```bash
curl -X POST https://api.kontiga.com/v1/kompis_proposals/kprp_8Vs3Hn6/reject \
  -H "Authorization: Bearer $KONTIGA_API_KEY"
```

CLI:

```bash
kontiga kompis-proposals reject kprp_8Vs3Hn6
```

MCP tool `reject_kompis_proposal`:

```json
{
  "name": "reject_kompis_proposal",
  "arguments": {
    "proposal_id": "kprp_8Vs3Hn6"
  }
}
```

TypeScript:

```typescript
import Kontiga from "@kontiga/sdk";

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.kompisProposals.reject("kprp_8Vs3Hn6");
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.kompis_proposals.reject("kprp_8Vs3Hn6")
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.KompisProposals.Reject(ctx, "kprp_8Vs3Hn6")
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.kompisProposals().reject("kprp_8Vs3Hn6");
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.KompisProposals.RejectAsync("kprp_8Vs3Hn6");
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->kompisProposals->reject('kprp_8Vs3Hn6');
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.kompis_proposals.reject("kprp_8Vs3Hn6")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .kompis_proposals()
    .reject("kprp_8Vs3Hn6".into())
    .await?;
```

Response, 200 OK:

```json
{
  "id": "kprp_8Vs3Hn6",
  "object": "kompis_proposal",
  "run_id": "krun_7Gq1Zd5",
  "kompis_id": "kmp_7Wn2Cs5",
  "kompis_name": "Chaser",
  "tool": "requests.remind",
  "params": {
    "request_id": "rqs_4Mb9Kt2",
    "note": "Your October payslip is the last thing we need. A photo of the paper copy is fine."
  },
  "title": "Remind Lotte de Vries, with a note",
  "detail": "An email to Lotte de Vries: the reminder with a fresh link, and the note \"Your October payslip is the last thing we need. A photo of the paper copy is fine.\"",
  "why": "Free text to an end customer needs a person.",
  "subject": {
    "kind": "request",
    "id": "rqs_4Mb9Kt2",
    "label": "Lotte de Vries, Personal loan",
    "href": "/console/requests/rqs_4Mb9Kt2"
  },
  "status": "rejected",
  "created_at": "2026-11-26T08:00:12Z",
  "expires_at": "2026-11-27T08:00:12Z",
  "decided_by": "Maria Lind",
  "decided_at": "2026-11-26T09:52:40Z"
}
```

## List timers and schedules

The timers Kompisar set themselves and their next scheduled runs: when, on what, why, and what cancels each.

`GET /v1/kompis_timers`. Who may: Owner, Admin, Analyst and Viewer; Developer in test mode. CLI: `kontiga kompis-timers list [--kompis-id <kompis_id>] [--status <scheduled|fired|cancelled>]`. MCP tool: `list_kompis_timers`.

**Parameters**
- `kompis_id` (id (kmp_)): Only this Kompis's timers and schedules.
- `status` (enum): Only timers in this state. One of `scheduled`, `fired`, `cancelled`.

**Returns** list of Kompis timers: The timers and schedules, soonest first.

API:

```bash
curl -X GET "https://api.kontiga.com/v1/kompis_timers?status=scheduled" \
  -H "Authorization: Bearer $KONTIGA_API_KEY"
```

CLI:

```bash
kontiga kompis-timers list --status scheduled
```

MCP tool `list_kompis_timers`:

```json
{
  "name": "list_kompis_timers",
  "arguments": {
    "status": "scheduled"
  }
}
```

TypeScript:

```typescript
import Kontiga from "@kontiga/sdk";

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.kompisTimers.list({
  status: "scheduled",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.kompis_timers.list(status="scheduled")
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.KompisTimers.List(ctx, &kontiga.KompisTimersListParams{
	Status: "scheduled",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.kompisTimers().list(KompisTimersListParams.builder()
    .status("scheduled")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.KompisTimers.ListAsync(new KompisTimersListOptions
{
    Status = "scheduled",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->kompisTimers->list([
    'status' => 'scheduled',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.kompis_timers.list(status: "scheduled")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .kompis_timers()
    .list(kontiga::kompis_timers::ListParams {
        status: "scheduled".into(),
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "items": [
    {
      "id": "ktmr_2Kd7Pw4",
      "object": "kompis_timer",
      "kompis_id": "kmp_7Wn2Cs5",
      "kompis_name": "Chaser",
      "kind": "timer",
      "at": "2026-11-28T08:00:00Z",
      "why": "Check again whether Lotte de Vries sent her October payslip.",
      "cancel_when": "the request is completed",
      "subject": {
        "kind": "request",
        "id": "rqs_4Mb9Kt2",
        "label": "Lotte de Vries, Personal loan",
        "href": "/console/requests/rqs_4Mb9Kt2"
      },
      "status": "scheduled",
      "created_at": "2026-11-26T08:00:12Z",
      "run_id": "krun_7Gq1Zd5"
    },
    {
      "id": "ktmr_6Hc1Rv8",
      "object": "kompis_timer",
      "kompis_id": "kmp_3Pb6Nk9",
      "kompis_name": "Morning digest",
      "kind": "schedule",
      "at": "2026-11-27T07:00:00Z",
      "why": "Weekdays at 08:00, Amsterdam time.",
      "cancel_when": null,
      "subject": null,
      "status": "scheduled"
    }
  ],
  "next_cursor": null
}
```

## Cancel a timer

The timer never fires. A schedule is changed on the Kompis itself.

`POST /v1/kompis_timers/{timer_id}/cancel`. Who may: Owner, Admin and Analyst; Developer in test mode. CLI: `kontiga kompis-timers cancel <timer_id>`. MCP tool: `cancel_kompis_timer`.

**Parameters**
- `timer_id` (id (ktmr_), required): The timer to cancel. In the path.

**Returns** Kompis timer: The timer, cancelled.

API:

```bash
curl -X POST https://api.kontiga.com/v1/kompis_timers/ktmr_2Kd7Pw4/cancel \
  -H "Authorization: Bearer $KONTIGA_API_KEY"
```

CLI:

```bash
kontiga kompis-timers cancel ktmr_2Kd7Pw4
```

MCP tool `cancel_kompis_timer`:

```json
{
  "name": "cancel_kompis_timer",
  "arguments": {
    "timer_id": "ktmr_2Kd7Pw4"
  }
}
```

TypeScript:

```typescript
import Kontiga from "@kontiga/sdk";

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.kompisTimers.cancel("ktmr_2Kd7Pw4");
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.kompis_timers.cancel("ktmr_2Kd7Pw4")
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.KompisTimers.Cancel(ctx, "ktmr_2Kd7Pw4")
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.kompisTimers().cancel("ktmr_2Kd7Pw4");
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.KompisTimers.CancelAsync("ktmr_2Kd7Pw4");
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->kompisTimers->cancel('ktmr_2Kd7Pw4');
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.kompis_timers.cancel("ktmr_2Kd7Pw4")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .kompis_timers()
    .cancel("ktmr_2Kd7Pw4".into())
    .await?;
```

Response, 200 OK:

```json
{
  "id": "ktmr_2Kd7Pw4",
  "object": "kompis_timer",
  "kompis_id": "kmp_7Wn2Cs5",
  "kompis_name": "Chaser",
  "kind": "timer",
  "at": "2026-11-28T08:00:00Z",
  "why": "Check again whether Lotte de Vries sent her October payslip.",
  "cancel_when": "the request is completed",
  "subject": {
    "kind": "request",
    "id": "rqs_4Mb9Kt2",
    "label": "Lotte de Vries, Personal loan",
    "href": "/console/requests/rqs_4Mb9Kt2"
  },
  "status": "cancelled",
  "created_at": "2026-11-26T08:00:12Z",
  "run_id": "krun_7Gq1Zd5"
}
```

## The team memory

One memory for the whole team: what the Kompisar learned and how your team wants the work done, each entry with who wrote it and when. A Kompis searches it before it works and never reads it whole. An edit is a new version; a past run keeps the version it read.

## List the team memory

Everything the Kompisar remember, as one memory for the whole team: what they learned and how your team wants the work done, each entry with who wrote it and when.

`GET /v1/kompis_memory`. Who may: Owner, Admin, Analyst and Viewer; Developer in test mode. CLI: `kontiga kompis-memory list [--kompis-id <kompis_id>] [--pinned <true|false>] [--limit <n>]`. MCP tool: `list_kompis_memory`.

**Parameters**
- `kompis_id` (id (kmp_)): Only entries this Kompis wrote.
- `pinned` (boolean): Only pinned entries, or only the others.
- `limit` (integer): How many to answer, pinned first, then newest. At least 1, at most 200.

**Returns** list of memory entries: The entries, pinned first, then newest.

API:

```bash
curl -X GET "https://api.kontiga.com/v1/kompis_memory?limit=50" \
  -H "Authorization: Bearer $KONTIGA_API_KEY"
```

CLI:

```bash
kontiga kompis-memory list --limit 50
```

MCP tool `list_kompis_memory`:

```json
{
  "name": "list_kompis_memory",
  "arguments": {
    "limit": 50
  }
}
```

TypeScript:

```typescript
import Kontiga from "@kontiga/sdk";

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.kompisMemory.list({
  limit: 50,
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.kompis_memory.list(limit=50)
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.KompisMemory.List(ctx, &kontiga.KompisMemoryListParams{
	Limit: 50,
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.kompisMemory().list(KompisMemoryListParams.builder()
    .limit(50)
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.KompisMemory.ListAsync(new KompisMemoryListOptions
{
    Limit = 50,
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->kompisMemory->list([
    'limit' => 50,
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.kompis_memory.list(limit: 50)
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .kompis_memory()
    .list(kontiga::kompis_memory::ListParams {
        limit: 50,
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "items": [
    {
      "id": "kmem_3Lq7Pd1",
      "object": "memory_entry",
      "text": "Elif Kaya takes payslip fraud on weekdays; Jonas Eriksen on weekends.",
      "writer": {
        "kind": "member",
        "id": "mem_9Wd2Hc5",
        "name": "Maria Lind",
        "color": null
      },
      "run_id": null,
      "pinned": true,
      "version": 1,
      "status": "active",
      "created_at": "2026-11-02T13:24:00Z",
      "updated_at": "2026-11-02T13:24:00Z",
      "edited_by": null
    },
    {
      "id": "kmem_8Fw2Ys6",
      "object": "memory_entry",
      "text": "Brightwater's payroll provider prints the net pay in bold on every payslip; bold alone is not a finding.",
      "writer": {
        "kind": "kompis",
        "id": "kmp_4Tq8Rn2",
        "name": "Payslip triage",
        "color": "orange"
      },
      "run_id": "krun_1Xd4Hb7",
      "pinned": false,
      "version": 1,
      "status": "active",
      "created_at": "2026-11-19T10:02:00Z",
      "updated_at": "2026-11-19T10:02:00Z",
      "edited_by": null
    }
  ],
  "next_cursor": null
}
```

## Search the team memory

The entries closest in meaning to a question, as a Kompis finds them before it works: over the whole team or one Kompis's own.

`GET /v1/kompis_memory/search`. Who may: Owner, Admin, Analyst and Viewer; Developer in test mode. CLI: `kontiga kompis-memory search <q> [--kompis-id <kompis_id>] [--limit <n>]`. MCP tool: `search_kompis_memory`.

**Parameters**
- `q` (string, required): A question in plain words. At most 300 characters.
- `kompis_id` (id (kmp_)): Search only this Kompis's own entries.
- `limit` (integer): How many to answer, closest first. At least 1, at most 50.

**Returns** list of memory entries: The closest entries, each with how close it is.

API:

```bash
curl -X GET "https://api.kontiga.com/v1/kompis_memory/search?q=who+takes+payslip+fraud" \
  -H "Authorization: Bearer $KONTIGA_API_KEY"
```

CLI:

```bash
kontiga kompis-memory search 'who takes payslip fraud'
```

MCP tool `search_kompis_memory`:

```json
{
  "name": "search_kompis_memory",
  "arguments": {
    "q": "who takes payslip fraud"
  }
}
```

TypeScript:

```typescript
import Kontiga from "@kontiga/sdk";

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.kompisMemory.search({
  q: "who takes payslip fraud",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.kompis_memory.search(q="who takes payslip fraud")
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.KompisMemory.Search(ctx, &kontiga.KompisMemorySearchParams{
	Q: "who takes payslip fraud",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.kompisMemory().search(KompisMemorySearchParams.builder()
    .q("who takes payslip fraud")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.KompisMemory.SearchAsync(new KompisMemorySearchOptions
{
    Q = "who takes payslip fraud",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->kompisMemory->search([
    'q' => 'who takes payslip fraud',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.kompis_memory.search(q: "who takes payslip fraud")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .kompis_memory()
    .search(kontiga::kompis_memory::SearchParams {
        q: "who takes payslip fraud".into(),
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "items": [
    {
      "id": "kmem_3Lq7Pd1",
      "object": "memory_entry",
      "text": "Elif Kaya takes payslip fraud on weekdays; Jonas Eriksen on weekends.",
      "writer": {
        "kind": "member",
        "id": "mem_9Wd2Hc5",
        "name": "Maria Lind",
        "color": null
      },
      "run_id": null,
      "pinned": true,
      "version": 1,
      "status": "active",
      "created_at": "2026-11-02T13:24:00Z",
      "updated_at": "2026-11-02T13:24:00Z",
      "edited_by": null,
      "relevance": 0.91
    },
    {
      "id": "kmem_5Ra9Lc2",
      "object": "memory_entry",
      "text": "Send fraud cases over 50,000 to Jonas Eriksen, whoever is on duty.",
      "writer": {
        "kind": "member",
        "id": "mem_9Wd2Hc5",
        "name": "Maria Lind",
        "color": null
      },
      "pinned": false,
      "version": 2,
      "status": "active",
      "relevance": 0.74
    }
  ],
  "next_cursor": null
}
```

## Add to the team memory

Teach the team something: a preference or a rule of thumb every Kompis finds when it searches. A pinned entry is read on every run.

`POST /v1/kompis_memory`. Who may: Owner, Admin and Analyst; Developer in test mode. CLI: `kontiga kompis-memory add --text <text> [--pinned]`. MCP tool: `add_kompis_memory`.

**Parameters**
- `text` (string, required): What to teach the team, in plain words. At most 600 characters.
- `pinned` (boolean, default false): Read it on every run, not only when a search finds it.

**Returns** memory entry: The entry, written by you.

API:

```bash
curl -X POST https://api.kontiga.com/v1/kompis_memory \
  -H "Authorization: Bearer $KONTIGA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Never remind a party on a Sunday."
  }'
```

CLI:

```bash
kontiga kompis-memory add \
  --text 'Never remind a party on a Sunday.'
```

MCP tool `add_kompis_memory`:

```json
{
  "name": "add_kompis_memory",
  "arguments": {
    "text": "Never remind a party on a Sunday."
  }
}
```

TypeScript:

```typescript
import Kontiga from "@kontiga/sdk";

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.kompisMemory.add({
  text: "Never remind a party on a Sunday.",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.kompis_memory.add(text="Never remind a party on a Sunday.")
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.KompisMemory.Add(ctx, &kontiga.KompisMemoryAddParams{
	Text: "Never remind a party on a Sunday.",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.kompisMemory().add(KompisMemoryAddParams.builder()
    .text("Never remind a party on a Sunday.")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.KompisMemory.AddAsync(new KompisMemoryAddOptions
{
    Text = "Never remind a party on a Sunday.",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->kompisMemory->add([
    'text' => 'Never remind a party on a Sunday.',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.kompis_memory.add(text: "Never remind a party on a Sunday.")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .kompis_memory()
    .add(kontiga::kompis_memory::AddParams {
        text: "Never remind a party on a Sunday.".into(),
        ..Default::default()
    })
    .await?;
```

Response, 201 Created:

```json
{
  "id": "kmem_7Tn3Wk5",
  "object": "memory_entry",
  "text": "Never remind a party on a Sunday.",
  "writer": {
    "kind": "member",
    "id": "mem_9Wd2Hc5",
    "name": "Maria Lind",
    "color": null
  },
  "run_id": null,
  "pinned": false,
  "version": 1,
  "status": "active",
  "created_at": "2026-11-26T09:54:00Z",
  "updated_at": "2026-11-26T09:54:00Z",
  "edited_by": null
}
```

## Edit a memory entry

Correct what an entry says. The edit is a new version: the next run reads it, and a past run keeps the version it read.

`PATCH /v1/kompis_memory/{entry_id}`. Who may: Owner, Admin and Analyst; Developer in test mode. CLI: `kontiga kompis-memory update <entry_id> --text <text>`. MCP tool: `update_kompis_memory`.

**Parameters**
- `entry_id` (id (kmem_), required): The entry to correct. In the path.
- `text` (string, required): What it says now. At most 600 characters.

**Returns** memory entry: The entry, with its new version.

API:

```bash
curl -X PATCH https://api.kontiga.com/v1/kompis_memory/kmem_3Lq7Pd1 \
  -H "Authorization: Bearer $KONTIGA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Elif Kaya takes payslip fraud on weekdays; Amira Khalil on weekends."
  }'
```

CLI:

```bash
kontiga kompis-memory update kmem_3Lq7Pd1 \
  --text 'Elif Kaya takes payslip fraud on weekdays; Amira Khalil on weekends.'
```

MCP tool `update_kompis_memory`:

```json
{
  "name": "update_kompis_memory",
  "arguments": {
    "entry_id": "kmem_3Lq7Pd1",
    "text": "Elif Kaya takes payslip fraud on weekdays; Amira Khalil on weekends."
  }
}
```

TypeScript:

```typescript
import Kontiga from "@kontiga/sdk";

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.kompisMemory.update("kmem_3Lq7Pd1", {
  text: "Elif Kaya takes payslip fraud on weekdays; Amira Khalil on weekends.",
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.kompis_memory.update("kmem_3Lq7Pd1", text="Elif Kaya takes payslip fraud on weekdays; Amira Khalil on weekends.")
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.KompisMemory.Update(ctx, "kmem_3Lq7Pd1", &kontiga.KompisMemoryUpdateParams{
	Text: "Elif Kaya takes payslip fraud on weekdays; Amira Khalil on weekends.",
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.kompisMemory().update("kmem_3Lq7Pd1", KompisMemoryUpdateParams.builder()
    .text("Elif Kaya takes payslip fraud on weekdays; Amira Khalil on weekends.")
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.KompisMemory.UpdateAsync("kmem_3Lq7Pd1", new KompisMemoryUpdateOptions
{
    Text = "Elif Kaya takes payslip fraud on weekdays; Amira Khalil on weekends.",
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->kompisMemory->update('kmem_3Lq7Pd1', [
    'text' => 'Elif Kaya takes payslip fraud on weekdays; Amira Khalil on weekends.',
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.kompis_memory.update("kmem_3Lq7Pd1", text: "Elif Kaya takes payslip fraud on weekdays; Amira Khalil on weekends.")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .kompis_memory()
    .update("kmem_3Lq7Pd1".into(), kontiga::kompis_memory::UpdateParams {
        text: "Elif Kaya takes payslip fraud on weekdays; Amira Khalil on weekends.".into(),
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "id": "kmem_3Lq7Pd1",
  "object": "memory_entry",
  "text": "Elif Kaya takes payslip fraud on weekdays; Amira Khalil on weekends.",
  "writer": {
    "kind": "member",
    "id": "mem_9Wd2Hc5",
    "name": "Maria Lind",
    "color": null
  },
  "run_id": null,
  "pinned": true,
  "version": 2,
  "status": "active",
  "created_at": "2026-11-02T13:24:00Z",
  "updated_at": "2026-11-26T09:55:00Z",
  "edited_by": "Maria Lind"
}
```

## Pin a memory entry

A pinned entry is read on every run, whatever it searches: the place for your team's standing preferences. Unpin it to have it found by search only.

`POST /v1/kompis_memory/{entry_id}/pin`. Who may: Owner, Admin and Analyst; Developer in test mode. CLI: `kontiga kompis-memory pin <entry_id> --pinned <true|false>`. MCP tool: `pin_kompis_memory`.

**Parameters**
- `entry_id` (id (kmem_), required): The entry. In the path.
- `pinned` (boolean, required): `true` to pin it, `false` to have it found by search only.

**Returns** memory entry: The entry, pinned or not.

API:

```bash
curl -X POST https://api.kontiga.com/v1/kompis_memory/kmem_3Lq7Pd1/pin \
  -H "Authorization: Bearer $KONTIGA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "pinned": false
  }'
```

CLI:

```bash
kontiga kompis-memory pin kmem_3Lq7Pd1 --pinned=false
```

MCP tool `pin_kompis_memory`:

```json
{
  "name": "pin_kompis_memory",
  "arguments": {
    "entry_id": "kmem_3Lq7Pd1",
    "pinned": false
  }
}
```

TypeScript:

```typescript
import Kontiga from "@kontiga/sdk";

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.kompisMemory.pin("kmem_3Lq7Pd1", {
  pinned: false,
});
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.kompis_memory.pin("kmem_3Lq7Pd1", pinned=False)
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.KompisMemory.Pin(ctx, "kmem_3Lq7Pd1", &kontiga.KompisMemoryPinParams{
	Pinned: false,
})
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.kompisMemory().pin("kmem_3Lq7Pd1", KompisMemoryPinParams.builder()
    .pinned(false)
    .build());
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.KompisMemory.PinAsync("kmem_3Lq7Pd1", new KompisMemoryPinOptions
{
    Pinned = false,
});
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->kompisMemory->pin('kmem_3Lq7Pd1', [
    'pinned' => false,
]);
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.kompis_memory.pin("kmem_3Lq7Pd1", pinned: false)
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .kompis_memory()
    .pin("kmem_3Lq7Pd1".into(), kontiga::kompis_memory::PinParams {
        pinned: false,
        ..Default::default()
    })
    .await?;
```

Response, 200 OK:

```json
{
  "id": "kmem_3Lq7Pd1",
  "object": "memory_entry",
  "text": "Elif Kaya takes payslip fraud on weekdays; Jonas Eriksen on weekends.",
  "writer": {
    "kind": "member",
    "id": "mem_9Wd2Hc5",
    "name": "Maria Lind",
    "color": null
  },
  "run_id": null,
  "pinned": false,
  "version": 1,
  "status": "active",
  "created_at": "2026-11-02T13:24:00Z",
  "updated_at": "2026-11-26T09:56:00Z",
  "edited_by": null
}
```

## Delete a memory entry

The entry is no longer read by any Kompis. A past run's record still shows the version it read.

`DELETE /v1/kompis_memory/{entry_id}`. Who may: Owner, Admin and Analyst; Developer in test mode. CLI: `kontiga kompis-memory delete <entry_id>`. MCP tool: `delete_kompis_memory`.

**Parameters**
- `entry_id` (id (kmem_), required): The entry to delete. In the path.

**Returns** memory entry: The entry, deleted.

API:

```bash
curl -X DELETE https://api.kontiga.com/v1/kompis_memory/kmem_7Tn3Wk5 \
  -H "Authorization: Bearer $KONTIGA_API_KEY"
```

CLI:

```bash
kontiga kompis-memory delete kmem_7Tn3Wk5
```

MCP tool `delete_kompis_memory`:

```json
{
  "name": "delete_kompis_memory",
  "arguments": {
    "entry_id": "kmem_7Tn3Wk5"
  }
}
```

TypeScript:

```typescript
import Kontiga from "@kontiga/sdk";

const kontiga = new Kontiga(); // reads KONTIGA_API_KEY
const result = await kontiga.kompisMemory.delete("kmem_7Tn3Wk5");
```

Python:

```python
from kontiga import Kontiga

kontiga = Kontiga()  # reads KONTIGA_API_KEY
result = kontiga.kompis_memory.delete("kmem_7Tn3Wk5")
```

Go:

```go
client := kontiga.NewClient() // reads KONTIGA_API_KEY
result, err := client.KompisMemory.Delete(ctx, "kmem_7Tn3Wk5")
if err != nil {
	return err
}
```

Java:

```java
Kontiga kontiga = Kontiga.fromEnv(); // reads KONTIGA_API_KEY
var result = kontiga.kompisMemory().delete("kmem_7Tn3Wk5");
```

.NET:

```csharp
var kontiga = new KontigaClient(); // reads KONTIGA_API_KEY
var result = await kontiga.KompisMemory.DeleteAsync("kmem_7Tn3Wk5");
```

PHP:

```php
$kontiga = new \Kontiga\Client(); // reads KONTIGA_API_KEY
$result = $kontiga->kompisMemory->delete('kmem_7Tn3Wk5');
```

Ruby:

```ruby
require "kontiga"

kontiga = Kontiga::Client.new # reads KONTIGA_API_KEY
result = kontiga.kompis_memory.delete("kmem_7Tn3Wk5")
```

Rust:

```rust
let kontiga = kontiga::Client::from_env()?; // reads KONTIGA_API_KEY
let result = kontiga
    .kompis_memory()
    .delete("kmem_7Tn3Wk5".into())
    .await?;
```

Response, 200 OK:

```json
{
  "id": "kmem_7Tn3Wk5",
  "object": "memory_entry",
  "text": "Never remind a party on a Sunday.",
  "writer": {
    "kind": "member",
    "id": "mem_9Wd2Hc5",
    "name": "Maria Lind",
    "color": null
  },
  "run_id": null,
  "pinned": true,
  "version": 1,
  "status": "deleted",
  "created_at": "2026-11-02T13:24:00Z",
  "updated_at": "2026-11-26T09:57:00Z",
  "edited_by": null
}
```
