DeclarativeChatAgentNode#
- class langchain_azure_ai.agents.prebuilt.declarative.DeclarativeChatAgentNode(
- client: AIProjectClient,
- model: str,
- instructions: str,
- name: str,
- description: str | None = None,
- agent_id: str | None = None,
- response_format: Dict[str, Any] | None = None,
- tools: Sequence[AgentServiceBaseTool | BaseTool | Callable] | ToolNode | None = None,
- tool_resources: Any | None = None,
- temperature: float | None = None,
- top_p: float | None = None,
- polling_interval: int = 1,
- tags: Sequence[str] | None = None,
- trace: bool = True,
A LangGraph node that represents a declarative chat agent in Azure AI Foundry.
You can use this node to create complex graphs that involve interactions with an Azure AI Foundry agent.
You can also use langchain_azure_ai.agents.AgentServiceFactory to create instances of this node.
Example
Initialize the DeclarativeChatAgentNode.
- Parameters:
client (AIProjectClient) β The AIProjectClient instance to use.
model (str) β The model to use for the agent.
instructions (str) β The prompt instructions to use for the agent.
name (str) β The name of the agent.
agent_id (str | None) β The ID of an existing agent to use. If not provided, a new agent will be created.
response_format (Dict[str, Any] | None) β The response format to use for the agent.
description (str | None) β An optional description for the agent.
tools (Sequence[AgentServiceBaseTool | BaseTool | Callable] | ToolNode | None) β A list of tools to use with the agent. Each tool can be a
tool. (dictionary defining the)
tool_resources (Any | None) β Optional tool resources to use with the agent.
temperature (float | None) β The temperature to use for the agent.
top_p (float | None) β The top_p value to use for the agent.
tags (Sequence[str] | None) β Optional tags to associate with the agent.
polling_interval (int) β The interval (in seconds) to poll for updates on the agentβs status. Defaults to 1 second.
trace (bool) β Whether to enable tracing for the node. Defaults to True.
Note
DeclarativeChatAgentNode implements the standard Runnable Interface
. π
The
Runnable Interface
has additional methods that are available on runnables, such aswith_config
,with_types
,with_retry
,assign
,bind
,get_graph
, and more.
Attributes
Methods
|
Initialize self. |