langchain-sidequest 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
from typing import List, Optional
|
|
2
|
+
|
|
3
|
+
from langchain_core.tools import BaseTool, BaseToolkit
|
|
4
|
+
from sidequestpays import SideQuest
|
|
5
|
+
from sidequestpays.integrations.langchain import sidequest_tools
|
|
6
|
+
|
|
7
|
+
__all__ = ["SideQuestToolkit", "SideQuest"]
|
|
8
|
+
__version__ = "0.1.0"
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class SideQuestToolkit(BaseToolkit):
|
|
12
|
+
"""Tools that let a LangChain or LangGraph agent hire a verified person for a real-world task.
|
|
13
|
+
|
|
14
|
+
Set SIDEQUEST_API_KEY, or pass api_key. Use read_only=True to only allow looking up quests and the balance.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
api_key: Optional[str] = None
|
|
18
|
+
base_url: Optional[str] = None
|
|
19
|
+
read_only: bool = False
|
|
20
|
+
|
|
21
|
+
def get_tools(self) -> List[BaseTool]:
|
|
22
|
+
client = SideQuest(api_key=self.api_key, base_url=self.base_url)
|
|
23
|
+
return sidequest_tools(client, read_only=self.read_only)
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: langchain-sidequest
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: LangChain integration for SideQuest: let agents hire verified people for real-world tasks like checking a store, taking photos, making a phone call, or inspecting an item.
|
|
5
|
+
Project-URL: Homepage, https://sidequestpays.com
|
|
6
|
+
Project-URL: Documentation, https://sidequestpays.com/docs
|
|
7
|
+
Project-URL: Source, https://github.com/uckhill/Sidequest/tree/main/integrations/langchain
|
|
8
|
+
Author-email: Crescent Harbor LLC <hello@sidequestpays.com>
|
|
9
|
+
License-Expression: MIT
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: agent tools,ai agents,human in the loop,langchain,langgraph,real world tasks,sidequest
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
15
|
+
Requires-Python: >=3.9
|
|
16
|
+
Requires-Dist: langchain-core>=0.3
|
|
17
|
+
Requires-Dist: sidequestpays>=0.2.0
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
|
|
20
|
+
# langchain-sidequest
|
|
21
|
+
|
|
22
|
+
Give your LangChain or LangGraph agent hands in the real world. [SideQuest](https://sidequestpays.com) lets an agent hire a verified local person to check a store, photograph a shelf or property, inspect an item before purchase, run a pickup and drop-off, or make a phone call. Every quest is paid upfront into escrow, and the person submits photo, GPS, and written proof.
|
|
23
|
+
|
|
24
|
+
## Install
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
pip install langchain-sidequest
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Get an API key at [sidequestpays.com/post](https://sidequestpays.com/post) (or `POST /v1/requesters`), then:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
export SIDEQUEST_API_KEY=sq_live_...
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Use
|
|
37
|
+
|
|
38
|
+
```python
|
|
39
|
+
from langchain_sidequest import SideQuestToolkit
|
|
40
|
+
from langgraph.prebuilt import create_react_agent
|
|
41
|
+
|
|
42
|
+
tools = SideQuestToolkit().get_tools()
|
|
43
|
+
agent = create_react_agent("anthropic:claude-sonnet-4-5", tools)
|
|
44
|
+
|
|
45
|
+
agent.invoke({"messages": [("user", "Check if Joe's Hardware at 412 Main St, Philadelphia is open right now and photograph the hours sign. Budget $15.")]})
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Tools: `list_templates`, `create_quest`, `get_quest`, `list_quests`, `approve_quest`, `dispute_quest`, `cancel_quest`, `get_balance`.
|
|
49
|
+
|
|
50
|
+
Use `SideQuestToolkit(read_only=True)` for an agent that should only look up quests.
|
|
51
|
+
|
|
52
|
+
## Safety and spending
|
|
53
|
+
|
|
54
|
+
Create a capped agent key so an agent can't overspend: `POST /v1/keys` with `max_quest_usd` and `daily_limit_usd`, or require your approval by email for every quest with `requires_approval: true`. See the [docs](https://sidequestpays.com/docs).
|
|
55
|
+
|
|
56
|
+
## License
|
|
57
|
+
|
|
58
|
+
MIT
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
langchain_sidequest/__init__.py,sha256=XbMVgfZ77xGZSMkzI8qk3PKg3ovfy878zxlQ2_eCHnE,797
|
|
2
|
+
langchain_sidequest-0.1.0.dist-info/METADATA,sha256=KUpEadARA1XICIWBQeChjUdArPOj6RurrTqDHq6Etdc,2433
|
|
3
|
+
langchain_sidequest-0.1.0.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
|
|
4
|
+
langchain_sidequest-0.1.0.dist-info/licenses/LICENSE,sha256=RY05UdNGCzqWNZM3bNP6xh8uwsB6Hd9CYUCrR3fc5jY,1076
|
|
5
|
+
langchain_sidequest-0.1.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Crescent Harbor LLC
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|