Getting AgentNotFound errors in trying to access an agent in OSDK

I am using the latest version of the OSDK apps which enables Platform SDK resources (beta) with preview flag and corresponding scopes. In trying to access the agent in the OSDK I get the AgentNotFound error. Is there a particular kind of permission that users within an org need to have to be able to access agents? Is it different from just having view access to the agent? Does not having agent enabled or platform access matter?

Addendum: I’m trying to use the Platform SDK endpoints specifically. In the meantime, I am testing a fallback using an exported query function that makes use of the published function.

Hi @JulioM,

Which OSDK language are you using and how are you creating your client?

Did you enable AIP Agents read permission in the Resources tab of your app?

And have you also included api:use-aip-agents-read in the scope when creating the auth client?

Best,
Tom

Hi @tompp , I have been using the Typescript language but I have also used the token created with CURL to test it out. The agents scopes are enabled. I include them in a react application using the createPublicOauthClient under @osdk/oauth where I invoke the following scopes:

scopes: [
    "api:read-data",
    "api:write-data",
    "api:use-ontologies-read",
    "api:use-ontologies-write",
    "api:use-aip-agents-read",
    "api:use-aip-agents-write",
]

And I can confirm they are included in the scopes:

{
    "type": "union",
    "scopes": [
        {
            "type": "intersection",
            "scopes": [
                {
                    "type": "operation",
                    "operations": [
                        "api:use-ontologies-write",
                        "api:use-ontologies-read",
                        "api:read-data",
                        "api:use-aip-agents-read",
                        "api:use-aip-agents-write",
                        "api:write-data"
                    ]
                },
                {
                    "type": "resource",
                    "resourceIds": [
                        [REDACTED]
                    ],
                    "includeChildren": true
                },
                {
                    "type": "operation",
                    "operations": [
                        "api:read-data",
                        "api:write-data"
                    ]
                }
            ]
        },
        {
            "type": "intersection",
            "scopes": [
                {
                    "type": "resource",
                    "resourceIds": [
                        "ri.multipass..organization.root"
                    ],
                    "includeChildren": true
                },
                {
                    "type": "operation",
                    "operations": [
                        "organization:discover",
                        "organization:groups",
                        "organization:users"
                    ]
                }
            ]
        }
    ]
}

Only thing noteworthy is that Foundry Platform access is disabled for the organization of the user and AIP Agent Studio isn’t enabled either on that org. Still the project housing the agent is accessible with viewer permission to the user. Below is the access of the user to the agent:

Hi @JulioM,

Have you tried / are you able to enable AIP Agent Studio for the org / user? I agree that shouldn’t be the problem but worth eliminating it.

If you’re still struggling, I think it would be best to raise this via the Issues app so that the support team can debug it more thoroughly.

Thanks,
Tom

Thanks Tom, still no luck with that setting enabled. I have created the internal issue for follow up.