{"id":29960234,"url":"https://github.com/caseymcc/arbiterai","last_synced_at":"2026-05-11T05:09:02.137Z","repository":{"id":300426648,"uuid":"1006123790","full_name":"caseymcc/arbiterAI","owner":"caseymcc","description":null,"archived":false,"fork":false,"pushed_at":"2026-04-25T03:18:36.000Z","size":554,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-25T04:27:25.117Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","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/caseymcc.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-06-21T14:47:41.000Z","updated_at":"2026-04-25T02:59:18.000Z","dependencies_parsed_at":"2025-06-21T16:37:20.778Z","dependency_job_id":"513c785d-669b-4ce4-a9ab-1a818f9117e8","html_url":"https://github.com/caseymcc/arbiterAI","commit_stats":null,"previous_names":["caseymcc/hermesaxiom","caseymcc/arbiterai"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/caseymcc/arbiterAI","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caseymcc%2FarbiterAI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caseymcc%2FarbiterAI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caseymcc%2FarbiterAI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caseymcc%2FarbiterAI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/caseymcc","download_url":"https://codeload.github.com/caseymcc/arbiterAI/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/caseymcc%2FarbiterAI/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32882164,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-10T13:40:02.631Z","status":"online","status_checked_at":"2026-05-11T02:00:05.975Z","response_time":120,"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":[],"created_at":"2025-08-03T22:08:41.998Z","updated_at":"2026-05-11T05:09:02.116Z","avatar_url":"https://github.com/caseymcc.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ArbiterAI\n\nA modern, high-performance C++17 library that provides a unified, embeddable interface for interacting with multiple Large Language Model (LLM) providers. ArbiterAI simplifies LLM integration for C++ applications by offering a single, consistent API across diverse backends — from cloud services to local models.\n\n## Key Features\n\n- **Unified API** — Single interface for completions and streaming across all providers\n- **Session-Oriented Chat** — Stateful `ChatClient` with conversation history, tool calling, and per-session caching\n- **Multiple Providers** — OpenAI, Anthropic, DeepSeek, OpenRouter, llama.cpp (local), and a Mock provider for testing\n- **Model Management** — Dynamic configuration from JSON files with schema validation and remote updates\n- **Cost Tracking** — Per-session and global spending limits with persistent state\n- **Response Caching** — TTL-based caching to reduce costs and latency\n- **Tool/Function Calling** — Define tools with JSON schemas for LLM function calling\n- **Mock Provider** — Deterministic testing with `\u003cecho\u003e` tags — no API keys or network required\n\n## Quick Start\n\n```cpp\n#include \"arbiterAI/arbiterAI.h\"\n#include \"arbiterAI/chatClient.h\"\n\n// Initialize the library\narbiterAI::ArbiterAI\u0026 ai = arbiterAI::ArbiterAI::instance();\nai.initialize({\"path/to/config\"});\n\n// Create a chat session\narbiterAI::ChatConfig config;\nconfig.model = \"gpt-4\";\nconfig.temperature = 0.7;\nauto client = ai.createChatClient(config);\n\n// Send a message\narbiterAI::CompletionRequest request;\nrequest.messages = {{\"user\", \"Hello!\"}};\narbiterAI::CompletionResponse response;\nclient-\u003ecompletion(request, response);\nstd::cout \u003c\u003c response.text \u003c\u003c std::endl;\n```\n\n## Building\n\nThe project uses CMake and vcpkg for dependency management. A Docker environment is provided for consistent builds.\n\n1. **Start the Docker container:**\n    ```bash\n    ./runDocker.sh\n    ```\n\n2. **Build inside the container:**\n    ```bash\n    ./build.sh\n    ```\n    For a clean rebuild:\n    ```bash\n    ./build.sh --rebuild\n    ```\n\nBuild output is located in `build/linux_x64_debug/`.\n\n## Running Tests\n\nFrom inside the Docker container:\n\n```bash\n./build/linux_x64_debug/arbiterai_tests\n```\n\nTests use Google Test and include coverage for all core components, providers, and the mock provider.\n\n## Standalone Server\n\nArbiterAI includes a standalone HTTP server (`arbiterAI-server`) that exposes an OpenAI-compatible API, model management, runtime configuration, and a live dashboard.\n\n```bash\n# Start the server (inside Docker)\n./build/linux_x64_debug/arbiterAI-server -p 8080\n\n# Use it with any OpenAI-compatible client\ncurl http://localhost:8080/v1/chat/completions \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\": \"gpt-4\", \"messages\": [{\"role\": \"user\", \"content\": \"Hello!\"}]}'\n\n# Add a new model config at runtime (no restart needed)\ncurl -X POST http://localhost:8080/api/models/config \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"model\": \"gpt-4o-mini\", \"provider\": \"openai\", \"ranking\": 80}'\n\n# Live dashboard\nopen http://localhost:8080/dashboard\n```\n\nKey features:\n\n- **OpenAI-compatible** — `/v1/chat/completions`, `/v1/models`, `/v1/embeddings` with streaming support\n- **Runtime config injection** — Add, update, or remove model configs via REST (`/api/models/config`)\n- **Model lifecycle** — Load, unload, pin, and download models via `/api/models/:name/load|unload|pin`\n- **Telemetry** — System snapshots, inference history, hardware info at `/api/stats`\n- **Config persistence** — Optionally persist runtime changes with `--override-path`\n\nSee the [Server Guide](docs/server.md) for the full API reference and configuration options.\n\n## Documentation\n\n| Document | Description |\n|----------|-------------|\n| [Project Overview](docs/project.md) | Goals, features, and supported providers |\n| [Developer Guide](docs/developer.md) | Architecture, API reference, and component details |\n| [Server Guide](docs/server.md) | Standalone server API reference and configuration |\n| [Testing Guide](docs/testing.md) | Mock provider, echo tags, and testing strategies |\n| [Development Process](docs/development.md) | Workflow and task tracking |\n| [Examples](examples/README.md) | CLI, proxy, and mock provider examples |\n\n## Mock Provider\n\nArbiterAI includes a Mock provider for testing without API keys or network calls. Use `\u003cecho\u003e` tags to control responses:\n\n```cpp\narbiterAI::ChatConfig config;\nconfig.model = \"mock-model\";\nauto client = ai.createChatClient(config);\n\narbiterAI::CompletionRequest request;\nrequest.messages = {{\"user\", \"What is 2+2? \u003cecho\u003e4\u003c/echo\u003e\"}};\n\narbiterAI::CompletionResponse response;\nclient-\u003ecompletion(request, response);\n// response.text == \"4\"\n```\n\nSee the [Testing Guide](docs/testing.md) for full echo tag syntax and examples.\n\n## License\n\nSee [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaseymcc%2Farbiterai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcaseymcc%2Farbiterai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaseymcc%2Farbiterai/lists"}