agents
agents copied to clipboard
TypeError: agent._url.replace is not a function
I get this error when I pass in the query field in the useAgent. I'm on the latest agents SDK.
For whatever it's worth, I'm running my backend locally on localhost:8787 & I am trying to use the "query" field in the useAgents hook so that I can pass in a JWT.
Something like:
// works if i uncomment below
const agent = useAgent({
agent: "test-agent",
host: "http://localhost:8787",
// query: async () => ({
// token: await getToken(), << calls clerk's getToken function
// }),
});