@runloop/api-client - v1.4.0
    Preparing search index...

    Object-oriented interface for working with Agents.

    The Agent class provides a high-level API for managing AI agent entities. Agents represent registered AI agents that can be mounted into devboxes and sourced from various package managers (npm, pip), git repositories, or object storage.

    Agents are created and then mounted into devboxes via the mounts parameter:

    import { RunloopSDK } from '@runloop/api-client-ts';

    const runloop = new RunloopSDK();

    // Create an agent from git
    const agent = await runloop.agent.create({
    name: 'my-agent',
    source: {
    type: 'git',
    git: {
    repository: 'https://github.com/user/agent-repo',
    ref: 'main'
    }
    }
    });

    // Mount agent into a devbox
    const devbox = await runloop.devbox.create({
    name: 'devbox-with-agent',
    mounts: [{
    type: 'agent_mount',
    agent_id: agent.id,
    agent_path: '/home/user/agent'
    }]
    });
    Index

    Constructors

    Accessors

    Methods

    Constructors

    Accessors

    Methods

    • List all agents, optionally filtered by name, public status, or search query.

      Parameters

      • client: Runloop

        The Runloop client instance

      • Optionalparams: AgentListParams

        Optional filter parameters

      • Optionaloptions: RequestOptions<unknown>

        Request options

      Returns Promise<RunloopSDK.Agent[]>

      Array of Agent instances

      const runloop = new RunloopSDK();
      // List all agents
      const agents = await runloop.agent.list();

      // Filter by name
      const agents = await runloop.agent.list({ name: 'my-agent' });

      // Search by ID or name
      const agents = await runloop.agent.list({ search: 'agent-123' });
    • Get the complete agent data from the API.

      Parameters

      • Optionaloptions: RequestOptions<unknown>

        Request options

      Returns Promise<AgentView>

      The agent data