> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ag2.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# autogen.register_function

<code class="doc-symbol doc-symbol-heading doc-symbol-function" />

#### register\_function

```python theme={null}
register_function(
    f: Callable[..., Any],
    *,
    caller: ConversableAgent,
    executor: ConversableAgent,
    name: str | None = None,
    description: str
) -> None
```

Register a function to be proposed by an agent and executed for an executor.<br />This function can be used instead of function decorators `@ConversationAgent.register_for_llm` and
`@ConversationAgent.register_for_execution`.<br />

<b>Parameters:</b>

| Name          | Description                                                                                                                                                                                                                                                                |
| ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `f`           | the function to be registered.<br /><br />**Type:** Callable\[..., Any]                                                                                                                                                                                                    |
| `caller`      | the agent calling the function, typically an instance of ConversableAgent.<br /><br />**Type:** [ConversableAgent](/docs/api-reference/autogen/ConversableAgent)                                                                                                           |
| `executor`    | the agent executing the function, typically an instance of UserProxy.<br /><br />**Type:** [ConversableAgent](/docs/api-reference/autogen/ConversableAgent)                                                                                                                |
| `name`        | name of the function.<br /><br />If None, the function name will be used (default: None).<br /><br />**Type:** str \| None<br /><br />**Default:** None                                                                                                                    |
| `description` | description of the function.<br /><br />The description is used by LLM to decode whether the function is called.<br /><br />Make sure the description is properly describing what the function does or it might not be called by LLM when needed.<br /><br />**Type:** str |

<br />
