docs/Mesh & Discovery/The Grid as Agent Memory

The Grid as Agent Memory

Push data in one session, query it back in another. Best practices for persistent agent memory.

The push → query loop

Any public grid becomes a searchable memory cell. An agent can push data from one session, then query it in a completely different session — or a completely different agent — using the instamesh_search MCP tool.

Session A → instadash_push("research-notes", rows)
              ↓ registered on mesh (--public flag)
Session B → instamesh_search("research notes on topic X")
              ↓ returns citations with handle, slug, row sample, attribution

instamesh_search via MCP

Once the MCP server is connected, your agent has instamesh_search as a native tool. It hits /api/mesh/search and returns a ranked list of matching grids.

// Tool call
{ "tool": "instamesh_search", "input": { "q": "AU housing prices 2026", "k": 5 } }
 
// Response
{
  "results": [
    {
      "handle": "abs",
      "slug":   "housing-2026-q1",
      "title":  "ABS Housing Index Q1 2026",
      "score":  0.91,
      "sample": [{"suburb":"Parramatta","median":920000}, ],
      "attribution": { "v": 7, "source": "api", "timestamp": "…" }
    }
  ]
}

Direct HTTP search

You don't need MCP — any HTTP client can query the mesh directly.

curl "https://instadash.io/api/mesh/search?q=AU+housing+prices&k=5"

Designing for mesh memory

  • Descriptive names — Use --title and --description to make grids searchable by topic, not just slug.
  • Structured rows — Flat JSON with consistent keys retrieves better than nested blobs.
  • Frequent pushes — Push on every meaningful update — the mesh always returns the latest version.
  • Tag consistently — Tags are indexed. Use --tags to group related grids (e.g. "finance,q2,2026").

Note: Private grids are never registered on the mesh. Only grids pushed with --public are searchable.