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.4.tar.gz (37.2 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.4-py3-none-any.whl (42.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: krim_sdk-0.4.4.tar.gz
  • Upload date:
  • Size: 37.2 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.4.tar.gz
Algorithm Hash digest
SHA256 302be26e475173e5d3dcc9f1aa2e49101694fff80c90cdf8b32847b5dc6a52c3
MD5 91cb9b5d882f749818f8cdd258006f60
BLAKE2b-256 4eb7734d134884e4a143f471f2dc636dadba7c39f3ddf007ddf80f9ab8b032b9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: krim_sdk-0.4.4-py3-none-any.whl
  • Upload date:
  • Size: 42.7 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 a548aebdfb79e105765cf1b4d48d65be48ef53239bce08934854dfd151720545
MD5 c7fb818352bb229b18453ef204c2a1e0
BLAKE2b-256 bc1c27fdeae886c5f526d96664af8a7673a0aeafa9fd677e12aeb4ca3c0d921e

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