@gleanwork/api-client 0.5.1 → 0.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/README.md +15 -15
  2. package/dist/commonjs/funcs/clientAgentsList.d.ts +2 -2
  3. package/dist/commonjs/funcs/clientAgentsList.js +2 -2
  4. package/dist/commonjs/funcs/clientAgentsRetrieve.d.ts +2 -2
  5. package/dist/commonjs/funcs/clientAgentsRetrieve.js +2 -2
  6. package/dist/commonjs/funcs/clientAgentsRetrieveSchemas.d.ts +2 -2
  7. package/dist/commonjs/funcs/clientAgentsRetrieveSchemas.js +2 -2
  8. package/dist/commonjs/funcs/clientAgentsRun.d.ts +2 -2
  9. package/dist/commonjs/funcs/clientAgentsRun.js +2 -2
  10. package/dist/commonjs/funcs/clientAgentsRunStream.d.ts +2 -2
  11. package/dist/commonjs/funcs/clientAgentsRunStream.js +2 -2
  12. package/dist/commonjs/lib/config.d.ts +2 -2
  13. package/dist/commonjs/lib/config.js +2 -2
  14. package/dist/commonjs/models/components/agent.d.ts +16 -6
  15. package/dist/commonjs/models/components/agent.d.ts.map +1 -1
  16. package/dist/commonjs/models/components/agent.js.map +1 -1
  17. package/dist/commonjs/models/components/agentschemas.d.ts +4 -4
  18. package/dist/commonjs/models/components/searchagentsrequest.d.ts +1 -1
  19. package/dist/commonjs/models/components/workflow.d.ts +5 -5
  20. package/dist/commonjs/models/components/workflow.d.ts.map +1 -1
  21. package/dist/commonjs/models/components/workflow.js +2 -2
  22. package/dist/commonjs/models/components/workflow.js.map +1 -1
  23. package/dist/commonjs/react-query/clientAgentsList.d.ts +2 -2
  24. package/dist/commonjs/react-query/clientAgentsList.js +2 -2
  25. package/dist/commonjs/react-query/clientAgentsRetrieve.d.ts +4 -4
  26. package/dist/commonjs/react-query/clientAgentsRetrieve.js +4 -4
  27. package/dist/commonjs/react-query/clientAgentsRetrieveSchemas.d.ts +4 -4
  28. package/dist/commonjs/react-query/clientAgentsRetrieveSchemas.js +4 -4
  29. package/dist/commonjs/react-query/clientAgentsRun.d.ts +2 -2
  30. package/dist/commonjs/react-query/clientAgentsRun.js +2 -2
  31. package/dist/commonjs/react-query/clientAgentsRunStream.d.ts +2 -2
  32. package/dist/commonjs/react-query/clientAgentsRunStream.js +2 -2
  33. package/dist/commonjs/sdk/agents.d.ts +10 -10
  34. package/dist/commonjs/sdk/agents.js +10 -10
  35. package/dist/esm/funcs/clientAgentsList.d.ts +2 -2
  36. package/dist/esm/funcs/clientAgentsList.js +2 -2
  37. package/dist/esm/funcs/clientAgentsRetrieve.d.ts +2 -2
  38. package/dist/esm/funcs/clientAgentsRetrieve.js +2 -2
  39. package/dist/esm/funcs/clientAgentsRetrieveSchemas.d.ts +2 -2
  40. package/dist/esm/funcs/clientAgentsRetrieveSchemas.js +2 -2
  41. package/dist/esm/funcs/clientAgentsRun.d.ts +2 -2
  42. package/dist/esm/funcs/clientAgentsRun.js +2 -2
  43. package/dist/esm/funcs/clientAgentsRunStream.d.ts +2 -2
  44. package/dist/esm/funcs/clientAgentsRunStream.js +2 -2
  45. package/dist/esm/lib/config.d.ts +2 -2
  46. package/dist/esm/lib/config.js +2 -2
  47. package/dist/esm/models/components/agent.d.ts +16 -6
  48. package/dist/esm/models/components/agent.d.ts.map +1 -1
  49. package/dist/esm/models/components/agent.js.map +1 -1
  50. package/dist/esm/models/components/agentschemas.d.ts +4 -4
  51. package/dist/esm/models/components/searchagentsrequest.d.ts +1 -1
  52. package/dist/esm/models/components/workflow.d.ts +5 -5
  53. package/dist/esm/models/components/workflow.d.ts.map +1 -1
  54. package/dist/esm/models/components/workflow.js +2 -2
  55. package/dist/esm/models/components/workflow.js.map +1 -1
  56. package/dist/esm/react-query/clientAgentsList.d.ts +2 -2
  57. package/dist/esm/react-query/clientAgentsList.js +2 -2
  58. package/dist/esm/react-query/clientAgentsRetrieve.d.ts +4 -4
  59. package/dist/esm/react-query/clientAgentsRetrieve.js +4 -4
  60. package/dist/esm/react-query/clientAgentsRetrieveSchemas.d.ts +4 -4
  61. package/dist/esm/react-query/clientAgentsRetrieveSchemas.js +4 -4
  62. package/dist/esm/react-query/clientAgentsRun.d.ts +2 -2
  63. package/dist/esm/react-query/clientAgentsRun.js +2 -2
  64. package/dist/esm/react-query/clientAgentsRunStream.d.ts +2 -2
  65. package/dist/esm/react-query/clientAgentsRunStream.js +2 -2
  66. package/dist/esm/sdk/agents.d.ts +10 -10
  67. package/dist/esm/sdk/agents.js +10 -10
  68. package/docs/sdks/agents/README.md +16 -12
  69. package/jsr.json +1 -1
  70. package/package.json +1 -1
  71. package/src/funcs/clientAgentsList.ts +2 -2
  72. package/src/funcs/clientAgentsRetrieve.ts +2 -2
  73. package/src/funcs/clientAgentsRetrieveSchemas.ts +2 -2
  74. package/src/funcs/clientAgentsRun.ts +2 -2
  75. package/src/funcs/clientAgentsRunStream.ts +2 -2
  76. package/src/lib/config.ts +2 -2
  77. package/src/models/components/agent.ts +16 -6
  78. package/src/models/components/agentschemas.ts +4 -4
  79. package/src/models/components/searchagentsrequest.ts +1 -1
  80. package/src/models/components/workflow.ts +7 -7
  81. package/src/react-query/clientAgentsList.ts +2 -2
  82. package/src/react-query/clientAgentsRetrieve.ts +4 -4
  83. package/src/react-query/clientAgentsRetrieveSchemas.ts +4 -4
  84. package/src/react-query/clientAgentsRun.ts +2 -2
  85. package/src/react-query/clientAgentsRunStream.ts +2 -2
  86. package/src/sdk/agents.ts +10 -10
@@ -7,10 +7,10 @@ import { combineSignals } from "../lib/primitives.js";
7
7
  import { unwrapAsync } from "../types/fp.js";
8
8
  import { useGleanContext } from "./_context.js";
9
9
  /**
10
- * Get Agent
10
+ * Retrieve an agent
11
11
  *
12
12
  * @remarks
13
- * Get an agent by ID. This endpoint implements the LangChain Agent Protocol, specifically part of the Agents stage (https://langchain-ai.github.io/agent-protocol/api.html#tag/agents/GET/agents/{agent_id}). It adheres to the standard contract defined for agent interoperability and can be used by agent runtimes that support the Agent Protocol.
13
+ * Returns details of an [agent](https://developers.glean.com/agents/agents-api) created in the Agent Builder.
14
14
  */
15
15
  export function useClientAgentsRetrieve(agentId, timezoneOffset, options) {
16
16
  const client = useGleanContext();
@@ -20,10 +20,10 @@ export function useClientAgentsRetrieve(agentId, timezoneOffset, options) {
20
20
  });
21
21
  }
22
22
  /**
23
- * Get Agent
23
+ * Retrieve an agent
24
24
  *
25
25
  * @remarks
26
- * Get an agent by ID. This endpoint implements the LangChain Agent Protocol, specifically part of the Agents stage (https://langchain-ai.github.io/agent-protocol/api.html#tag/agents/GET/agents/{agent_id}). It adheres to the standard contract defined for agent interoperability and can be used by agent runtimes that support the Agent Protocol.
26
+ * Returns details of an [agent](https://developers.glean.com/agents/agents-api) created in the Agent Builder.
27
27
  */
28
28
  export function useClientAgentsRetrieveSuspense(agentId, timezoneOffset, options) {
29
29
  const client = useGleanContext();
@@ -5,17 +5,17 @@ import * as components from "../models/components/index.js";
5
5
  import { QueryHookOptions, SuspenseQueryHookOptions, TupleToPrefixes } from "./_types.js";
6
6
  export type ClientAgentsRetrieveSchemasQueryData = components.AgentSchemas;
7
7
  /**
8
- * Get Agent Schemas
8
+ * List an agent's schemas
9
9
  *
10
10
  * @remarks
11
- * Get an agent's schemas by ID. This endpoint implements the LangChain Agent Protocol, specifically part of the Agents stage (https://langchain-ai.github.io/agent-protocol/api.html#tag/agents/GET/agents/{agent_id}/schemas). It adheres to the standard contract defined for agent interoperability and can be used by agent runtimes that support the Agent Protocol.
11
+ * Return [agent](https://developers.glean.com/agents/agents-api)'s input and output schemas. You can use these schemas to detect changes to an agent's input or output structure.
12
12
  */
13
13
  export declare function useClientAgentsRetrieveSchemas(agentId: string, timezoneOffset?: number | undefined, options?: QueryHookOptions<ClientAgentsRetrieveSchemasQueryData>): UseQueryResult<ClientAgentsRetrieveSchemasQueryData, Error>;
14
14
  /**
15
- * Get Agent Schemas
15
+ * List an agent's schemas
16
16
  *
17
17
  * @remarks
18
- * Get an agent's schemas by ID. This endpoint implements the LangChain Agent Protocol, specifically part of the Agents stage (https://langchain-ai.github.io/agent-protocol/api.html#tag/agents/GET/agents/{agent_id}/schemas). It adheres to the standard contract defined for agent interoperability and can be used by agent runtimes that support the Agent Protocol.
18
+ * Return [agent](https://developers.glean.com/agents/agents-api)'s input and output schemas. You can use these schemas to detect changes to an agent's input or output structure.
19
19
  */
20
20
  export declare function useClientAgentsRetrieveSchemasSuspense(agentId: string, timezoneOffset?: number | undefined, options?: SuspenseQueryHookOptions<ClientAgentsRetrieveSchemasQueryData>): UseSuspenseQueryResult<ClientAgentsRetrieveSchemasQueryData, Error>;
21
21
  export declare function prefetchClientAgentsRetrieveSchemas(queryClient: QueryClient, client$: GleanCore, agentId: string, timezoneOffset?: number | undefined): Promise<void>;
@@ -7,10 +7,10 @@ import { combineSignals } from "../lib/primitives.js";
7
7
  import { unwrapAsync } from "../types/fp.js";
8
8
  import { useGleanContext } from "./_context.js";
9
9
  /**
10
- * Get Agent Schemas
10
+ * List an agent's schemas
11
11
  *
12
12
  * @remarks
13
- * Get an agent's schemas by ID. This endpoint implements the LangChain Agent Protocol, specifically part of the Agents stage (https://langchain-ai.github.io/agent-protocol/api.html#tag/agents/GET/agents/{agent_id}/schemas). It adheres to the standard contract defined for agent interoperability and can be used by agent runtimes that support the Agent Protocol.
13
+ * Return [agent](https://developers.glean.com/agents/agents-api)'s input and output schemas. You can use these schemas to detect changes to an agent's input or output structure.
14
14
  */
15
15
  export function useClientAgentsRetrieveSchemas(agentId, timezoneOffset, options) {
16
16
  const client = useGleanContext();
@@ -20,10 +20,10 @@ export function useClientAgentsRetrieveSchemas(agentId, timezoneOffset, options)
20
20
  });
21
21
  }
22
22
  /**
23
- * Get Agent Schemas
23
+ * List an agent's schemas
24
24
  *
25
25
  * @remarks
26
- * Get an agent's schemas by ID. This endpoint implements the LangChain Agent Protocol, specifically part of the Agents stage (https://langchain-ai.github.io/agent-protocol/api.html#tag/agents/GET/agents/{agent_id}/schemas). It adheres to the standard contract defined for agent interoperability and can be used by agent runtimes that support the Agent Protocol.
26
+ * Return [agent](https://developers.glean.com/agents/agents-api)'s input and output schemas. You can use these schemas to detect changes to an agent's input or output structure.
27
27
  */
28
28
  export function useClientAgentsRetrieveSchemasSuspense(agentId, timezoneOffset, options) {
29
29
  const client = useGleanContext();
@@ -9,10 +9,10 @@ export type ClientAgentsRunMutationVariables = {
9
9
  };
10
10
  export type ClientAgentsRunMutationData = components.AgentRunWaitResponse;
11
11
  /**
12
- * Create Run, Wait for Output
12
+ * Create an [agent](https://developers.glean.com/agents/agents-api) run and wait for the response
13
13
  *
14
14
  * @remarks
15
- * Creates and triggers a run of an agent. Waits for final output and then returns it. This endpoint implements the LangChain Agent Protocol, specifically part of the Runs stage (https://langchain-ai.github.io/agent-protocol/api.html#tag/runs/POST/runs/wait). It adheres to the standard contract defined for agent interoperability and can be used by agent runtimes that support the Agent Protocol. Note that running agents that reference third party platform write actions is unsupported as it requires user confirmation.
15
+ * Executes an agent run and returns the final response.
16
16
  */
17
17
  export declare function useClientAgentsRunMutation(options?: MutationHookOptions<ClientAgentsRunMutationData, Error, ClientAgentsRunMutationVariables>): UseMutationResult<ClientAgentsRunMutationData, Error, ClientAgentsRunMutationVariables>;
18
18
  export declare function mutationKeyClientAgentsRun(): MutationKey;
@@ -7,10 +7,10 @@ import { combineSignals } from "../lib/primitives.js";
7
7
  import { unwrapAsync } from "../types/fp.js";
8
8
  import { useGleanContext } from "./_context.js";
9
9
  /**
10
- * Create Run, Wait for Output
10
+ * Create an [agent](https://developers.glean.com/agents/agents-api) run and wait for the response
11
11
  *
12
12
  * @remarks
13
- * Creates and triggers a run of an agent. Waits for final output and then returns it. This endpoint implements the LangChain Agent Protocol, specifically part of the Runs stage (https://langchain-ai.github.io/agent-protocol/api.html#tag/runs/POST/runs/wait). It adheres to the standard contract defined for agent interoperability and can be used by agent runtimes that support the Agent Protocol. Note that running agents that reference third party platform write actions is unsupported as it requires user confirmation.
13
+ * Executes an agent run and returns the final response.
14
14
  */
15
15
  export function useClientAgentsRunMutation(options) {
16
16
  const client = useGleanContext();
@@ -9,10 +9,10 @@ export type ClientAgentsRunStreamMutationVariables = {
9
9
  };
10
10
  export type ClientAgentsRunStreamMutationData = string;
11
11
  /**
12
- * Create Run, Stream Output
12
+ * Create an agent run and stream the response
13
13
  *
14
14
  * @remarks
15
- * Creates and triggers a run of an agent. Streams the output in SSE format. This endpoint implements the LangChain Agent Protocol, specifically part of the Runs stage (https://langchain-ai.github.io/agent-protocol/api.html#tag/runs/POST/runs/stream). It adheres to the standard contract defined for agent interoperability and can be used by agent runtimes that support the Agent Protocol. Note that running agents that reference third party platform write actions is unsupported as it requires user confirmation.
15
+ * Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the result as a stream of server-sent events (SSE).
16
16
  */
17
17
  export declare function useClientAgentsRunStreamMutation(options?: MutationHookOptions<ClientAgentsRunStreamMutationData, Error, ClientAgentsRunStreamMutationVariables>): UseMutationResult<ClientAgentsRunStreamMutationData, Error, ClientAgentsRunStreamMutationVariables>;
18
18
  export declare function mutationKeyClientAgentsRunStream(): MutationKey;
@@ -7,10 +7,10 @@ import { combineSignals } from "../lib/primitives.js";
7
7
  import { unwrapAsync } from "../types/fp.js";
8
8
  import { useGleanContext } from "./_context.js";
9
9
  /**
10
- * Create Run, Stream Output
10
+ * Create an agent run and stream the response
11
11
  *
12
12
  * @remarks
13
- * Creates and triggers a run of an agent. Streams the output in SSE format. This endpoint implements the LangChain Agent Protocol, specifically part of the Runs stage (https://langchain-ai.github.io/agent-protocol/api.html#tag/runs/POST/runs/stream). It adheres to the standard contract defined for agent interoperability and can be used by agent runtimes that support the Agent Protocol. Note that running agents that reference third party platform write actions is unsupported as it requires user confirmation.
13
+ * Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the result as a stream of server-sent events (SSE).
14
14
  */
15
15
  export function useClientAgentsRunStreamMutation(options) {
16
16
  const client = useGleanContext();
@@ -2,38 +2,38 @@ import { ClientSDK, RequestOptions } from "../lib/sdks.js";
2
2
  import * as components from "../models/components/index.js";
3
3
  export declare class Agents extends ClientSDK {
4
4
  /**
5
- * Get Agent
5
+ * Retrieve an agent
6
6
  *
7
7
  * @remarks
8
- * Get an agent by ID. This endpoint implements the LangChain Agent Protocol, specifically part of the Agents stage (https://langchain-ai.github.io/agent-protocol/api.html#tag/agents/GET/agents/{agent_id}). It adheres to the standard contract defined for agent interoperability and can be used by agent runtimes that support the Agent Protocol.
8
+ * Returns details of an [agent](https://developers.glean.com/agents/agents-api) created in the Agent Builder.
9
9
  */
10
10
  retrieve(agentId: string, timezoneOffset?: number | undefined, options?: RequestOptions): Promise<components.Agent>;
11
11
  /**
12
- * Get Agent Schemas
12
+ * List an agent's schemas
13
13
  *
14
14
  * @remarks
15
- * Get an agent's schemas by ID. This endpoint implements the LangChain Agent Protocol, specifically part of the Agents stage (https://langchain-ai.github.io/agent-protocol/api.html#tag/agents/GET/agents/{agent_id}/schemas). It adheres to the standard contract defined for agent interoperability and can be used by agent runtimes that support the Agent Protocol.
15
+ * Return [agent](https://developers.glean.com/agents/agents-api)'s input and output schemas. You can use these schemas to detect changes to an agent's input or output structure.
16
16
  */
17
17
  retrieveSchemas(agentId: string, timezoneOffset?: number | undefined, options?: RequestOptions): Promise<components.AgentSchemas>;
18
18
  /**
19
- * Search Agents
19
+ * Search agents
20
20
  *
21
21
  * @remarks
22
- * List Agents available in this service. This endpoint implements the LangChain Agent Protocol, specifically part of the Agents stage (https://langchain-ai.github.io/agent-protocol/api.html#tag/agents/POST/agents/search). It adheres to the standard contract defined for agent interoperability and can be used by agent runtimes that support the Agent Protocol.
22
+ * Search for [agents](https://developers.glean.com/agents/agents-api) by agent name.
23
23
  */
24
24
  list(request: components.SearchAgentsRequest, options?: RequestOptions): Promise<components.SearchAgentsResponse>;
25
25
  /**
26
- * Create Run, Stream Output
26
+ * Create an agent run and stream the response
27
27
  *
28
28
  * @remarks
29
- * Creates and triggers a run of an agent. Streams the output in SSE format. This endpoint implements the LangChain Agent Protocol, specifically part of the Runs stage (https://langchain-ai.github.io/agent-protocol/api.html#tag/runs/POST/runs/stream). It adheres to the standard contract defined for agent interoperability and can be used by agent runtimes that support the Agent Protocol. Note that running agents that reference third party platform write actions is unsupported as it requires user confirmation.
29
+ * Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the result as a stream of server-sent events (SSE).
30
30
  */
31
31
  runStream(request: components.AgentRunCreate, options?: RequestOptions): Promise<string>;
32
32
  /**
33
- * Create Run, Wait for Output
33
+ * Create an [agent](https://developers.glean.com/agents/agents-api) run and wait for the response
34
34
  *
35
35
  * @remarks
36
- * Creates and triggers a run of an agent. Waits for final output and then returns it. This endpoint implements the LangChain Agent Protocol, specifically part of the Runs stage (https://langchain-ai.github.io/agent-protocol/api.html#tag/runs/POST/runs/wait). It adheres to the standard contract defined for agent interoperability and can be used by agent runtimes that support the Agent Protocol. Note that running agents that reference third party platform write actions is unsupported as it requires user confirmation.
36
+ * Executes an agent run and returns the final response.
37
37
  */
38
38
  run(request: components.AgentRunCreate, options?: RequestOptions): Promise<components.AgentRunWaitResponse>;
39
39
  }
@@ -10,46 +10,46 @@ import { ClientSDK } from "../lib/sdks.js";
10
10
  import { unwrapAsync } from "../types/fp.js";
11
11
  export class Agents extends ClientSDK {
12
12
  /**
13
- * Get Agent
13
+ * Retrieve an agent
14
14
  *
15
15
  * @remarks
16
- * Get an agent by ID. This endpoint implements the LangChain Agent Protocol, specifically part of the Agents stage (https://langchain-ai.github.io/agent-protocol/api.html#tag/agents/GET/agents/{agent_id}). It adheres to the standard contract defined for agent interoperability and can be used by agent runtimes that support the Agent Protocol.
16
+ * Returns details of an [agent](https://developers.glean.com/agents/agents-api) created in the Agent Builder.
17
17
  */
18
18
  async retrieve(agentId, timezoneOffset, options) {
19
19
  return unwrapAsync(clientAgentsRetrieve(this, agentId, timezoneOffset, options));
20
20
  }
21
21
  /**
22
- * Get Agent Schemas
22
+ * List an agent's schemas
23
23
  *
24
24
  * @remarks
25
- * Get an agent's schemas by ID. This endpoint implements the LangChain Agent Protocol, specifically part of the Agents stage (https://langchain-ai.github.io/agent-protocol/api.html#tag/agents/GET/agents/{agent_id}/schemas). It adheres to the standard contract defined for agent interoperability and can be used by agent runtimes that support the Agent Protocol.
25
+ * Return [agent](https://developers.glean.com/agents/agents-api)'s input and output schemas. You can use these schemas to detect changes to an agent's input or output structure.
26
26
  */
27
27
  async retrieveSchemas(agentId, timezoneOffset, options) {
28
28
  return unwrapAsync(clientAgentsRetrieveSchemas(this, agentId, timezoneOffset, options));
29
29
  }
30
30
  /**
31
- * Search Agents
31
+ * Search agents
32
32
  *
33
33
  * @remarks
34
- * List Agents available in this service. This endpoint implements the LangChain Agent Protocol, specifically part of the Agents stage (https://langchain-ai.github.io/agent-protocol/api.html#tag/agents/POST/agents/search). It adheres to the standard contract defined for agent interoperability and can be used by agent runtimes that support the Agent Protocol.
34
+ * Search for [agents](https://developers.glean.com/agents/agents-api) by agent name.
35
35
  */
36
36
  async list(request, options) {
37
37
  return unwrapAsync(clientAgentsList(this, request, options));
38
38
  }
39
39
  /**
40
- * Create Run, Stream Output
40
+ * Create an agent run and stream the response
41
41
  *
42
42
  * @remarks
43
- * Creates and triggers a run of an agent. Streams the output in SSE format. This endpoint implements the LangChain Agent Protocol, specifically part of the Runs stage (https://langchain-ai.github.io/agent-protocol/api.html#tag/runs/POST/runs/stream). It adheres to the standard contract defined for agent interoperability and can be used by agent runtimes that support the Agent Protocol. Note that running agents that reference third party platform write actions is unsupported as it requires user confirmation.
43
+ * Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the result as a stream of server-sent events (SSE).
44
44
  */
45
45
  async runStream(request, options) {
46
46
  return unwrapAsync(clientAgentsRunStream(this, request, options));
47
47
  }
48
48
  /**
49
- * Create Run, Wait for Output
49
+ * Create an [agent](https://developers.glean.com/agents/agents-api) run and wait for the response
50
50
  *
51
51
  * @remarks
52
- * Creates and triggers a run of an agent. Waits for final output and then returns it. This endpoint implements the LangChain Agent Protocol, specifically part of the Runs stage (https://langchain-ai.github.io/agent-protocol/api.html#tag/runs/POST/runs/wait). It adheres to the standard contract defined for agent interoperability and can be used by agent runtimes that support the Agent Protocol. Note that running agents that reference third party platform write actions is unsupported as it requires user confirmation.
52
+ * Executes an agent run and returns the final response.
53
53
  */
54
54
  async run(request, options) {
55
55
  return unwrapAsync(clientAgentsRun(this, request, options));
@@ -5,15 +5,15 @@
5
5
 
6
6
  ### Available Operations
7
7
 
8
- * [retrieve](#retrieve) - Get Agent
9
- * [retrieveSchemas](#retrieveschemas) - Get Agent Schemas
10
- * [list](#list) - Search Agents
11
- * [runStream](#runstream) - Create Run, Stream Output
12
- * [run](#run) - Create Run, Wait for Output
8
+ * [retrieve](#retrieve) - Retrieve an agent
9
+ * [retrieveSchemas](#retrieveschemas) - List an agent's schemas
10
+ * [list](#list) - Search agents
11
+ * [runStream](#runstream) - Create an agent run and stream the response
12
+ * [run](#run) - Create an [agent](https://developers.glean.com/agents/agents-api) run and wait for the response
13
13
 
14
14
  ## retrieve
15
15
 
16
- Get an agent by ID. This endpoint implements the LangChain Agent Protocol, specifically part of the Agents stage (https://langchain-ai.github.io/agent-protocol/api.html#tag/agents/GET/agents/{agent_id}). It adheres to the standard contract defined for agent interoperability and can be used by agent runtimes that support the Agent Protocol.
16
+ Returns details of an [agent](https://developers.glean.com/agents/agents-api) created in the Agent Builder.
17
17
 
18
18
  ### Example Usage
19
19
 
@@ -114,7 +114,7 @@ import {
114
114
 
115
115
  ## retrieveSchemas
116
116
 
117
- Get an agent's schemas by ID. This endpoint implements the LangChain Agent Protocol, specifically part of the Agents stage (https://langchain-ai.github.io/agent-protocol/api.html#tag/agents/GET/agents/{agent_id}/schemas). It adheres to the standard contract defined for agent interoperability and can be used by agent runtimes that support the Agent Protocol.
117
+ Return [agent](https://developers.glean.com/agents/agents-api)'s input and output schemas. You can use these schemas to detect changes to an agent's input or output structure.
118
118
 
119
119
  ### Example Usage
120
120
 
@@ -215,7 +215,7 @@ import {
215
215
 
216
216
  ## list
217
217
 
218
- List Agents available in this service. This endpoint implements the LangChain Agent Protocol, specifically part of the Agents stage (https://langchain-ai.github.io/agent-protocol/api.html#tag/agents/POST/agents/search). It adheres to the standard contract defined for agent interoperability and can be used by agent runtimes that support the Agent Protocol.
218
+ Search for [agents](https://developers.glean.com/agents/agents-api) by agent name.
219
219
 
220
220
  ### Example Usage
221
221
 
@@ -227,7 +227,9 @@ const glean = new Glean({
227
227
  });
228
228
 
229
229
  async function run() {
230
- const result = await glean.client.agents.list({});
230
+ const result = await glean.client.agents.list({
231
+ name: "HR Policy Agent",
232
+ });
231
233
 
232
234
  // Handle the result
233
235
  console.log(result);
@@ -251,7 +253,9 @@ const glean = new GleanCore({
251
253
  });
252
254
 
253
255
  async function run() {
254
- const res = await clientAgentsList(glean, {});
256
+ const res = await clientAgentsList(glean, {
257
+ name: "HR Policy Agent",
258
+ });
255
259
 
256
260
  if (!res.ok) {
257
261
  throw res.error;
@@ -304,7 +308,7 @@ import {
304
308
 
305
309
  ## runStream
306
310
 
307
- Creates and triggers a run of an agent. Streams the output in SSE format. This endpoint implements the LangChain Agent Protocol, specifically part of the Runs stage (https://langchain-ai.github.io/agent-protocol/api.html#tag/runs/POST/runs/stream). It adheres to the standard contract defined for agent interoperability and can be used by agent runtimes that support the Agent Protocol. Note that running agents that reference third party platform write actions is unsupported as it requires user confirmation.
311
+ Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the result as a stream of server-sent events (SSE).
308
312
 
309
313
  ### Example Usage
310
314
 
@@ -397,7 +401,7 @@ import {
397
401
 
398
402
  ## run
399
403
 
400
- Creates and triggers a run of an agent. Waits for final output and then returns it. This endpoint implements the LangChain Agent Protocol, specifically part of the Runs stage (https://langchain-ai.github.io/agent-protocol/api.html#tag/runs/POST/runs/wait). It adheres to the standard contract defined for agent interoperability and can be used by agent runtimes that support the Agent Protocol. Note that running agents that reference third party platform write actions is unsupported as it requires user confirmation.
404
+ Executes an agent run and returns the final response.
401
405
 
402
406
  ### Example Usage
403
407
 
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@gleanwork/api-client",
5
- "version": "0.5.1",
5
+ "version": "0.5.3",
6
6
  "exports": {
7
7
  ".": "./src/index.ts",
8
8
  "./models/errors": "./src/models/errors/index.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gleanwork/api-client",
3
- "version": "0.5.1",
3
+ "version": "0.5.3",
4
4
  "author": "Speakeasy",
5
5
  "type": "module",
6
6
  "tshy": {
@@ -24,10 +24,10 @@ import { APICall, APIPromise } from "../types/async.js";
24
24
  import { Result } from "../types/fp.js";
25
25
 
26
26
  /**
27
- * Search Agents
27
+ * Search agents
28
28
  *
29
29
  * @remarks
30
- * List Agents available in this service. This endpoint implements the LangChain Agent Protocol, specifically part of the Agents stage (https://langchain-ai.github.io/agent-protocol/api.html#tag/agents/POST/agents/search). It adheres to the standard contract defined for agent interoperability and can be used by agent runtimes that support the Agent Protocol.
30
+ * Search for [agents](https://developers.glean.com/agents/agents-api) by agent name.
31
31
  */
32
32
  export function clientAgentsList(
33
33
  client: GleanCore,
@@ -25,10 +25,10 @@ import { APICall, APIPromise } from "../types/async.js";
25
25
  import { Result } from "../types/fp.js";
26
26
 
27
27
  /**
28
- * Get Agent
28
+ * Retrieve an agent
29
29
  *
30
30
  * @remarks
31
- * Get an agent by ID. This endpoint implements the LangChain Agent Protocol, specifically part of the Agents stage (https://langchain-ai.github.io/agent-protocol/api.html#tag/agents/GET/agents/{agent_id}). It adheres to the standard contract defined for agent interoperability and can be used by agent runtimes that support the Agent Protocol.
31
+ * Returns details of an [agent](https://developers.glean.com/agents/agents-api) created in the Agent Builder.
32
32
  */
33
33
  export function clientAgentsRetrieve(
34
34
  client: GleanCore,
@@ -25,10 +25,10 @@ import { APICall, APIPromise } from "../types/async.js";
25
25
  import { Result } from "../types/fp.js";
26
26
 
27
27
  /**
28
- * Get Agent Schemas
28
+ * List an agent's schemas
29
29
  *
30
30
  * @remarks
31
- * Get an agent's schemas by ID. This endpoint implements the LangChain Agent Protocol, specifically part of the Agents stage (https://langchain-ai.github.io/agent-protocol/api.html#tag/agents/GET/agents/{agent_id}/schemas). It adheres to the standard contract defined for agent interoperability and can be used by agent runtimes that support the Agent Protocol.
31
+ * Return [agent](https://developers.glean.com/agents/agents-api)'s input and output schemas. You can use these schemas to detect changes to an agent's input or output structure.
32
32
  */
33
33
  export function clientAgentsRetrieveSchemas(
34
34
  client: GleanCore,
@@ -24,10 +24,10 @@ import { APICall, APIPromise } from "../types/async.js";
24
24
  import { Result } from "../types/fp.js";
25
25
 
26
26
  /**
27
- * Create Run, Wait for Output
27
+ * Create an [agent](https://developers.glean.com/agents/agents-api) run and wait for the response
28
28
  *
29
29
  * @remarks
30
- * Creates and triggers a run of an agent. Waits for final output and then returns it. This endpoint implements the LangChain Agent Protocol, specifically part of the Runs stage (https://langchain-ai.github.io/agent-protocol/api.html#tag/runs/POST/runs/wait). It adheres to the standard contract defined for agent interoperability and can be used by agent runtimes that support the Agent Protocol. Note that running agents that reference third party platform write actions is unsupported as it requires user confirmation.
30
+ * Executes an agent run and returns the final response.
31
31
  */
32
32
  export function clientAgentsRun(
33
33
  client: GleanCore,
@@ -25,10 +25,10 @@ import { APICall, APIPromise } from "../types/async.js";
25
25
  import { Result } from "../types/fp.js";
26
26
 
27
27
  /**
28
- * Create Run, Stream Output
28
+ * Create an agent run and stream the response
29
29
  *
30
30
  * @remarks
31
- * Creates and triggers a run of an agent. Streams the output in SSE format. This endpoint implements the LangChain Agent Protocol, specifically part of the Runs stage (https://langchain-ai.github.io/agent-protocol/api.html#tag/runs/POST/runs/stream). It adheres to the standard contract defined for agent interoperability and can be used by agent runtimes that support the Agent Protocol. Note that running agents that reference third party platform write actions is unsupported as it requires user confirmation.
31
+ * Executes an [agent](https://developers.glean.com/agents/agents-api) run and returns the result as a stream of server-sent events (SSE).
32
32
  */
33
33
  export function clientAgentsRunStream(
34
34
  client: GleanCore,
package/src/lib/config.ts CHANGED
@@ -64,8 +64,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
64
64
  export const SDK_METADATA = {
65
65
  language: "typescript",
66
66
  openapiDocVersion: "0.9.0",
67
- sdkVersion: "0.5.1",
67
+ sdkVersion: "0.5.3",
68
68
  genVersion: "2.610.0",
69
69
  userAgent:
70
- "speakeasy-sdk/typescript 0.5.1 2.610.0 0.9.0 @gleanwork/api-client",
70
+ "speakeasy-sdk/typescript 0.5.3 2.610.0 0.9.0 @gleanwork/api-client",
71
71
  } as const;
@@ -12,20 +12,25 @@ import { Result as SafeParseResult } from "../../types/fp.js";
12
12
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
13
13
 
14
14
  /**
15
- * The agent metadata.
15
+ * The agent metadata. Currently not implemented.
16
16
  */
17
17
  export type AgentMetadata = {};
18
18
 
19
19
  /**
20
- * Describes which protocol features the agent supports. In addition to the standard capabilities (prefixed with ap.), implementations can declare custom capabilities, named in reverse domain notation (eg. com.example.some.capability).
20
+ * Describes features that the agent supports. example: {
21
+ *
22
+ * @remarks
23
+ * "ap.io.messages": true,
24
+ * "ap.io.streaming": true
25
+ * }
21
26
  */
22
27
  export type AgentCapabilities = {
23
28
  /**
24
- * Whether the agent supports Messages as input/output/state. If true, the agent uses the `messages` key in threads/runs endpoints.
29
+ * Whether the agent supports messages as an input. If true, you'll pass `messages` as an input when running the agent.
25
30
  */
26
31
  apIoMessages?: boolean | undefined;
27
32
  /**
28
- * Whether the agent supports streaming output.
33
+ * Whether the agent supports streaming output. If true, you you can stream agent ouput. All agents currently support streaming.
29
34
  */
30
35
  apIoStreaming?: boolean | undefined;
31
36
  additionalProperties?: { [k: string]: any };
@@ -45,11 +50,16 @@ export type Agent = {
45
50
  */
46
51
  description?: string | undefined;
47
52
  /**
48
- * The agent metadata.
53
+ * The agent metadata. Currently not implemented.
49
54
  */
50
55
  metadata?: AgentMetadata | undefined;
51
56
  /**
52
- * Describes which protocol features the agent supports. In addition to the standard capabilities (prefixed with ap.), implementations can declare custom capabilities, named in reverse domain notation (eg. com.example.some.capability).
57
+ * Describes features that the agent supports. example: {
58
+ *
59
+ * @remarks
60
+ * "ap.io.messages": true,
61
+ * "ap.io.streaming": true
62
+ * }
53
63
  */
54
64
  capabilities: AgentCapabilities;
55
65
  };
@@ -9,12 +9,12 @@ import { Result as SafeParseResult } from "../../types/fp.js";
9
9
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
10
 
11
11
  /**
12
- * The schema for the agent input. In JSON Schema format.
12
+ * The schema for the agent input. In JSON schema format.
13
13
  */
14
14
  export type InputSchema = {};
15
15
 
16
16
  /**
17
- * The schema for the agent output. In JSON Schema format.
17
+ * The schema for the agent output. In JSON schema format.
18
18
  */
19
19
  export type OutputSchema = {};
20
20
 
@@ -27,11 +27,11 @@ export type AgentSchemas = {
27
27
  */
28
28
  agentId: string;
29
29
  /**
30
- * The schema for the agent input. In JSON Schema format.
30
+ * The schema for the agent input. In JSON schema format.
31
31
  */
32
32
  inputSchema: InputSchema;
33
33
  /**
34
- * The schema for the agent output. In JSON Schema format.
34
+ * The schema for the agent output. In JSON schema format.
35
35
  */
36
36
  outputSchema: OutputSchema;
37
37
  };
@@ -9,7 +9,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
9
 
10
10
  export type SearchAgentsRequest = {
11
11
  /**
12
- * Filters on the name of the agent. If empty, acts as no filter.
12
+ * Filters on the name of the agent. The keyword search is case-insensitive. If search string is ommited or empty, acts as no filter.
13
13
  */
14
14
  name?: string | undefined;
15
15
  };
@@ -20,6 +20,10 @@ import {
20
20
  } from "./person.js";
21
21
 
22
22
  export type Workflow = {
23
+ /**
24
+ * The name of the workflow.
25
+ */
26
+ name?: string | undefined;
23
27
  author?: Person | undefined;
24
28
  /**
25
29
  * Server Unix timestamp of the creation time.
@@ -31,10 +35,6 @@ export type Workflow = {
31
35
  lastUpdateTimestamp?: number | undefined;
32
36
  lastUpdatedBy?: Person | undefined;
33
37
  permissions?: ObjectPermissions | undefined;
34
- /**
35
- * The name of the workflow.
36
- */
37
- name?: string | undefined;
38
38
  /**
39
39
  * The ID of the workflow.
40
40
  */
@@ -47,23 +47,23 @@ export const Workflow$inboundSchema: z.ZodType<
47
47
  z.ZodTypeDef,
48
48
  unknown
49
49
  > = z.object({
50
+ name: z.string().optional(),
50
51
  author: Person$inboundSchema.optional(),
51
52
  createTimestamp: z.number().int().optional(),
52
53
  lastUpdateTimestamp: z.number().int().optional(),
53
54
  lastUpdatedBy: Person$inboundSchema.optional(),
54
55
  permissions: ObjectPermissions$inboundSchema.optional(),
55
- name: z.string().optional(),
56
56
  id: z.string().optional(),
57
57
  });
58
58
 
59
59
  /** @internal */
60
60
  export type Workflow$Outbound = {
61
+ name?: string | undefined;
61
62
  author?: Person$Outbound | undefined;
62
63
  createTimestamp?: number | undefined;
63
64
  lastUpdateTimestamp?: number | undefined;
64
65
  lastUpdatedBy?: Person$Outbound | undefined;
65
66
  permissions?: ObjectPermissions$Outbound | undefined;
66
- name?: string | undefined;
67
67
  id?: string | undefined;
68
68
  };
69
69
 
@@ -73,12 +73,12 @@ export const Workflow$outboundSchema: z.ZodType<
73
73
  z.ZodTypeDef,
74
74
  Workflow
75
75
  > = z.object({
76
+ name: z.string().optional(),
76
77
  author: Person$outboundSchema.optional(),
77
78
  createTimestamp: z.number().int().optional(),
78
79
  lastUpdateTimestamp: z.number().int().optional(),
79
80
  lastUpdatedBy: Person$outboundSchema.optional(),
80
81
  permissions: ObjectPermissions$outboundSchema.optional(),
81
- name: z.string().optional(),
82
82
  id: z.string().optional(),
83
83
  });
84
84
 
@@ -24,10 +24,10 @@ export type ClientAgentsListMutationVariables = {
24
24
  export type ClientAgentsListMutationData = components.SearchAgentsResponse;
25
25
 
26
26
  /**
27
- * Search Agents
27
+ * Search agents
28
28
  *
29
29
  * @remarks
30
- * List Agents available in this service. This endpoint implements the LangChain Agent Protocol, specifically part of the Agents stage (https://langchain-ai.github.io/agent-protocol/api.html#tag/agents/POST/agents/search). It adheres to the standard contract defined for agent interoperability and can be used by agent runtimes that support the Agent Protocol.
30
+ * Search for [agents](https://developers.glean.com/agents/agents-api) by agent name.
31
31
  */
32
32
  export function useClientAgentsListMutation(
33
33
  options?: MutationHookOptions<