Efficient web information retrieval and summation without excessive token usage.
Project description
websumm-agent
A Python package that helps agents efficiently retrieve and summarize information from the web without excessive token usage. The package takes a user's query as input and returns a structured response containing the most relevant and concise information fetched from the web. It ensures that the output is well-formatted and adheres to specific patterns, making it easy for agents to process and utilize the information.
Installation
pip install websumm_agent
Usage
Basic Usage
from websumm_agent import websumm_agent
user_input = "What are the latest developments in quantum computing?"
response = websumm_agent(user_input)
print(response)
Using a Custom LLM
You can pass your own LangChain-compatible LLM instance to use with different providers:
OpenAI
from langchain_openai import ChatOpenAI
from websumm_agent import websumm_agent
llm = ChatOpenAI()
user_input = "What are the latest developments in quantum computing?"
response = websumm_agent(user_input, llm=llm)
Anthropic
from langchain_anthropic import ChatAnthropic
from websumm_agent import websumm_agent
llm = ChatAnthropic()
user_input = "What are the latest developments in quantum computing?"
response = websumm_agent(user_input, llm=llm)
Google Generative AI
from langchain_google_genai import ChatGoogleGenerativeAI
from websumm_agent import websumm_agent
llm = ChatGoogleGenerativeAI()
user_input = "What are the latest developments in quantum computing?"
response = websumm_agent(user_input, llm=llm)
Using a Custom API Key
from websumm_agent import websumm_agent
user_input = "What are the latest developments in quantum computing?"
response = websumm_agent(user_input, api_key="your_llm7_api_key_here")
Parameters
user_input(str) - The user input text to processllm(Optional[BaseChatModel]) - The LangChain LLM instance to use. If not provided, the default ChatLLM7 will be used.api_key(Optional[str]) - The API key for LLM7. If not provided, the package will look for theLLM7_API_KEYenvironment variable.
Default LLM Provider
By default, the package uses ChatLLM7 from langchain-llm7. The default rate limits for LLM7 free tier are sufficient for most use cases. For higher rate limits, you can:
- Set the
LLM7_API_KEYenvironment variable - Pass your API key directly to the function
- Get a free API key by registering at https://token.llm7.io/
Contributing
Issues and contributions are welcome! Please submit them through the GitHub repository.
Author
Eugene Evstafev
Email: hi@euegne.plus
GitHub: chigwell
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file websumm_agent-2025.12.21193658.tar.gz.
File metadata
- Download URL: websumm_agent-2025.12.21193658.tar.gz
- Upload date:
- Size: 6.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa8fe2d941608f6a6385c93ce5ef01e4a26102ce40d8e2b170e9f5ecbbd979c0
|
|
| MD5 |
cef1f2d54384ad5adc8e31f61a3b2ba3
|
|
| BLAKE2b-256 |
fa1622721910b3c4e0f4f7f6c5df05ff654a3d0213bfea73c2b0568012810630
|
File details
Details for the file websumm_agent-2025.12.21193658-py3-none-any.whl.
File metadata
- Download URL: websumm_agent-2025.12.21193658-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
09c79a29b0e2444c84e186b17e0e2a08062cb2858b3f88b987b0ab20aea87aa1
|
|
| MD5 |
c323ab761fb09791bd3c5c5797cf9d45
|
|
| BLAKE2b-256 |
8617a2d7e7c9a867370d60de59d149728d02928a47d3717160bbeee52769fb21
|