# DefinedAgent

> Type reference for DefinedAgent in the Rippling SDK, including its public shape and related types.

## Type definition

```
export declare class DefinedAgent {
    getSourceAgentId(): string;
    getApiName(): string;
    setName(name: string): this;
    setDescription(description: string): this;
    setIdentity(identityMode: ACPAgentIdentityMode): this;
    setEventTriggers(eventTriggers: ACPAgentEventTrigger[]): this;
    setSource(files: ACPAgentSourceFile[], entrypoint: string): this;
    toDict(): Config;
    readonly retrieve: (ctx: AgentOperationsContext, options?: RequestOptions) => APIPromise<AgentRetrieveResponse>;
    readonly sessions: AgentSessions;
    get source(): URL | undefined;
    constructor(input: DefinedAgentProps);
}
```

## Related types

-   [ACPAgentIdentityMode](https://developer.rippling.com/documentation/js-sdk/metadata-sdk/reference/types/ACPAgentIdentityMode-e5c6c496)
-   [ACPAgentEventTrigger](https://developer.rippling.com/documentation/js-sdk/metadata-sdk/reference/types/ACPAgentEventTrigger-d2c7b67e)
-   [ACPAgentSourceFile](https://developer.rippling.com/documentation/js-sdk/metadata-sdk/reference/types/ACPAgentSourceFile-ad97b046)
-   [AgentOperationsContext](https://developer.rippling.com/documentation/js-sdk/metadata-sdk/reference/types/AgentOperationsContext-fb660b6f)
-   [AgentSessions](https://developer.rippling.com/documentation/js-sdk/metadata-sdk/reference/types/AgentSessions-488e172a)
-   [DefinedAgentProps](https://developer.rippling.com/documentation/js-sdk/metadata-sdk/reference/types/DefinedAgentProps-c236627b)

Source: https://developer.rippling.com/documentation/js-sdk/metadata-sdk/reference/types/DefinedAgent-e3beeae9

> For the complete documentation index, see [llms.txt](https://developer.rippling.com/llms.txt). Public pages have a Markdown version at the same URL with .md added.
