Skip to content

Kneo Agent Client

A typed Python SDK and adapter toolkit for the Kneo Agent Platform.

kneo-client is the shared client layer that powers Kneo Agent Studio (development) and Kneo Agent Dashboard (operations). It owns the operational semantics of talking to a Kneo Agent Platform instance — auth, profiles, retries, idempotency, pagination, request IDs, and consistent error normalization — so downstream UIs do not each reinvent them.

Architecture

Three layers:

  1. kneo_client._generated — low-level client generated from kneo_serv's openapi.json via openapi-python-client. Covers the stable /v1 API. Treated as a private module.
  2. kneo_client.core — handwritten cross-cutting client: auth (Bearer / X-Kneo-Api-Key), profile resolution, httpx-based transport, retry / backoff / timeout policy, idempotency-key support, request-ID propagation, pagination helpers, normalized errors, and redaction-aware logging.
  3. Domain adapters:
    • kneo_client.platform — operational surface for the dashboard: health, runs, traces, checkpoints, replay, human tasks, audit, credentials, policies.
    • kneo_client.agent — development surface for the studio: spec validate / compile / explain / run / policy-report.

The public entry point is a unified KneoClient exposing .platform and .agent namespaces:

from kneo_client import KneoClient

async with KneoClient(profile="default") as client:
    run = await client.platform.runs.create(...)
    report = await client.agent.specs.policy_report(...)

A synchronous facade is provided for callers that do not run in an event loop.

Install

pip install kneo-client

Scope

In scope: anything required to talk to the Kneo Agent Platform /v1 API safely and consistently.

Out of scope: business-logic redefinition of the platform; n8n / Dify / other workflow import/conversion (that belongs in Kneo Agent Studio as a development-domain library).