Docs

extraAgents - HyperCore Info Endpoint

Get information about extra agents for a user on Hyperliquid. Manage trading agents, permissions, and delegated access.

Get information about extra agents configured for a user, including trading agents, permissions, and delegated access settings.

The live response is an array of agent records with name, address, and validUntil.

Authenticate HyperCore Info requests by sending your Dwellir API key in the x-api-key header to https://api-hyperliquid-mainnet-info.n.dwellir.com/info.

When to Use This Endpoint

The extraAgents endpoint is essential for:

  • Agent Management — View all agents with access to the account
  • Permission Tracking — Monitor agent permissions and access levels
  • Security Auditing — Verify authorized agents and delegated access
  • Access Control — Manage who can trade on behalf of the account

Common Use Cases

1. List All Agents

Display all agents with access to the account:

JavaScript
async function listAgents(userAddress) {
  const agents = await getExtraAgents(userAddress);

  console.log('=== Account Agents ===\n');
  console.log(`Total agents: ${agents.length}`);

  if (agents.length === 0) {
    console.log('No extra agents configured');
  } else {
    console.log('Agents have access to this account');
  }
}

// Usage
await listAgents('0x63E8c7C149556D5f34F833419A287bb9Ef81487f');

2. Security Audit

Audit agent access for security:

JavaScript
async function auditAgentAccess(userAddress) {
  const agents = await getExtraAgents(userAddress);

  const audit = {
    timestamp: new Date().toISOString(),
    agentCount: agents.length,
    hasAgents: agents.length > 0,
    securityStatus: agents.length === 0 ? 'no-agents' : 'agents-configured'
  };

  console.log('=== Security Audit ===\n');
  console.log(`Agent count: ${audit.agentCount}`);
  console.log(`Status: ${audit.securityStatus}`);

  return audit;
}

// Usage
const audit = await auditAgentAccess('0x63E8c7C149556D5f34F833419A287bb9Ef81487f');

3. Monitor Agent Changes

Track changes in agent configuration:

JavaScript
class AgentMonitor {
  constructor(userAddress) {
    this.userAddress = userAddress;
    this.lastKnownCount = null;
  }

  async checkForChanges() {
    const agents = await getExtraAgents(this.userAddress);
    const currentCount = agents.length;

    if (this.lastKnownCount !== null) {
      const change = currentCount - this.lastKnownCount;

      if (change > 0) {
        console.log(`⚠️  ${change} new agent(s) added`);
      } else if (change < 0) {
        console.log(`✓ ${Math.abs(change)} agent(s) removed`);
      }
    }

    this.lastKnownCount = currentCount;

    return {
      currentCount: currentCount,
      changed: this.lastKnownCount !== null && currentCount !== this.lastKnownCount
    };
  }
}

// Usage
const monitor = new AgentMonitor('0x63E8c7C149556D5f34F833419A287bb9Ef81487f');
setInterval(() => monitor.checkForChanges(), 60000); // Check every minute

4. Build Agent Dashboard

Create agent management dashboard:

JavaScript
async function getAgentDashboard(userAddress) {
  try {
    const agents = await getExtraAgents(userAddress);

    return {
      status: 'success',
      agents: agents,
      totalAgents: agents.length,
      hasAgents: agents.length > 0,
      lastUpdated: new Date().toISOString()
    };
  } catch (error) {
    return {
      status: 'error',
      error: error.message,
      agents: []
    };
  }
}

// Usage
const dashboard = await getAgentDashboard('0x63E8c7C149556D5f34F833419A287bb9Ef81487f');
console.log('Agent Dashboard:', dashboard);

5. Verify Agent Authorization

Check if agents are properly authorized:

JavaScript
async function verifyAgentAuthorization(userAddress) {
  const agents = await getExtraAgents(userAddress);

  const verification = {
    isConfigured: agents.length > 0,
    agentCount: agents.length,
    status: agents.length > 0 ? 'agents-active' : 'no-agents',
    recommendation: agents.length > 0
      ? 'Review agent permissions regularly'
      : 'No agents configured'
  };

  console.log('Agent Authorization:', verification);
  return verification;
}

// Usage
const verification = await verifyAgentAuthorization('0x63E8c7C149556D5f34F833419A287bb9Ef81487f');

Best Practices

  1. Validate addresses — Ensure user addresses are valid Ethereum addresses
  2. Cache data — Cache agent data for several minutes
  3. Monitor changes — Track agent additions/removals for security
  4. Regular audits — Periodically review agent access for security
  5. Handle empty states — Account for users without extra agents

Security Considerations

Regular Security Checks

JavaScript
class SecurityChecker {
  constructor(userAddress, checkIntervalMs = 300000) {
    this.userAddress = userAddress;
    this.checkIntervalMs = checkIntervalMs; // 5 minutes
  }

  async performSecurityCheck() {
    const data = await getExtraAgents(this.userAddress);

    const securityReport = {
      timestamp: new Date().toISOString(),
      agentCount: data.agents.length,
      status: data.agents.length === 0 ? 'secure-no-agents' : 'review-required'
    };

    if (data.agents.length > 0) {
      console.log(`⚠️  Security Review: ${data.agents.length} agent(s) have access`);
    } else {
      console.log('✓ Security Check: No extra agents');
    }

    return securityReport;
  }

  async startMonitoring() {
    // Initial check
    await this.performSecurityCheck();

    // Periodic checks
    setInterval(() => this.performSecurityCheck(), this.checkIntervalMs);
  }
}

Manage agent access and permissions with Dwellir's HyperCore Info Endpoint. Get your API key →