{"id":24059613,"url":"https://github.com/addy999/onequery","last_synced_at":"2025-05-12T16:45:35.625Z","repository":{"id":270887885,"uuid":"911680408","full_name":"addy999/onequery","owner":"addy999","description":"AI web agent to find answers to any question","archived":false,"fork":false,"pushed_at":"2025-02-04T15:14:41.000Z","size":13829,"stargazers_count":31,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-01T00:42:46.131Z","etag":null,"topics":["ai","llm","rag","scraping-api","selenium","web","webdev"],"latest_commit_sha":null,"homepage":"https://www.onequery.app/","language":"Python","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/addy999.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":"2025-01-03T15:37:20.000Z","updated_at":"2025-03-14T02:51:22.000Z","dependencies_parsed_at":"2025-01-30T07:35:43.534Z","dependency_job_id":null,"html_url":"https://github.com/addy999/onequery","commit_stats":null,"previous_names":["addy999/onequery"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/addy999%2Fonequery","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/addy999%2Fonequery/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/addy999%2Fonequery/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/addy999%2Fonequery/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/addy999","download_url":"https://codeload.github.com/addy999/onequery/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253778794,"owners_count":21962928,"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":["ai","llm","rag","scraping-api","selenium","web","webdev"],"created_at":"2025-01-09T06:15:26.519Z","updated_at":"2025-05-12T16:45:35.597Z","avatar_url":"https://github.com/addy999.png","language":"Python","readme":"# OneQuery\n\n[![GitHub License](https://img.shields.io/github/license/addy999/onequery)](https://github.com/addy999/onequery/blob/main/LICENSE)\n[![GitHub Last Commit](https://img.shields.io/github/last-commit/addy999/onequery)](https://github.com/addy999/onequery/commits/main)\n\n\u003e 🔨 **Note:** This repository is still in development. Contributions and feedback are welcome!\n\n## Setup\n\n- Requirements: `pip install -r requirements.txt`\n- Install browser: `python -m playwright install`\n  - This project uses Playwright to control the browser. You can install the browser of your choice using the command above.\n- Write your environment variables in a `.env` file (see `.env.test`)\n- Install OmniParser\n  - For webpage analysis, we use the [OmniParser](https://huggingface.co/spaces/microsoft/OmniParser) model from Hugging Face. You'll need to host it via an [API](https://github.com/addy999/omniparser-api) locally.\n\n## Examples\n\n- Finding issues on a github repo\n\n[![Video Demo 1](http://img.youtube.com/vi/a_QPDnAosKM/0.jpg)](https://youtu.be/a_QPDnAosKM?si=pXtZgrRlvXzii7FX \"Finding issues on a GitHub repo\")\n  \n- Finding live events\n\n[![Video Demo 2](http://img.youtube.com/vi/sp_YuZ1Q4wU/0.jpg)](https://youtu.be/sp_YuZ1Q4wU?feature=shared \"Finding live events\")\n\n## Usage\n\n### General query with no source to start with\n\n```python\ntask = \"Find 2 recent issues from PyTorch repository.\"\n\nclass IssueModel(BaseModel):\n    date: str\n    title: str\n    author: str\n    description: str\n\nclass OutputModel(BaseModel):\n    issues: list[IssueModel]\n\nscraper = WebScraper(task, None, OutputModel)\nscraper.run()\n```\n\n### If you know the URL\n\n```python\nstart_url = \"https://in.bookmyshow.com/\"\ntask = \"Find 5 events happening in Bangalore this week.\"\n\nclass EventsModel(BaseModel):\n    name: str\n    date: str\n    location: str\n\nclass OutputModel(BaseModel):\n    events: list[EventsModel]\n\nscraper = WebScraper(task, start_url, OutputModel)\nscraper.run()\n```\n\n### Serving with a REST API\n\nServer:\n\n```bash\npip install fastapi[all]\n```\n\n```python\nuvicorn server:app --reload\n```\n\nClient:\n\n```python\nimport requests\n\nurl = \"http://0.0.0.0:8000/scrape\"\n\npayload = {\n    \"start_url\": \"http://example.com\",\n    \"task\": \"Scrape the website for data\",\n    \"schema\": {\n        \"title\": (str, ...),\n        \"description\": (str, ...)\n    }\n}\n\nresponse = requests.post(url, json=payload)\n\nprint(response.status_code)\nprint(response.json())\n```\n\n\u003e 💡 **Tip:** For a hosted solution with a lightning fast Zig based browser, worldwide proxy support, and job queuing system, check out [onequery.app](https://www.onequery.app).\n\n## Testing\n\nIn the works\n\n## Status\n\n- ✅ Basic functionality\n- 🛠️ Testing\n- 🛠️ Documentation\n\n## Architecture\n\n(needs to be revised)\n\n### Flowchart\n\n```mermaid\ngraph TD;\n    A[Text Query] --\u003e B[WebLLM];\n    B --\u003e C[Browser Instructions];\n    C --\u003e D[Browser Execution];\n    D --\u003e E[OmniParser];\n    E --\u003e F[Screenshot \u0026 Structured Info];\n    F --\u003e G[AI];\n    C --\u003e G;\n    G --\u003e H[JSON Output];\n```\n\n### Stack\n\n- Browser: [Playwright](https://github.com/microsoft/playwright-python)\n- VLLM: [OmniParser](https://github.com/addy999/omniparser-api)\n\n\n## Alternatives\n- https://github.com/CognosysAI/browser/\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faddy999%2Fonequery","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faddy999%2Fonequery","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faddy999%2Fonequery/lists"}