Skip to content

Commit 6d1fbef

Browse files
authored
Merge branch 'main' into add-link-checking
2 parents c390266 + 63a1c93 commit 6d1fbef

2 files changed

Lines changed: 29 additions & 0 deletions

File tree

src/oss/langchain/agents.mdx

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,29 @@ const result = await agent.invoke(
535535
For more details on message types and formatting, see [Messages](/oss/langchain/messages). For comprehensive middleware documentation, see [Middleware](/oss/langchain/middleware).
536536
</Tip>
537537

538+
## Invocation
539+
540+
You can invoke an agent by passing an update to its [state](/oss/langgraph/graph-api#state). All agents include a [sequence of messages](/oss/langgraph/use-graph-api#messagesstate) in their state; to invoke the agent, pass a new message:
541+
542+
:::python
543+
```python
544+
result = agent.invoke(
545+
{"messages": [{"role": "user", "content": "What's the weather in San Francisco?"}]}
546+
)
547+
```
548+
:::
549+
:::js
550+
```typescript
551+
await agent.invoke({
552+
messages: [{ role: "user", content: "What's the weather in San Francisco?" }],
553+
})
554+
```
555+
:::
556+
557+
For streaming steps and / or tokens from the agent, refer to the [streaming](/oss/langchain/streaming) guide.
558+
559+
Otherwise, the agent follows the LangGraph [Graph API](/oss/langgraph/use-graph-api) and supports all associated methods.
560+
538561
## Advanced concepts
539562

540563
### Structured output

src/oss/langchain/tools.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ Many AI applications interact with users via natural language. However, some use
1515

1616
Tools are components that [agents](/oss/langchain/agents) call to perform actions. They extend model capabilities by letting them interact with the world through well-defined inputs and outputs. Tools encapsulate a callable function and its input schema. These can be passed to compatible [chat models](/oss/langchain/models), allowing the model to decide whether to invoke a tool and with what arguments. In these scenarios, tool calling enables models to generate requests that conform to a specified input schema.
1717

18+
<Note>
19+
**Server-side tool use**
20+
21+
Some chat models (e.g., [OpenAI](/oss/integrations/chat/openai), [Anthropic](/oss/integrations/chat/anthropic), and [Gemini](/oss/integrations/chat/google_generative_ai)) feature [built-in tools](/oss/langchain/models#server-side-tool-use) that are executed server-side, such as web search and code interpreters. Refer to the [provider overview](/oss/integrations/providers/overview) to learn how to access these tools with your specific chat model.
22+
</Note>
23+
1824
## Create tools
1925

2026
### Basic tool definition

0 commit comments

Comments
 (0)