Skip to main content

KRIM Agent SDK - programmable coding agent core

Project description

KRIM SDK

Programmable coding agent core. Build custom AI agents with ease.

Installation

pip install krim-sdk

Quick Start

from krim_sdk import Agent, AgentOptions
from krim_sdk.models import ClaudeModel
from krim_sdk.tools import default_tools

# Create agent
agent = Agent(
    model=ClaudeModel(),
    provider="claude",
    system_prompt="You are a helpful coding assistant.",
    tools=default_tools(),
)

# Run
result = agent.run("Hello!")
print(agent.last_response)

Custom Tools

from krim_sdk import Tool

class MyTool(Tool):
    name = "my_tool"
    description = "Does something useful"
    parameters = {
        "input": {"type": "string", "description": "Input data"},
    }

    def run(self, input: str) -> str:
        return f"Processed: {input}"

Event Handling

from krim_sdk import Agent, EventHandler

class MyHandler(EventHandler):
    def on_stream(self, text: str) -> None:
        print(text, end="", flush=True)

    def on_tool_start(self, name: str, args: dict) -> None:
        print(f"\nRunning {name}...")

agent = Agent(
    model=model,
    system_prompt=prompt,
    tools=tools,
    event_handler=MyHandler(),
)

License

MIT

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

krim_sdk-0.4.3.tar.gz (36.8 kB view details)

Uploaded Source

Built Distribution

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

krim_sdk-0.4.3-py3-none-any.whl (42.5 kB view details)

Uploaded Python 3

File details

Details for the file krim_sdk-0.4.3.tar.gz.

File metadata

  • Download URL: krim_sdk-0.4.3.tar.gz
  • Upload date:
  • Size: 36.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for krim_sdk-0.4.3.tar.gz
Algorithm Hash digest
SHA256 ddab4db939763081197295369273eda3db2e2560d6a37c0ebf18917868794eca
MD5 263872bf53237b0a557649cfdebd0666
BLAKE2b-256 43f70d4b838f8cf65759b5866c0381f58d5e405fa659dc64a8f26463cab65d4e

See more details on using hashes here.

File details

Details for the file krim_sdk-0.4.3-py3-none-any.whl.

File metadata

  • Download URL: krim_sdk-0.4.3-py3-none-any.whl
  • Upload date:
  • Size: 42.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.9 {"installer":{"name":"uv","version":"0.9.9"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for krim_sdk-0.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 722a336837ef73c51706e3192d7f8281d2d5a7e2aa571ef508a71a9a0dd5c8c4
MD5 a566716c7355e201309f373b4bdd31b5
BLAKE2b-256 ebde0bf4ff07633ff6932387535f455c84ef17ea787fc3acc5a9722e0189122c

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