> ISPO SDK documentation. [HTML](https://ispo.ai/docs/interfaces/core.AgentApi.html) · [Documentation index](https://ispo.ai/docs/llms.txt)

# Interface AgentApi

```typescript
interface AgentApi {
    activities: AgentActivitiesApi;
    providers: AgentProvidersApi;
    remote: RemoteCodingApi;
    runs: AgentRunsApi;
    sessions: AgentSessionsApi;
    spawn(input: AgentSpawnInput): Promise<AgentSpawnResult>;
    stop(input: AgentStopInput): Promise<AgentStopResult>;
}
```

Types: [activities](#activities), [AgentActivitiesApi](core.AgentActivitiesApi.md), [providers](#providers), [AgentProvidersApi](core.AgentProvidersApi.md), [remote](#remote), [RemoteCodingApi](core.RemoteCodingApi.md), [runs](#runs), [AgentRunsApi](core.AgentRunsApi.md), [sessions](#sessions), [AgentSessionsApi](core.AgentSessionsApi.md), [spawn](#spawn-1), [AgentSpawnInput](core.Supporting_types.AgentSpawnInput.md), [AgentSpawnResult](core.Supporting_types.AgentSpawnResult.md), [stop](#stop-1), [AgentStopInput](core.Supporting_types.AgentStopInput.md), [AgentStopResult](core.Supporting_types.AgentStopResult.md)

##### Index

### <a id="properties"></a>Properties

[activities](#activities) [providers](#providers) [remote](#remote) [runs](#runs) [sessions](#sessions)

### <a id="methods"></a>Methods

[spawn](#spawn) [stop](#stop)

## <a id="properties-1"></a>Properties

### <a id="activities"></a>activities

```typescript
activities: AgentActivitiesApi
```

Types: [AgentActivitiesApi](core.AgentActivitiesApi.md)

### <a id="providers"></a>providers

```typescript
providers: AgentProvidersApi
```

Types: [AgentProvidersApi](core.AgentProvidersApi.md)

### <a id="remote"></a>remote

```typescript
remote: RemoteCodingApi
```

Types: [RemoteCodingApi](core.RemoteCodingApi.md)

Durable isolated-checkout coding on an explicitly enrolled remote target.

### <a id="runs"></a>runs

```typescript
runs: AgentRunsApi
```

Types: [AgentRunsApi](core.AgentRunsApi.md)

Experimental private ISPO Cloud finite-run surface. Feature-flagged host side.

**Authority for `agent.runs`**

Reviewed request token: `agent.hostedRuns`. Standing capability: `agent.hostedRuns`.

Handle structured `ProjectRpcError` failures. A timeout does not guarantee cancellation; do not automatically retry effects without a documented idempotency contract. [Method authority and recovery](/docs/documents/Method_authority.md).

### <a id="sessions"></a>sessions

```typescript
sessions: AgentSessionsApi
```

Types: [AgentSessionsApi](core.AgentSessionsApi.md)

## <a id="methods-1"></a>Methods

### <a id="spawn"></a>spawn

*   <a id="spawn-1"></a>
    
    ```typescript
    spawn(input: AgentSpawnInput): Promise<AgentSpawnResult>
    ```
    
    Types: [AgentSpawnInput](core.Supporting_types.AgentSpawnInput.md), [AgentSpawnResult](core.Supporting_types.AgentSpawnResult.md)
    
    Spawn an observed terminal agent into a project (§10.22 orchestration).
    
    #### Parameters
    
    *   input: [AgentSpawnInput](core.Supporting_types.AgentSpawnInput.md)
    
    #### Returns Promise<[AgentSpawnResult](core.Supporting_types.AgentSpawnResult.md)\>
    

**Authority for `agent.spawn`**

Reviewed request token: `agent.dispatch`. Authority depends on the arguments, resource, and caller; check the live capability surface.

Handle structured `ProjectRpcError` failures. A timeout does not guarantee cancellation; do not automatically retry effects without a documented idempotency contract. [Method authority and recovery](/docs/documents/Method_authority.md).

### <a id="stop"></a>stop

*   <a id="stop-1"></a>
    
    ```typescript
    stop(input: AgentStopInput): Promise<AgentStopResult>
    ```
    
    Types: [AgentStopInput](core.Supporting_types.AgentStopInput.md), [AgentStopResult](core.Supporting_types.AgentStopResult.md)
    
    Terminate a running agent terminal by id (kills the underlying process). Gated by `agent.dispatch` for your own terminals; stopping a terminal you spawned into ANOTHER target additionally needs the `agent.orchestrate` grant (§10.22). Idempotent: stopping an already-ended terminal resolves `{ stopped: false }` rather than throwing.
    
    #### Parameters
    
    *   input: [AgentStopInput](core.Supporting_types.AgentStopInput.md)
    
    #### Returns Promise<[AgentStopResult](core.Supporting_types.AgentStopResult.md)\>
    

**Authority for `agent.stop`**

Reviewed request token: `agent.dispatch`. Standing capability: `agent.dispatch`.

Handle structured `ProjectRpcError` failures. A timeout does not guarantee cancellation; do not automatically retry effects without a documented idempotency contract. [Method authority and recovery](/docs/documents/Method_authority.md).
