Agent

Agent resource class for asynchronous operations.

class runloop_api_client.sdk.async_agent.AsyncAgent(client, agent_id, agent_view=None)[source]

Async wrapper around agent operations.

This class provides an asynchronous interface for interacting with agents, including retrieving agent information.

Example

>>> agent = await runloop.agent.create_from_npm(name="my-agent", package_name="@runloop/example-agent")
>>> info = await agent.get_info()
>>> print(info.name)
property id: str

Return the agent identifier.

Returns:

Unique agent ID

Return type:

str

async get_info(**options)[source]

Retrieve the latest agent information.

Parameters:

options (Unpack[BaseRequestOptions]) – Optional request configuration

Returns:

Agent details

Return type:

AgentView

async delete(**options)[source]

Delete this agent. This action is irreversible.

Parameters:

options (Unpack[LongRequestOptions]) – Optional request configuration

Returns:

API response acknowledging deletion

Return type:

object