# create_pbi_agent

> **Function** in `langchain_community`

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

Construct a Power BI agent from an LLM and tools.

## Signature

```python
create_pbi_agent(
    llm: BaseLanguageModel,
    toolkit: Optional[PowerBIToolkit] = None,
    powerbi: Optional[PowerBIDataset] = None,
    callback_manager: Optional[BaseCallbackManager] = None,
    prefix: str = POWERBI_PREFIX,
    suffix: str = POWERBI_SUFFIX,
    format_instructions: Optional[str] = None,
    examples: Optional[str] = None,
    input_variables: Optional[List[str]] = 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` | `BaseLanguageModel` | 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`) |
| `prefix` | `str` | No | Optional. The prefix for the prompt. Default is POWERBI_PREFIX. (default: `POWERBI_PREFIX`) |
| `suffix` | `str` | No | Optional. The suffix for the prompt. Default is POWERBI_SUFFIX. (default: `POWERBI_SUFFIX`) |
| `format_instructions` | `Optional[str]` | No | Optional. The format instructions for the prompt. Default is None. (default: `None`) |
| `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`) |
| `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/a6a6079511ac8a5c1293337f88096b8641562e77/libs/community/langchain_community/agent_toolkits/powerbi/base.py#L21)