{"id":26236254,"url":"https://github.com/graniet/kheish","last_synced_at":"2025-10-29T02:09:42.191Z","repository":{"id":267590015,"uuid":"901720337","full_name":"graniet/kheish","owner":"graniet","description":"Kheish: A multi-role LLM agent for tasks like code auditing, file searching, and more seamlessly leveraging RAG and extensible modules.","archived":false,"fork":false,"pushed_at":"2024-12-28T11:22:26.000Z","size":3735,"stargazers_count":141,"open_issues_count":0,"forks_count":12,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-07-15T13:28:32.070Z","etag":null,"topics":["agent","ai","ai-agent","ai-agents","anthropic","llm","modules","multi-agent","openai","orchestration","rag"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/graniet.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}},"created_at":"2024-12-11T07:30:19.000Z","updated_at":"2025-07-03T13:21:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"9e2f3b51-134a-4147-b3c9-bcca4e5f6f19","html_url":"https://github.com/graniet/kheish","commit_stats":null,"previous_names":["graniet/kheish"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/graniet/kheish","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graniet%2Fkheish","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graniet%2Fkheish/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graniet%2Fkheish/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graniet%2Fkheish/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/graniet","download_url":"https://codeload.github.com/graniet/kheish/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graniet%2Fkheish/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281544195,"owners_count":26519554,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-29T02:00:06.901Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["agent","ai","ai-agent","ai-agents","anthropic","llm","modules","multi-agent","openai","orchestration","rag"],"created_at":"2025-03-13T03:29:16.816Z","updated_at":"2025-10-29T02:09:42.176Z","avatar_url":"https://github.com/graniet.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kheish\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"docs/logo.png\" alt=\"Kheish Logo\" width=\"250\"\u003e\n\u003c/p\u003e\n\n**Kheish** 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.\n\n## Highlights of Kheish as an **Agent**\n\n- **Adaptive Role Switching**  \n  Kheish functions as a single agent with multiple internal roles:\n  - **Proposer**: Generates or updates proposals based on user input and context.  \n  - **Reviewer**: Critically evaluates proposals, identifying flaws or requesting improvements.  \n  - **Validator**: Final gatekeeper ensuring correctness and completeness.  \n  - **Formatter**: Takes a validated solution and converts it into a final presentation format (Markdown, etc.).  \n  These roles can be enabled or disabled depending on the task definition in your YAML file.\n\n- **On-Demand Module Requests**  \n  As an agent, Kheish can spontaneously invoke modules if it needs more information or functionality. Modules include:  \n  - **Filesystem (`fs`)**: Reading files chunk by chunk, indexing them in RAG.  \n  - **Shell (`sh`)**: Running limited shell commands with sandboxed allowances.  \n  - **RAG (`rag`)**: Storing and retrieving large amounts of text via embeddings, enabling chunk-based queries.  \n  - **SSH (`ssh`)**: Secure remote commands.  \n  - **Memories (`memories`)**: Storing or recalling data outside the immediate LLM context (long-term memory).\n\n- **Feedback \u0026 Iteration**  \n  In many tasks, Kheish re-checks and revises its own proposals. For example:\n  1. **Proposer** suggests a solution.\n  2. **Reviewer** critiques and possibly requests changes.\n  3. **Proposer** refines based on feedback.\n  4. **Validator** delivers final approval or requests more fixes.  \n  This iterative approach provides an agent that grows the solution’s quality step by step.\n\n- **Retrieval-Augmented Generation (RAG)**  \n  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.\n\n- **Single Agent, Many Tasks**  \n  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.\n\n## Example Tasks\n\n| Task Name | Description |\n|-----------|-------------|\n| `audit-code` | A thorough security audit of a codebase, identifying potential vulnerabilities via multi-step agent roles. |\n| `hf-secret-finder` | Requests the Hugging Face API, clones the repositories, and uses `trufflehog` (via the `sh` module) to detect secrets. |\n| `find-in-file` | Searches for a secret across multiple files, chunk-reading them with `fs`. |\n| `weather-blog-post` | Fetches live weather data (via `web` or a custom module) and writes a humorous blog post about it. |\n\n## How Kheish Works\n\n1. **Reads a YAML Configuration**  \n   Includes the agent roles, modules, the workflow of steps, and final output instructions.\n2. **Builds an Agent**  \n   Kheish loads the roles (Proposer, Reviewer, etc.) and hooks in the modules for possible requests.  \n3. **Executes Steps Internally**  \n   The agent:\n   - Gathers context (files, text).\n   - Generates or refines a solution (`Proposer`).\n   - Seeks feedback (`Reviewer`) if needed.\n   - Validates correctness (`Validator`).\n   - Formats the final result (`Formatter`).\n4. **Optional RAG Integration**  \n   If large data is encountered, the agent chunk-indexes it into a vector store, retrieving relevant pieces via semantic queries.\n5. **API Integration**\n   Kheish provides a REST API that allows:\n   - Task submission and monitoring\n   - Real-time status updates\n   - Result retrieval\n   - Module execution control\n6. **Output**  \n   Once validated, Kheish saves or exports the final solution. If further feedback is provided, it can loop back into revision mode automatically.\n\n## Installation \u0026 Usage\n\n1. **Clone the Repository**  \n   ```bash\n   git clone https://github.com/yourusername/kheish.git\n   cd kheish\n   ```\n2. **Install Dependencies**  \n   - Rust toolchain (latest stable).  \n   - `OPENAI_API_KEY` or other relevant environment variables for your chosen LLM provider.\n3. **Build**  \n   ```bash\n   cargo build --release\n   ```\n4. **Run a Task**  \n   ```bash\n   ./target/release/kheish --task-config examples/tasks/audit-code.yaml\n   ```\n\n## Contributing\n\nContributions to Kheish are welcome! Feel free to open issues or submit pull requests on [GitHub](https://github.com/graniet/kheish).\n\n## License\n\nLicensed under [Apache 2.0](LICENSE).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraniet%2Fkheish","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgraniet%2Fkheish","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraniet%2Fkheish/lists"}