https://github.com/dbpunk-labs/octogen
Octogen is an Open-Source Code Interpreter Agent Framework
https://github.com/dbpunk-labs/octogen
chatgpt codeinterpreter codellama docker terminal
Last synced: about 1 year ago
JSON representation
Octogen is an Open-Source Code Interpreter Agent Framework
- Host: GitHub
- URL: https://github.com/dbpunk-labs/octogen
- Owner: dbpunk-labs
- Created: 2023-09-08T16:38:49.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-05T17:02:26.000Z (over 1 year ago)
- Last Synced: 2025-03-28T17:11:19.549Z (about 1 year ago)
- Topics: chatgpt, codeinterpreter, codellama, docker, terminal
- Language: Python
- Homepage: https://octogen.dev
- Size: 1.62 MB
- Stars: 255
- Watchers: 6
- Forks: 18
- Open Issues: 28
-
Metadata Files:
- Readme: README.md
- License: LICENSES/Elastic-2.0.txt
Awesome Lists containing this project
- awesome-cli-agents - dbpunk-labs/octogen - Octogen is an Open-Source Code Interpreter Agent Framework [Terminal] (257โญ) (๐ AI Tools for Vim, Neovim, and Terminal)
README


[](https://pypi.org/project/og-chat/)

[](https://app.gitter.im/#/room/#octogen:gitter.im)
[ไธญๆ](./README_zh_cn.md)
> ## Octogen
> an open-source code interpreter
> ไธๆฌพๅผๆบๅฏๆฌๅฐ้จ็ฝฒ็ไปฃ็ ่งฃ้ๅจ
## News
* 2023-10-24 ๐ Octogen [v0.5.0](https://github.com/dbpunk-labs/octogen/discussions) has been released ๐
https://github.com/dbpunk-labs/octogen/assets/8623385/7445cc4d-567e-4d1a-bedc-b5b566329c41
|Supported OSs|Supported Interpreters|Supported Dev Enviroment|
|----|-----|-----|
|

|
|

|
## Getting Started
Requirement
* python 3.10 and above
* pip
* [docker](https://www.docker.com/products/docker-desktop/) 24.0.0 and above, or [podman](https://podman.io/)
> To deploy Octogen, the user needs permission to run Docker commands.
> To use codellama, your host must have at least 8 CPUs and 16 GB of RAM.
Install the octogen on your local computer
1. Install og_up
```bash
pip install og_up
```
2. Set up the Octogen service
```
og_up
```
You have the following options to select
* OpenAI , recommanded for daily use
* Azure OpenAI
* CodeLlama,
* Octogen agent services powered by GPT4 and Codellama 34B
The default is using docker as container engine. use podman with flag `--use_podman`
3. Execute the command `og`, you will see the following output
```
Welcome to use octogenโค๏ธ . To ask a programming question, simply type your question and press esc + enter
You can use /help to look for help
[1]๐ง>
```
## Development
Prepare the environment
```
git clone https://github.com/dbpunk-labs/octogen.git
cd octogen
python3 -m venv octogen_venv
source octogen_venv/bin/activate
pip install -r requirements.txt
```
Run the sandbox including Agent with mock model and Kernel
```
$ bash start_sandbox.sh
$ og
Welcome to use octogenโค๏ธ . To ask a programming question, simply type your question and press esc +
enter
Use /help for help
[1]๐ง>hello
โญโ ๐Octogen โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โ
โ 0 ๐ง how can I help you today? โ
โ โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
[2]๐ง>
```
* To use openai for development, just update the config in the `start_sandbox.sh` with the example of [openai-env.example](./env_sample/openai_env.sample)
* To use azure openai for development, just update the config in the `start_sandbox.sh` with the example of [azure-env.example](./env_sample/azure_env.sample)
* To use codellama for development, just update the config in the `start_sandbox.sh` with the example of [codellama-env.example](./env_sample/codellama_env.sample)
## Supported API Service
|name|type|status| installation|
|----|-----|----------------|---|
|[Openai GPT 3.5/4](https://openai.com/product#made-for-developers) |LLM| โ
fully supported|use `og_up` then choose the `OpenAI`|
|[Azure Openai GPT 3.5/4](https://azure.microsoft.com/en-us/products/ai-services/openai-service) |LLM| โ
fully supported|use `og_up` then choose the `Azure OpenAI`|
|[LLama.cpp Server](https://github.com/ggerganov/llama.cpp/tree/master/examples/server) |LLM| โ๏ธ supported | use `og_up` then choose the `CodeLlama` |
|[Octopus Agent Service](https://octogen.dev) |Code Interpreter| โ
supported | apply api key from [octogen.dev](https://www.octogen.dev/) then use `og_up` then choose the `Octogen` |
## The internal of local deployment

* Octogen Kernel: The code execution engine, based on notebook kernels.
* Octogen Agent: Manages client requests, uses ReAct to process complex tasks, and stores user-assembled applications.
* Octogen Terminal Cli: Accepts user requests, sends them to the Agent, and renders rich results. Currently supports Discord, iTerm2, and Kitty terminals.
## Features
* Automatically execute AI-generated code in a Docker environment.
* Experiment feature, render images in iTerm2 and kitty.
* Upload files with the `/up` command and you can use it in your prompt
* Experiment feature, assemble code blocks into an application and you can run the code directly by `/run` command
* Support copying output to the clipboard with `/cc` command
* Support prompt histories stored in the octopus cli
if you have any feature suggestion. please create a discuession to talk about it
## Roadmap
* [roadmap for v0.5.0](https://github.com/dbpunk-labs/octogen/issues/64)