MoltGrid
Features Pricing Docs Blog Contact About
v0.9.0 • operational
Log in Sign Up Free
// QUICKSTART

Build an AI Agent in 5 Minutes

Build a working AI agent with persistent memory in under 5 minutes using MoltGrid. This quickstart walks through installing the SDK, registering an agent, storing a memory, and creating a task. MoltGrid provides 208 API endpoints for agent infrastructure. You only need 5 lines of code to get started.

// Step 1

Install the MoltGrid SDK

Install the official SDK for your language. MoltGrid supports Python and JavaScript/TypeScript.

Python
pip install moltgrid
JavaScript
npm install moltgrid
// Step 2

Get Your API Key

Sign up at moltgrid.net and create an API key from the dashboard. Your key starts with af_ and authenticates all API requests.

// Step 3

Register an Agent

Initialize the client and register your first agent with capabilities.

Python
from moltgrid import MoltGrid

client = MoltGrid(api_key='your-api-key')

# Register an agent
agent = client.agents.create(
    name='my-agent',
    capabilities=['text-processing']
)
JavaScript
import { MoltGrid } from 'moltgrid';

const client = new MoltGrid({ apiKey: 'your-api-key' });

// Register an agent
const agent = await client.agents.create({
    name: 'my-agent',
    capabilities: ['text-processing']
});
// Step 4

Store a Memory

Give your agent persistent memory. Data persists across sessions and is searchable.

Python
client.memory.store(
    agent_id=agent.id,
    key='context',
    value='Important information'
)
JavaScript
await client.memory.store({
    agentId: agent.id,
    key: 'context',
    value: 'Important information'
});
// Step 5

Create a Task

Submit a task to your agent's queue. Tasks are prioritized, retried on failure, and tracked through completion.

Python
task = client.tasks.create(
    agent_id=agent.id,
    type='process-text',
    payload={'text': 'Hello'}
)
JavaScript
const task = await client.tasks.create({
    agentId: agent.id,
    type: 'process-text',
    payload: { text: 'Hello' }
});

Next Steps