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

# Is Function Or Decorated • AI Agents Framework

> is_function_or_decorated: Checks if the given object is a function or has a __call__ method.

# is\_function\_or\_decorated

<div className="flex items-center gap-2">
  <Badge color="purple">Method</Badge>
</div>

> This is a method of the [**AgentsGenerator**](../classes/AgentsGenerator) class in the [**agents\_generator**](../modules/agents_generator) module.

Checks if the given object is a function or has a **call** method.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def is_function_or_decorated(obj: Any) -> Any
```

## Parameters

<ParamField query="obj" type="Any" required={true}>
  The object to be checked.
</ParamField>

### Returns

<ResponseField name="Returns" type="Any">
  True if the object is a function or has a **call** method, False otherwise.
</ResponseField>

## Uses

* `inspect.isfunction`

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai/praisonai/agents_generator.py#L220">
  `praisonai/agents_generator.py` at line 220
</Card>
