Package: instrukt
>_⚡  InstruktTerminal AI Commander at your fingertipscoding assistant exampleCheckoutdemosfor more examples.NOTE: This is a work in progress, expect bugs and api changes.IntroductionInstrukt is a terminal-based AI integrated environment. It offers a platform where users can::robot: Create and instruct modular AI agents:card_file_box: Generate document indexes for question-answering:toolbox: Create and attach tools to any agentAgents are simpledrop-in Python packagesthat can be extended, shared with others, attached to tools and augmented with document indexes.Instruct them in natural language and, for safety, run them inside secure containers (currently implemented with Docker) to perform tasks in their dedicated, sandboxed space :shield:.Built with:Langchain,Textual,ChromaConsulting Services: Need help with Langchain or AI integration ? You can reach out to me atcontact@blob42.xyzTOCUsageFeaturesSupported PlatformsLLM ModelsDocument Indexes and Question-AnsweringRoadmapContributingPatreonSocialVisionLicenseUsageQuickstartpip install instrukt[all]exportOPENAI_API_KEYwith your OpenAI API key.runinstruktIf the color scheme is broken, exportTERM=xterm-256colorA configuration file will be created at:~/.config/instrukt/instrukt.ymlYou can run instrukt on headless server such or a docker container with CUDA support.NOTE: if you are starting with a bare container, you need at least g++ and libmagic.Check thequickstartandinstallguide for more details.From source:Make sure the latest version ofpoetryis installed.Set your virtualenvClone the repositoryRunpoetry install -E all --with dev,testThis will install Instrukt including extra tools for agents.See the installation guide for more detailsDefault Agents:Coding AI: A coding assistant. Create indexes over any code base and attach it to the agent to do RAG (Retrieval Augmented Generation)Chat Q&A: A simple conversational agent.Features:computer: Keyboard and Mouse Terminal Interface:A terminal-based interface for power keyboard users to instruct AI agents without ever
leaving the keyboard.Richcolorful agent outputs with markdown and
source code support thanks to theTextualTUI
library.Run Instrukt on bare metal or docker containers with CUDA support.Remote access with SSH and terminal multiplexers.:robot: Custom AI Agents:Designcustom agentsand tools.Agents are simple python packages can be shared and loaded by other users.:books: Chat with code and documents:Index your data and let agents retrieve it for question-answering.Create and organize your indexes with an easy UI.Index creation willauto detect programming languagesand optimize the splitting/chunking
strategy accordingly.Fuzzy select (fzf, dmenu ...) source documents that were used for retrievalctrl+p:wrench: Tools:Use the pre-defined toolset or design your own tools.Attach or detach tools to agents on-the-go, tailoring your AI workflows to your needs.:zap: Prompt Console :Integrated REPL-Prompt for quick interaction with agents, and a fast feedback loop for development and testing.Automate repetitive tasks with custom commands.Builtin prompt/chat history.Usevim,emacsor any external$EDITORto edit messages.:bird: LangChain:Leverage the LangChain ecosystem to automate anything.WIP: Extensible API for integrating with other frameworks.:shield: Secure Containers:Run agents inside secure docker containers for safety and privacy.UsegVisorruntime for a full isolation of the agent.note: The docker agent is only available toPatreonsupporters as an early preview.:microscope: Developer Console:Debug and introspect agents using an in-built IPython console.ctrl+dDocument Indexes and Question-AnsweringIndexes can be  created using OpenAI or local embeddings models.Chromafor managing indexes.Create and manage indexes using theIndex ManagementUI (pressI)Indexing a directory will auto detect programming languages and use an appropriate
splitting strategy optimized for the target language.Indexes can be attached to any agent as aretrievaltool using theindexmenu
in the top of the agent's window.Agents can use attached indexes for question-answering.Supported platforms:Linux/Mac.Windows tested under WSL2.LLM ModelsCurrently onlyOpenAIsupported.Using private local models is thenext milestone.Roadmapprivate local LLM modelsLocal embeddingsHF SetenceTransformers supported embeddings.Instructor Embeddingsuse text-generation-webui APIemulatePrivateGPTuse self hostedgo-skynet/LocalAIIndexing and embeddingsIndex directories and auto detect content. ( seeAutoDirLoader)Detect programming languages and use the appropriate splitter.Load a git repository from URLLoad any webpage / website.DocumentationCreating agentsCreating toolsIndexing and chat with documents and source code.Example use casesTutorials.ContributingAny contribution, feedback and PR is welcome !You can help with:Testing and creating Issues for bugs or features that would be useful.If you have technical skills, you are welcome to create a PR.If you don't have technical skills you can help with documentation, adding examples
and tutorials or create new user stories.PatreonBy becoming a patron, you will help me continue committing time to the development of Instrukt and bring to life all the planned features. Check out thePatreon pagefor more details on the rewards for early supporters.SocialJoin theDiscordserver to keep updated on the progress or ask for help.VisionAI should be accessible to everyone and not a walled garden for big corporations and SaaS services.Instrukt is a modest contribution to create tools that empower users without compromising their freedoms. The short-term goal is to make it usable with minimal reliance on external APIs and services, giving users the choice to opt for local models and self-hosted services.LicenseCopyright (c) 2023 Chakib Ben Ziane. All Rights Reserved.Instrukt is licensed with a AGPL license, in short this means that it can be used by anyone for any purpose. However, if you decide to make a publicly available instance your users are entitled to a copy of the source code including all modifications that you have made (which needs to be available trough an interface such as a button on your website), you may also not distribute this project in a form that does not contain the source code (Such as compiling / encrypting the code and distributing this version without also distributing the source code that includes the changes that you made. You are allowed to distribute this in a closed form if you also provide a separate archive with the source code.).