research_crew
agentclient.NewWithAddress()
function creates a new RunAgent client with the following parameters:
"331fa66f-1089-43f0-8912-cc1b4c22ab01"
- Unique identifier for the agent"research_crew"
- Human-readable name of the agenttrue
- Enable secure connection"localhost"
- Server hostname or IP address8453
- Server port numberdefer cancel()
ensures proper cleanup.
Run()
method executes the agent with the provided parameters. In this example, we’re passing a topic
parameter with the value "global warming"
.
defer agentClient.Close()
to ensure proper cleanup