Skip to main content

KATE SDK — auto-eval, observability, and knowledge marketplace for AI agents

Project description

PyPI License Python

KATE SDK

Auto-eval, observability, and knowledge marketplace for AI agents. Trace every LLM call, run evaluations, discover and use marketplace tools, and catch regressions before they ship.

Install

pip install projectkate

Optional instrumentation extras

pip install projectkate[openai]                # OpenAI
pip install projectkate[anthropic-instrument]  # Anthropic
pip install projectkate[langchain]             # LangChain / LangGraph
pip install projectkate[mistral]               # Mistral
pip install projectkate[vertexai]              # Vertex AI
pip install projectkate[google-genai]          # Google GenAI
pip install projectkate[crewai]                # CrewAI
pip install projectkate[all]                   # All supported providers

Quick Start

Trace mode — instrument your agent

import projectkate
from openai import AsyncOpenAI

# Initialize — reads KATE_API_URL and KATE_API_KEY from env
projectkate.init(
    agent_name="News Summarizer",
    agent_objective="Summarize news articles concisely",
    agent_domain="content",
)

client = AsyncOpenAI()

@projectkate.trace("summarize")
async def summarize(text: str) -> str:
    response = await client.chat.completions.create(
        model="gpt-4o",
        messages=[{"role": "user", "content": f"Summarize: {text}"}],
    )
    return response.choices[0].message.content

async with projectkate.run():
    result = await summarize("Today's top news stories...")
    print(result)

Management client — programmatic platform access

from projectkate import KateClient

async with KateClient(api_key="kate_...") as kate:
    # List your agents
    agents = await kate.agents.list()

    # Check eval results for a run
    evals = await kate.evals.get_run_evals(run_id="...")

    # Publish an artifact
    await kate.artifacts.publish(artifact_id="...")

    # Check wallet balance
    balance = await kate.wallet.get_balance()

Tools — discover and use marketplace tools

KATE agents can discover and execute tools from the marketplace. The SDK provides a tool loop that handles the LLM ↔ tool-call cycle automatically.

Agentic tool loop

Wire up your LLM client and let the SDK handle tool discovery, execution, and chaining:

import projectkate
from openai import AsyncOpenAI

projectkate.init()
llm = AsyncOpenAI()

messages = [
    {"role": "system", "content": "You are a helpful assistant with access to tools."},
    {"role": "user", "content": "Find SEO keywords for 'AI observability'"},
]

result = await projectkate.tool_loop(
    llm,
    model="gpt-4o",
    messages=messages,
    max_rounds=10,
)

print(result.content)          # Final LLM response
print(result.tool_calls_made)  # Number of tool calls executed

Works with both OpenAI and Anthropic clients — the SDK detects the provider automatically.

Local tools

You can register your own tools alongside marketplace tools. The SDK merges them and routes calls to the right handler:

from projectkate import LocalTool

def get_current_date() -> str:
    from datetime import date
    return date.today().isoformat()

result = await projectkate.tool_loop(
    llm,
    model="gpt-4o",
    messages=messages,
    local_tools=[
        LocalTool(
            name="get_current_date",
            description="Returns today's date in ISO format",
            parameters={"type": "object", "properties": {}},
            fn=get_current_date,
        ),
    ],
)

Local tools run in-process. Async functions are supported.

Direct tool management

Use the management client for lower-level control:

async with KateClient(api_key="kate_...") as kate:
    # List tools available to your agent
    tools = await kate.tools.list(agent_id="...")

    # Execute a specific tool
    result = await kate.tools.execute(
        agent_id="...",
        tool_name="seo_keyword_research",
        input_data={"query": "AI observability"},
    )
    print(result.output)

    # Check credential status for subscribed tools
    statuses = await kate.tools.status(agent_id="...")

Local Eval (no server needed)

Run evaluations locally against your agent with zero infrastructure:

from projectkate.local import LocalEvalRunner

runner = LocalEvalRunner(agent_fn=my_agent)
results = await runner.run(test_cases=[
    {"input": "Summarize the news", "expected": "A concise summary..."},
])
runner.print_results(results)

Documentation

  • Docs — guides, API reference, and examples

License

Apache 2.0 — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

projectkate-0.3.2.tar.gz (43.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

projectkate-0.3.2-py3-none-any.whl (42.6 kB view details)

Uploaded Python 3

File details

Details for the file projectkate-0.3.2.tar.gz.

File metadata

  • Download URL: projectkate-0.3.2.tar.gz
  • Upload date:
  • Size: 43.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.5

File hashes

Hashes for projectkate-0.3.2.tar.gz
Algorithm Hash digest
SHA256 71a1d0cd9423cbf16907b28a920e7f242584c0774ebb7811fbb5276e701469d3
MD5 cef0086da93376e12cf2e5910efe270b
BLAKE2b-256 10af1120e4ed187a8ce6b04cd8f8edf77dacb1a78d46ace24478c3d1c5421b14

See more details on using hashes here.

File details

Details for the file projectkate-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: projectkate-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 42.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.8.5

File hashes

Hashes for projectkate-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ebc5e7422529b39151d947ea57ec822858be0f60550d6b93f8ed79755bf30f2d
MD5 8bcccf85405d41058f6023bffb8c5b01
BLAKE2b-256 d4383b8bf599915e702378d05ee98db90231b60f79c41ce52be3dc5ddb134116

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page