Back to Autogpt

🧠 Running AI/ML API with AutoGPT

docs/platform/aimlapi.md

0.6.444.4 KB
Original Source

🧠 Running AI/ML API with AutoGPT

Follow these steps to connect AI/ML API with the AutoGPT platform for high-performance AI text generation.


βœ… Prerequisites

  1. Make sure you have gone through and completed the AutoGPT Setup Guide, and AutoGPT is running locally at http://localhost:3000.
  2. You have an API key from AI/ML API.

βš™οΈ Setup Steps

1. Start AutoGPT Locally

Follow the official guide: πŸ“– AutoGPT Getting Started Guide

Make sure AutoGPT is running and accessible at: http://localhost:3000

πŸ’‘ Keep AutoGPT running in a terminal or Docker throughout the session.


2. Open the Visual Builder

Open your browser and go to: http://localhost:3000/build

Or click β€œBuild” in the navigation bar.


3. Add an AI Text Generator Block

  1. Click the "Blocks" button on the left sidebar.

  1. In the search bar, type AI Text Generator.
  2. Drag the block into the canvas.


4. Select an AI/ML API Model

Click the AI Text Generator block to configure it.

In the LLM Model dropdown, select one of the supported models from AI/ML API:

Model IDSpeedReasoning QualityBest For
Qwen/Qwen2.5-72B-Instruct-TurboMediumHighText-based tasks
nvidia/llama-3.1-nemotron-70b-instructMediumHighAnalytics and reasoning
meta-llama/Llama-3.3-70B-Instruct-TurboLowVery HighComplex multi-step tasks
meta-llama/Meta-Llama-3.1-70B-Instruct-TurboLowVery HighDeep reasoning
meta-llama/Llama-3.2-3B-Instruct-TurboHighMediumFast responses

βœ… These models are available via OpenAI-compatible API from AI/ML API


5. Configure the Prompt and API Key

Inside the AI Text Generator block:

  1. Enter your prompt text in the Prompt field.
  2. Enter your AI/ML API Key in the designated field.

πŸ” You can get your key from: https://aimlapi.com/app/keys/


6. Save Your Agent

Click the β€œSave” button at the top-right of the builder interface:

  1. Give your agent a name (e.g., aimlapi_test_agent).
  2. Click β€œSave Agent” to confirm.

πŸ’‘ Saving allows reuse, scheduling, and chaining in larger workflows.


7. Run Your Agent

From the workspace:

  1. Press β€œRun” next to your saved agent.
  2. The request will be sent to the selected AI/ML API model.


8. View the Output

  1. Scroll to the AI Text Generator block.
  2. Check the Output panel below it.
  3. You can copy, export, or pass the result to further blocks.


πŸ”„ Expand Your Agent

Now that AI/ML API is connected, expand your workflow by chaining additional blocks:

  • πŸ”§ Tools – fetch URLs, call APIs, scrape data
  • 🧠 Memory – retain context across interactions
  • βš™οΈ Actions / Chains – create full pipelines

πŸŽ‰ You’re now generating AI responses using enterprise-grade models from AI/ML API in AutoGPT!