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
Supported model backends:
- Claude
- OpenAI
- OpenRouter
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)
OpenRouter Example
from krim_sdk import Agent
from krim_sdk.models import OpenRouterModel
from krim_sdk.tools import default_tools
agent = Agent(
model=OpenRouterModel("minimax/minimax-m2.5"),
provider="openrouter",
system_prompt="You are a helpful coding assistant.",
tools=default_tools(),
)
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.7.tar.gz
(39.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
krim_sdk-0.4.7-py3-none-any.whl
(44.3 kB
view details)
File details
Details for the file krim_sdk-0.4.7.tar.gz.
File metadata
- Download URL: krim_sdk-0.4.7.tar.gz
- Upload date:
- Size: 39.7 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d330f1551fd32869f0f2ada47bfddb7d8d213bb0e2f08e1cc57b40404a35c49
|
|
| MD5 |
6386e21e11776529782f7c2c4720c64e
|
|
| BLAKE2b-256 |
d2ce917ab43447560082c00d3782e258fd7f13008bd0e615311ba3c9138d6b86
|
File details
Details for the file krim_sdk-0.4.7-py3-none-any.whl.
File metadata
- Download URL: krim_sdk-0.4.7-py3-none-any.whl
- Upload date:
- Size: 44.3 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
90bec769b9b44b3fc7e309925d5936cf9e5e4646f60cb7166a2b82b3646c0b82
|
|
| MD5 |
9712c84f440650bfe3c7ccf1c223bcdf
|
|
| BLAKE2b-256 |
00076c00b65a1e7bd2b112a1a0e5b1418ec78e2eefbd858b5c2ada8f20d52417
|