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.2.tar.gz (86.3 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.2-py3-none-any.whl (42.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: krim_sdk-0.4.2.tar.gz
  • Upload date:
  • Size: 86.3 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.2.tar.gz
Algorithm Hash digest
SHA256 2d13ded84df2afe8bca1eaa21d684991c6912f1a2228ff220905a384d7c141bf
MD5 9ceafe4c1199b89cacc9557e003bd2d8
BLAKE2b-256 c84cd739468f4f2dade947bda86595e21337be406b8349b68ef7d231803dfc25

See more details on using hashes here.

File details

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

File metadata

  • Download URL: krim_sdk-0.4.2-py3-none-any.whl
  • Upload date:
  • Size: 42.1 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 45db74932a72c8134477607fd80903a54cf2def85fbeccf8d9f403f03cfe18b7
MD5 27bed7949761020280214e2221744f44
BLAKE2b-256 2b74944321f43e3a000800e59a11a3610d7a2db111346b3eab0e0f01d6ba320b

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