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,
)[source]#

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 as with_config, with_types, with_retry, assign, bind, get_graph, and more.

Attributes

Methods

__init__(*args,Β **kwargs)

Initialize self.