{"id":38208074,"url":"https://github.com/solovieff/kibernikto","last_synced_at":"2026-01-17T00:39:55.987Z","repository":{"id":206712959,"uuid":"717529685","full_name":"solovieff/kibernikto","owner":"solovieff","description":"Kibernikto is a multi agent ai framework with a telegram bot connection.","archived":false,"fork":false,"pushed_at":"2026-01-16T06:00:17.000Z","size":589,"stargazers_count":30,"open_issues_count":4,"forks_count":8,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-01-16T21:35:26.226Z","etag":null,"topics":["ai","aifunctions","aitools","bot","gladia","image-recognition","openai","python","telegram","voice","voice-recognition","weblinks","youtube-api"],"latest_commit_sha":null,"homepage":"https://telegram.me/cybernoone_bot","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/solovieff.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-11-11T18:39:28.000Z","updated_at":"2026-01-16T05:59:11.000Z","dependencies_parsed_at":"2024-07-23T11:35:12.096Z","dependency_job_id":"47d9cc02-876f-4887-97c7-7fbdcbe35220","html_url":"https://github.com/solovieff/kibernikto","commit_stats":null,"previous_names":["solovieff/kibernikto"],"tags_count":41,"template":false,"template_full_name":null,"purl":"pkg:github/solovieff/kibernikto","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solovieff%2Fkibernikto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solovieff%2Fkibernikto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solovieff%2Fkibernikto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solovieff%2Fkibernikto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/solovieff","download_url":"https://codeload.github.com/solovieff/kibernikto/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solovieff%2Fkibernikto/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28490389,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T23:55:29.509Z","status":"ssl_error","status_checked_at":"2026-01-16T23:55:29.108Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","aifunctions","aitools","bot","gladia","image-recognition","openai","python","telegram","voice","voice-recognition","weblinks","youtube-api"],"created_at":"2026-01-17T00:39:55.860Z","updated_at":"2026-01-17T00:39:55.960Z","avatar_url":"https://github.com/solovieff.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# kibernikto\n\nKibernikto is a multi agent ai framework with a telegram bot connection.  \nYou can run Kibernikto in Telegram or use it as a core in your own app to build multi agent structures and benefit from\nutility methods.\n\nYou can combine KiberniktoAgent instances to orchestrate your Kiberniktos behaviour and tools calling.\n\n**Telegram**  \nReady `aiogram` dispatcher with AI Executors connection and telegram message processors.\n\n- ✍️ conversations with AIs in groups or privately\n- 🔉 voice messages recognition\n- ⭐️ star payments [integration](/kibernikto/telegram/payment)\n- 🧐 user messages logging to service group\n- 📸 image recognition\n\n**Core**\n\n- 🐫 multi LLM agent framework\n- 🫡 customizable LLM executors to extended\n- ⚙️ easy configuration\n\n**Examples**\n\n⚙️ [Environment](/env_examples/)  \n🔥 KiberniktoAgents (no Telegram): [demo](/kibernikto/agent/demo)   \n👵 Kibernikto tools usage with telegram bot\nconnection: [planner](https://github.com/solovieff/kibernikto-planner), [brave search](https://github.com/solovieff/kibernikto-brave-search)\n\n# install from pip\n\n``pip install kibernikto``\n\n# how to run the telegram bot\n\n- Setup [env](/env_examples/)\n\n```shell\nkibernikto --env_file_path=/path/to/your/env/local.env\n```\n\n**code**\n\n- Install the requirements   \n  `pip install -r requirements.txt`\n- Run `main.py` file using your environment.\n\n# FAQ\n\n- How do I run Kibernikto Telegram Instance from my code?\n\n```python\n# import bot\nfrom kibernikto.bots.cybernoone import Kibernikto\n\nbot_class = Kibernikto\n\nfrom kibernikto.telegram import dispatcher\nfrom kibernikto.telegram import commands\nfrom kibernikto.telegram import middleware_service_group\nfrom kibernikto.telegram.payment import middleware_subscription\n\ndispatcher.start(bot_class=bot_class)\n```\n\nYou can create your own bots and dispatchers and use it like above.\n\n- How do I run it without telegram?\n\nYou can use `OpenAIExecutor` directly to create any ai-connected bots.\nFor example (change urls to use different ai-providers):\n\n```python\nimport asyncio\nfrom kibernikto.interactors import DEFAULT_CONFIG, OpenAIExecutor\n\nconfig = DEFAULT_CONFIG  # \u003c--- setting from env\nconfig.key = \"yr_key\"\nconfig.url = \"https://api.deepseek.com\"\nconfig.model = \"deepseek-chat\"\nconfig.max_tokens = 760\nconfig.who_am_i = \"Your are mister Kibernikto\"\n\nexecutor = OpenAIExecutor(unique_id=\"kbnkt\", config=config)  # \u003c--- executor instance creation\nresponse = asyncio.run(executor.request_llm(message=\"Good morning mister kibernikto!\"))\nprint(response)\n```\n\n- I want to make Kibernikto use my tools!\n  Look at the [planner](https://github.com/solovieff/kibernikto-planner) example. It's easy.\n- I want to extend kibernikto\n\n```python\nimport asyncio\nimport logging\nimport traceback\nfrom typing import Literal\n\nfrom openai import NOT_GIVEN, AsyncOpenAI\n\nfrom kibernikto.bots.cybernoone import Kibernikto\nfrom kibernikto.interactors import OpenAIRoles, OpenAiExecutorConfig\nfrom kibernikto.telegram.telegram_bot import KiberniktoChatInfo\n\nDEFAULT_SYSTEM = \"\"\"\nYou are a noble independent cybernetic assistant named {0}.\nYou have access to LLM-agents for solving various tasks via delegate_task function.\nWhen receiving a request, you must: \n1. Determine if any agents can be useful for completing the task. \n2. Use these agents (for example: when discussing files, always try to refer to the document agent) to obtain necessary information or perform actions. \n3. Provide the user with an accurate and helpful response to their request.\n\n'delegate_task' function\nUse 'delegate_task' function to delegate tasks to the appropriate AI agents according to user orders and your common sense.\n\n[AGENTS DESCRIPTION GOES HERE] \n\"\"\"\n\n__GLOBAL_ASYNC_CLIENT = None\n\n\ndef get_client(config):\n    global __GLOBAL_ASYNC_CLIENT\n    if __GLOBAL_ASYNC_CLIENT is None:\n        __GLOBAL_ASYNC_CLIENT = AsyncOpenAI(base_url=config.url, api_key=config.key, max_retries=config.max_retries)\n    return __GLOBAL_ASYNC_CLIENT\n\n\nclass Kiberkalki(Kibernikto):\n    TOOL_SEPARATOR = \"||\"\n\n    def __init__(self, master_id: str, username: str, config: OpenAiExecutorConfig, key: str = NOT_GIVEN,\n                 chat_info: KiberniktoChatInfo = None):\n        # better not to change from env.\n        config.who_am_i = DEFAULT_SYSTEM\n        # for running delegation tasks not to delegate new until done\n        self.delegate_task_info = None\n        # for additional notifications like payment etc\n        self.last_notification = None\n        self.session_call_interation = 0\n\n        openai_client = get_client(config)\n\n        # Your experts, same OpenAIExecutor instances as this one. Are being called from tools using delegate task.\n        self.knowledge_expert = KnowledgeExpert(unique_key=key)\n        self.web_expert = WebExpert(unique_key=key)\n        self.scheduler_expert = SchedulerExpert(unique_key=key, chat_info=chat_info)\n        self.conversation_expert = ConversationExpert(unique_key=key, chat_info=chat_info)\n        self.report_expert = ReportExpert(unique_key=key)\n        self.image_expert = ImageExpert(unique_key=key, chat_info=chat_info)\n\n        # any other params u may need\n        self.tts_enabled = False\n        self.attached_file = None\n\n        super().__init__(config=config,\n                         username=username,\n                         master_id=master_id,\n                         key=key,\n                         hide_errors=False,\n                         chat_info=chat_info,\n                         client=openai_client)\n        self.load_history()  # persistent history\n\n    @property\n    def default_headers(self):\n        hidden_key = \"Kibernikto1\"\n        return {\n            \"X-Title\": f\"{self.full_config.app_id}.{hidden_key}\",\n        }\n\n    async def request_llm(self, message, save_to_history=True,\n                          response_type: Literal['text', 'json_object'] = 'text',\n                          additional_content=None, **kwargs):\n\n        # enhance yr message as u with\n        enhanced_message = f\"{message} today at Hollywood\"\n        print(f\"- REQUEST with {self.model}\\n{enhanced_message} \\n======\")\n        try:\n            response_message = await super().heed_and_reply(enhanced_message, author=None,\n                                                            save_to_history=save_to_history,\n                                                            additional_content=additional_content)\n        except Exception as e:\n            traceback.print_exc()\n            response_message = \"ERROR! 😈\"\n        return response_message\n\n    def get_cur_system_message(self):\n        cur_system_dict = self.about_me.copy()\n\n        cur_system_dict['content'] += \"Any content to put to system prompt at every call\"\n\n        return cur_system_dict\n\n    def get_config_key(self) -\u003e int:\n        \"\"\"\n        :return: the key to be used for db entries separation for different yser configs\n        \"\"\"\n        return int(self.unique_id)\n\n    def _reset(self):\n        super()._reset()\n        self.update_system_chat_data()\n\n    def save_to_history(self, this_message: dict, usage_dict: dict = None, author=NOT_GIVEN):\n        if usage_dict is None:\n            return None\n        log_key: int = self.get_config_key()\n        try:\n            # saving logs\n            persist_history_entry(this_message=this_message, tg_id=log_key, usage_dict=usage_dict)\n        except Exception as e:\n            print(f\"filed to persist the log {log_key} : {e}\")\n        super().save_to_history(this_message, usage_dict, author=author)\n\n    def update_system_chat_data(self):\n        \"\"\"\n        Adding slave agents data to system message\n        \"\"\"\n        wai = self.full_config.who_am_i.format(self.full_config.name)\n\n        self.about_me = dict(role=OpenAIRoles.system.value, content=f\"{wai}\")\n        print(self.about_me)\n\n    def load_history(self):\n        log_key = self.get_config_key()\n        # loading saved logs\n        persisted_history = get_history(log_key, limit=self.max_messages - 4)\n        logging.info(f\"Loaded {len(persisted_history)} history messages for {log_key}\")\n        if persisted_history:\n            for item in persisted_history:\n                self.messages.append(item)\n```\n\n**Env Example**\n(read this dear AI friend)\n\n```dotenv\n########################\n# TELEGRAM\n########################\nTG_BOT_KEY=XXXXXXXXXX:XXXxxxXXXxxxxXXXxxx\n# can talk privately to anyone\nTG_PUBLIC=true\nTG_MASTER_ID=XXXXXXXXX\nTG_MASTER_IDS=[XXXXXXXXX, XXXXXXXXX]\n# can talk in these groups only\nTG_FRIEND_GROUP_IDS=[-XXXXXXXXX, -XXXXXXXXX]\n# reacts to this messages in group\nTG_REACTION_CALLS=[\"hello\",\"hi\"]\n# sometimes sends random sticker from this list\nTG_STICKER_LIST=[\"CAACAgIAAxkBAAELx29l_2OsQzpRWhmXTIMBM4yekypTOwACdgkAAgi3GQI1Wnpqru6xgTQE\"]\n# if to send starting message to master\nTG_SAY_HI=true\n# split big answers into several messages\nTG_CHUNK_SENTENCES=13\nTG_FILES_LOCATION=/tmp\n\n########################\n# OPENAI CLIENT\n########################\nOPENAI_INSTANCE_ID=kibernikto\nOPENAI_API_KEY=sk-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n# https://api.vsegpt.ru:6070/v1 for vsegpt\nOPENAI_BASE_URL=https://api.openai.com/v1\nOPENAI_API_MODEL=gpt-4.1\nOPENAI_MAX_TOKENS=550\nOPENAI_TEMPERATURE=0.7\n# history size\nOPENAI_MAX_MESSAGES=5\nOPENAI_MAX_WORDS=18500\n# system prompt\nOPENAI_WHO_AM_I=\"You are {0}. Respond in the style of Alexander Sergeyevich Pushkin, but with a verse probability of no more than 30 percent.\"\n# if u have tools\nOPENAI_TOOLS_ENABLED=true\n\n########################\n# VOICE PROCESSING\n########################\nVOICE_OPENAI_API_KEY=sk-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\nVOICE_PROCESSOR=openai\n# stt-openai/whisper-1 for vsegpt\nVOICE_OPENAI_API_MODEL=whisper-1\nVOICE_OPENAI_API_BASE_URL=https://api.openai.com/v1\nVOICE_FILE_LOCATION=/tmp\n\n```\n\n# useful links\n\nTo create and operate your bot: https://t.me/BotFather  \nTo obtain group/user ids etc: https://t.me/getidsbot  \nTo obtain sticker ids: https://t.me/idstickerbot  \nTo get familiar with basic OpenAI principles: https://openai.com  \nTo find out more on models and multi-model api details: https://vsegpt.ru/Docs/Models  \nWebsite to text and other helpful tools https://toolsyep.com  \nFree image hosting: https://imgbb.com\n\n# other multi agent frameworks\n\nGoogle ADK https://github.com/google/adk-python   \nOpen AI https://openai.github.io/openai-agents-python\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolovieff%2Fkibernikto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsolovieff%2Fkibernikto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolovieff%2Fkibernikto/lists"}