ArchAstro. V1. Agents. AgentWorkingMemory
(archastro v0.2.0)
Copy Markdown
AgentWorkingMemory API resource.
Summary
Functions
Delete a working memory entry
List working memory entries for an agent
Update a working memory entry
Functions
@spec delete(ArchAstro.Client.t(), String.t(), String.t()) :: {:ok, :ok} | {:error, ArchAstro.Error.reason()}
Delete a working memory entry
Permanently deletes a working memory entry from the agent. This action is irreversible. Expired entries can also be deleted — they are hidden from list results but persist until overwritten or deleted.
Requires an app-scoped API key. The authenticated caller must be able to modify the agent that owns the entry. Returns 403 if the key is not app-scoped or the caller lacks modify access, and 404 if the agent or entry does not exist within the accessible scope.
Empty body. Returns HTTP 204 on success.
list(client, agent, params \\ %ArchAstro.Types.Operations.GetApiV1AgentsAgentAgentWorkingMemory.Params{})
@spec list( ArchAstro.Client.t(), String.t(), ArchAstro.Types.Operations.GetApiV1AgentsAgentAgentWorkingMemory.Params.t() ) :: {:ok, ArchAstro.Types.WorkingMemoryEntryListResponse.t()} | {:error, ArchAstro.Error.reason()}
List working memory entries for an agent
Returns a paginated list of working memory entries belonging to the specified agent. Entries are key-value pairs the agent stores for context between interactions. Results are ordered by creation time descending (newest first) and can be filtered with a substring search against the key name.
Requires an app-scoped API key. The authenticated caller must have access to the app the agent belongs to. Returns 403 if the key is not app-scoped, and 404 if the agent does not exist within the accessible scope.
Paginated list of working memory entries for the agent.
@spec update( ArchAstro.Client.t(), String.t(), String.t(), ArchAstro.Types.Operations.PatchApiV1AgentsAgentAgentWorkingMemoryEntry.Input.t() ) :: {:ok, ArchAstro.Types.WorkingMemoryEntry.t()} | {:error, ArchAstro.Error.reason()}
Update a working memory entry
Updates the value and/or expiry of an existing working memory entry. Only
the fields you supply are changed; omitted fields retain their current
values. The entry key cannot be changed after creation — delete the entry
and let the agent (or a future create call) write a new one instead.
Pass expires_at as null to remove the expiry so the entry no longer
expires. Expired entries can still be updated; they stay hidden from list
results until their expiry is in the future again.
Requires an app-scoped API key. The authenticated caller must be able to modify the agent that owns the entry. Returns 403 if the key is not app-scoped or the caller lacks modify access, and 404 if the agent or entry does not exist within the accessible scope.
The updated working memory entry.