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.1.tar.gz (35.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.1-py3-none-any.whl (42.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: krim_sdk-0.4.1.tar.gz
  • Upload date:
  • Size: 35.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for krim_sdk-0.4.1.tar.gz
Algorithm Hash digest
SHA256 317be49d3b3d65016da4dda641c07cc6092d658f1b995eb392d5e63095a13dbb
MD5 19816b4d97ffca7eb6011687952e2286
BLAKE2b-256 91046c6afb8bdf6f9c7f79c3bee7dd4d69a7f5d1cddd87807540c28060402846

See more details on using hashes here.

File details

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

File metadata

  • Download URL: krim_sdk-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 42.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.11

File hashes

Hashes for krim_sdk-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d712c37c3ea5190983fdb5a315fc0937e20ec355f4139f7a4116a0ab7b03dd0f
MD5 f14502f6cd6e39a0ca67b68e34079afa
BLAKE2b-256 9f619cb9678c26010dd17cceb70960fa61d2c505129d88a4d406d7fca6862a3e

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