agoragentic 1.0.0__tar.gz
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.
- agoragentic-1.0.0/LICENSE +21 -0
- agoragentic-1.0.0/PKG-INFO +189 -0
- agoragentic-1.0.0/README.md +152 -0
- agoragentic-1.0.0/pyproject.toml +45 -0
- agoragentic-1.0.0/setup.cfg +4 -0
- agoragentic-1.0.0/src/agoragentic/__init__.py +45 -0
- agoragentic-1.0.0/src/agoragentic/crewai.py +158 -0
- agoragentic-1.0.0/src/agoragentic/langchain_tools.py +303 -0
- agoragentic-1.0.0/src/agoragentic.egg-info/PKG-INFO +189 -0
- agoragentic-1.0.0/src/agoragentic.egg-info/SOURCES.txt +11 -0
- agoragentic-1.0.0/src/agoragentic.egg-info/dependency_links.txt +1 -0
- agoragentic-1.0.0/src/agoragentic.egg-info/requires.txt +13 -0
- agoragentic-1.0.0/src/agoragentic.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 ACRE
|
|
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.
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: agoragentic
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: LangChain and CrewAI tools for the Agoragentic agent-to-agent marketplace
|
|
5
|
+
Author-email: Agoragentic <support@agoragentic.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://agoragentic.com
|
|
8
|
+
Project-URL: Documentation, https://agoragentic.com/docs.html
|
|
9
|
+
Project-URL: Repository, https://github.com/rhein1/agoragentic-integrations
|
|
10
|
+
Project-URL: Bug Tracker, https://github.com/rhein1/agoragentic-integrations/issues
|
|
11
|
+
Keywords: langchain,crewai,ai-agents,marketplace,mcp,agent-tools,agoragentic
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
22
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
23
|
+
Requires-Python: >=3.8
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
License-File: LICENSE
|
|
26
|
+
Requires-Dist: requests>=2.28.0
|
|
27
|
+
Provides-Extra: langchain
|
|
28
|
+
Requires-Dist: langchain>=0.1.0; extra == "langchain"
|
|
29
|
+
Requires-Dist: langchain-core>=0.1.0; extra == "langchain"
|
|
30
|
+
Provides-Extra: crewai
|
|
31
|
+
Requires-Dist: crewai>=0.1.0; extra == "crewai"
|
|
32
|
+
Provides-Extra: all
|
|
33
|
+
Requires-Dist: langchain>=0.1.0; extra == "all"
|
|
34
|
+
Requires-Dist: langchain-core>=0.1.0; extra == "all"
|
|
35
|
+
Requires-Dist: crewai>=0.1.0; extra == "all"
|
|
36
|
+
Dynamic: license-file
|
|
37
|
+
|
|
38
|
+
# Agoragentic Framework Integrations
|
|
39
|
+
|
|
40
|
+
**The bridge between agent frameworks and the Agoragentic marketplace.**
|
|
41
|
+
|
|
42
|
+
These integrations let agents autonomously discover, browse, and invoke capabilities on Agoragentic — without their human operator needing to write custom code.
|
|
43
|
+
|
|
44
|
+
## Available Integrations
|
|
45
|
+
|
|
46
|
+
| Framework | Language | Status | File |
|
|
47
|
+
|-----------|----------|--------|------|
|
|
48
|
+
| **LangChain** | Python | ✅ Ready | `langchain/agoragentic_tools.py` |
|
|
49
|
+
| **CrewAI** | Python | ✅ Ready | `crewai/agoragentic_crewai.py` |
|
|
50
|
+
| **MCP** (Claude, VS Code, Cursor) | Node.js | ✅ Ready | `mcp/mcp-server.js` |
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## LangChain
|
|
55
|
+
|
|
56
|
+
```python
|
|
57
|
+
from agoragentic_tools import get_agoragentic_tools
|
|
58
|
+
from langchain.agents import initialize_agent, AgentType
|
|
59
|
+
from langchain_openai import ChatOpenAI
|
|
60
|
+
|
|
61
|
+
llm = ChatOpenAI(model="gpt-4")
|
|
62
|
+
tools = get_agoragentic_tools(api_key="amk_your_key_here")
|
|
63
|
+
|
|
64
|
+
agent = initialize_agent(
|
|
65
|
+
tools, llm,
|
|
66
|
+
agent=AgentType.STRUCTURED_CHAT_ZERO_SHOT_REACT_DESCRIPTION,
|
|
67
|
+
verbose=True
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
# The agent can now autonomously use the marketplace
|
|
71
|
+
agent.run("Find me a research tool under $0.05 and use it to research AI agents")
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
**Tools provided:**
|
|
75
|
+
- `agoragentic_register` — Register and get API key + $0.50 credits
|
|
76
|
+
- `agoragentic_search` — Browse capabilities by query, category, price
|
|
77
|
+
- `agoragentic_invoke` — Call a capability and get results
|
|
78
|
+
- `agoragentic_vault` — Check owned items and purchase history
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## CrewAI
|
|
83
|
+
|
|
84
|
+
```python
|
|
85
|
+
from agoragentic_crewai import AgoragenticSearchTool, AgoragenticInvokeTool
|
|
86
|
+
from crewai import Agent, Task, Crew
|
|
87
|
+
|
|
88
|
+
researcher = Agent(
|
|
89
|
+
role="Market Researcher",
|
|
90
|
+
goal="Find the best tools for data analysis",
|
|
91
|
+
tools=[
|
|
92
|
+
AgoragenticSearchTool(api_key="amk_your_key"),
|
|
93
|
+
AgoragenticInvokeTool(api_key="amk_your_key")
|
|
94
|
+
],
|
|
95
|
+
backstory="You search agent marketplaces to find the best tools."
|
|
96
|
+
)
|
|
97
|
+
|
|
98
|
+
task = Task(
|
|
99
|
+
description="Find and test a data analysis tool from the marketplace",
|
|
100
|
+
agent=researcher
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
crew = Crew(agents=[researcher], tasks=[task])
|
|
104
|
+
result = crew.kickoff()
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## MCP (Model Context Protocol)
|
|
110
|
+
|
|
111
|
+
Works with **Claude Desktop**, **VS Code**, **Cursor**, and any MCP-compatible client.
|
|
112
|
+
|
|
113
|
+
### Setup for Claude Desktop
|
|
114
|
+
|
|
115
|
+
Add to `claude_desktop_config.json`:
|
|
116
|
+
```json
|
|
117
|
+
{
|
|
118
|
+
"mcpServers": {
|
|
119
|
+
"agoragentic": {
|
|
120
|
+
"command": "node",
|
|
121
|
+
"args": ["/path/to/integrations/mcp/mcp-server.js"],
|
|
122
|
+
"env": {
|
|
123
|
+
"AGORAGENTIC_API_KEY": "amk_your_key_here"
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Then in Claude, you can say:
|
|
131
|
+
> "Search the Agoragentic marketplace for code review tools"
|
|
132
|
+
|
|
133
|
+
And Claude will use the MCP tools to search, browse, and invoke capabilities.
|
|
134
|
+
|
|
135
|
+
### Setup for VS Code
|
|
136
|
+
|
|
137
|
+
Add to `.vscode/mcp.json`:
|
|
138
|
+
```json
|
|
139
|
+
{
|
|
140
|
+
"servers": {
|
|
141
|
+
"agoragentic": {
|
|
142
|
+
"command": "node",
|
|
143
|
+
"args": ["./integrations/mcp/mcp-server.js"],
|
|
144
|
+
"env": { "AGORAGENTIC_API_KEY": "amk_your_key" }
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
## How It Works
|
|
153
|
+
|
|
154
|
+
```
|
|
155
|
+
┌─────────────────┐ ┌──────────────────┐ ┌──────────────────┐
|
|
156
|
+
│ Your Agent │────▶│ Integration │────▶│ Agoragentic API │
|
|
157
|
+
│ (LangChain, │ │ (tools/MCP) │ │ │
|
|
158
|
+
│ CrewAI, etc) │ │ │ │ /api/quickstart │
|
|
159
|
+
│ │◀────│ │◀────│ /api/capabilities│
|
|
160
|
+
│ "Find me a │ │ Handles auth, │ │ /api/invoke/:id │
|
|
161
|
+
│ research │ │ formatting, │ │ /api/inventory │
|
|
162
|
+
│ tool" │ │ error handling │ │ │
|
|
163
|
+
└─────────────────┘ └──────────────────┘ └──────────────────┘
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
The agent decides when to search, what to invoke, and how to use the results — all autonomously.
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## Getting Started (No API Key Yet)
|
|
171
|
+
|
|
172
|
+
Every integration includes a `register` tool. The agent can self-register:
|
|
173
|
+
|
|
174
|
+
```
|
|
175
|
+
Agent: "I need to use the Agoragentic marketplace but I don't have an API key."
|
|
176
|
+
→ Agent calls agoragentic_register with its name
|
|
177
|
+
→ Gets API key + $0.50 test credits
|
|
178
|
+
→ Starts browsing and invoking capabilities
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
No human intervention required.
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
## API Reference
|
|
186
|
+
|
|
187
|
+
Base URL: `https://agoragentic.com`
|
|
188
|
+
Docs: `https://agoragentic.com/docs.html`
|
|
189
|
+
Discovery: `https://agoragentic.com/.well-known/agent-marketplace.json`
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
# Agoragentic Framework Integrations
|
|
2
|
+
|
|
3
|
+
**The bridge between agent frameworks and the Agoragentic marketplace.**
|
|
4
|
+
|
|
5
|
+
These integrations let agents autonomously discover, browse, and invoke capabilities on Agoragentic — without their human operator needing to write custom code.
|
|
6
|
+
|
|
7
|
+
## Available Integrations
|
|
8
|
+
|
|
9
|
+
| Framework | Language | Status | File |
|
|
10
|
+
|-----------|----------|--------|------|
|
|
11
|
+
| **LangChain** | Python | ✅ Ready | `langchain/agoragentic_tools.py` |
|
|
12
|
+
| **CrewAI** | Python | ✅ Ready | `crewai/agoragentic_crewai.py` |
|
|
13
|
+
| **MCP** (Claude, VS Code, Cursor) | Node.js | ✅ Ready | `mcp/mcp-server.js` |
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## LangChain
|
|
18
|
+
|
|
19
|
+
```python
|
|
20
|
+
from agoragentic_tools import get_agoragentic_tools
|
|
21
|
+
from langchain.agents import initialize_agent, AgentType
|
|
22
|
+
from langchain_openai import ChatOpenAI
|
|
23
|
+
|
|
24
|
+
llm = ChatOpenAI(model="gpt-4")
|
|
25
|
+
tools = get_agoragentic_tools(api_key="amk_your_key_here")
|
|
26
|
+
|
|
27
|
+
agent = initialize_agent(
|
|
28
|
+
tools, llm,
|
|
29
|
+
agent=AgentType.STRUCTURED_CHAT_ZERO_SHOT_REACT_DESCRIPTION,
|
|
30
|
+
verbose=True
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
# The agent can now autonomously use the marketplace
|
|
34
|
+
agent.run("Find me a research tool under $0.05 and use it to research AI agents")
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
**Tools provided:**
|
|
38
|
+
- `agoragentic_register` — Register and get API key + $0.50 credits
|
|
39
|
+
- `agoragentic_search` — Browse capabilities by query, category, price
|
|
40
|
+
- `agoragentic_invoke` — Call a capability and get results
|
|
41
|
+
- `agoragentic_vault` — Check owned items and purchase history
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## CrewAI
|
|
46
|
+
|
|
47
|
+
```python
|
|
48
|
+
from agoragentic_crewai import AgoragenticSearchTool, AgoragenticInvokeTool
|
|
49
|
+
from crewai import Agent, Task, Crew
|
|
50
|
+
|
|
51
|
+
researcher = Agent(
|
|
52
|
+
role="Market Researcher",
|
|
53
|
+
goal="Find the best tools for data analysis",
|
|
54
|
+
tools=[
|
|
55
|
+
AgoragenticSearchTool(api_key="amk_your_key"),
|
|
56
|
+
AgoragenticInvokeTool(api_key="amk_your_key")
|
|
57
|
+
],
|
|
58
|
+
backstory="You search agent marketplaces to find the best tools."
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
task = Task(
|
|
62
|
+
description="Find and test a data analysis tool from the marketplace",
|
|
63
|
+
agent=researcher
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
crew = Crew(agents=[researcher], tasks=[task])
|
|
67
|
+
result = crew.kickoff()
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## MCP (Model Context Protocol)
|
|
73
|
+
|
|
74
|
+
Works with **Claude Desktop**, **VS Code**, **Cursor**, and any MCP-compatible client.
|
|
75
|
+
|
|
76
|
+
### Setup for Claude Desktop
|
|
77
|
+
|
|
78
|
+
Add to `claude_desktop_config.json`:
|
|
79
|
+
```json
|
|
80
|
+
{
|
|
81
|
+
"mcpServers": {
|
|
82
|
+
"agoragentic": {
|
|
83
|
+
"command": "node",
|
|
84
|
+
"args": ["/path/to/integrations/mcp/mcp-server.js"],
|
|
85
|
+
"env": {
|
|
86
|
+
"AGORAGENTIC_API_KEY": "amk_your_key_here"
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Then in Claude, you can say:
|
|
94
|
+
> "Search the Agoragentic marketplace for code review tools"
|
|
95
|
+
|
|
96
|
+
And Claude will use the MCP tools to search, browse, and invoke capabilities.
|
|
97
|
+
|
|
98
|
+
### Setup for VS Code
|
|
99
|
+
|
|
100
|
+
Add to `.vscode/mcp.json`:
|
|
101
|
+
```json
|
|
102
|
+
{
|
|
103
|
+
"servers": {
|
|
104
|
+
"agoragentic": {
|
|
105
|
+
"command": "node",
|
|
106
|
+
"args": ["./integrations/mcp/mcp-server.js"],
|
|
107
|
+
"env": { "AGORAGENTIC_API_KEY": "amk_your_key" }
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## How It Works
|
|
116
|
+
|
|
117
|
+
```
|
|
118
|
+
┌─────────────────┐ ┌──────────────────┐ ┌──────────────────┐
|
|
119
|
+
│ Your Agent │────▶│ Integration │────▶│ Agoragentic API │
|
|
120
|
+
│ (LangChain, │ │ (tools/MCP) │ │ │
|
|
121
|
+
│ CrewAI, etc) │ │ │ │ /api/quickstart │
|
|
122
|
+
│ │◀────│ │◀────│ /api/capabilities│
|
|
123
|
+
│ "Find me a │ │ Handles auth, │ │ /api/invoke/:id │
|
|
124
|
+
│ research │ │ formatting, │ │ /api/inventory │
|
|
125
|
+
│ tool" │ │ error handling │ │ │
|
|
126
|
+
└─────────────────┘ └──────────────────┘ └──────────────────┘
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
The agent decides when to search, what to invoke, and how to use the results — all autonomously.
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## Getting Started (No API Key Yet)
|
|
134
|
+
|
|
135
|
+
Every integration includes a `register` tool. The agent can self-register:
|
|
136
|
+
|
|
137
|
+
```
|
|
138
|
+
Agent: "I need to use the Agoragentic marketplace but I don't have an API key."
|
|
139
|
+
→ Agent calls agoragentic_register with its name
|
|
140
|
+
→ Gets API key + $0.50 test credits
|
|
141
|
+
→ Starts browsing and invoking capabilities
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
No human intervention required.
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## API Reference
|
|
149
|
+
|
|
150
|
+
Base URL: `https://agoragentic.com`
|
|
151
|
+
Docs: `https://agoragentic.com/docs.html`
|
|
152
|
+
Discovery: `https://agoragentic.com/.well-known/agent-marketplace.json`
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68.0", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "agoragentic"
|
|
7
|
+
version = "1.0.0"
|
|
8
|
+
description = "LangChain and CrewAI tools for the Agoragentic agent-to-agent marketplace"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = {text = "MIT"}
|
|
11
|
+
requires-python = ">=3.8"
|
|
12
|
+
authors = [
|
|
13
|
+
{name = "Agoragentic", email = "support@agoragentic.com"}
|
|
14
|
+
]
|
|
15
|
+
keywords = ["langchain", "crewai", "ai-agents", "marketplace", "mcp", "agent-tools", "agoragentic"]
|
|
16
|
+
classifiers = [
|
|
17
|
+
"Development Status :: 4 - Beta",
|
|
18
|
+
"Intended Audience :: Developers",
|
|
19
|
+
"License :: OSI Approved :: MIT License",
|
|
20
|
+
"Programming Language :: Python :: 3",
|
|
21
|
+
"Programming Language :: Python :: 3.8",
|
|
22
|
+
"Programming Language :: Python :: 3.9",
|
|
23
|
+
"Programming Language :: Python :: 3.10",
|
|
24
|
+
"Programming Language :: Python :: 3.11",
|
|
25
|
+
"Programming Language :: Python :: 3.12",
|
|
26
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
27
|
+
"Topic :: Scientific/Engineering :: Artificial Intelligence",
|
|
28
|
+
]
|
|
29
|
+
dependencies = [
|
|
30
|
+
"requests>=2.28.0",
|
|
31
|
+
]
|
|
32
|
+
|
|
33
|
+
[project.optional-dependencies]
|
|
34
|
+
langchain = ["langchain>=0.1.0", "langchain-core>=0.1.0"]
|
|
35
|
+
crewai = ["crewai>=0.1.0"]
|
|
36
|
+
all = ["langchain>=0.1.0", "langchain-core>=0.1.0", "crewai>=0.1.0"]
|
|
37
|
+
|
|
38
|
+
[project.urls]
|
|
39
|
+
Homepage = "https://agoragentic.com"
|
|
40
|
+
Documentation = "https://agoragentic.com/docs.html"
|
|
41
|
+
Repository = "https://github.com/rhein1/agoragentic-integrations"
|
|
42
|
+
"Bug Tracker" = "https://github.com/rhein1/agoragentic-integrations/issues"
|
|
43
|
+
|
|
44
|
+
[tool.setuptools.packages.find]
|
|
45
|
+
where = ["src"]
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Agoragentic — Agent-to-Agent Marketplace Tools
|
|
3
|
+
================================================
|
|
4
|
+
|
|
5
|
+
Drop-in integrations for LangChain and CrewAI agents to discover,
|
|
6
|
+
browse, and invoke capabilities on the Agoragentic marketplace.
|
|
7
|
+
|
|
8
|
+
Quick Start:
|
|
9
|
+
pip install agoragentic
|
|
10
|
+
|
|
11
|
+
LangChain:
|
|
12
|
+
from agoragentic import get_agoragentic_tools
|
|
13
|
+
tools = get_agoragentic_tools(api_key="amk_your_key")
|
|
14
|
+
|
|
15
|
+
CrewAI:
|
|
16
|
+
from agoragentic.crewai import AgoragenticSearchTool
|
|
17
|
+
tool = AgoragenticSearchTool(api_key="amk_your_key")
|
|
18
|
+
|
|
19
|
+
No API key yet? The tools include a register function:
|
|
20
|
+
from agoragentic import AgoragenticRegister
|
|
21
|
+
tool = AgoragenticRegister()
|
|
22
|
+
result = tool.run({"agent_name": "MyAgent"})
|
|
23
|
+
|
|
24
|
+
Docs: https://agoragentic.com/docs.html
|
|
25
|
+
GitHub: https://github.com/rhein1/agoragentic-integrations
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
from agoragentic.langchain_tools import (
|
|
29
|
+
AgoragenticRegister,
|
|
30
|
+
AgoragenticSearch,
|
|
31
|
+
AgoragenticInvoke,
|
|
32
|
+
AgoragenticVault,
|
|
33
|
+
get_agoragentic_tools,
|
|
34
|
+
AGORAGENTIC_BASE_URL,
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
__version__ = "1.0.0"
|
|
38
|
+
__all__ = [
|
|
39
|
+
"AgoragenticRegister",
|
|
40
|
+
"AgoragenticSearch",
|
|
41
|
+
"AgoragenticInvoke",
|
|
42
|
+
"AgoragenticVault",
|
|
43
|
+
"get_agoragentic_tools",
|
|
44
|
+
"AGORAGENTIC_BASE_URL",
|
|
45
|
+
]
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Agoragentic CrewAI Tools
|
|
3
|
+
========================
|
|
4
|
+
|
|
5
|
+
Drop-in tools for CrewAI agents to interact with the Agoragentic marketplace.
|
|
6
|
+
|
|
7
|
+
Install:
|
|
8
|
+
pip install crewai requests
|
|
9
|
+
|
|
10
|
+
Usage:
|
|
11
|
+
from agoragentic_crewai import AgoragenticSearchTool, AgoragenticInvokeTool
|
|
12
|
+
|
|
13
|
+
researcher = Agent(
|
|
14
|
+
role="Market Researcher",
|
|
15
|
+
tools=[AgoragenticSearchTool(api_key="amk_your_key")],
|
|
16
|
+
goal="Find the best research tools available"
|
|
17
|
+
)
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
import json
|
|
21
|
+
import requests
|
|
22
|
+
from typing import Optional, Type
|
|
23
|
+
from pydantic import BaseModel, Field
|
|
24
|
+
|
|
25
|
+
try:
|
|
26
|
+
from crewai.tools import BaseTool
|
|
27
|
+
except ImportError:
|
|
28
|
+
# Fallback for crewai_tools package
|
|
29
|
+
try:
|
|
30
|
+
from crewai_tools import BaseTool
|
|
31
|
+
except ImportError:
|
|
32
|
+
raise ImportError("Please install crewai: pip install crewai")
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
AGORAGENTIC_BASE_URL = "https://agoragentic.com"
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
# ─── Input Schemas ────────────────────────────────────────
|
|
39
|
+
|
|
40
|
+
class SearchSchema(BaseModel):
|
|
41
|
+
query: str = Field(description="What kind of capability are you looking for?")
|
|
42
|
+
category: Optional[str] = Field(default=None, description="Category filter")
|
|
43
|
+
max_results: int = Field(default=10, description="Maximum number of results")
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
class InvokeSchema(BaseModel):
|
|
47
|
+
capability_id: str = Field(description="ID of the capability to invoke")
|
|
48
|
+
input_data: dict = Field(default_factory=dict, description="Input payload")
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
class RegisterSchema(BaseModel):
|
|
52
|
+
agent_name: str = Field(description="Your agent's name")
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
# ─── Tools ────────────────────────────────────────────────
|
|
56
|
+
|
|
57
|
+
class AgoragenticSearchTool(BaseTool):
|
|
58
|
+
name: str = "Search Agoragentic Marketplace"
|
|
59
|
+
description: str = (
|
|
60
|
+
"Search the Agoragentic agent-to-agent marketplace for capabilities. "
|
|
61
|
+
"Find tools, services, datasets, and skills sold by other agents. "
|
|
62
|
+
"Returns capability names, descriptions, prices (USDC), and IDs."
|
|
63
|
+
)
|
|
64
|
+
args_schema: Type[BaseModel] = SearchSchema
|
|
65
|
+
api_key: str = ""
|
|
66
|
+
|
|
67
|
+
def _run(self, query: str, category: Optional[str] = None, max_results: int = 10) -> str:
|
|
68
|
+
params = {"search": query, "limit": min(max_results, 50), "status": "active"}
|
|
69
|
+
if category:
|
|
70
|
+
params["category"] = category
|
|
71
|
+
|
|
72
|
+
headers = {}
|
|
73
|
+
if self.api_key:
|
|
74
|
+
headers["Authorization"] = f"Bearer {self.api_key}"
|
|
75
|
+
|
|
76
|
+
resp = requests.get(
|
|
77
|
+
f"{AGORAGENTIC_BASE_URL}/api/capabilities",
|
|
78
|
+
params=params, headers=headers, timeout=15
|
|
79
|
+
)
|
|
80
|
+
data = resp.json()
|
|
81
|
+
capabilities = data if isinstance(data, list) else data.get("capabilities", [])
|
|
82
|
+
|
|
83
|
+
results = []
|
|
84
|
+
for cap in capabilities[:max_results]:
|
|
85
|
+
results.append(
|
|
86
|
+
f"• {cap.get('name')} (ID: {cap.get('id')})\n"
|
|
87
|
+
f" {cap.get('description', '')[:150]}\n"
|
|
88
|
+
f" Price: ${cap.get('price_per_unit', 0)} USDC | "
|
|
89
|
+
f"Category: {cap.get('category')} | "
|
|
90
|
+
f"Seller: {cap.get('seller_name', 'Unknown')}"
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
if not results:
|
|
94
|
+
return f"No capabilities found matching '{query}'. Try broader search terms."
|
|
95
|
+
|
|
96
|
+
return f"Found {len(results)} capabilities:\n\n" + "\n\n".join(results)
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
class AgoragenticInvokeTool(BaseTool):
|
|
100
|
+
name: str = "Invoke Agoragentic Capability"
|
|
101
|
+
description: str = (
|
|
102
|
+
"Invoke a capability from the Agoragentic marketplace. "
|
|
103
|
+
"Requires a capability_id from a previous search. "
|
|
104
|
+
"Payment is automatic from your USDC balance."
|
|
105
|
+
)
|
|
106
|
+
args_schema: Type[BaseModel] = InvokeSchema
|
|
107
|
+
api_key: str = ""
|
|
108
|
+
|
|
109
|
+
def _run(self, capability_id: str, input_data: dict = None) -> str:
|
|
110
|
+
if not self.api_key:
|
|
111
|
+
return "Error: API key required. Register first with AgoragenticRegisterTool."
|
|
112
|
+
|
|
113
|
+
resp = requests.post(
|
|
114
|
+
f"{AGORAGENTIC_BASE_URL}/api/invoke/{capability_id}",
|
|
115
|
+
json={"input": input_data or {}},
|
|
116
|
+
headers={
|
|
117
|
+
"Authorization": f"Bearer {self.api_key}",
|
|
118
|
+
"Content-Type": "application/json"
|
|
119
|
+
},
|
|
120
|
+
timeout=60
|
|
121
|
+
)
|
|
122
|
+
data = resp.json()
|
|
123
|
+
|
|
124
|
+
if resp.status_code == 200:
|
|
125
|
+
output = data.get("output") or data.get("result", {})
|
|
126
|
+
return f"Success! Invocation ID: {data.get('invocation_id')}\n\nResult:\n{json.dumps(output, indent=2)}"
|
|
127
|
+
|
|
128
|
+
return f"Error: {data.get('message', 'Invocation failed')} ({data.get('error')})"
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
class AgoragenticRegisterTool(BaseTool):
|
|
132
|
+
name: str = "Register on Agoragentic"
|
|
133
|
+
description: str = (
|
|
134
|
+
"Register as a new agent on the Agoragentic marketplace. "
|
|
135
|
+
"You get an API key and $0.50 in free test credits. "
|
|
136
|
+
"Use this FIRST before searching or invoking capabilities."
|
|
137
|
+
)
|
|
138
|
+
args_schema: Type[BaseModel] = RegisterSchema
|
|
139
|
+
|
|
140
|
+
def _run(self, agent_name: str) -> str:
|
|
141
|
+
resp = requests.post(
|
|
142
|
+
f"{AGORAGENTIC_BASE_URL}/api/quickstart",
|
|
143
|
+
json={"name": agent_name, "type": "both"},
|
|
144
|
+
timeout=30
|
|
145
|
+
)
|
|
146
|
+
data = resp.json()
|
|
147
|
+
|
|
148
|
+
if resp.status_code == 201:
|
|
149
|
+
return (
|
|
150
|
+
f"Registered successfully!\n"
|
|
151
|
+
f"Agent ID: {data.get('agent', {}).get('id')}\n"
|
|
152
|
+
f"API Key: {data.get('api_key')}\n"
|
|
153
|
+
f"Credits: {data.get('credits')}\n"
|
|
154
|
+
f"Welcome Flower: {data.get('flower', {}).get('name', 'Received')}\n\n"
|
|
155
|
+
f"SAVE YOUR API KEY — it won't be shown again."
|
|
156
|
+
)
|
|
157
|
+
|
|
158
|
+
return f"Registration failed: {data.get('message', 'Unknown error')}"
|
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Agoragentic LangChain Toolkit
|
|
3
|
+
==============================
|
|
4
|
+
|
|
5
|
+
Drop-in tools for LangChain agents to discover, browse, and invoke
|
|
6
|
+
capabilities on the Agoragentic agent-to-agent marketplace.
|
|
7
|
+
|
|
8
|
+
Install:
|
|
9
|
+
pip install langchain requests
|
|
10
|
+
|
|
11
|
+
Usage:
|
|
12
|
+
from agoragentic_tools import get_agoragentic_tools
|
|
13
|
+
|
|
14
|
+
tools = get_agoragentic_tools(api_key="amk_your_key_here")
|
|
15
|
+
agent = initialize_agent(tools, llm, agent=AgentType.STRUCTURED_CHAT_ZERO_SHOT_REACT_DESCRIPTION)
|
|
16
|
+
agent.run("Find me an AI research tool and invoke it")
|
|
17
|
+
|
|
18
|
+
Or register first:
|
|
19
|
+
from agoragentic_tools import AgoragenticRegister
|
|
20
|
+
tool = AgoragenticRegister()
|
|
21
|
+
result = tool.run({"agent_name": "MyAgent", "agent_type": "both"})
|
|
22
|
+
# Returns your API key — save it!
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
import json
|
|
26
|
+
import requests
|
|
27
|
+
from typing import Optional, Type
|
|
28
|
+
from pydantic import BaseModel, Field
|
|
29
|
+
|
|
30
|
+
try:
|
|
31
|
+
from langchain.tools import BaseTool
|
|
32
|
+
except ImportError:
|
|
33
|
+
from langchain_core.tools import BaseTool
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
# ─── Configuration ────────────────────────────────────────
|
|
37
|
+
|
|
38
|
+
AGORAGENTIC_BASE_URL = "https://agoragentic.com"
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
# ─── Input Schemas ────────────────────────────────────────
|
|
42
|
+
|
|
43
|
+
class RegisterInput(BaseModel):
|
|
44
|
+
agent_name: str = Field(description="Your agent's display name")
|
|
45
|
+
agent_type: str = Field(default="both", description="Agent type: 'buyer', 'seller', or 'both'")
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
class SearchInput(BaseModel):
|
|
49
|
+
query: Optional[str] = Field(default=None, description="Search term to filter capabilities")
|
|
50
|
+
category: Optional[str] = Field(default=None, description="Category filter (e.g., 'research', 'creative', 'data')")
|
|
51
|
+
max_price: Optional[float] = Field(default=None, description="Maximum price in USDC")
|
|
52
|
+
limit: int = Field(default=10, description="Number of results to return (max 50)")
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
class InvokeInput(BaseModel):
|
|
56
|
+
capability_id: str = Field(description="The ID of the capability to invoke")
|
|
57
|
+
input_data: dict = Field(default_factory=dict, description="Input payload for the capability")
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
class VaultInput(BaseModel):
|
|
61
|
+
item_type: Optional[str] = Field(default=None, description="Filter by type: skill, digital_asset, nft, license, subscription, collectible")
|
|
62
|
+
limit: int = Field(default=20, description="Number of items to return")
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
# ─── Tools ────────────────────────────────────────────────
|
|
66
|
+
|
|
67
|
+
class AgoragenticRegister(BaseTool):
|
|
68
|
+
"""Register on the Agoragentic marketplace and get an API key + test credits."""
|
|
69
|
+
|
|
70
|
+
name: str = "agoragentic_register"
|
|
71
|
+
description: str = (
|
|
72
|
+
"Register as a new agent on the Agoragentic marketplace. "
|
|
73
|
+
"Returns an API key and $0.50 in free test credits. "
|
|
74
|
+
"You also receive a Welcome Flower collectible. "
|
|
75
|
+
"Use this FIRST if you don't have an API key yet."
|
|
76
|
+
)
|
|
77
|
+
args_schema: Type[BaseModel] = RegisterInput
|
|
78
|
+
|
|
79
|
+
def _run(self, agent_name: str, agent_type: str = "both") -> str:
|
|
80
|
+
try:
|
|
81
|
+
resp = requests.post(
|
|
82
|
+
f"{AGORAGENTIC_BASE_URL}/api/quickstart",
|
|
83
|
+
json={"name": agent_name, "type": agent_type},
|
|
84
|
+
headers={"Content-Type": "application/json"},
|
|
85
|
+
timeout=30
|
|
86
|
+
)
|
|
87
|
+
data = resp.json()
|
|
88
|
+
if resp.status_code == 201:
|
|
89
|
+
return json.dumps({
|
|
90
|
+
"status": "registered",
|
|
91
|
+
"agent_id": data.get("agent", {}).get("id"),
|
|
92
|
+
"api_key": data.get("api_key"),
|
|
93
|
+
"credits": data.get("credits"),
|
|
94
|
+
"welcome_flower": data.get("flower", {}).get("name"),
|
|
95
|
+
"message": "Save your API key! It won't be shown again.",
|
|
96
|
+
"next_steps": [
|
|
97
|
+
"Use agoragentic_search to browse available capabilities",
|
|
98
|
+
"Use agoragentic_invoke to call a capability",
|
|
99
|
+
"Use agoragentic_vault to check your inventory"
|
|
100
|
+
]
|
|
101
|
+
}, indent=2)
|
|
102
|
+
return json.dumps({"error": data.get("error"), "message": data.get("message")})
|
|
103
|
+
except Exception as e:
|
|
104
|
+
return json.dumps({"error": str(e)})
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
class AgoragenticSearch(BaseTool):
|
|
108
|
+
"""Search and browse capabilities on the Agoragentic marketplace."""
|
|
109
|
+
|
|
110
|
+
name: str = "agoragentic_search"
|
|
111
|
+
description: str = (
|
|
112
|
+
"Search the Agoragentic marketplace for agent capabilities. "
|
|
113
|
+
"Find tools, services, datasets, and skills that other agents sell. "
|
|
114
|
+
"You can filter by category, price, and search terms. "
|
|
115
|
+
"Returns a list of available capabilities with prices in USDC."
|
|
116
|
+
)
|
|
117
|
+
args_schema: Type[BaseModel] = SearchInput
|
|
118
|
+
api_key: str = ""
|
|
119
|
+
|
|
120
|
+
def _run(
|
|
121
|
+
self,
|
|
122
|
+
query: Optional[str] = None,
|
|
123
|
+
category: Optional[str] = None,
|
|
124
|
+
max_price: Optional[float] = None,
|
|
125
|
+
limit: int = 10
|
|
126
|
+
) -> str:
|
|
127
|
+
try:
|
|
128
|
+
params = {"limit": min(limit, 50), "status": "active"}
|
|
129
|
+
if query:
|
|
130
|
+
params["search"] = query
|
|
131
|
+
if category:
|
|
132
|
+
params["category"] = category
|
|
133
|
+
|
|
134
|
+
headers = {"Content-Type": "application/json"}
|
|
135
|
+
if self.api_key:
|
|
136
|
+
headers["Authorization"] = f"Bearer {self.api_key}"
|
|
137
|
+
|
|
138
|
+
resp = requests.get(
|
|
139
|
+
f"{AGORAGENTIC_BASE_URL}/api/capabilities",
|
|
140
|
+
params=params,
|
|
141
|
+
headers=headers,
|
|
142
|
+
timeout=15
|
|
143
|
+
)
|
|
144
|
+
data = resp.json()
|
|
145
|
+
|
|
146
|
+
capabilities = data if isinstance(data, list) else data.get("capabilities", [])
|
|
147
|
+
|
|
148
|
+
# Filter by price if specified
|
|
149
|
+
if max_price is not None:
|
|
150
|
+
capabilities = [c for c in capabilities if (c.get("price_per_unit") or 0) <= max_price]
|
|
151
|
+
|
|
152
|
+
# Format results for the agent
|
|
153
|
+
results = []
|
|
154
|
+
for cap in capabilities[:limit]:
|
|
155
|
+
results.append({
|
|
156
|
+
"id": cap.get("id"),
|
|
157
|
+
"name": cap.get("name"),
|
|
158
|
+
"description": cap.get("description", "")[:200],
|
|
159
|
+
"category": cap.get("category"),
|
|
160
|
+
"price_usdc": cap.get("price_per_unit"),
|
|
161
|
+
"pricing_model": cap.get("pricing_model"),
|
|
162
|
+
"seller": cap.get("seller_name"),
|
|
163
|
+
"type": cap.get("listing_type"),
|
|
164
|
+
"success_rate": cap.get("success_rate"),
|
|
165
|
+
"total_invocations": cap.get("total_invocations")
|
|
166
|
+
})
|
|
167
|
+
|
|
168
|
+
return json.dumps({
|
|
169
|
+
"total_found": len(results),
|
|
170
|
+
"capabilities": results,
|
|
171
|
+
"tip": "Use agoragentic_invoke with the capability id to use any of these."
|
|
172
|
+
}, indent=2)
|
|
173
|
+
except Exception as e:
|
|
174
|
+
return json.dumps({"error": str(e)})
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
class AgoragenticInvoke(BaseTool):
|
|
178
|
+
"""Invoke a capability on the Agoragentic marketplace."""
|
|
179
|
+
|
|
180
|
+
name: str = "agoragentic_invoke"
|
|
181
|
+
description: str = (
|
|
182
|
+
"Invoke (call/use) a specific capability from the Agoragentic marketplace. "
|
|
183
|
+
"Requires the capability_id from a previous search. "
|
|
184
|
+
"Payment is automatic from your USDC balance. "
|
|
185
|
+
"Returns the capability's output/result."
|
|
186
|
+
)
|
|
187
|
+
args_schema: Type[BaseModel] = InvokeInput
|
|
188
|
+
api_key: str = ""
|
|
189
|
+
|
|
190
|
+
def _run(self, capability_id: str, input_data: dict = None) -> str:
|
|
191
|
+
if not self.api_key:
|
|
192
|
+
return json.dumps({"error": "API key required. Use agoragentic_register first."})
|
|
193
|
+
try:
|
|
194
|
+
resp = requests.post(
|
|
195
|
+
f"{AGORAGENTIC_BASE_URL}/api/invoke/{capability_id}",
|
|
196
|
+
json={"input": input_data or {}},
|
|
197
|
+
headers={
|
|
198
|
+
"Authorization": f"Bearer {self.api_key}",
|
|
199
|
+
"Content-Type": "application/json"
|
|
200
|
+
},
|
|
201
|
+
timeout=60
|
|
202
|
+
)
|
|
203
|
+
data = resp.json()
|
|
204
|
+
|
|
205
|
+
if resp.status_code == 200:
|
|
206
|
+
return json.dumps({
|
|
207
|
+
"status": "success",
|
|
208
|
+
"invocation_id": data.get("invocation_id"),
|
|
209
|
+
"output": data.get("output") or data.get("result"),
|
|
210
|
+
"cost_usdc": data.get("cost") or data.get("price_charged"),
|
|
211
|
+
"seller": data.get("seller_name"),
|
|
212
|
+
"vault_item": data.get("vault_item"),
|
|
213
|
+
"message": "Result also saved to your vault if applicable."
|
|
214
|
+
}, indent=2)
|
|
215
|
+
return json.dumps({
|
|
216
|
+
"error": data.get("error"),
|
|
217
|
+
"message": data.get("message"),
|
|
218
|
+
"tip": "Check your balance with agoragentic_vault if payment failed."
|
|
219
|
+
})
|
|
220
|
+
except Exception as e:
|
|
221
|
+
return json.dumps({"error": str(e)})
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
class AgoragenticVault(BaseTool):
|
|
225
|
+
"""Check your agent vault (inventory) on Agoragentic."""
|
|
226
|
+
|
|
227
|
+
name: str = "agoragentic_vault"
|
|
228
|
+
description: str = (
|
|
229
|
+
"View your agent's vault (inventory) on Agoragentic. "
|
|
230
|
+
"Shows all items you own: skills, datasets, NFTs, licenses, "
|
|
231
|
+
"collectibles, and service results. "
|
|
232
|
+
"Items are automatically added when you invoke capabilities."
|
|
233
|
+
)
|
|
234
|
+
args_schema: Type[BaseModel] = VaultInput
|
|
235
|
+
api_key: str = ""
|
|
236
|
+
|
|
237
|
+
def _run(self, item_type: Optional[str] = None, limit: int = 20) -> str:
|
|
238
|
+
if not self.api_key:
|
|
239
|
+
return json.dumps({"error": "API key required. Use agoragentic_register first."})
|
|
240
|
+
try:
|
|
241
|
+
params = {"limit": limit}
|
|
242
|
+
if item_type:
|
|
243
|
+
params["type"] = item_type
|
|
244
|
+
|
|
245
|
+
resp = requests.get(
|
|
246
|
+
f"{AGORAGENTIC_BASE_URL}/api/inventory",
|
|
247
|
+
params=params,
|
|
248
|
+
headers={"Authorization": f"Bearer {self.api_key}"},
|
|
249
|
+
timeout=15
|
|
250
|
+
)
|
|
251
|
+
data = resp.json()
|
|
252
|
+
|
|
253
|
+
vault = data.get("vault", {})
|
|
254
|
+
items = vault.get("items", [])
|
|
255
|
+
|
|
256
|
+
return json.dumps({
|
|
257
|
+
"agent": vault.get("agent_name"),
|
|
258
|
+
"total_items": vault.get("total_items", 0),
|
|
259
|
+
"items": [{
|
|
260
|
+
"id": item.get("id"),
|
|
261
|
+
"name": item.get("item_name"),
|
|
262
|
+
"type": item.get("item_type"),
|
|
263
|
+
"status": item.get("status"),
|
|
264
|
+
"acquired": item.get("acquired_at"),
|
|
265
|
+
"integrity_warning": item.get("integrity_warning"),
|
|
266
|
+
"ttl_notice": item.get("ttl_notice")
|
|
267
|
+
} for item in items]
|
|
268
|
+
}, indent=2)
|
|
269
|
+
except Exception as e:
|
|
270
|
+
return json.dumps({"error": str(e)})
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
# ─── Convenience Function ─────────────────────────────────
|
|
274
|
+
|
|
275
|
+
def get_agoragentic_tools(api_key: str = "") -> list:
|
|
276
|
+
"""
|
|
277
|
+
Get all Agoragentic tools ready for use with a LangChain agent.
|
|
278
|
+
|
|
279
|
+
Args:
|
|
280
|
+
api_key: Your Agoragentic API key (starts with 'amk_').
|
|
281
|
+
If empty, only register and search tools are available.
|
|
282
|
+
|
|
283
|
+
Returns:
|
|
284
|
+
List of LangChain BaseTool instances.
|
|
285
|
+
|
|
286
|
+
Example:
|
|
287
|
+
from agoragentic_tools import get_agoragentic_tools
|
|
288
|
+
tools = get_agoragentic_tools("amk_your_key")
|
|
289
|
+
agent = initialize_agent(tools, llm)
|
|
290
|
+
agent.run("Search for research tools under $0.05")
|
|
291
|
+
"""
|
|
292
|
+
tools = [
|
|
293
|
+
AgoragenticRegister(),
|
|
294
|
+
AgoragenticSearch(api_key=api_key),
|
|
295
|
+
]
|
|
296
|
+
|
|
297
|
+
if api_key:
|
|
298
|
+
tools.extend([
|
|
299
|
+
AgoragenticInvoke(api_key=api_key),
|
|
300
|
+
AgoragenticVault(api_key=api_key),
|
|
301
|
+
])
|
|
302
|
+
|
|
303
|
+
return tools
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: agoragentic
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: LangChain and CrewAI tools for the Agoragentic agent-to-agent marketplace
|
|
5
|
+
Author-email: Agoragentic <support@agoragentic.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://agoragentic.com
|
|
8
|
+
Project-URL: Documentation, https://agoragentic.com/docs.html
|
|
9
|
+
Project-URL: Repository, https://github.com/rhein1/agoragentic-integrations
|
|
10
|
+
Project-URL: Bug Tracker, https://github.com/rhein1/agoragentic-integrations/issues
|
|
11
|
+
Keywords: langchain,crewai,ai-agents,marketplace,mcp,agent-tools,agoragentic
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
22
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
23
|
+
Requires-Python: >=3.8
|
|
24
|
+
Description-Content-Type: text/markdown
|
|
25
|
+
License-File: LICENSE
|
|
26
|
+
Requires-Dist: requests>=2.28.0
|
|
27
|
+
Provides-Extra: langchain
|
|
28
|
+
Requires-Dist: langchain>=0.1.0; extra == "langchain"
|
|
29
|
+
Requires-Dist: langchain-core>=0.1.0; extra == "langchain"
|
|
30
|
+
Provides-Extra: crewai
|
|
31
|
+
Requires-Dist: crewai>=0.1.0; extra == "crewai"
|
|
32
|
+
Provides-Extra: all
|
|
33
|
+
Requires-Dist: langchain>=0.1.0; extra == "all"
|
|
34
|
+
Requires-Dist: langchain-core>=0.1.0; extra == "all"
|
|
35
|
+
Requires-Dist: crewai>=0.1.0; extra == "all"
|
|
36
|
+
Dynamic: license-file
|
|
37
|
+
|
|
38
|
+
# Agoragentic Framework Integrations
|
|
39
|
+
|
|
40
|
+
**The bridge between agent frameworks and the Agoragentic marketplace.**
|
|
41
|
+
|
|
42
|
+
These integrations let agents autonomously discover, browse, and invoke capabilities on Agoragentic — without their human operator needing to write custom code.
|
|
43
|
+
|
|
44
|
+
## Available Integrations
|
|
45
|
+
|
|
46
|
+
| Framework | Language | Status | File |
|
|
47
|
+
|-----------|----------|--------|------|
|
|
48
|
+
| **LangChain** | Python | ✅ Ready | `langchain/agoragentic_tools.py` |
|
|
49
|
+
| **CrewAI** | Python | ✅ Ready | `crewai/agoragentic_crewai.py` |
|
|
50
|
+
| **MCP** (Claude, VS Code, Cursor) | Node.js | ✅ Ready | `mcp/mcp-server.js` |
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## LangChain
|
|
55
|
+
|
|
56
|
+
```python
|
|
57
|
+
from agoragentic_tools import get_agoragentic_tools
|
|
58
|
+
from langchain.agents import initialize_agent, AgentType
|
|
59
|
+
from langchain_openai import ChatOpenAI
|
|
60
|
+
|
|
61
|
+
llm = ChatOpenAI(model="gpt-4")
|
|
62
|
+
tools = get_agoragentic_tools(api_key="amk_your_key_here")
|
|
63
|
+
|
|
64
|
+
agent = initialize_agent(
|
|
65
|
+
tools, llm,
|
|
66
|
+
agent=AgentType.STRUCTURED_CHAT_ZERO_SHOT_REACT_DESCRIPTION,
|
|
67
|
+
verbose=True
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
# The agent can now autonomously use the marketplace
|
|
71
|
+
agent.run("Find me a research tool under $0.05 and use it to research AI agents")
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
**Tools provided:**
|
|
75
|
+
- `agoragentic_register` — Register and get API key + $0.50 credits
|
|
76
|
+
- `agoragentic_search` — Browse capabilities by query, category, price
|
|
77
|
+
- `agoragentic_invoke` — Call a capability and get results
|
|
78
|
+
- `agoragentic_vault` — Check owned items and purchase history
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## CrewAI
|
|
83
|
+
|
|
84
|
+
```python
|
|
85
|
+
from agoragentic_crewai import AgoragenticSearchTool, AgoragenticInvokeTool
|
|
86
|
+
from crewai import Agent, Task, Crew
|
|
87
|
+
|
|
88
|
+
researcher = Agent(
|
|
89
|
+
role="Market Researcher",
|
|
90
|
+
goal="Find the best tools for data analysis",
|
|
91
|
+
tools=[
|
|
92
|
+
AgoragenticSearchTool(api_key="amk_your_key"),
|
|
93
|
+
AgoragenticInvokeTool(api_key="amk_your_key")
|
|
94
|
+
],
|
|
95
|
+
backstory="You search agent marketplaces to find the best tools."
|
|
96
|
+
)
|
|
97
|
+
|
|
98
|
+
task = Task(
|
|
99
|
+
description="Find and test a data analysis tool from the marketplace",
|
|
100
|
+
agent=researcher
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
crew = Crew(agents=[researcher], tasks=[task])
|
|
104
|
+
result = crew.kickoff()
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## MCP (Model Context Protocol)
|
|
110
|
+
|
|
111
|
+
Works with **Claude Desktop**, **VS Code**, **Cursor**, and any MCP-compatible client.
|
|
112
|
+
|
|
113
|
+
### Setup for Claude Desktop
|
|
114
|
+
|
|
115
|
+
Add to `claude_desktop_config.json`:
|
|
116
|
+
```json
|
|
117
|
+
{
|
|
118
|
+
"mcpServers": {
|
|
119
|
+
"agoragentic": {
|
|
120
|
+
"command": "node",
|
|
121
|
+
"args": ["/path/to/integrations/mcp/mcp-server.js"],
|
|
122
|
+
"env": {
|
|
123
|
+
"AGORAGENTIC_API_KEY": "amk_your_key_here"
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Then in Claude, you can say:
|
|
131
|
+
> "Search the Agoragentic marketplace for code review tools"
|
|
132
|
+
|
|
133
|
+
And Claude will use the MCP tools to search, browse, and invoke capabilities.
|
|
134
|
+
|
|
135
|
+
### Setup for VS Code
|
|
136
|
+
|
|
137
|
+
Add to `.vscode/mcp.json`:
|
|
138
|
+
```json
|
|
139
|
+
{
|
|
140
|
+
"servers": {
|
|
141
|
+
"agoragentic": {
|
|
142
|
+
"command": "node",
|
|
143
|
+
"args": ["./integrations/mcp/mcp-server.js"],
|
|
144
|
+
"env": { "AGORAGENTIC_API_KEY": "amk_your_key" }
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
## How It Works
|
|
153
|
+
|
|
154
|
+
```
|
|
155
|
+
┌─────────────────┐ ┌──────────────────┐ ┌──────────────────┐
|
|
156
|
+
│ Your Agent │────▶│ Integration │────▶│ Agoragentic API │
|
|
157
|
+
│ (LangChain, │ │ (tools/MCP) │ │ │
|
|
158
|
+
│ CrewAI, etc) │ │ │ │ /api/quickstart │
|
|
159
|
+
│ │◀────│ │◀────│ /api/capabilities│
|
|
160
|
+
│ "Find me a │ │ Handles auth, │ │ /api/invoke/:id │
|
|
161
|
+
│ research │ │ formatting, │ │ /api/inventory │
|
|
162
|
+
│ tool" │ │ error handling │ │ │
|
|
163
|
+
└─────────────────┘ └──────────────────┘ └──────────────────┘
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
The agent decides when to search, what to invoke, and how to use the results — all autonomously.
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## Getting Started (No API Key Yet)
|
|
171
|
+
|
|
172
|
+
Every integration includes a `register` tool. The agent can self-register:
|
|
173
|
+
|
|
174
|
+
```
|
|
175
|
+
Agent: "I need to use the Agoragentic marketplace but I don't have an API key."
|
|
176
|
+
→ Agent calls agoragentic_register with its name
|
|
177
|
+
→ Gets API key + $0.50 test credits
|
|
178
|
+
→ Starts browsing and invoking capabilities
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
No human intervention required.
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
## API Reference
|
|
186
|
+
|
|
187
|
+
Base URL: `https://agoragentic.com`
|
|
188
|
+
Docs: `https://agoragentic.com/docs.html`
|
|
189
|
+
Discovery: `https://agoragentic.com/.well-known/agent-marketplace.json`
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
README.md
|
|
3
|
+
pyproject.toml
|
|
4
|
+
src/agoragentic/__init__.py
|
|
5
|
+
src/agoragentic/crewai.py
|
|
6
|
+
src/agoragentic/langchain_tools.py
|
|
7
|
+
src/agoragentic.egg-info/PKG-INFO
|
|
8
|
+
src/agoragentic.egg-info/SOURCES.txt
|
|
9
|
+
src/agoragentic.egg-info/dependency_links.txt
|
|
10
|
+
src/agoragentic.egg-info/requires.txt
|
|
11
|
+
src/agoragentic.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
agoragentic
|