# Khala: define, build, verify and deploy your own agents

> Khala is a platform for IT teams to build and govern their organization’s agents — with their stack, on their cloud and with the code in their repository. The team defines the logic and the tests, a coding agent builds until it passes them, and OverMind verifies separately.

Source: https://www.renaiss.ai/khala · Code in your GitHub or GitLab · Your models and keys · SaaS, your cloud or on-premise

```shell
$ khala cases create --title "Disputed charges" --risk critical
Created CAS-1 · Disputed charges
$ khala cases move CAS-1 build
CAS-1 is now in build
$ khala new CAS-1
Created agent disputed-charges from CAS-1 (Pydantic AI, risk critical)
Repository: acme/agent-disputed-charges
```

## What Khala does — and what IT keeps

1. **Define** — The team writes the logic of the process and the tests that defend it. That definition is the input for everything else.
2. **Build** — A coding agent works in a sandbox until it passes the visible tests, then opens a pull request.
3. **Verify and deploy** — OverMind runs the hidden tests and calculates the Readiness Score. Without passing its gates, there is no promotion.

**Who owns what**

| Asset | Owner |
| --- | --- |
| Agent code | The customer’s repository, in GitHub or GitLab |
| Framework | Whichever the customer sets; Khala asks for a minimum contract |
| Models and keys | The customer’s, through the gateway |
| Secrets | The customer’s vault; Khala stores the reference |
| Verification | OverMind, separate from whoever builds |
| Pipelines | The customer’s runners |

## IT keeps control — and keeps its stack

### Control: Nothing skips your repository

Nothing reaches production without going through your repository, your review and your gates. The business defines the logic and the tests; IT sets the standards and reviews every pull request.

### The code: Readable code, no lock-in

Every agent is a repository in your GitHub or GitLab, with readable code, tests and CI. It imports no Khala library: if you ever leave the platform, the agent keeps working.

### Day to day: Khala takes the repetitive work

Building against the tests, verifying every pull request, gathering evidence for risk and audit, and migrating agents when a standard changes.

**Khala works with what you already have**

| Layer | Yours |
| --- | --- |
| Repository | GitHub or GitLab |
| Framework | Whichever the team sets, with its own blueprint |
| Models | Your provider and your keys: Amazon Bedrock, Azure OpenAI, Vertex AI |
| Coding agent | Claude Code, Codex or Antigravity |
| CI/CD | Your runners; Argo CD or Flux |
| Identity and secrets | Your SSO and your vault |
| Observability | OpenTelemetry to your monitoring and your SIEM |
| Infrastructure | Your cloud or data center, on Kubernetes |

## Sovereign technology, agnostic of models and techniques

The customer decides which models and techniques to use, where they run and who operates the platform.

### 01 · Sovereign: Under the customer’s control

Code, data, keys and secrets belong to the customer and run in their cloud or data center.

### 02 · Model-agnostic: No mandatory model

The customer chooses the model and the provider, and can change them. Each change is a pull request that OverMind verifies.

### 03 · Technique-agnostic: No imposed technique

RAG, framework, coding agent and tools: Khala works with the ones the team sets and lets them be replaced.

### Renaiss components: Own

Renaiss has its own models and components, such as its RAG component.

### Renaiss components: Configurable

They are configured for each organization and each use case.

### Renaiss components: Optional

The customer can use them or replace them with their own; the rest of the platform doesn’t change.

## Khala complements your cloud — it doesn’t replace your team

Khala doesn’t sell compute or models and doesn’t compete with your cloud’s services: it uses them. Model spend goes to the customer’s account, with the customer’s keys.

1. **Your agents** (Layer 3) — Code in your repository, deployed to your environments.
2. **Khala** (Layer 2) — Define, build, verify and govern.
3. **Your cloud and your models** (Layer 1) — AWS, Azure, Google Cloud or your data center: compute, models, data and identity.

**Khala compared with a vendor-managed agent**

|   | Managed agent | Khala |
| --- | --- | --- |
| What you buy | An agent the vendor builds and operates | A tool to build and govern your own |
| Where it lives | On the vendor’s platform | In the customer’s repository and cloud |
| Typical scope | Customer service | Any process with rules and tests |
| Role of IT | Integrating systems | Setting standards and reviewing changes |
| When it ends | The agent stays on the platform | The code and the tests stay with the customer |

> If you are looking for a turnkey customer-service agent operated by a third party, a managed agent gets there sooner. Khala is for teams that want to build and govern their agents like the rest of their software.

## From a case to production in seven steps

Every agent is born from a case: a business process with an owner, KPIs and a risk level. It always follows the same steps, in the console or in the terminal.

1. **Case** — Process, owner, KPIs and risk.
2. **Define** — Logic and tests.
3. **Connect** — Tools, knowledge and channels.
4. **Build** — Build in a sandbox and pull request.
5. **Evaluate** — Suite, findings and Readiness Score.
6. **Deploy** — Environments, promotion and release.
7. **Observe** — Traces, cost and KPIs.

> Everything you can do with clicks in the console you can do with a command. The Git flow is always the same: branch, sandbox, pull request, merge and release.

## The builder’s input is a definition, not a prompt

### Goal and scope

What the agent is for and what is out of scope. Anything out of scope is routed to a person.

### Steps

The process, in order. Each step says who decides: fixed code, the agent, a decision point or the LLM.

### Rules

“When this happens, the agent does this.” Every rule needs a test that fails if the rule breaks.

### Limits

What the agent never does, what needs human approval and what escalates to a person.

`agent/definition.yaml`

```yaml
logic:
  goal: Resolve disputes over unrecognized charges
  out_of_scope:
    - Confirmed fraud
  steps:
    - id: s-1
      kind: STEP_KIND_FIXED
      text: Verify the customer's identity
    - id: s-2
      kind: STEP_KIND_DECISION
      text: Classify the reason
  rules:
    - id: r-amount
      when: the amount exceeds 5,000
      effect: escalate to a person
  limits:
    - id: l-refund
      kind: LIMIT_KIND_APPROVAL
      text: Refund more than 2,000
version: 3
```

> Before building, Khala cross-checks logic and tests: it flags rules without a test, contradictions and gaps — and asks.

## Visible tests to build, hidden tests to verify

### Visible: The builder reads them

They live in the repository, in evals/visible.jsonl, one per line. The builder builds until it passes them, and the team edits them like any other file.

### Hidden: Only OverMind sees them

They live in a store only OverMind can access and never enter the build sandbox. The ratio between the two is set by the Policy according to the risk level.

### Where the cases come from

Process experts, history (tickets, case files, transcripts), synthetic cases, production traces, incidents and attacks.

### How they are evaluated

Deterministic and trajectory checks, a judge with a rubric, human review, and non-functional checks — cost, latency and load — with thresholds per channel.

### So the builder can’t cheat

Read-only tests and thresholds, variants of each case at verification time, and detection of expected values hard-coded in the code.

> A judge doesn’t count as a gate until its agreement with human labels passes a measured threshold.

## Four catalogues, one mechanism

Every asset is created once, tested in isolation, published with an owner and a version, and reused by any agent.

### 01: Tools

MCP Studio generates the server from OpenAPI, WSDL, a database schema, approved SQL queries or a function. It goes from mocked to real without touching the agent’s code.

### 02: Knowledge

Incremental ingestion from the customer’s sources. Permissions inherited from the source, mandatory citations and an index version tied to each release.

### 03: Skills

Only from the internal catalogue: reviewed, versioned and with their own evals that measure when they trigger.

### 04: Channels

The team describes the channel and the builder writes the adapter, with its templates and tests, in the same build.

**Untrusted input + Sensitive data + Changes state** — Design lint · rule of two: an agent that combines all three can’t act alone — anything that changes state requires human approval. Checked when the definition is saved and again in the pull-request check.

## Decision points: a closed question, a threshold and a record

Where the answer can be enumerated, the step is not an open LLM call: it is a decision point declared in the definition, with the decide and extract primitives.

**Anatomy of a decision point**

| Field | Example |
| --- | --- |
| Question | What is the reason for the dispute? |
| Type | Choice, score, yes or no, or extraction |
| Options | duplicate · not recognized · wrong amount |
| Prior rule | What code resolves before asking |
| Threshold | 0.80 |
| Doubt route | A person or an LLM |
| Model | Pinned; changing it is a PR that measures again |

### Shadow: Decides and records, but doesn’t act

Every decision point is born in this mode.

### Active: Acts once it has evidence

When there are enough labelled cases and the threshold was tuned with them.

### Off: Disabled

The decision point is switched off.

### Decision ledger

Every decision is recorded with its probabilities, the threshold, the model version, the route taken and the human label that arrives later.

### Fail safe

Below the threshold, or if the model doesn’t respond, the flow takes the doubt route. Each decision is a Temporal activity.

## The builder is a coding agent inside a sandbox

1. **Planner** — Reads the definition, finds gaps and asks what is missing, in a session separate from the one that builds.
2. **Builder** — Writes code on its branch until it passes the visible suite. If a test and a rule clash, it exits with a conflict.
3. **Reviewer** — Starts with a clean context and a model from a different family than the builder.

### Engines: Claude Code, Codex and Antigravity

All three pass the same conformance suite.

### Delivery: A pull request, not a black box

The diff, the test report, the assumptions, the open questions and the preview. The build log keeps the engine, model, cost and transcript.

**Build sandbox permissions**

| Resource | Access |
| --- | --- |
| Tests, thresholds and Policy | Read-only |
| Hidden tests | Outside the sandbox |
| Credentials for customer systems | None |
| Network | Only through the gateway |
| Writes | Only on its own branch |

> Without visible tests, or without a verified model key for the builder, the build doesn’t start.

## The agent is the customer’s repository

Khala doesn’t impose a framework. With three pieces, the playground, the evals and deployment all work — and an existing agent joins by adding the manifest.

`agent-disputed-charges/`

```text
agent-disputed-charges/
├─ khala.yaml               manifest
├─ agent/
│  ├─ definition.yaml       logic, written by Khala
│  ├─ agent.py              the agent
│  ├─ invoke.py             standard invocation
│  └─ workflow.py           Temporal workflow
├─ tools/  knowledge/  channels/
├─ evals/
│  ├─ visible.jsonl         visible tests
│  └─ thresholds.yaml       thresholds
├─ overmind.policy.yaml     Policy
├─ tests/                   no network, no keys
└─ .github/workflows/ci.yml lint and tests
```

1. **khala.yaml** (Contract) — Name, risk, framework, tools, knowledge, channels, models, thresholds and environments.
2. **Standard invocation** (Contract) — One JSON in and one JSON out, whatever the framework.
3. **Traces in OpenTelemetry** (Contract) — Agent, model and tool spans, with cost and latency.

> Git works both ways: saving in the console creates a commit, and a push to the main branch enters Khala as a new version. If a file breaks the contract, it is rejected with the reason.

## OverMind verifies separately and returns a Readiness Score

Each gate starts at 100 and every open finding subtracts from it: Critical −25, High −10, Medium −4, Low −1.

| Gate | Weight | What it covers |
| --- | --- | --- |
| Security | 35/100 | Red teaming, permissions and leaks. |
| Business | 30/100 | Hidden and regression tests. |
| Robustness | 20/100 | Load, latency and cost per task. |
| Build | 15/100 | Repository audit. |

### On every pull request: Hidden, regression and basic red teaming

Plus the repository audit. Blocks the merge on a Critical or a clear regression.

### On every promotion: The full suite

Load, full red teaming and cost per task. Returns the score with its four gates.

### Every night: The same suite, the same version

Warns you when the agent degrades without anyone touching the code.

## Four environments, each with its own entry gate

1. **Sandbox** — One per branch, ephemeral. Network denied by default.
2. **Integration** — Receives the release from the sandbox. The step before the pilot.
3. **Pilot** — Entry with green gates and approval from Risk.
4. **Production** — Entry with the suite above its threshold and approval from the case owner.

### Segregation of duties

Whoever built the agent can’t approve its promotion. The server enforces it, not the UI.

### Immutable release

Commit, instructions, model versions, index snapshot, MCP versions, Policy and eval results. Reproducible and reversible in one step.

### Gradual rollout

By percentage, channel or segment. Shadow mode alongside the team. A kill switch per agent and per tool.

> Khala generates the pipelines and the infrastructure as code in the customer’s repository. Argo CD or Flux apply them.

## In production: traces, online evals and evidence

A doubtful trace goes to the review queue; whatever the expert labels joins the suite. Every incident becomes a regression case.

Production trace → Review queue → Test case → Agent suite

### Traces

Agent, model and tool spans in OpenTelemetry, with cost, latency and personal data masked. Exported to your observability stack and SIEM.

### Online evals

Trace sampling with judges, plus user feedback and escalations. They feed alerts and the review queue.

### Nightly diff

OverMind repeats the suite every night on the same version and warns you if the agent degrades with no code change.

### Evidence file

Per release and exportable: code, model, index and MCP versions, eval and red-teaming results, the Policy in force and approvals.

## Control is enforced outside the model

Identity, permissions and logging are deterministic: they don’t depend on what the agent decides.

### Identity: SSO and least privilege

SSO with the customer’s identity provider. Every agent has its own identity, with least privilege.

### Risk level: Inherited from the case

Sets the Policy template, the gates and the approvals.

### Gateway: One entry point

A single point for models, MCP and A2A: allowed models, budgets and personal-data masking.

### Secrets: In your vault

Khala stores the reference, never the value.

### Audit: Tamper-evident

Each entry carries the hash of the previous one, and the database refuses to modify or delete it.

**Permissions by profile**

| Action | FDE | Platform | Business | Risk | Ops |
| --- | --- | --- | --- | --- | --- |
| View cases and agents | ✓ | ✓ | ✓ | ✓ | ✓ |
| Create and change cases | ✓ | ✓ | ✓ | — | — |
| Create agents | ✓ | ✓ | — | — | — |
| Save the definition | ✓ | ✓ | — | — | — |
| Read the audit log | ✓ | ✓ | — | ✓ | — |

```shell
$ khala audit verify
Log intact: 128 entries checked.
```

## Organization standards are inherited and enforced

The organization sets the starting point for every agent; each area changes what the standard’s mode allows; the most specific level wins when the mode permits it.

### Fixed: Nobody below can change it

For example, the allowed providers and models — the gateway only routes to them.

### Default: Changeable within the allowed options

For example, the framework and the builder engine.

### Free: Each level decides

Left to the area or the agent.

**Where standards are applied**

| Component | How |
| --- | --- |
| Builder | Receives them as a blueprint, AGENTS.md and skills |
| Sandbox | Limits the package mirror, base images and network |
| Gateway | Only routes to allowed providers and models |
| OverMind | Checks framework, dependencies, provider and conventions |

> A standard is a file in Git. Changing it is a pull request, which generates the list of affected agents and a migration build per agent, with its tests as the safety net.

## Three ways to deploy the same platform

In all three modes, the agents’ code, the models, the keys and the secrets belong to the customer.

### 01 · SaaS: Operated by Renaiss

We install, upgrade and operate the platform.

### 02 · Your cloud: In your cloud account

The same platform, installed in the customer’s cloud account.

### 03 · On-premise: In your data center

On the customer’s Kubernetes, with no internet egress, signed releases and an SBOM.

### One package

The installation is the same in all three modes; only the configuration changes.

### No external resources

The console is served by the platform itself and loads nothing from the internet.

### Production doesn’t stop

If the control plane goes down, agents in production keep running.

## Khala: questions, answered

### What is Khala?

Khala is a platform by Renaiss for IT teams to build and govern their organization’s AI agents with their own stack. The team defines the logic and the tests, a coding agent (Claude Code, Codex or Antigravity) builds the agent in an isolated sandbox until it passes the visible tests and opens a pull request, and OverMind verifies it separately with hidden tests.

### Who owns the agents built with Khala?

The customer. Every agent is a repository in the customer’s GitHub or GitLab, with readable code, tests and CI, and it imports no Khala library — if the customer leaves the platform, the agent keeps working. Models, keys and secrets also stay with the customer.

### Which models, frameworks and coding agents does Khala support?

Khala is model- and technique-agnostic. Customers use their own provider and keys — for example Amazon Bedrock, Azure OpenAI or Vertex AI — any framework that meets a minimum contract (a khala.yaml manifest, a standard JSON invocation and OpenTelemetry traces), and Claude Code, Codex or Antigravity as the builder.

### How is Khala different from a vendor-managed agent?

A managed agent is built and operated by the vendor on its platform, usually for customer service. Khala is a tool for building and governing your own agents for any process with rules and tests: the code and the tests stay in your repository and cloud, and IT sets the standards and reviews every change.

### How does Khala keep the builder from gaming the tests?

The builder only sees the visible tests in evals/visible.jsonl. Hidden tests live in a store only OverMind can access and never enter the build sandbox; tests and thresholds are read-only, each case gets variants at verification time, and expected values hard-coded in the code are detected.

### How does an agent get to production with Khala?

Through four environments — sandbox, integration, pilot and production — each with its own entry gate. The pilot requires green OverMind gates and approval from Risk; production requires the suite above its threshold and approval from the case owner. Whoever built the agent cannot approve its promotion, and every release is immutable and reversible in one step.

### Can Khala run on-premise without internet access?

Yes. Khala runs as SaaS operated by Renaiss, in the customer’s cloud account, or on the customer’s Kubernetes in their own data center with no internet egress, signed releases and an SBOM. The installation package is the same in all three modes, and agents in production keep running if the control plane goes down.

### What does a Khala pilot require?

A real case with an owner and KPIs in a customer test environment: a process with an owner, volume and measurable KPIs plus an expert who contributes rules and test cases; a GitHub organization for the repositories, the identity provider and a model key; and a customer Kubernetes cluster or a Renaiss instance, depending on the deployment mode.

## What a pilot needs

A real case, with its owner and KPIs, in a customer test environment. With that, the whole path is covered: define, build, verify and deploy.

1. **A case** — A process with an owner, volume and measurable KPIs, and an expert who contributes rules and test cases.
2. **Access** — A GitHub organization for the repositories, the identity provider and a model key.
3. **An environment** — A customer Kubernetes cluster or a Renaiss instance, depending on the deployment mode.

Book a demo: https://www.renaiss.ai/khala#demo
