Nuntly.Agents (nuntly v0.1.0)

Copy Markdown View Source

Read and write persistent state for an AI agent, optionally scoped to a specific inbox or thread.

Summary

Functions

retrieve_agent_memory(client, agent_id, opts \\ [])

Retrieve Agent Memory

Retrieve the memory for an AI agent.

Arguments

  • client — A Nuntly.Client returned by Nuntly.new/1.
  • agent_id — Required path parameter, string. The agent identifier.
  • opts — Optional keyword list passed to Req for this request.

Example

client = Nuntly.new(api_key: "ntly_...")

Nuntly.Agents.retrieve_agent_memory(client, "agent-id")

upsert_agent_memory(client, agent_id, body, opts \\ [])

Upsert Agent Memory

Create or update the memory for an AI agent.

Arguments

  • client — A Nuntly.Client returned by Nuntly.new/1.
  • agent_id — Required path parameter, string. The agent identifier.
  • body — application/json request body using AgentMemoryRequest. Accepted fields:
    • "inboxId" (string, optional) — The inbox id to scope the memory to.
    • "threadId" (string, optional) — The thread id to scope the memory to.
    • "memory" (map, required) — The agent memory key-value data.
    • "summary" (string or nil, optional) — A human-readable conversation summary.
  • opts — Optional keyword list passed to Req for this request.

Example

client = Nuntly.new(api_key: "ntly_...")

Nuntly.Agents.upsert_agent_memory(
  client,
  "agent-id",
  %{
    "memory" => %{
      "key" => "value"
    }
  }
)