{"data":{"slug":"trylonai-gateway","name":"gateway","tagline":"Self-hosted firewall for securing AI applications with guardrails and content moderation.","github_url":"https://github.com/trylonai/gateway","owner":"trylonai","repo":"gateway","owner_avatar_url":"https://avatars.githubusercontent.com/u/205155604?v=4","primary_language":"Python","stars":126,"forks":12,"topics":["ai-gateway","ai-safety","content-moderation","llm-firewall","llm-guardrails","llm-security","pii-redaction","prompt-injection","self-hosted"],"archived":false,"github_pushed_at":"2025-06-25T10:01:46+00:00","maintenance_label":"Dormant","url":"https://www.graphcanon.com/tools/trylonai-gateway","markdown_url":"https://www.graphcanon.com/tools/trylonai-gateway.md","api_url":"https://www.graphcanon.com/api/graphcanon/tools/trylonai-gateway","graph_url":"https://www.graphcanon.com/api/graphcanon/graph?tool=trylonai-gateway","description":"The Open Source Firewall for LLMs. A self-hosted gateway to secure and control AI applications with powerful guardrails.","homepage_url":"https://www.trylon.ai","license":"Other","open_issues":0,"watchers":2,"ai_summary":"trylonai/gateway provides an open-source gateway to secure LLM-based AI applications by implementing powerful guardrails and measures such as PII redaction, prompt injection prevention, and more. Users can deploy the service locally via Docker. The framework allows for custom policies to control access and content flow through API requests.","readme_excerpt":"## Quick Start\n\nThe fastest way to deploy your own AI Gateway.\n\n**Prerequisites:** Docker and Docker Compose.\n\n1.  **Clone the repository:**\n    ```bash\n    git clone https://github.com/trylonai/gateway.git\n    cd gateway\n    ```\n\n2.  **Prepare your environment:**\n    ```bash\n    # Copy the example environment file. No edits are needed to run the quick start.\n    cp .env.example .env\n\n    # An example policies.yaml and docker-compose.yml are already present.\n    ```\n\n3.  **Launch the Gateway:**\n    ```bash\n    docker-compose up -d\n    ```\n    Note: The first launch will take several minutes. The gateway needs to download the machine learning models (~1.5GB+). Subsequent launches will be much faster because the models are stored in a persistent Docker volume (trylon_hf_cache).\n\n    You can monitor the download progress and see when the application is ready by watching the logs:\n\n    ```bash\n    docker-compose logs -f\n    ```\n\n4.  **Test a Guardrail in Action**\n\n    The default `policies.yaml` comes with a PII guardrail enabled to **block** any request containing an email address. Let's test it.\n    ```bash\n    curl -s -X POST \"http://localhost:8000/v1/chat/completions\" \\\n      -H \"Authorization: Bearer $OPENAI_API_KEY\" \\\n      -H \"Content-Type: application/json\" \\\n      -d '{\n        \"model\": \"gpt-3.5-turbo\",\n        \"messages\": [{\"role\": \"user\", \"content\": \"My email address is test@example.com\"}]\n      }' | jq\n    ```\n    You'll see a response with `finish_reason: \"content_filter\"`, confirming the block. Congratulations! You've just seen a guardrail in action without writing any code.","github_created_at":"2025-06-12T15:15:00+00:00","created_at":"2026-07-15T10:45:24.199002+00:00","updated_at":"2026-07-15T11:07:50.034031+00:00","categories":[{"slug":"evaluation-observability","name":"Evaluation & Observability","url":"https://www.graphcanon.com/categories/evaluation-observability","markdown_url":"https://www.graphcanon.com/categories/evaluation-observability.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/evaluation-observability"},{"slug":"llm-frameworks","name":"LLM Frameworks","url":"https://www.graphcanon.com/categories/llm-frameworks","markdown_url":"https://www.graphcanon.com/categories/llm-frameworks.md","api_url":"https://www.graphcanon.com/api/graphcanon/categories/llm-frameworks"}],"tags":[{"slug":"content-moderation","name":"content-moderation"},{"slug":"docker-compose","name":"docker-compose"},{"slug":"guardrails","name":"guardrails"},{"slug":"pii-redaction","name":"pii-redaction"},{"slug":"prompt-injection","name":"prompt-injection"},{"slug":"python","name":"python"},{"slug":"security","name":"security"},{"slug":"self-hosted","name":"self-hosted"}],"trust":{"provenance":{"is_fork":false,"github_id":1000951326,"owner_type":"Organization","methodology":"github_public_v1","parent_repo":null,"near_duplicate_slugs":[]},"computed_at":"2026-07-15T10:45:25.252Z","maintenance":{"label":"Dormant","score":18,"methodology":"github_public_v1","releases_90d":0,"days_since_push":385,"last_release_at":null},"security_summary":{"status":"no_lockfile","scanner":null,"low_count":0,"high_count":0,"last_scan_at":"2026-07-15T10:45:25.605Z","medium_count":0,"scan_profile":"none","critical_count":0}},"capability_facts":{"scan":{"source":"repo_scan","observed_at":"2026-07-15T11:07:15.710Z"},"deploy":{"source":"dockerfile:Dockerfile","self_host":true,"observed_at":"2026-07-15T11:07:15.710Z","managed_saas":false},"languages":{"value":["python"],"source":"github.language+pyproject.toml","observed_at":"2026-07-15T11:07:15.710Z"},"has_docker":{"value":true,"source":"dockerfile:Dockerfile","observed_at":"2026-07-15T11:07:15.710Z"},"license_spdx":{"value":"Other","source":"github.license","observed_at":"2026-07-15T11:07:15.710Z"}},"decision_facts":{"hosting":null,"pricing":{"model":"freemium","summary":"Open-source with no explicit monetary cost, but requires users to handle infrastructure costs associated with local Docker deployment"},"requirements":{"notes":["Docker and Docker Compose are required for deployment","Initial launch takes several minutes due to downloading machine learning models (~1.5GB+) for the first time"],"min_ram_gb":4,"requires_docker":true},"constraints":{"min_ram_gb":4,"pricing_model":"freemium","requires_docker":true},"when_to_use":["When you need to self-host a secure gateway for LLM-based AI applications that requires local deployment via Docker","If your application requires PII redaction or prompt injection prevention measures built into the gateway framework"],"when_not_to_use":["Avoid if you are looking for cloud-managed services, as this tool is designed solely for local or self-hosted environments","Not suitable if you require extensive customization beyond the provided policies.yaml file and predefined guardrails for content moderation and security"],"source":"enrich:decision_facts","observed_at":"2026-07-15T11:07:49.870Z"},"constraint_facets":{"min_ram_gb":4,"pricing_model":"freemium","requires_docker":true},"decision_summary":[{"label":"Pricing","value":"freemium - Open-source with no explicit monetary cost, but requires users to handle infrastructure costs associated with local Docker deployment"},{"label":"Requirements","value":"Min 4 GB RAM; Requires Docker; Docker and Docker Compose are required for deployment; Initial launch takes several minutes due to downloading machine learning models (~1.5GB+) for the first time"},{"label":"Adopt for","value":"Self-hosted firewall for securing AI applications with guardrails and content moderation."}]}}