This example demonstrates how to integrate smolagents.ToolCallingAgent into Coagent.
References:
-
Install
coagent(see Installation). -
Start a NATS server (see Distributed).
-
Install
smolagents:pip install smolagents
First, start a server in one terminal:
export MODEL_ID="your-model-id"
export MODEL_BASE_URL="your-base-url"
export MODEL_API_KEY="your-api-key"
python examples/framework-integration/smolagents/agent.pyThen communicate with the agent using the coagent CLI:
coagent agent -H type:ChatMessage --chat -d '{"role":"user","content":"What is the weather like in Beijing?"}'