You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/en-US/python-sdk.md
+77-24Lines changed: 77 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -260,60 +260,107 @@ if handled and not is_error:
260
260
261
261
### Framework integrations
262
262
263
-
Expose the QVeris discover/inspect/call workflow as tools for popular agent frameworks. Adapters import their framework lazily, so the base `qveris` package never depends on them.
263
+
Expose the QVeris discover/inspect/call workflow as native tools for popular agent frameworks. Adapters import their framework lazily, so the base `qveris` package never depends on them.
| LangChain / LangGraph |`StructuredTool`|`pip install "qveris[langchain]"` (adapter: Python 3.9+) | The current `create_agent` example requires Python 3.10+, `langchain>=1.0`, and a model-provider package. |
268
+
| OpenAI Agents SDK |`FunctionTool`|`pip install "qveris[openai-agents]"` (Python 3.10+) | Pass the tools to `Agent`; close with `await client.close()`. |
269
+
| CrewAI |`BaseTool`|`pip install "qveris[crewai]"` (Python 3.10+) | Tools are sync/async bridged; close with `aclose(client)`. |
270
+
| AutoGen |`autogen_core.tools.FunctionTool`|`pip install "qveris[autogen]"` (Python 3.10+) | Also install `autogen-agentchat` and a model extension such as `autogen-ext[openai]`. |
271
+
| LlamaIndex |`llama_index.core.tools.FunctionTool`|`pip install "qveris[llamaindex]"` (Python 3.10+) | Also install the model integration used by `FunctionAgent`; use an async agent or `await tool.acall(...)`. |
272
+
| Pydantic AI |`pydantic_ai.Tool`|`pip install "qveris[pydantic-ai]"` (Python 3.10+) | The extra is slim; add a provider extra such as `pydantic-ai-slim[openai]`. |
273
+
274
+
Every `get_qveris_tools(client, session_id=...)` call returns exactly three tools: `qveris_discover`, `qveris_inspect`, and `qveris_call`. Results, including QVeris error payloads, are JSON strings so the agent can inspect them and recover. `discover` is free and returns a `search_id`; pass that ID to `inspect` and `call`. A complete agent run needs `QVERIS_API_KEY` plus the API key required by its model provider.
275
+
276
+
**LangChain and LangGraph**
277
+
278
+
Use LangChain's current `create_agent` API. It runs on LangGraph; custom LangGraph workflows can put the same tools in a `ToolNode`.
#run your crew synchronously (crew.kickoff()), then:
332
+
agent = Agent(role="Researcher", goal="Use the right capability", backstory="Tool specialist", tools=get_qveris_tools(client))
333
+
#Crew(...).kickoff()
313
334
aclose(client)
314
335
```
315
336
316
-
CrewAI runs tools synchronously; these bridge to the async client on one dedicated event loop. Close the client with `aclose(client)` (not `await client.close()`), since its connections are bound to that loop. The TypeScript SDK ships a Vercel AI SDK adapter.
337
+
CrewAI's client connections run on the adapter's dedicated event loop, so use `aclose(client)` rather than `await client.close()`.
338
+
339
+
**AutoGen, LlamaIndex, and Pydantic AI**
340
+
341
+
```python
342
+
# The following snippets assume a configured QverisClient plus the framework's
343
+
# model_client / llm. Choose the adapter that matches your agent framework.
344
+
# AutoGen AssistantAgent
345
+
from autogen_agentchat.agents import AssistantAgent
346
+
from qveris.integrations.autogen import get_qveris_tools
0 commit comments