# OpenAIFunctionsAgent

> **Class** in `langchain_classic`

📖 [View in docs](https://reference.langchain.com/python/langchain-classic/agents/openai_functions_agent/base/OpenAIFunctionsAgent)

An Agent driven by OpenAIs function powered API.

## Signature

```python
OpenAIFunctionsAgent()
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `llm` | `unknown` | Yes | This should be an instance of `ChatOpenAI`, specifically a model that supports using `functions`. |
| `tools` | `unknown` | Yes | The tools this agent has access to. |
| `prompt` | `unknown` | Yes | The prompt for this agent, should support agent_scratchpad as one of the variables. For an easy way to construct this prompt, use `OpenAIFunctionsAgent.create_prompt(...)` |
| `output_parser` | `unknown` | Yes | The output parser for this agent. Should be an instance of `OpenAIFunctionsAgentOutputParser`. |

## Extends

- `BaseSingleActionAgent`

## Properties

- `llm`
- `tools`
- `prompt`
- `output_parser`
- `input_keys`
- `functions`

## Methods

- [`get_allowed_tools()`](https://reference.langchain.com/python/langchain-classic/agents/openai_functions_agent/base/OpenAIFunctionsAgent/get_allowed_tools)
- [`validate_prompt()`](https://reference.langchain.com/python/langchain-classic/agents/openai_functions_agent/base/OpenAIFunctionsAgent/validate_prompt)
- [`plan()`](https://reference.langchain.com/python/langchain-classic/agents/openai_functions_agent/base/OpenAIFunctionsAgent/plan)
- [`aplan()`](https://reference.langchain.com/python/langchain-classic/agents/openai_functions_agent/base/OpenAIFunctionsAgent/aplan)
- [`return_stopped_response()`](https://reference.langchain.com/python/langchain-classic/agents/openai_functions_agent/base/OpenAIFunctionsAgent/return_stopped_response)
- [`create_prompt()`](https://reference.langchain.com/python/langchain-classic/agents/openai_functions_agent/base/OpenAIFunctionsAgent/create_prompt)
- [`from_llm_and_tools()`](https://reference.langchain.com/python/langchain-classic/agents/openai_functions_agent/base/OpenAIFunctionsAgent/from_llm_and_tools)

## ⚠️ Deprecated

Deprecated since version 0.1.0. Use create_openai_functions_agent instead. Will be removed in version 1.0.

---

[View source on GitHub](https://github.com/langchain-ai/langchain/blob/9f232caa7a8fe1ca042a401942d5d90d54ceb1a6/libs/langchain/langchain_classic/agents/openai_functions_agent/base.py#L38)