{"id":23267036,"url":"https://github.com/johnnybui/okos","last_synced_at":"2025-08-20T18:30:25.674Z","repository":{"id":268101225,"uuid":"903316947","full_name":"johnnybui/okos","owner":"johnnybui","description":"Okos is a Telegram AI Assistant built with TypeScript, LangGraph, and multiple AI model providers. It maintains conversation context and provides summaries of interactions.","archived":false,"fork":false,"pushed_at":"2025-01-28T11:54:16.000Z","size":196,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-28T12:36:41.456Z","etag":null,"topics":["ai","chat-bot","chatbot","gemini","groq","langchain","langchain-js","langgraph","langgraph-js","langsmith","okos","ollama","openai","rag","rag-chatbot","redis","search-api","telegram-bot","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/johnnybui.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2024-12-14T09:39:46.000Z","updated_at":"2025-01-28T11:54:20.000Z","dependencies_parsed_at":"2025-01-05T08:17:02.938Z","dependency_job_id":"bbeaeb89-974d-4171-9391-2be98a129ba9","html_url":"https://github.com/johnnybui/okos","commit_stats":{"total_commits":33,"total_committers":1,"mean_commits":33.0,"dds":0.0,"last_synced_commit":"1fac2e2572fbce61d5d9ae264ecb2ce8c4d54108"},"previous_names":["johnnybui/okos"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnnybui%2Fokos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnnybui%2Fokos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnnybui%2Fokos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnnybui%2Fokos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johnnybui","download_url":"https://codeload.github.com/johnnybui/okos/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238482428,"owners_count":19479839,"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","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","chat-bot","chatbot","gemini","groq","langchain","langchain-js","langgraph","langgraph-js","langsmith","okos","ollama","openai","rag","rag-chatbot","redis","search-api","telegram-bot","typescript"],"created_at":"2024-12-19T16:47:22.908Z","updated_at":"2025-02-12T13:46:30.182Z","avatar_url":"https://github.com/johnnybui.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Okos - AI Telegram Assistant\n\n[![Build](https://github.com/johnnybui/okos/actions/workflows/build.yml/badge.svg)](https://github.com/johnnybui/okos/actions/workflows/build.yml)\n\nOkos is a Telegram AI Assistant built with TypeScript, LangGraph, and multiple AI model providers. It maintains conversation context and provides summaries of interactions.\n\n## Features\n\n- Multiple AI model support (OpenAI, Google Gemini, Groq, Ollama)\n- Conversation context management\n- Automatic conversation summarization\n- Multiple Images input support\n- Internet searching\n- Redis for state persistence\n- Docker support for both local and cloud deployments\n\n## Prerequisites\n\n- Bun 1.2 (for development only)\n- Docker and Docker Compose (for containerized deployment)\n- Telegram Bot Token from [BotFather](https://t.me/botfather)\n- API keys for chosen AI providers\n- Redis server\n- Ollama with Llama model installed (for Ollama model provider)\n\n## Prebuilt Docker Image\n\n```\nghcr.io/johnnybui/okos\n```\n\nPlatforms: `amd64` and `arm64`\n\n## Setup\n\n1. Clone the repository\n2. Install dependencies:\n\n```bash\nbun install\n```\n\n3. Copy the example environment file:\n\n```bash\n# For local development\ncp .env.example .env\n\n# For Docker deployment\ncp .env.docker.example .env.docker\n```\n\n4. Configure environment variables in `.env` or `.env.docker`:\n\n- `TELEGRAM_BOT_TOKEN`: Your Telegram bot token\n- `MODEL_PROVIDER`: Choose from 'ollama', 'google', 'groq', or 'openai'\n- Provider-specific API keys and model names\n- Redis URL\n- (Optional) LangSmith credentials for monitoring\n\n## Running Locally\n\nDevelopment mode with hot reload:\n\n```bash\nbun dev\n```\n\nProduction mode:\n\n```bash\nbun run build\nbun start\n```\n\n## Docker Deployment\n\nYou can deploy using one of two options:\n\n### 1. Local Deployment with Ollama\n\nFor local LLM inference:\n\n1. **Build Containers** (optional):  \n   Use the command below to build the containers. Alternatively, to use a prebuilt image, edit the `docker-compose` file, replacing the `build: .` line with:\n   ```yaml\n   image: ghcr.io/johnnybui/okos\n   ```\n   Run build:\n   ```bash\n   bun build:ollama\n   ```\n2. **Start Services**:\n   ```bash\n   bun up:ollama\n   ```\n\n### 2. Cloud Deployment\n\nFor cloud-based AI providers (OpenAI, Google, Groq):\n\n1. **Build Containers** (optional):  \n   Similar to local deployment, replace `build: .` in the `docker-compose` file with the prebuilt image if desired:\n   ```yaml\n   image: ghcr.io/johnnybui/okos\n   ```\n   Run build:\n   ```bash\n   bun build:cloud\n   ```\n2. **Start Services**:\n   ```bash\n   bun up:cloud\n   ```\n\n## Environment Variables\n\n### Required\n\n- `TELEGRAM_BOT_TOKEN`: Telegram Bot token\n- `MODEL_PROVIDER`: AI model provider ('ollama', 'google', 'groq', or 'openai')\n- `SEARCH_PROVIDER`: Search provider ('tavily' or 'brave')\n- `TAVILY_API_KEY`: Tavily API key for internet searching\n- `BRAVE_SEARCH_API_KEY`: Brave Search API key for internet searching\n- `REDIS_URL`: Redis connection URL\n\n### Provider-Specific\n\n- OpenAI:\n  - `OPENAI_API_KEY`\n  - `OPENAI_MODEL_NAME` (default: gpt-4o-mini)\n- Google:\n  - `GOOGLE_API_KEY`\n  - `GOOGLE_MODEL_NAME` (default: gemini-1.5-flash)\n- Groq:\n  - `GROQ_API_KEY`\n  - `GROQ_MODEL_NAME` (default: llama-3.3-70b-versatile)\n- Ollama:\n  - `OLLAMA_API_URL`\n  - `OLLAMA_MODEL_NAME` (default: llama3.2)\n\n### Optional\n\n- `LANGCHAIN_TRACING_V2`: Enable LangSmith tracing\n- `LANGCHAIN_ENDPOINT`: LangSmith endpoint\n- `LANGCHAIN_API_KEY`: LangSmith API key\n- `LANGCHAIN_PROJECT`: LangSmith project name\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnnybui%2Fokos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnnybui%2Fokos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnnybui%2Fokos/lists"}