# OpenAIFunctionsAgentOutputParser

> **Class** in `langchain_classic`

📖 [View in docs](https://reference.langchain.com/python/langchain-classic/agents/output_parsers/openai_functions/OpenAIFunctionsAgentOutputParser)

Parses a message into agent action/finish.

Is meant to be used with OpenAI models, as it relies on the specific
function_call parameter from OpenAI to convey what tools to use.

If a function_call parameter is passed, then that is used to get
the tool and tool input.

If one is not passed, then the AIMessage is assumed to be the final output.

## Signature

```python
OpenAIFunctionsAgentOutputParser()
```

## Extends

- `AgentOutputParser`

## Methods

- [`parse_ai_message()`](https://reference.langchain.com/python/langchain-classic/agents/output_parsers/openai_functions/OpenAIFunctionsAgentOutputParser/parse_ai_message)
- [`parse_result()`](https://reference.langchain.com/python/langchain-classic/agents/output_parsers/openai_functions/OpenAIFunctionsAgentOutputParser/parse_result)
- [`parse()`](https://reference.langchain.com/python/langchain-classic/agents/output_parsers/openai_functions/OpenAIFunctionsAgentOutputParser/parse)

---

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