by graniet
Kheish: A multi-role LLM agent for tasks like code auditing, file searching, and more seamlessly leveraging RAG and extensible modules.
# Add to your Claude Code skills
git clone https://github.com/graniet/kheishKheish is an open-source, multi-role agent designed for complex tasks that require structured, step-by-step collaboration with Large Language Models (LLMs). Rather than a simple orchestrator, Kheish itself acts as an intelligent agent that can request modules on demand, integrate user feedback, switch between specialized roles (Proposer, Reviewer, Validator, Formatter, etc.), and ultimately deliver a refined result. By harnessing multiple “sub-agents” (roles) within one framework, Kheish tackles tasks like security audits, file searches, RAG-based exploration, and more.
Adaptive Role Switching
Kheish functions as a single agent with multiple internal roles:
On-Demand Module Requests
As an agent, Kheish can spontaneously invoke modules if it needs more information or functionality. Modules include:
fs): Reading files chunk by chunk, indexing them in RAG.sh): Running limited shell commands with sandboxed allowances.No comments yet. Be the first to share your thoughts!
rag)ssh): Secure remote commands.memories): Storing or recalling data outside the immediate LLM context (long-term memory).Feedback & Iteration
In many tasks, Kheish re-checks and revises its own proposals. For example:
Retrieval-Augmented Generation (RAG)
For large codebases or multi-file contexts, Kheish indexes data in a vector store. It can retrieve relevant snippets later without stuffing the entire text into a single LLM prompt. This agent-based RAG integration reduces token usage and scales to bigger projects.
Single Agent, Many Tasks
Kheish can handle parallel or serial tasks by defining separate YAML configurations or combining them into a single multi-step scenario. Each role or module request is orchestrated internally by Kheish’s logic—no external orchestrator needed.
| Task Name | Description |
|-----------|-------------|
| audit-code | A thorough security audit of a codebase, identifying potential vulnerabilities via multi-step agent roles. |
| hf-secret-finder | Requests the Hugging Face API, clones the repositories, and uses trufflehog (via the sh module) to detect secrets. |
| find-in-file | Searches for a secret across multiple files, chunk-reading them with fs. |
| weather-blog-post | Fetches live weather data (via web or a custom module) and writes a humorous blog post about it. |
Proposer).Reviewer) if needed.Validator).Formatter).git clone https://github.com/yourusername/kheish.git
cd kheish
OPENAI_API_KEY or other relevant environment variables for your chosen LLM provider.cargo build --release
./target/release/kheish --task-config examples/tasks/audit-code.yaml
Contributions to Kheish are welcome! Feel free to open issues or submit pull requests on GitHub.
Licensed under Apache 2.0.