ADK for TypeScript: API Reference
    Preparing search index...

    Class InMemoryRunner

    Hierarchy (View Summary)

    Constructors

    Properties

    agent: BaseAgent
    appName: string
    artifactService?: BaseArtifactService
    credentialService?: BaseCredentialService
    memoryService?: BaseMemoryService
    pluginManager: PluginManager
    sessionService: BaseSessionService

    Methods

    • Runs the agent with the given message, and returns an async generator of events.

      Parameters

      • params: {
            newMessage: Content;
            runConfig?: RunConfig;
            sessionId: string;
            stateDelta?: Record<string, unknown>;
            userId: string;
        }
        • newMessage: Content

          A new message to append to the session.

        • OptionalrunConfig?: RunConfig

          The run config for the agent.

        • sessionId: string

          The session ID of the session.

        • OptionalstateDelta?: Record<string, unknown>

          An optional state delta to apply to the session.

        • userId: string

          The user ID of the session.

      Returns AsyncGenerator<Event, void, undefined>

      The events generated by the agent.

    • Runs the agent with a new, ephemeral session.

      Parameters

      • params: {
            newMessage: Content;
            runConfig?: RunConfig;
            stateDelta?: Record<string, unknown>;
            userId: string;
        }
        • newMessage: Content

          A new message to append to the session.

        • OptionalrunConfig?: RunConfig

          The run config for the agent.

        • OptionalstateDelta?: Record<string, unknown>

          An optional state delta to apply to the session.

        • userId: string

          The user ID of the session.

      Returns AsyncGenerator<Event, void, undefined>

      The Events generated by the agent.