# create_cohere_react_agent

> **Function** in `langchain_cohere`

📖 [View in docs](https://reference.langchain.com/python/langchain-cohere/react_multi_hop/agent/create_cohere_react_agent)

Create an agent that enables multiple tools to be used in sequence to complete a
task.

## Signature

```python
create_cohere_react_agent(
    llm: BaseLanguageModel,
    tools: Sequence[BaseTool],
    prompt: ChatPromptTemplate,
) -> Runnable
```

## Description

**Example:**

```python
from langchain.agents import AgentExecutor
from langchain.prompts import ChatPromptTemplate
from langchain_cohere import ChatCohere, create_cohere_react_agent

prompt = ChatPromptTemplate.from_template("{input}")
tools = []  # Populate this with a list of tools you would like to use.

llm = ChatCohere()

agent = create_cohere_react_agent(
    llm,
    tools,
    prompt
)
agent_executor = AgentExecutor(agent=agent, tools=tools)

agent_executor.invoke({
    "input": "In what year was the company that was founded as Sound of Music added to the S&P 500?",
})
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `llm` | `BaseLanguageModel` | Yes | The `ChatCohere` LLM instance to use. |
| `tools` | `Sequence[BaseTool]` | Yes | Tools this agent has access to. |
| `prompt` | `ChatPromptTemplate` | Yes | The prompt to use. |

## Returns

`Runnable`

A `Runnable` sequence representing an agent. It takes as input all the same input

---

[View source on GitHub](https://github.com/langchain-ai/langchain-cohere/blob/98e3d038d365eebd6dabcf8c4d94072580f7401d/libs/cohere/langchain_cohere/react_multi_hop/agent.py#L34)