Gleanex.Platform.Agents (Gleanex v0.1.0)

Copy Markdown View Source

Provides API endpoints related to agents

Summary

Functions

create_run(agent_id, body, opts \\ [])

@spec create_run(
  agent_id :: String.t(),
  body :: Gleanex.Platform.AgentRunCreateRequest.t(),
  opts :: keyword()
) ::
  {:ok, Gleanex.Platform.AgentRunWaitResponse.t() | String.t()}
  | {:error, Gleanex.Error.t()}

Create agent run

Execute an agent run. Set stream to true to receive server-sent events; otherwise the response contains the final agent messages.

Request Body

Content Types: application/json

get(agent_id, opts \\ [])

@spec get(agent_id :: String.t(), opts :: keyword()) ::
  {:ok, Gleanex.Platform.AgentGetResponse.t()} | {:error, Gleanex.Error.t()}

Get agent

Retrieve details for an agent available to the authenticated user.

get_schemas(agent_id, opts \\ [])

@spec get_schemas(agent_id :: String.t(), opts :: keyword()) ::
  {:ok, Gleanex.Platform.AgentSchemasResponse.t()} | {:error, Gleanex.Error.t()}

Get agent schemas

Retrieve an agent's input and output JSON schemas.

Options

  • include_tools: Whether to include tool metadata in the response.

search(body, opts \\ [])

@spec search(body :: Gleanex.Platform.AgentsSearchRequest.t(), opts :: keyword()) ::
  {:ok, Gleanex.Platform.AgentsSearchResponse.t()} | {:error, Gleanex.Error.t()}

Search agents

Search agents available to the authenticated user by agent name.

Request Body

Content Types: application/json