autogen/dotnet/website/articles/Use-function-call.md
Invoke function call inside an agent To invoke a function instead of returning the function call object, you can pass its function call wrapper to the agent via `functionMap`.  You can then pass the `WeatherReportWrapper` to the agent via `functionMap`: [!code-csharp[](../../sample/AutoGen.BasicSamples/CodeSnippet/FunctionCallCodeSnippet.cs?name=code_snippet_6)]  When a function call object is returned, the agent will invoke the function and uses the return value as response rather than returning the function call object.  [!code-csharp[](../../sample/AutoGen.BasicSamples/CodeSnippet/FunctionCallCodeSnippet.cs?name=code_snippet_6_1)] 