{"id":13862821,"url":"https://github.com/icebaker/nano-bots-api","last_synced_at":"2025-09-17T07:31:22.940Z","repository":{"id":166203144,"uuid":"641665075","full_name":"icebaker/nano-bots-api","owner":"icebaker","description":"HTTP API for Nano Bots: small, AI-powered bots that can be easily shared as a single file, designed to support multiple providers such as Cohere Command, Google Gemini, Maritaca AI MariTalk, Mistral AI, Ollama, OpenAI ChatGPT, and others, with support for calling tools (functions).","archived":false,"fork":false,"pushed_at":"2024-06-23T22:06:10.000Z","size":102,"stargazers_count":18,"open_issues_count":1,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-08T21:03:53.914Z","etag":null,"topics":["alpaca","chatgpt","gemini","gemini-pro","google-ai","google-gemini","google-vertex-ai","gpt","gpt-4","llama","llm","maritaca-ai","mistral-ai","nano-bots","ollama","ollama-api","openai","openai-api","vicuna"],"latest_commit_sha":null,"homepage":"https://api.nbots.io","language":"Ruby","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/icebaker.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}},"created_at":"2023-05-16T23:12:01.000Z","updated_at":"2025-03-08T00:42:31.000Z","dependencies_parsed_at":"2023-12-29T22:16:49.337Z","dependency_job_id":"af27e6e8-5ebc-45cc-a4d7-238934d76012","html_url":"https://github.com/icebaker/nano-bots-api","commit_stats":{"total_commits":59,"total_committers":1,"mean_commits":59.0,"dds":0.0,"last_synced_commit":"87140d8b93fd267bc4a9b9c48ff3e8e593afe2c8"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/icebaker/nano-bots-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icebaker%2Fnano-bots-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icebaker%2Fnano-bots-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icebaker%2Fnano-bots-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icebaker%2Fnano-bots-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/icebaker","download_url":"https://codeload.github.com/icebaker/nano-bots-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/icebaker%2Fnano-bots-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274366730,"owners_count":25272295,"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","status":"online","status_checked_at":"2025-09-09T02:00:10.223Z","response_time":80,"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":["alpaca","chatgpt","gemini","gemini-pro","google-ai","google-gemini","google-vertex-ai","gpt","gpt-4","llama","llm","maritaca-ai","mistral-ai","nano-bots","ollama","ollama-api","openai","openai-api","vicuna"],"created_at":"2024-08-05T06:01:53.356Z","updated_at":"2025-09-17T07:31:22.636Z","avatar_url":"https://github.com/icebaker.png","language":"Ruby","funding_links":[],"categories":["Ruby","Building"],"sub_categories":["Tools"],"readme":"# Nano Bots API\n\nThe Nano Bots API leverages [ruby-nano-bots](https://github.com/icebaker/ruby-nano-bots) to create an HTTP API, enabling you to integrate your [Nano Bots](https://spec.nbots.io) through web requests.\n\nNano Bots are small, AI-powered bots that can be easily shared as a single file, designed to support multiple providers such as [Anthropic Claude](https://www.anthropic.com/claude), [Cohere Command](https://cohere.com), [Google Gemini](https://deepmind.google/technologies/gemini), [Maritaca AI MariTalk](https://www.maritaca.ai), [Mistral AI](https://mistral.ai), [Ollama](https://ollama.ai), [OpenAI ChatGPT](https://openai.com/chatgpt), and others, with support for calling tools (functions).\n\n- [Public API](#public-api)\n- [Running](#running)\n  - [Docker](#docker)\n- [Security and Privacy](#security-and-privacy)\n  - [Tools (Functions)](#tools-functions)\n- [API](#api)\n- [Development](#Development)\n\n## Public API\n\nThis API is available for free as a public API at: https://api.nbots.io\n\nIt is used to power the following projects:\n\n- [Nano Bots for Sublime Text](https://github.com/icebaker/sublime-nano-bots)\n- [Nano Bots for Visual Studio Code](https://github.com/icebaker/vscode-nano-bots)\n- [Nano Bots for Obsidian](https://github.com/icebaker/obsidian-nano-bots)\n- [Nano Bots Clinic (Live Editor)](https://clinic.nbots.io)\n- [Nano Bots Marketplace](https://nbots.io)\n\n## Running\n\nRequirements:\n```bash\nbuild-essential libffi-dev libsodium-dev lua5.4-dev\n```\n\n```sh\ngit clone https://github.com/icebaker/nano-bots-api.git\ncd nano-bots-api\n```\n\nCopy the `.env.example` file to `.env` and fill in the necessary data and run the server:\n\n```sh\ncp .env.example .env\nbundle\n./init.sh\n```\n\n### Docker\n\n```sh\ngit clone https://github.com/icebaker/nano-bots-api.git\ncd nano-bots-api\n./build.sh\ncp docker-compose.example.yml docker-compose.yml # Provide your credentials.\ndocker-compose up -d\n# http://localhost:3048\n```\n\n## Security and Privacy\n\nRead the Ruby Nano Bots documentation to learn about [security and privacy features](https://github.com/icebaker/ruby-nano-bots#security-and-privacy).\n\nWe strongly recommend that you define a `NANO_BOTS_ENCRYPTION_PASSWORD` to increase the security and privacy of your users.\n\n### Tools (Functions)\n\nThe API ensures that Tools (Functions) run in sandboxed mode when the environment variable `FORCE_SANDBOXED` is set to `true`. You may set it to `false` at your own risk. Learn more about what being sandboxed means in the [Nano Bots specification](https://spec.nbots.io/#/README?id=functions).\n\nAlso, the API does not allow `confirmable` tools; as per the current implementation, it would block requests without being able to collect a confirmation answer from users.\n\n## API\n\n| Verb | Path                   | Description                                    |\n|------|------------------------|------------------------------------------------|\n| GET  | /                      | Get the version.                               |\n| GET  | /cartridges            | Get all available cartridges.                  |\n| POST | /cartridges/source     | Show the source code of a cartridge.           |\n| POST | /cartridges            | Evaluate the input.                            |\n| POST | /cartridges/stream     | Create a stream to be pooled for a evaluation. |\n| GET  | /cartridges/stream/:id | Get the current stream of a cartridge.         |\n\n\n### Payloads\n\n`POST /cartridges/source`\n```json\n{\n  \"id\": \"-\"\n}\n```\n\n`POST /cartridges`\n```json\n{\n  \"cartridge\": \"-\",\n  \"state\": \"-\",\n  \"input\": \"hi\"\n}\n```\n\n`POST /cartridges`\n```json\n{\n  \"cartridge\": {\n    \"meta\": {\n      \"symbol\": \"🤖\",\n      \"name\": \"Nano Bot Name\",\n      \"author\": \"Your Name\",\n      \"version\": \"1.0.0\",\n      \"license\": \"CC0-1.0\",\n      \"description\": \"A helpful assistant.\"\n    },\n    \"behaviors\": {\n      \"interaction\": {\n        \"directive\": \"You are a helpful assistant.\"\n      }\n    },\n    \"interfaces\": {\n      \"repl\": {\n        \"prompt\": [\n          { \"text\": \"🤖\" },\n          { \"text\": \"\u003e \", \"color\": \"blue\" }\n        ]\n      }\n    },\n    \"provider\": {\n      \"id\": \"openai\",\n      \"credentials\": {\n        \"access-token\": \"ENV/OPENAI_API_KEY\"\n      },\n      \"settings\": {\n        \"user\": \"ENV/NANO_BOTS_END_USER\",\n        \"model\": \"gpt-3.5-turbo\"\n      }\n    }\n  },\n  \"state\": \"-\",\n  \"input\": \"hi\"\n}\n```\n\n`POST /cartridges`\n```json\n{\n  \"as\": \"repl\",\n  \"action\": \"boot\",\n  \"cartridge\": \"-\",\n  \"state\": \"a21179b6104703af19328485101be839\"\n}\n```\n\n`POST /cartridges`\n```json\n{\n  \"as\": \"repl\",\n  \"action\": \"eval\",\n  \"cartridge\": \"-\",\n  \"state\": \"a21179b6104703af19328485101be839\"\n}\n```\n\n`POST /cartridges`\n```json\n{\n  \"as\": \"eval\",\n  \"action\": \"boot\",\n  \"cartridge\": \"-\",\n  \"state\": \"5677e56bbff1e8137c8eb1f60d2623ac\"\n}\n```\n\n`POST /cartridges`\n```json\n{\n  \"as\": \"eval\",\n  \"action\": \"eval\",\n  \"cartridge\": \"-\",\n  \"state\": \"5677e56bbff1e8137c8eb1f60d2623ac\"\n}\n```\n\n`POST /cartridges/stream`\n\nThe same payloads that were used for `POST /cartridges`:\n\n```json\n{\n  \"cartridge\": \"-\",\n  \"state\": \"-\",\n  \"input\": \"hi\"\n}\n```\n\n## Development\n\nOnce you've installed the dependencies with `bundle`, run Rubocop with the `-A` flag for automatic fixes.\n\n```sh\nrubocop -A\n```\n\nIf you face issues upgrading gem versions:\n\n```sh\nbundle install --full-index\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficebaker%2Fnano-bots-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ficebaker%2Fnano-bots-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ficebaker%2Fnano-bots-api/lists"}