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.0.tar.gz (34.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.0-py3-none-any.whl (41.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: krim_sdk-0.4.0.tar.gz
  • Upload date:
  • Size: 34.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.0.tar.gz
Algorithm Hash digest
SHA256 30ff6de450218834794dbd0cc606bd8633ccf177f967d9f2ee0f37aa79f0f2d3
MD5 53c9fe29851b884abc0e0c2ac76a773e
BLAKE2b-256 cde34e54ee435fce55d2ed855bca82635b5721a0b0c96db02dd1e4c5a08634e3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: krim_sdk-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 41.7 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7fac5b009cc64fdc77adf4c904d87148298ca8bb9866ec0e6878a2209931629d
MD5 18e35100d6df958cc6fc0a96c9dc7ce1
BLAKE2b-256 86870a8a890752535978770986b4946da4830e7267ef2dd9ee98a439ed7b0a28

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