{"id":28028368,"url":"https://github.com/permitio/permit-langflow","last_synced_at":"2025-05-11T07:11:38.083Z","repository":{"id":261608799,"uuid":"877357878","full_name":"permitio/permit-langflow","owner":"permitio","description":"A Permit.io and Langflow example app.","archived":false,"fork":false,"pushed_at":"2025-01-09T11:09:03.000Z","size":1153,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-05-11T07:11:32.170Z","etag":null,"topics":["example"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/permitio.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":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-23T14:11:10.000Z","updated_at":"2025-05-01T10:50:27.000Z","dependencies_parsed_at":"2024-11-07T13:58:21.824Z","dependency_job_id":null,"html_url":"https://github.com/permitio/permit-langflow","commit_stats":null,"previous_names":["permitio/permit-langflow"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/permitio%2Fpermit-langflow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/permitio%2Fpermit-langflow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/permitio%2Fpermit-langflow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/permitio%2Fpermit-langflow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/permitio","download_url":"https://codeload.github.com/permitio/permit-langflow/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253528975,"owners_count":21922636,"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","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":["example"],"created_at":"2025-05-11T07:11:37.518Z","updated_at":"2025-05-11T07:11:38.065Z","avatar_url":"https://github.com/permitio.png","language":"Python","readme":"# permit-langflow\n\n## AstraDB instructions:\n1. Create a database\n2. Create Vector-enabled collection with Mistral Embeddings\n3. Leave the collection empty\n\n## Permit.io instructions:\n\n1. Resources with resource roles\n\n    ![image](./resources.png)\n\n2. Resource relations\n\n    ![image](./resource-relations.png)\n    \n    ![image](./resource-relations-2.png)\n\n    ![image](./resource-relations-3.png)\n\n3. Role derivation relations\n\n    ![image](./derivation.png)\n\n    ![image](./derivation-2.png)\n\n    ![image](./derivation-3.png)\n\n4. Policy\n\n    ![image](./policy.png)\n\n5. Users\n\n    ![image](./users.png)\n\n6. Instances\n\n    ![image](./instances.png)\n\n## LangFlow instructions:\n1. Create a new blank project\n2. Create a confidential Global Variable in Settings for Permit Key\n    \n    ![image](./settings.png)\n\n3. Import `flows.json` into LangFlow\n    - you should be ok with importing this JSON only\n    - other `*.py` files are added for reference as they are custom components implemented for this project\n4. Add Mistral API key\n    1. Create a free Mistral account\n    2. Get your API key from https://console.mistral.ai/api-keys/\n    3. Add the key to Mistral components\n5. Run ingestion flow:\n    1. Select the AstraDB database and collection\n    2. Click Play button\n    3. Check if the collection is populated with vectors\n6. Install Permit with `pip install` component\n    - make sure the installation succeeds by verifing output `Installation status`\n\n7. Run the Permit Policy Decision Point (PDP) locally:\n\n    ```bash\n    docker run -p 7766:7000 --env PDP_API_KEY=\u003cYOUR_KEY\u003e --env PDP_DEBUG=true permitio/pdp-v2:latest\n    ```\n\n8. Use `ngrok` to create a tunnel from `http://localhost:7766` to an external endpoint provided by `ngrok`:\n\n    ```bash\n    ngrok http http://localhost:7766\n    ```\n\n9. Run the chat flow by either:\n    1. Opening the Playground (bottom right corner)\n    2. Clicking the Play icon button on the **last** component\n\n10. Example queries:\n\n    ![image](./chat1.png)\n    \n    ![image](./chat2.png)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpermitio%2Fpermit-langflow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpermitio%2Fpermit-langflow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpermitio%2Fpermit-langflow/lists"}