# create_pbi_chat_agent

> **Function** in `langchain_community`

📖 [View in docs](https://reference.langchain.com/python/langchain-community/agent_toolkits/powerbi/chat_base/create_pbi_chat_agent)

Construct a Power BI agent from a Chat LLM and tools.

If you supply only a toolkit and no Power BI dataset, the same LLM is used for both.

## Signature

```python
create_pbi_chat_agent(
    llm: BaseChatModel,
    toolkit: Optional[PowerBIToolkit] = None,
    powerbi: Optional[PowerBIDataset] = None,
    callback_manager: Optional[BaseCallbackManager] = None,
    output_parser: Optional[AgentOutputParser] = None,
    prefix: str = POWERBI_CHAT_PREFIX,
    suffix: str = POWERBI_CHAT_SUFFIX,
    examples: Optional[str] = None,
    input_variables: Optional[List[str]] = None,
    memory: Optional[BaseChatMemory] = None,
    top_k: int = 10,
    verbose: bool = False,
    agent_executor_kwargs: Optional[Dict[str, Any]] = None,
    **kwargs: Any = {},
) -> AgentExecutor
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `llm` | `BaseChatModel` | Yes | The language model to use. |
| `toolkit` | `Optional[PowerBIToolkit]` | No | Optional. The Power BI toolkit. Default is None. (default: `None`) |
| `powerbi` | `Optional[PowerBIDataset]` | No | Optional. The Power BI dataset. Default is None. (default: `None`) |
| `callback_manager` | `Optional[BaseCallbackManager]` | No | Optional. The callback manager. Default is None. (default: `None`) |
| `output_parser` | `Optional[AgentOutputParser]` | No | Optional. The output parser. Default is None. (default: `None`) |
| `prefix` | `str` | No | Optional. The prefix for the prompt. Default is POWERBI_CHAT_PREFIX. (default: `POWERBI_CHAT_PREFIX`) |
| `suffix` | `str` | No | Optional. The suffix for the prompt. Default is POWERBI_CHAT_SUFFIX. (default: `POWERBI_CHAT_SUFFIX`) |
| `examples` | `Optional[str]` | No | Optional. The examples for the prompt. Default is None. (default: `None`) |
| `input_variables` | `Optional[List[str]]` | No | Optional. The input variables for the prompt. Default is None. (default: `None`) |
| `memory` | `Optional[BaseChatMemory]` | No | Optional. The memory. Default is None. (default: `None`) |
| `top_k` | `int` | No | Optional. The top k for the prompt. Default is 10. (default: `10`) |
| `verbose` | `bool` | No | Optional. Whether to print verbose output. Default is False. (default: `False`) |
| `agent_executor_kwargs` | `Optional[Dict[str, Any]]` | No | Optional. The agent executor kwargs. Default is None. (default: `None`) |
| `kwargs` | `Any` | No | Any. Additional keyword arguments. (default: `{}`) |

## Returns

`AgentExecutor`

The agent executor.

---

[View source on GitHub](https://github.com/langchain-ai/langchain-community/blob/4b280287bd55b99b44db2dd849f02d66c89534d5/libs/community/langchain_community/agent_toolkits/powerbi/chat_base.py#L23)