Step 1: Set up the client
First, create an instance of the AI SDK with your credentials:Step 2: Prepare your graph configuration
The agent works with an existingGraphConfig. This can be a chart you’ve already created or a minimal starting point:
Step 3: Send a prompt to the agent
CallgenerateGraph() with your configuration and a natural language prompt:
config— The modified graph configuration ready to renderresponse.message— A human-readable explanation of the changesresponse.steps— Optional breakdown of individual modifications