SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2609.02991 · September 2026

TRACE: Spatiotemporal Contact Memory Graph Network Simulator for Granular Dynamics

Junfeng Fang, Changjian Zhou, Negin Yousefpour, Guillermo Narsilio, Jie Qi, Guillermo A. Narsilio, Hans Petter Jostad

arXiv · PDF · Open in the Atlas

Code that ran

10 of 13 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 2 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 8 failures of our instrument; 3 no recorded run), measured 2026-11-24; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2609.02991.json · badge: /api/ran/2609.02991.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
Data-Driven-Computational-Geotechnics/TRACE canonical (classifier label)
classifier basis: census
10 ran · 3 no recorded run
FunctionStatusWhere it lives
build_mlp Ran
ran; our contract draft was wrong, not the code
Data-Driven-Computational-Geotechnics/TRACE/baselines/gns/gns/model.py
code served (permissive licence) · get_code("7a9bdff7c4b6fdf5")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Sequential. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    "in_dim": 4,
    "out_dim": 3,
    "hidden": 128,
    "n_hidden_layers": 2,
    "layernorm": True,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Sequential — a Sequential output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Sequential output the recorded ndim 1 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
build_mlp Ran
ran; our contract draft was wrong, not the code
Data-Driven-Computational-Geotechnics/TRACE/baselines/nmgns/tgnn/model.py
code served (permissive licence) · get_code("b7711dd656eacee4")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Sequential. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    "in_dim": 4,
    "out_dim": 3,
    "hidden": 128,
    "n_hidden": 2,
    "layernorm": True,
    "slope": 0.1,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Sequential — a Sequential output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Sequential output the recorded ndim 1 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
collate_graphs Ran
ran; our contract draft was wrong, not the code
Data-Driven-Computational-Geotechnics/TRACE/trace/tracegnn/data.py
code served (permissive licence) · get_code("88e126bc2e7e2bfb")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
from typing import List, Dict

torch.manual_seed(0)

# Create a batch of graph dictionaries
# Each dict represents a graph with tensor data
batch = [
    {
        "node_features": torch.randn(4, 3),
        "edge_index": torch.randint(0, 4, (2, 5)),
        "labels": torch.tensor([0, 1, 0, 1]),
    },
    {
        "node_features": torch.randn(4, 3),
        "edge_index": torch.randint(0, 4, (2, 5)),
        "labels": torch.tensor([1, 0, 1, 0]),
    },
]

ARGS = {
    "batch": batch,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
load_config Ran
ran; our contract draft was wrong, not the code
Data-Driven-Computational-Geotechnics/TRACE/common/trainer_common.py
code served (permissive licence) · get_code("86fbdb2f0a071f11")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os
import sys
import json
import math
import logging
import argparse
import yaml
import tempfile
import torch

# Create a temporary YAML config file
temp_config = tempfile.NamedTemporaryFile(mode='w', suffix='.yaml', delete=False)
config_content = {
    'exp_name': 'test_experiment',
    'results_path': '.',
    'seed': 42,
    'gpu': None,
    'model_name': 'test_model',
    'some_param': 'value'
}
yaml.dump(config_content, temp_config)
temp_config.close()

# Mock sys.argv to provide command-line arguments
sys.argv = [
    'test_script.py',
    '--config', temp_config.name,
    '--exp-name', 'override_exp',
    '--gpu', '0',
    '--results-path', '/tmp/results',
    '--seed', '123'
]

ARGS = {
    'model_name': 'test_model_name'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, yaml — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
make_logger Ran
ran; our contract draft was wrong, not the code
Data-Driven-Computational-Geotechnics/TRACE/common/trainer_common.py
code served (permissive licence) · get_code("7e5e740560a568f1")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Logger. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os
import sys
import json
import math
import logging
import argparse
from pathlib import Path
import tempfile

# Create a temporary directory for the log file
temp_dir = tempfile.mkdtemp()
log_file_path = Path(temp_dir) / "test.log"

ARGS = {
    "log_file": log_file_path,
    "name": "test_logger"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Logger — a Logger output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Logger output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
metadata_radius Ran
ran, honoured the contract we drafted
Data-Driven-Computational-Geotechnics/TRACE/common/sand_data.py
code served (permissive licence) · get_code("06cdd80059b0293e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import json
import tempfile
import os

# Create a temporary JSON file with metadata containing default_connectivity_radius
temp_dir = tempfile.mkdtemp()
meta_path = os.path.join(temp_dir, "metadata.json")

metadata = {
    "default_connectivity_radius": 2.5
}

with open(meta_path, 'w') as f:
    json.dump(metadata, f)

ARGS = {
    "meta_path": meta_path,
    "skin_factor": 0.5
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
render_panel Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Data-Driven-Computational-Geotechnics/TRACE/common/render.py
code served (permissive licence) · get_code("6a174e5e09aa6b30")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 1, dtype family float, shape (10,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
from pathlib import Path
import tempfile

# Create tiny synthetic data for the particles simulation
# Shape: (T, N_particles, 3) where last dim is [x, y, height]
np.random.seed(0)

T = 10  # number of timesteps
N_particles = 5  # number of particles
box_size = 1.0

# Ground truth trajectory
gt = np.random.rand(T, N_particles, 2) * box_size
# Add height info in the first frame for coloring
gt_with_height = np.zeros((T, N_particles, 2))
gt_with_height[:, :, 0] = gt[:, :, 0]  # x positions
gt_with_height[:, :, 1] = np.linspace(0, box_size, N_particles)  # y positions (colored by initial height)

# Prediction trajectory (slightly perturbed from gt)
pred = gt_with_height + np.random.randn(T, N_particles, 2) * 0.05

# Create a temporary directory for saving
temp_dir = tempfile.mkdtemp()
save_path = Path(temp_dir) / "render_panel_test.png"

ARGS = {
    "pred": pred,
    "gt": gt_with_height,
    "box_size": box_size,
    "save_path": save_path,
    "title": "Test Render Panel",
    "frames": None,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
matplotlib, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (10,) — shape (10,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
rollout_any Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
Data-Driven-Computational-Geotechnics/TRACE/common/eval_any.py
code served (permissive licence) · get_code("abdc0c5a637486ea")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 4, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

class MockGNSModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.n_history = 5
    
    def rollout(self, pos, vseq0, nt, rad, Rn, dt=1.0, box=(0.0, 1.0)):
        # pos: (N, d), vseq0: (N, H, d)
        # Returns list of Rn dicts with 'pos' key
        N = pos.shape[0]
        d = pos.shape[1]
        traj = []
        for _ in range(Rn):
            traj.append({'pos': torch.randn(N, d)})
        return traj

class MockTGNNModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.n_frames = 3
    
    def rollout(self, pos_seq, nt, rad, Rn, dt=1.0, box=(0.0, 1.0)):
        # pos_seq: (L, N, d)
        # Returns list of Rn dicts with 'pos' key
        N = pos_seq.shape[1]
        d = pos_seq.shape[2]
        traj = []
        for _ in range(Rn):
            traj.append({'pos': torch.randn(N, d)})
        return traj

# GNS sample: need at least 3 frames (1 + H + Rn)
sample_gns = {
    'pos': torch.randn(10, 4, 3),  # (T, N, d)
    'vel': torch.randn(10, 4, 3),
    'node_type': torch.zeros(4, dtype=torch.long),
    'radius': torch.ones(4) * 0.1
}

# TGNN sample: need at least L + Rn + 1 frames
sample_tgnn = {
    'pos': torch.randn(8, 4, 3),  # (T, N, d)
    'vel': torch.randn(8, 4, 3),
    'node_type': torch.zeros(4, dtype=torch.long),
    'radius': torch.ones(4) * 0.1
}

ARGS = {
    'm': MockGNSModel(),
    'kind': 'gns',
    'sample': sample_gns,
    'dev': 'cpu',
    'horizon': 5,
    'box': 1.0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
render, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 4, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
rollout_pred Ran
ran, honoured the contract we drafted
Data-Driven-Computational-Geotechnics/TRACE/common/render.py
code served (permissive licence) · get_code("52b3b12b35c34e70")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 4, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

class DummyModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 4)
    
    def rollout(self, pos, vel, node_type, radius, n_steps, dt, box_size, contact_projection=False):
        """Simulate n_steps forward, returning list of dicts with 'pos' key."""
        trajectory = []
        current_pos = pos.clone()
        current_vel = vel.clone()
        
        for _ in range(n_steps):
            # Simple forward Euler step
            current_pos = current_pos + current_vel * dt
            # Dummy velocity update (could add forces)
            current_vel = current_vel * 0.99
            trajectory.append({'pos': current_pos.clone()})
        
        return trajectory

# Build small tensors with distinct dimensions
N = 2  # number of nodes
d = 4  # position dimension

model = DummyModel()
dev = torch.device('cpu')

sample = {
    'pos': torch.randn(5, N, d),  # 5 time steps, 2 nodes, 4 dims
    'vel': torch.randn(5, N, d),  # same shape
    'node_type': torch.randint(0, 3, (N,)),  # 2 node types
    'radius': torch.ones(N) * 0.1,  # 2 radii
}

ARGS = {
    'model': model,
    'sample': sample,
    'dev': dev,
    'dt': 0.01,
    'box_size': 1.0,
    'n_steps': 3,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 4, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
setup_run Ran
ran; our contract draft was wrong, not the code
Data-Driven-Computational-Geotechnics/TRACE/common/trainer_common.py
code served (permissive licence) · get_code("e0177164e99d9681")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os
import sys
import json
import math
import logging
import argparse
from pathlib import Path
from datetime import datetime
import tempfile

# Create a temporary directory for the run
temp_dir = tempfile.mkdtemp()

ARGS = {
    'cfg': {
        'model_name': 'test_model',
        'exp_name': 'test_experiment',
        'results_path': Path(temp_dir),
        'results_dirname': 'test_model'
    }
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
load_any Not yet run
unverified (harvested, no recorded run)
Data-Driven-Computational-Geotechnics/TRACE/common/eval_any.py
code served (permissive licence) · get_code("efe7cea377a35832")
How it ran

no invocation recorded.

render_gif Not yet run
unverified (harvested, no recorded run)
Data-Driven-Computational-Geotechnics/TRACE/common/render.py
code served (permissive licence) · get_code("99da1cb6b3b0386e")
How it ran

no invocation recorded.

run_eval Not yet run
unverified (harvested, no recorded run)
Data-Driven-Computational-Geotechnics/TRACE/common/eval_common.py
code served (permissive licence) · get_code("155a7ca64cbef7ca")
How it ran

no invocation recorded.

Also present in other papers' code

Of 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 13 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 13 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-24.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Learned graph simulators provide an efficient alternative to high-fidelity solvers for granular dynamics. However, granular motion depends strongly on inter-granular contact history, which is difficult to preserve when particle contacts form, break, and rearrange. Existing simulators mainly store temporal information in node features or node-level memory. Here we introduce TRACE, a graph-network simulator that stores interaction history directly on contact edges. Each edge maintains a persistent memory updated by attention-based message passing and a gated recurrent unit, while an edge-identity dictionary preserves this memory as the contact graph changes. A physics-structured decoder predicts inter-granular normal and tangential contact forces, enforces the Coulomb friction limit, and applies equal-and-opposite internal forces. The model is trained with single-step pretraining followed by autoregressive rollout fine-tuning. We evaluate TRACE on 2D and 3D granular column-collapse benchmarks. In both cases, TRACE produces stable, physically consistent long-horizon rollouts, closely reproducing the final deposit geometry and the kinetic energy released during collapse. Compared with graph network simulator (GNS) and node-memory graph neural simulator (NMGNS), TRACE reduces long-rollout position error by 31-62% and final-deposit error by 58-89% across the two benchmarks, while using fewer parameters and maintaining near-zero particle interpenetration. TRACE also achieves 12.2$\times$ and 8.9$\times$ speedups over the material point method (MPM) reference solver in 2D and 3D, respectively. Our code is available at https://github.com/Data-Driven-Computational-Geotechnics/TRACE.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2609.02991")
get_code_for_paper("2609.02991")
have("2609.02991")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2609.02991.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2609.02991.svg)](https://syntology.ai/paper/2609.02991)

Connect an agent — have() is free.