Semantic Kernel Ready to Use Plugins
A collection of tools and plugins for Semantic Kernel Framework that enhances AI applications with Python code execution, web search capabilities, and detailed logging.
🚀 Overview
Semantic Kernel Tools provides a set of powerful plugins for the Semantic Kernel Framework:
- Python Code Generator: Generate and execute Python code safely based on natural language requests
- Web Search Plugin: Integrate Tavily search API for web search capabilities
- SK Logger: Enhanced logging with colorful output and detailed tracking
✨ Features
- Python Code Generation and Execution: Generate robust Python code and execute it in a controlled environment
- Web Search Integration: Search the web using Tavily API
- Enhanced Logging: Track AI operations with detailed, colorful logs
- Extensible Architecture: Easily customize or extend functionality
📋 Requirements
- Python 3.10+
- Semantic Kernel 1.0.0+
📥 Installation
pip install semantic-kernel-plugins
🚀 Quick Start
import asyncio
import logging
import os
from dotenv import load_dotenv
from semantic_kernel import Kernel
from semantic_kernel.connectors.ai.bedrock import BedrockChatCompletion
from semantic_kernel.connectors.ai.bedrock.bedrock_prompt_execution_settings import \
BedrockChatPromptExecutionSettings
from semantic_kernel.connectors.ai.function_choice_behavior import \
FunctionChoiceBehavior
from semantic_kernel.contents.chat_history import ChatHistory
from semantic_kernel.utils.logging import setup_logging
from semantic_kernel_plugins.plugins.python.python_code_generator import \
PythonCodeGeneratorPlugin
from semantic_kernel_plugins.plugins.web.tavily_web_search import \
TavilySearchPlugin
async def main():
kernel = Kernel()
chat_completion = BedrockChatCompletion(
model_id=os.getenv("ANTHROPIC_MODEL_ID"),
)
kernel.add_service(chat_completion)
setup_logging()
logging.getLogger("kernel").setLevel(logging.INFO)
## Ready to use plugins - Tavily Web Search
kernel.add_plugin(
TavilySearchPlugin(os.getenv("TAVILY_API_KEY")),
plugin_name="TavilyWebSearch",
)
## Ready to use plugins - Python Code Generator
execution_settings = BedrockChatPromptExecutionSettings(
max_tokens=4096,
temperature=0.5,
)
execution_settings.function_choice_behavior = FunctionChoiceBehavior.Auto()
python_generator = PythonCodeGeneratorPlugin(
chat_service=chat_completion, execution_settings=execution_settings
)
kernel.add_plugin(python_generator, plugin_name="PythonCodeGenerator")
history = ChatHistory()
userInput = "<Your Request>"
history.add_user_message(userInput)
result = await chat_completion.get_chat_message_content(
chat_history=history,
settings=execution_settings,
kernel=kernel,
)
print("\033[1m\033[34mAssistant > \033[0m" + str(result))
history.add_message(result)
if __name__ == "__main__":
asyncio.run(main())
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
Built with ❤️ for AI developers working with Semantic Kernel.
Metadata
Release files for semantic-kernel-plugins 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| semantic_kernel_plugins-0.1.1.tar.gz | 3.4 kB | Without provenance | Details for semantic_kernel_plugins-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| semantic_kernel_plugins-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for semantic_kernel_plugins-0.1.1-py3-none-any.whl |
Total release size: 6.6 kB
Release files / semantic_kernel_plugins-0.1.1.tar.gz
| Download URL | semantic_kernel_plugins-0.1.1.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
821af41ff1ad59a0af5d523fc8029e4c047ca839b6203c0ed79b43c675f9b91d
|
|
BLAKE2b-256 checksum How to use checksums |
6d368c3fa450d4a29ea72304a21daef415e009192050faef0ac0029a1ed5a484
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.1
|
Release files / semantic_kernel_plugins-0.1.1-py3-none-any.whl
| Download URL | semantic_kernel_plugins-0.1.1-py3-none-any.whl |
|---|---|
| Size | 3.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
90fec5122cef0e7a51cfd5f1f1674db46131675c364787e1101d055e47789e86
|
|
BLAKE2b-256 checksum How to use checksums |
c91c9d8f5d5a9ade4be99fda3e632de1cd9d1cd9b88e4d6155828c8540eb1fc1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.1
|
Security for semantic-kernel-plugins 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.