{"id":28972542,"url":"https://github.com/aldotobing/neurogo","last_synced_at":"2026-04-29T14:05:18.663Z","repository":{"id":298306873,"uuid":"999457199","full_name":"aldotobing/neurogo","owner":"aldotobing","description":"A Universal AI Command Router Built for Maximum Flexibility. NeuroGO is a lightweight, modular AI command router built in Go that routes natural language prompts to AI providers. Think HTTP router, but for AI - route conversational commands to any AI model with a simple, unified interface.","archived":false,"fork":false,"pushed_at":"2025-06-10T11:52:56.000Z","size":1758,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-24T11:06:54.756Z","etag":null,"topics":["ai","aiframework","framework","golang","llm"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aldotobing.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":"2025-06-10T09:24:45.000Z","updated_at":"2025-06-10T11:52:59.000Z","dependencies_parsed_at":"2025-06-10T12:52:07.946Z","dependency_job_id":null,"html_url":"https://github.com/aldotobing/neurogo","commit_stats":null,"previous_names":["aldotobing/neurogo"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aldotobing/neurogo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aldotobing%2Fneurogo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aldotobing%2Fneurogo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aldotobing%2Fneurogo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aldotobing%2Fneurogo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aldotobing","download_url":"https://codeload.github.com/aldotobing/neurogo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aldotobing%2Fneurogo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32428622,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T13:34:34.882Z","status":"ssl_error","status_checked_at":"2026-04-29T13:34:29.830Z","response_time":110,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["ai","aiframework","framework","golang","llm"],"created_at":"2025-06-24T11:06:53.656Z","updated_at":"2026-04-29T14:05:18.644Z","avatar_url":"https://github.com/aldotobing.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NeuroGO\n\n**A Universal AI Command Router Built for Maximum Flexibility**\n\nNeuroGO is a lightweight, modular AI command router built in Go that routes natural language prompts to AI providers. Think HTTP router, but for AI - route conversational commands to any AI model with a simple, unified interface.\n\n## 🌟 Features\n\n- **Provider Agnostic**: Works with OpenAI, Gemini, DeepSeek, HuggingFace, Ollama, and any future AI provider\n- **Zero Lock-in**: Switch between providers without changing application logic\n- **Familiar Patterns**: If you know HTTP routers, you already understand NeuroGO\n- **Flexible Deployment**: Local models, cloud APIs, or hybrid setups\n\n## 🚀 Quick Start\n\n### Local Setup (No API Keys)\n\n```bash\n# Install Ollama for local AI\ncurl -fsSL https://ollama.ai/install.sh | sh\nollama serve \u0026\u0026 ollama pull llama3.1\n\n# Run NeuroGO\ngit clone https://github.com/aldotobing/neurogo.git\ncd neurogo \u0026\u0026 make setup \u0026\u0026 make dev\n\n# Visit http://localhost:8080\n```\n\n### Cloud Setup (With API Keys)\n\n```bash\ngit clone https://github.com/aldotobing/neurogo.git\ncd neurogo \u0026\u0026 make setup\n\n# Configure providers in .env\necho \"OPENAI_API_KEY=sk-your-key\" \u003e\u003e .env\necho \"DEEPSEEK_API_KEY=your-key\" \u003e\u003e .env\n\nmake dev\n```\n\n### Docker\n\n```bash\ngit clone https://github.com/aldotobing/neurogo.git\ncd neurogo \u0026\u0026 cp .env.example .env\nmake docker-run\n```\n\n## 🔄 Provider Management\n\nNeuroGO allows you to switch between AI providers dynamically or let the system auto-select the best provider for each task.\n\n### Available Providers\n\n| Provider | API Key Required | Best For | Status Check |\n|----------|------------------|----------|--------------|\n| **OpenAI** | ✅ OPENAI_API_KEY | General tasks, production | `use openai` |\n| **DeepSeek** | ✅ DEEPSEEK_API_KEY | Reasoning, analysis | `use deepseek` |\n| **Gemini** | ✅ GEMINI_API_KEY | Translation, multimodal | `use gemini` |\n| **Ollama** | ❌ Local setup | Development, privacy | `use ollama` |\n| **HuggingFace** | ✅ HUGGINGFACE_API_KEY | Specialized models | `use huggingface` |\n\n### Provider Switching Commands\n\n#### 1. Switch to Specific Provider\n\n```bash\n# Switch to DeepSeek for all subsequent commands\nPOST /api/process\n{\"prompt\": \"use deepseek\"}\n\n# Switch to OpenAI\n{\"prompt\": \"use openai\"}\n\n# Switch to Gemini  \n{\"prompt\": \"use gemini\"}\n\n# Switch to Ollama (local)\n{\"prompt\": \"use ollama\"}\n```\n\n#### 2. Auto Mode (Recommended)\n\n```bash\n# Let the system choose the best provider for each task\n{\"prompt\": \"use auto\"}\n```\n\n#### 3. One-Time Provider Use\n\n```bash\n# Use DeepSeek for this command only\n{\"prompt\": \"with deepseek explain quantum computing\"}\n\n# Use OpenAI for this command only\n{\"prompt\": \"with openai write a poem about nature\"}\n```\n\n#### 4. Provider Information\n\n```bash\n# List all available providers\n{\"prompt\": \"list providers\"}\n\n# Check current provider\n{\"prompt\": \"current provider\"}\n\n# System status\n{\"prompt\": \"status\"}\n```\n\n### Example Workflow\n\n```bash\n# 1. Check what providers you have\ncurl -X POST http://localhost:8080/api/process \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"prompt\": \"list providers\"}'\n\n# 2. Switch to a specific provider\ncurl -X POST http://localhost:8080/api/process \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"prompt\": \"use deepseek\"}'\n\n# 3. Now all commands use DeepSeek\ncurl -X POST http://localhost:8080/api/process \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"prompt\": \"translate hello to Spanish\"}'\n\n# 4. Compare with another provider\ncurl -X POST http://localhost:8080/api/process \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"prompt\": \"with openai translate hello to Spanish\"}'\n\n# 5. Switch back to auto mode\ncurl -X POST http://localhost:8080/api/process \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"prompt\": \"use auto\"}'\n```\n\n### Provider Selection Logic\n\nWhen in **auto mode**, NeuroGO automatically selects the best provider based on task type:\n\n- **Translation**: Gemini → OpenAI → DeepSeek → Ollama\n- **Reasoning**: DeepSeek → OpenAI → Gemini → Ollama  \n- **Coding**: Ollama → OpenAI → DeepSeek → Gemini\n- **Summarization**: OpenAI → DeepSeek → Gemini → Ollama\n- **General**: OpenAI → DeepSeek → Gemini → Ollama\n\n## 🤖 Supported Providers\n\n| Provider | API Key | Best For | Example Commands |\n|----------|---------|----------|------------------|\n| **OpenAI** | Required | General tasks, production | `summarize [text]` |\n| **DeepSeek** | Required | Reasoning, analysis | `think about [topic]`, `reason through [problem]` |\n| **Gemini** | Required | Translation, multimodal | `translate [text] to [language]` |\n| **HuggingFace** | Required | Specialized models | `analyze sentiment of [text]` |\n| **Ollama** | None (local) | Development, privacy | `chat [message]`, `generate code for [task]` |\n\n## 💻 Usage\n\n### Playground UI\n\nStart server and visit http://localhost:8080 for interactive testing.\n\n### Programmatic Usage\n\n```go\npackage main\n\nimport (\n    \"fmt\"\n    \"log\"\n    \"os\"\n    \"errors\"\n\n    \"github.com/joho/godotenv\"\n    \"github.com/aldotobing/neurogo/router\"\n    \"github.com/aldotobing/neurogo/providers\"\n    \"github.com/aldotobing/neurogo/config\"\n)\n\nfunc main() {\n    // Load environment variables\n    godotenv.Load()\n\n    // Initialize the router\n    r := router.New()\n\n\n    // Configure a provider\n    openAIProvider := providers.NewOpenAI(os.Getenv(\"OPENAI_API_KEY\"))\n    ollamaProvider := providers.NewOllama(os.Getenv(\"OLLAMA_HOST\"))\n\n    // Register a route\n    r.Handle(\"summarize *\", func(ctx *router.Context) error {\n        response, err := openAIProvider.Complete(ctx.Captures[0], config.CompletionOptions{\n            Model: \"gpt-3.5-turbo\",\n            SystemPrompt: \"You are a summarization expert.\",\n        })\n        if err != nil {\n            return err\n        }\n        ctx.Response = response\n        return nil\n    })\n\n    // Process a prompt\n    result, err := r.Process(\"summarize the latest AI research papers\")\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tfmt.Println(result)\n}\n\\`\\`\\`\n\n### REST API\n\\`\\`\\`bash\ncurl -X POST http://localhost:8080/api/process \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"prompt\": \"summarize AI developments\"}'\n\\`\\`\\`\n\n### WebSocket\n\\`\\`\\`javascript\nconst ws = new WebSocket('ws://localhost:8080/ws');\nws.send(JSON.stringify({\n  type: 'process',\n  prompt: 'translate hello to Spanish'\n}));\n\\`\\`\\`\n\n## 🔧 **Configuration**\n\nCreate `.env` file (add only what you have):\n\\`\\`\\`env\n# Local\nOLLAMA_HOST=http://localhost:11434\n\n# Cloud APIs\nOPENAI_API_KEY=sk-your-key\nDEEPSEEK_API_KEY=your-key\nGEMINI_API_KEY=your-key\nHUGGINGFACE_API_KEY=your-key\n\\`\\`\\`\n\n## 🎯 **Routing Patterns**\n\n\\`\\`\\`go\n// Exact match\nr.Handle(\"help\", handler)\n\n// Single capture\nr.Handle(\"summarize *\", handler)\n// Input: \"summarize this article\" → ctx.Captures[0] = \"this article\"\n\n// Multiple captures  \nr.Handle(\"translate * to *\", handler)\n// Input: \"translate hello to Spanish\" → ctx.Captures[0] = \"hello\", ctx.Captures[1] = \"Spanish\"\n\\`\\`\\`\n\n## ➕ **Adding New AI Providers**\n\n### Step 1: Implement Provider Interface\nCreate `providers/newprovider.go`:\n\\`\\`\\`go\npackage providers\n\nimport (\n    \"github.com/aldotobing/neurogo/config\"\n\t\"net/http\"\n\t\"errors\"\n\t\"log\"\n\t\"os\"\n)\n\ntype NewProvider struct {\n    apiKey string\n    client *http.Client\n}\n\nfunc NewNewProvider(apiKey string) *NewProvider {\n    return \u0026NewProvider{\n        apiKey: apiKey,\n        client: \u0026http.Client{},\n    }\n}\n\nfunc (p *NewProvider) Complete(prompt string, options config.CompletionOptions) (string, error) {\n    // 1. Build request to your AI service\n    request := buildRequest(prompt, options)\n    \n    // 2. Make HTTP call\n    response, err := p.client.Do(request)\n    if err != nil {\n        return \"\", err\n    }\n    \n    // 3. Parse and return response\n    return parseResponse(response)\n}\n\nfunc (p *NewProvider) Stream(prompt string, options config.CompletionOptions, callback func(chunk string)) error {\n    // Implement streaming if supported\n    return errors.New(\"streaming not implemented\")\n}\n\nfunc (p *NewProvider) IsAvailable() bool {\n    return p.apiKey != \"\"\n}\n\nfunc (p *NewProvider) GetName() string {\n    return \"NewProvider\"\n}\n\\`\\`\\`\n\n### Step 2: Register Provider\nAdd to `cmd/server/main.go` in `setupProviders()` function:\n\\`\\`\\`go\nfunc setupProviders(r *router.Router) {\n    // ... existing providers ...\n    \n    // Add your new provider\n    if apiKey := os.Getenv(\"NEWPROVIDER_API_KEY\"); apiKey != \"\" {\n        newProvider := providers.NewNewProvider(apiKey)\n        if newProvider.IsAvailable() {\n            log.Println(\"✅ NewProvider configured\")\n            \n            r.Handle(\"your command pattern *\", func(ctx *router.Context) error {\n                response, err := newProvider.Complete(ctx.Captures[0], config.CompletionOptions{\n                    Model: \"your-model-name\",\n                })\n                if err != nil {\n                    return err\n                }\n                ctx.Response = response\n                return nil\n            })\n        }\n    }\n}\n\\`\\`\\`\n\n### Step 3: Update Environment\nAdd to `.env.example`:\n\\`\\`\\`env\n# New Provider Configuration\nNEWPROVIDER_API_KEY=your_new_provider_api_key_here\n\\`\\`\\`\n\n### Step 4: Update Documentation\nAdd to the provider table in README and help command.\n\n**That's it!** Your new provider is now integrated with automatic detection, health checks, and routing.\n\n## 🛠️ **Development**\n\n\\`\\`\\`bash\nmake help          # Show all commands\nmake setup         # Setup environment\nmake dev           # Run with hot reload\nmake test          # Run tests\nmake build         # Build binary\nmake docker-run    # Run with Docker\n\\`\\`\\`\n\n## 🏗️ **Project Structure**\n\n\\`\\`\\`\nneurogo/\n├── cmd/server/          # Server entry point\n├── providers/           # AI provider implementations ← Add new providers here\n```\n.\n├── router/              # Core routing logic\n├── config/             # Configuration management\n├── server/             # HTTP/WebSocket server\n├── web/                # Playground UI\n└── Makefile            # Build automation\n```\n\\`\\`\\`\n\n## 📚 **Examples**\n\n### Multi-Provider Routing\n\\`\\`\\`go\n// Use different providers for different tasks\nr.Handle(\"summarize *\", openAIHandler)      // OpenAI for summaries\nr.Handle(\"reason through *\", deepSeekHandler) // DeepSeek for reasoning\nr.Handle(\"translate * to *\", geminiHandler)   // Gemini for translation\nr.Handle(\"chat *\", ollamaHandler)            // Ollama for general chat\n\\`\\`\\`\n\n### Provider Fallbacks\n\\`\\`\\`go\nr.Handle(\"ask *\", func(ctx *router.Context) error {\n    // Try providers in order of preference\n    if openAI.IsAvailable() {\n        return openAI.Complete(ctx.Captures[0], options)\n    }\n    if ollama.IsAvailable() {\n        return ollama.Complete(ctx.Captures[0], options)\n    }\n    return errors.New(\"no providers available\")\n})\n\\`\\`\\`\n\n## 🐳 **Docker Support**\n\n\\`\\`\\`yaml\n# docker-compose.yml\nversion: '3.8'\nservices:\n  neurogo:\n    build: .\n    ports:\n      - \"8080:8080\"\n    environment:\n      - OPENAI_API_KEY=${OPENAI_API_KEY}\n      - DEEPSEEK_API_KEY=${DEEPSEEK_API_KEY}\n    depends_on:\n      - ollama\n  \n  ollama:\n    image: ollama/ollama:latest\n    ports:\n      - \"11434:11434\"\n\\`\\`\\`\n\n## 🤝 **Contributing**\n\n1. Fork the repository\n2. Create feature branch (`git checkout -b feature/new-provider`)\n3. Add provider implementation in `providers/`\n4. Register in `cmd/server/main.go`\n5. Add tests and documentation\n6. Submit pull request\n\n## 📄 **License**\n\nMIT License - see LICENSE file for details.\n\n## 🆘 **Support**\n\n- 📖 **Documentation**: Check code examples and comments\n- 🐛 **Issues**: Report bugs on GitHub Issues  \n- 💬 **Discussions**: Use GitHub Discussions for questions\n\n---\n\n**Built with ❤️ by [aldotobing](https://github.com/aldotobing)**\n\n*NeuroGO: Where Natural Language Meets Intelligent Routing*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faldotobing%2Fneurogo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faldotobing%2Fneurogo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faldotobing%2Fneurogo/lists"}