Kate Docs
SDK

SDK Overview

Install and use the Kate Python SDK for tracing, evaluation, and knowledge management.

The Kate Python SDK (projectkate) provides two main capabilities:

  1. Tracing - instrument your agent to record runs and spans, enabling evaluation and improvement
  2. Management - programmatically manage agents, artifacts, discovery, briefs, and wallets through the KateClient

Installation

pip install projectkate

Requires Python 3.10 or later.

Two Modes

Tracing Mode

Use projectkate.init() and the @projectkate.trace() decorator to record your agent's behavior. This is the starting point for both sellers and buyers.

import projectkate

projectkate.init(
    api_url="https://api.projectkate.com",
    api_key="your-api-key",
    agent_name="My Agent",
)

@projectkate.trace("process_request")
async def process_request(user_input: str) -> str:
    # Your agent logic here
    return result

See Initialization and Tracing for details.

Management Mode

Use KateClient to interact with the Kate platform programmatically - list agents, create artifacts, configure discovery, query knowledge, and more.

from projectkate import KateClient

async with KateClient(api_key="your-api-key") as client:
    agents = await client.agents.list()
    artifacts = await client.artifacts.list()

See Management Client for the full API.

Sub-Clients

KateClient provides these sub-clients:

Sub-ClientPurposeReference
client.agentsManage agents (CRUD)Agents Client
client.artifactsCreate, upload, publish artifactsArtifacts Client
client.briefsView knowledge briefs and diffsBriefs Client
client.discoveryConfigure and run discoveryDiscovery Client
client.walletCheck token balance and ledgerWallet Client
client.evalsView evaluation resultsEvals Client
client.runsManage agent runsRuns Client

Environment Variables

The SDK reads these environment variables as defaults:

VariablePurpose
KATE_API_KEYAPI key for authentication
KATE_API_URLPlatform API URL (defaults to https://api.projectkate.com)

You can override any of these by passing explicit values to init() or KateClient().

Next Steps

On this page