{"id":30587357,"url":"https://github.com/deepset-ai/haystack-rag-agent","last_synced_at":"2025-08-29T12:09:16.056Z","repository":{"id":269021156,"uuid":"906179095","full_name":"deepset-ai/haystack-rag-agent","owner":"deepset-ai","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-20T10:41:15.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-20T11:28:53.005Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deepset-ai.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-12-20T10:28:41.000Z","updated_at":"2024-12-20T10:41:19.000Z","dependencies_parsed_at":"2024-12-20T11:39:06.556Z","dependency_job_id":null,"html_url":"https://github.com/deepset-ai/haystack-rag-agent","commit_stats":null,"previous_names":["deepset-ai/haystack-rag-agent"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/deepset-ai/haystack-rag-agent","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepset-ai%2Fhaystack-rag-agent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepset-ai%2Fhaystack-rag-agent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepset-ai%2Fhaystack-rag-agent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepset-ai%2Fhaystack-rag-agent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deepset-ai","download_url":"https://codeload.github.com/deepset-ai/haystack-rag-agent/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deepset-ai%2Fhaystack-rag-agent/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272680893,"owners_count":24975360,"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-08-29T02:00:10.610Z","response_time":87,"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-29T12:09:15.396Z","updated_at":"2025-08-29T12:09:16.041Z","avatar_url":"https://github.com/deepset-ai.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![RagAgentExample.gif](readme_resources%2FRagAgentExample.gif)\n\nAlso works Async:\n![AsyncRagExample.gif](readme_resources%2FAsyncRagExample.gif)\n\n## Prerequisites\n\nBefore you begin, ensure you have the following:\n\n- Docker\n- Python 3.x\n- OpenAI API key\n\n## Setup Instructions\n\n### 1. Add Your OpenAI API Key\n\nA `.env` file already exists in the root directory of the project with the following content:\n\n```plaintext\nOPENAI_API_KEY=\u003cyour-api-key\u003e\n```\n\nReplace `\u003cyour-api-key\u003e` with your actual OpenAI API key. This key will be used by the application to interact with the OpenAI API.\n\n### 2. Start the Docker Containers\n\nTo start the application, run the following command from the root directory:\n\n```bash\ndocker compose up\n```\n\nThis will start all the required Docker containers for the project.\n\n### 3. Configure the Agent in OpenWebUI\n\nThe Agent does not support streaming out of the box, but OpenWebUI has Streaming set as a default. To configure the agent accordingly:\n\n1. Open the OpenWebUI interface in your browser at http://localhost:2000/.\n2. Follow the steps demonstrated in the video below to correctly configure the Agent, so that it Streaming is turned off and it therefore properly works in OpenWebUI:\n\n![tutorial.gif](readme_resources%2Ftutorial.gif)\n\n## Customizing the Agent's Tools\n\nThe `tools.py` file allows you to customize the tools the agent has access to. You can add new tools simply by creating a Python function with the appropriate annotations.\n\n### Example:\n```python\ndef get_weather(\n    city: Annotated[str, \"The city for which to get the weather\"] = \"Munich\",\n    unit: Annotated[Literal[\"Celsius\", \"Fahrenheit\"], \"The unit for the temperature\"] = \"Celsius\"\n):\n    \"\"\"\n    A simple function to get the current weather for a location.\n    \"\"\"\n    return f\"22.0 {unit}\"\n```\n\nAdding a new tool like this enables the agent to perform additional tasks. You can refer to the other example methods already included in `tools.py` for further guidance.\n\n## Haystack Pipeline\nThe core logic of the Haystack pipeline, powering the agent, is implemented in `agent.py`. Below is a visualization of the pipeline:\n\n![pipeline.png](readme_resources%2Fpipeline.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepset-ai%2Fhaystack-rag-agent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeepset-ai%2Fhaystack-rag-agent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeepset-ai%2Fhaystack-rag-agent/lists"}