Skip to content

Allow proper types for agent props #1886

Description

@stof

Describe the bug
The generic types for Agent enforces Record<string, unknown> as bound for Props. This Record type requires subtypes to define an index signature for type string, which prevents using interfaces with well-defined properties.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
While the type could still default to Record<string, unknown>, it should allow using proper interfaces that have no index signature.

Screenshots

This is the error reported by Typescript on a getAgentsByName call passing { props: config } as third argument:

Image

Version:
0.17.3

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions