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/mkdocs/en/knowledge_vectorstore.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -614,7 +614,7 @@ The complete example is available at [knowledge_with_vectorstore](../../../examp
614
614
615
615
Steps to run the example:
616
616
617
-
1. Configure environment variables in `examples/knowledge_with_vectorstore/.env`, set `VECTORSTORE_TYPE=tencentvdb` and fill in the Tencent Cloud VectorDB connection parameters:
617
+
1. Configure environment variables in [examples/knowledge_with_vectorstore/.env](../../../examples/knowledge_with_vectorstore/.env), set `VECTORSTORE_TYPE=tencentvdb` and fill in the Tencent Cloud VectorDB connection parameters:
@@ -99,7 +117,7 @@ For tool nodes, they are typically used with the `@tool` and `@tool_node` decora
99
117
100
118
```python
101
119
from langchain_core.tools import tool
102
-
from trpc_agent_sdk.agents.langgraph_agentimport tool_node
120
+
from trpc_agent_sdk.agents import tool_node
103
121
104
122
@tool
105
123
@tool_node
@@ -154,7 +172,7 @@ Its purpose is to:
154
172
What `LangGraphAgent` actually accepts is not the `StateGraph` builder itself, but the graph object after `compile()`. The framework's `LangGraphAgent` explicitly requires a compiled graph as input.
155
173
156
174
```python
157
-
from trpc_agent_sdk.agents.langgraph_agentimport LangGraphAgent
175
+
from trpc_agent_sdk.agents import LangGraphAgent
158
176
159
177
graph = graph_builder.compile()
160
178
@@ -180,7 +198,7 @@ A LangGraphAgent can be created by providing a compiled LangGraph graph, as show
180
198
The other parameters follow the same definitions as in `LlmAgent`.
181
199
182
200
```python
183
-
from trpc_agent_sdk.agents.langgraph_agentimport LangGraphAgent
201
+
from trpc_agent_sdk.agents import LangGraphAgent
184
202
185
203
# Assume the LangGraph has already been built
186
204
graph = build_your_langgraph()
@@ -198,13 +216,13 @@ agent = LangGraphAgent(
198
216
### Basic Graph Structure
199
217
200
218
```python
219
+
from typing import Annotated
220
+
from typing_extensions import TypedDict
201
221
from langchain.chat_models import init_chat_model
202
222
from langchain_core.tools import tool
203
223
from langgraph.graph import StateGraph, START
204
224
from langgraph.graph.message import add_messages
205
225
from langgraph.prebuilt import tools_condition, ToolNode
Used to decorate tool execution nodes, automatically recording tool invocation information. Note that @tool_node must be placed after LangGraph's @tool decorator:
257
275
258
276
```python
259
-
from trpc_agent_sdk.agents.langgraph_agentimport tool_node
Without explicitly instantiating `LiteLLMModel`, you can pass only the model name string; the framework uses `ModelRegistry`'s `supported_models` regex patterns to match and create a LiteLLMModel instance. In this case, the API Key, base_url, and other settings rely on environment variables (e.g., `OPENAI_API_KEY`, `OPENAI_API_BASE`).
237
237
238
238
```python
239
-
from trpc_agent_sdk.agents.llm_agentimport LlmAgent
TransferAgent is a transfer proxy Agent designed to enable custom Agents without transfer capability (such as `TrpcRemoteA2aAgent`) to gain transfer capability, thereby integrating them into the tRPC-Agent framework's multi-Agent system.
444
444
445
-
`TrpcRemoteA2aAgent` can be used to simulate a remote Agent scenario (first start an A2A Agent service with `examples/a2a/run_server.py` to mimic a remote Agent).
445
+
`TrpcRemoteA2aAgent` can be used to simulate a remote Agent scenario (first start an A2A Agent service with [examples/a2a/run_server.py](../../../examples/a2a/run_server.py) to mimic a remote Agent).
446
446
447
447
Through TransferAgent, custom Agents can:
448
448
-**Act as sub_agent**: The parent Agent can transfer control to this Agent, and this Agent can transfer control to parent/sibling Agents
Copy file name to clipboardExpand all lines: docs/mkdocs/en/session.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ In trpc-agent, `SessionService` is used to manage `Session` (sessions). A `Sessi
22
22
23
23
### Core Structure of Session
24
24
25
-
Based on the implementation in `trpc_agent/sessions/_session.py`, a `Session` contains the following key fields:
25
+
Based on the implementation in [trpc_agent_sdk/sessions/_session.py](../../../trpc_agent_sdk/sessions/_session.py), a `Session` contains the following key fields:
0 commit comments