{"id":50879443,"url":"https://github.com/muxi-ai/muxi-ruby","last_synced_at":"2026-06-15T12:30:46.354Z","repository":{"id":339650795,"uuid":"1113383937","full_name":"muxi-ai/muxi-ruby","owner":"muxi-ai","description":"Official MUXI SDK for Ruby","archived":false,"fork":false,"pushed_at":"2026-04-08T21:30:26.000Z","size":67,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"develop","last_synced_at":"2026-04-08T23:17:33.204Z","etag":null,"topics":["ai","ai-agents","muxi","ruby","sdk"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/muxi-ai.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":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-09T22:49:19.000Z","updated_at":"2026-04-08T21:30:31.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/muxi-ai/muxi-ruby","commit_stats":null,"previous_names":["muxi-ai/muxi-ruby"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/muxi-ai/muxi-ruby","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muxi-ai%2Fmuxi-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muxi-ai%2Fmuxi-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muxi-ai%2Fmuxi-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muxi-ai%2Fmuxi-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/muxi-ai","download_url":"https://codeload.github.com/muxi-ai/muxi-ruby/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muxi-ai%2Fmuxi-ruby/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34276760,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-13T02:00:06.617Z","response_time":62,"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":["ai","ai-agents","muxi","ruby","sdk"],"created_at":"2026-06-15T12:30:45.489Z","updated_at":"2026-06-15T12:30:46.341Z","avatar_url":"https://github.com/muxi-ai.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MUXI Ruby SDK\n\nOfficial Ruby SDK for [MUXI](https://muxi.org) — infrastructure for AI agents.\n\n**Highlights**\n- Pure Ruby with stdlib only (no external dependencies)\n- Built-in retries, idempotency, and typed errors\n- Streaming helpers for chat/audio and deploy/log tails\n\n\u003e Need deeper usage notes? See the [User Guide](https://github.com/muxi-ai/muxi-ruby/blob/main/USER_GUIDE.md) for streaming, retries, and auth details.\n\n## Installation\n\nAdd to your Gemfile:\n\n```ruby\ngem 'muxi'\n```\n\nOr install directly:\n\n```bash\ngem install muxi\n```\n\n## Quick Start\n\n### Server Management (Control Plane)\n\n```ruby\nrequire 'muxi'\n\n# Create a server client for managing formations\nserver = Muxi::ServerClient.new(\n  url: ENV['MUXI_SERVER_URL'],\n  key_id: ENV['MUXI_KEY_ID'],\n  secret_key: ENV['MUXI_SECRET_KEY']\n)\n\n# List formations\nformations = server.list_formations\nformations['formations'].each do |f|\n  puts \"#{f['id']}: #{f['status']}\"\nend\n\n# Get server status\nstatus = server.status\nputs \"Uptime: #{status['uptime']}s\"\n```\n\n### Formation Usage (Runtime API)\n\n```ruby\nrequire 'muxi'\n\n# Create a formation client\nclient = Muxi::FormationClient.new(\n  formation_id: 'my-bot',\n  server_url: ENV['MUXI_SERVER_URL'],\n  admin_key: ENV['MUXI_ADMIN_KEY'],\n  client_key: ENV['MUXI_CLIENT_KEY']\n)\n\n# Or connect directly to a formation\nclient = Muxi::FormationClient.new(\n  url: 'http://localhost:8001',\n  admin_key: ENV['MUXI_ADMIN_KEY'],\n  client_key: ENV['MUXI_CLIENT_KEY']\n)\n\n# Chat (non-streaming)\nresponse = client.chat({ message: 'Hello!' }, user_id: 'user123')\nputs response['message']\n\n# Chat (streaming)\nclient.chat_stream({ message: 'Tell me a story' }, user_id: 'user123') do |event|\n  data = JSON.parse(event['data']) rescue event['data']\n  print data['text'] if data.is_a?(Hash) \u0026\u0026 data['text']\nend\n\n# Health check\nhealth = client.health\nputs \"Status: #{health['status']}\"\n```\n\n## Webhook Verification\n\n```ruby\nrequire 'muxi'\n\n# In your webhook handler (e.g., Rails controller)\ndef webhook\n  payload = request.raw_post\n  signature = request.headers['X-Muxi-Signature']\n  \n  unless Muxi::Webhook.verify_signature(payload, signature, ENV['WEBHOOK_SECRET'])\n    render json: { error: 'Invalid signature' }, status: 401\n    return\n  end\n  \n  event = Muxi::Webhook.parse(payload)\n  \n  case event.status\n  when 'completed'\n    event.content.each do |item|\n      puts item.text if item.type == 'text'\n    end\n  when 'failed'\n    puts \"Error: #{event.error.message}\"\n  when 'awaiting_clarification'\n    puts \"Question: #{event.clarification.question}\"\n  end\n  \n  render json: { received: true }\nend\n```\n\n## Configuration\n\n### Environment Variables\n\n- `MUXI_DEBUG=1` - Enable debug logging\n\n### Client Options\n\n```ruby\nMuxi::ServerClient.new(\n  url: 'https://muxi.example.com:7890',\n  key_id: 'your-key-id',\n  secret_key: 'your-secret-key',\n  timeout: 30,        # Request timeout in seconds\n  max_retries: 3,     # Retry on 429/5xx errors\n  debug: true         # Enable debug logging\n)\n```\n\n## Error Handling\n\n```ruby\nbegin\n  server.get_formation('nonexistent')\nrescue Muxi::NotFoundError =\u003e e\n  puts \"Not found: #{e.message}\"\nrescue Muxi::AuthenticationError =\u003e e\n  puts \"Auth failed: #{e.message}\"\nrescue Muxi::RateLimitError =\u003e e\n  puts \"Rate limited. Retry after: #{e.retry_after}s\"\nrescue Muxi::MuxiError =\u003e e\n  puts \"Error: #{e.message} (#{e.status_code})\"\nend\n```\n\n## Requirements\n\n- Ruby 3.0+\n- No external dependencies (uses stdlib only)\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuxi-ai%2Fmuxi-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmuxi-ai%2Fmuxi-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuxi-ai%2Fmuxi-ruby/lists"}