Repository navigation
Readme update #103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Readme update #103
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
1d4cc48
readme skeleton
dannyjameswilliams 55006fd
updated link placement
dannyjameswilliams ef48007
New banner and text update
dannyjameswilliams 7a2ef40
More sections + fleshed out links
dannyjameswilliams 5e3c201
updated banner to colour
dannyjameswilliams b7d3581
chore: no-op commit for README.md
dannyjameswilliams 4906641
added async note and pagination
dannyjameswilliams File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,38 +1,126 @@ | ||
| # Weaviate Agents Python Client | ||
| <p align="center"> | ||
| <a href="https://github.com/weaviate/weaviate-agents-python-client"> | ||
| <img src="./docs/images/banner.png" alt="Weaviate Agents"> | ||
| </a> | ||
| </p> | ||
|
|
||
| [](https://github.com/weaviate/weaviate-agents-python-client/actions) | ||
| [](https://badge.fury.io/py/weaviate-agents) | ||
| <p align="center"> | ||
| <a href="https://docs.weaviate.io/query-agent">Docs</a> • | ||
| <a href="https://weaviate-python-client.readthedocs.io/en/latest/weaviate-agents-python-client/docs/modules.html">Reference Guide</a> • | ||
| <a href="https://weaviate.io">Weaviate</a> | ||
| </p> | ||
|
|
||
| <p align="center"> | ||
| <a href="https://github.com/weaviate/weaviate-agents-python-client/actions"><img src="https://github.com/weaviate/weaviate-agents-python-client/actions/workflows/main.yaml/badge.svg?branch=main" alt="Main Branch"></a> | ||
| <a href="https://badge.fury.io/py/weaviate-agents"><img src="https://badge.fury.io/py/weaviate-agents.svg" alt="PyPI version"></a> | ||
| </p> | ||
|
|
||
|
|
||
| Weaviate Agents allow you to automatically interface with your Weaviate collections without writing any complex code. | ||
|
|
||
| # Installation | ||
|
|
||
| This package is a sub-package to be used in conjunction with the [Weaviate Python Client](https://github.com/weaviate/weaviate-python-client). Rather than installing this package directly, you should install it as an optional extra when installing the Weaviate Python Client. | ||
|
|
||
| ```bash | ||
| pip install weaviate-client[agents] | ||
| pip install -U "weaviate-client[agents]" | ||
| ``` | ||
|
|
||
| If you are having trouble, try to explicitly install/upgrade the agents package via `pip install -U weaviate-agents`. | ||
|
|
||
| Requires Python 3.9+ and a [Weaviate Cloud](https://console.weaviate.cloud) cluster. | ||
|
|
||
| # Query Agent | ||
|
|
||
| Query Agent is a Weaviate-native agent that turns natural-language questions into precise database operations, making full use of dynamic filters, cross-collection routing, query optimization, and aggregations. It returns accurate and relevant results with source citations. It replaces manual query construction and ad-hoc logic with runtime, context-aware planning that optimizes and executes queries across user collections. | ||
| The Query Agent turns natural-language questions into precise database operations, making full use of: | ||
|
|
||
| * dynamic filters | ||
| * cross-collection routing | ||
| * query optimization | ||
| * aggregations | ||
|
|
||
| Query Agent supports two modes: | ||
| - Ask mode: for building agentic applications that require conversational interactions and answers backed by data stored in Weaviate. This can be accessed using the `ask()` and `ask_stream()` methods, depending on whether your application needs streaming tokens and progress messages. | ||
| - Search mode: for building agentic applications that require high quality information retrieval with strong recall and controlled precision, without the final-answer generation. This can be accessed using the `search()` method. | ||
| It returns accurate and relevant results with source citations. It replaces manual query construction and ad-hoc logic with runtime, context-aware planning that optimizes and executes queries across user collections. | ||
|
|
||
| The `QueryAgent` and `AsyncQueryAgent` clients provide sync and async versions of the same methods. | ||
| ## Ask Mode | ||
|
|
||
| The Weviate Query Agent is Generally Available. For more information, see the [Weaviate Agents - Query Agent Docs](https://weaviate.io/developers/agents/query). | ||
| **Ask mode** is natural-language in and natural-language out. It searches or aggregates your data, depending on the user's query, and then answers the question with respect to the retrieved data. This can be accessed using the `ask()` or `ask_stream()` methods, depending on whether your application needs streaming tokens and progress messages. | ||
|
|
||
| # Transformation Agent | ||
| ```python | ||
| import weaviate | ||
| from weaviate.agents.query import QueryAgent | ||
|
|
||
| The Weaviate Transformation Agent is an agentic service designed to augment and transform data using generative models. Use the Transformation Agent to append new properties and/or update existing properties of data on existing objects in Weaviate. | ||
| client = weaviate.connect_to_weaviate_cloud(cluster_url=..., auth_credentials=...) | ||
|
|
||
| > ⚠️ **Alpha Release**: Weaviate Transformation Agent is currently in alpha and is subject to change. Features may be modified or removed without notice. Please check that you are using the latest version of the package. | ||
| qa = QueryAgent( | ||
| client=client, | ||
| collections=["FinancialContracts"], | ||
| ) | ||
|
|
||
| For more information, see the [Weaviate Agents - Transformation Agent Docs](https://docs.weaviate.io/agents/transformation). | ||
| res = qa.ask("Find all contracts signed in 2025") | ||
| ``` | ||
|
|
||
| Ask mode can be additionally be customized with: | ||
| * Output formats for structured outputs | ||
| * LLM-based evaluation of retrieved sources | ||
|
|
||
| An async version of ask mode is also available with the async client. | ||
|
|
||
| [Learn more about ask mode in the official documentation.](https://docs.weaviate.io/query-agent/guides/ask_mode) | ||
|
|
||
| # Personalization Agent | ||
| ## Search Mode | ||
|
|
||
| The Weaviate Personalization Agent is an agentic service designed to return personalized recommendations tailored to each user. The developer would simply provide a user profile with a history of interactions, and the Personalization Agent takes care of all intervening steps to provide a set of personalized recommendations from Weaviate. | ||
| **Search mode** is designed for high quality information retrieval with strong recall and controlled precision, without the final-answer generation. This can be accessed using the `search()` method. | ||
|
|
||
| ```python | ||
| from weaviate.agents.query import QueryAgent | ||
|
|
||
| qa = QueryAgent( | ||
| client=client, | ||
| collections=["ECommerce"], | ||
| ) | ||
| search_response = qa.search( | ||
| query="Find me some vintage shoes under $70", | ||
| limit=10, | ||
| effort="medium", | ||
| ) | ||
| ``` | ||
|
|
||
| Search mode can be optionally customized with: | ||
| * Different filtering strategies for recall or precision based search priorities | ||
| * Effort level to control search quality versus latency | ||
| * Diversity weights to improve diversity amongst results | ||
| * Pagination of the results set | ||
|
|
||
| An async version of search mode is also available with the async client. | ||
|
|
||
| [Learn more about search mode in the official documentation.](https://docs.weaviate.io/query-agent/guides/search_mode) | ||
|
|
||
| # Documentation | ||
|
|
||
| * [Full documentation](https://docs.weaviate.io/query-agent) for quickstarts, walkthroughs and overviews of how to use the Query Agent | ||
|
|
||
| * [Tutorials & Guides](https://docs.weaviate.io/query-agent/recipes) for getting started quickly with the Query Agent | ||
|
|
||
| * [API reference manual](https://weaviate-python-client.readthedocs.io/en/latest/weaviate-agents-python-client/docs/modules.html) for specific documentation on this client as well as examples | ||
|
|
||
| # Support | ||
|
|
||
| - [GitHub issues](https://github.com/weaviate/weaviate-agents-python-client/issues) for bug reports and feature requests | ||
| - [Community forum](https://forum.weaviate.io) for questions and discussion | ||
|
|
||
| # Citation | ||
|
|
||
| If you use the Query Agent in your research, please consider citing our paper: | ||
|
|
||
| ```tex | ||
| @article{query-agent, | ||
| title={Querying databases with function calling}, | ||
| author={Shorten, Connor and Pierse, Charles and Smith, Thomas Benjamin and D'Oosterlinck, Karel and Celik, Tuana and Cardenas, Erika and Monigatti, Leonie and Hasan, Mohd Shukri and Schmuhl, Edward and Williams, Daniel and others}, | ||
| journal={arXiv preprint arXiv:2502.00032}, | ||
| year={2025} | ||
| } | ||
| ``` | ||
|
|
||
| > ⚠️ **Alpha Release**: Weaviate Personalization Agent is currently in alpha and is subject to change. Features may be modified or removed without notice. Please check that you are using the latest version of the package. | ||
| # License | ||
|
|
||
| For more information, see the [Weaviate Agents - Personalization Agent Docs](https://docs.weaviate.io/agents/personalization). | ||
| [BSD 3-Clause](./LICENSE) | ||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be nice to be able to say you can paginate a consistent results set too?