Skip to content

Commit

Permalink
Release 0.1.10
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Jan 18, 2025
1 parent 09bd466 commit 53d3e13
Show file tree
Hide file tree
Showing 62 changed files with 385 additions and 459 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@letta-ai/letta-client",
"version": "0.1.9",
"version": "0.1.10",
"private": false,
"repository": "https://github.com/letta-ai/letta-node",
"main": "./index.js",
Expand Down
26 changes: 12 additions & 14 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -3018,7 +3018,7 @@ await client.runs.deleteRun("run_id");
</dl>
</details>

<details><summary><code>client.runs.<a href="/src/api/resources/runs/client/Client.ts">getRunMessages</a>(runId, { ...params }) -> Letta.LettaSchemasMessageMessage[]</code></summary>
<details><summary><code>client.runs.<a href="/src/api/resources/runs/client/Client.ts">getRunMessages</a>(runId, { ...params }) -> Letta.LettaMessageUnion[]</code></summary>
<dl>
<dd>

Expand All @@ -3035,17 +3035,15 @@ Get messages associated with a run with filtering options.
Args:
run_id: ID of the run
cursor: Cursor for pagination
start_date: Filter messages after this date
end_date: Filter messages before this date
limit: Maximum number of messages to return
query_text: Search text in message content
ascending: Sort order by creation time
tags: Filter by message tags
match_all_tags: If true, match all tags. If false, match any tag
role: Filter by message role (user/assistant/system/tool)
tool_name: Filter by tool call name
role: Filter by role (user/assistant/system/tool)
return_message_object: Whether to return Message objects or LettaMessage objects
user_id: ID of the user making the request

Returns:
A list of messages associated with the run. Default is List[LettaMessage].

</dd>
</dl>
</dd>
Expand Down Expand Up @@ -4473,7 +4471,7 @@ await client.agents.messages.list("agent_id");
</dl>
</details>

<details><summary><code>client.agents.messages.<a href="/src/api/resources/agents/resources/messages/client/Client.ts">create</a>(agentId, { ...params }) -> Letta.LettaResponse</code></summary>
<details><summary><code>client.agents.messages.<a href="/src/api/resources/agents/resources/messages/client/Client.ts">send</a>(agentId, { ...params }) -> Letta.LettaResponse</code></summary>
<dl>
<dd>

Expand Down Expand Up @@ -4502,7 +4500,7 @@ This endpoint accepts a message from a user and processes it through the agent.
<dd>

```typescript
await client.agents.messages.create("agent_id", {
await client.agents.messages.send("agent_id", {
messages: [
{
role: "user",
Expand Down Expand Up @@ -4714,7 +4712,7 @@ for await (const item of response) {
</dl>
</details>

<details><summary><code>client.agents.messages.<a href="/src/api/resources/agents/resources/messages/client/Client.ts">createAsync</a>(agentId, { ...params }) -> Letta.Run</code></summary>
<details><summary><code>client.agents.messages.<a href="/src/api/resources/agents/resources/messages/client/Client.ts">sendAsync</a>(agentId, { ...params }) -> Letta.Run</code></summary>
<dl>
<dd>

Expand All @@ -4726,8 +4724,8 @@ for await (const item of response) {
<dl>
<dd>

Asynchronously process a user message and return a job ID.
The actual processing happens in the background, and the status can be checked using the job ID.
Asynchronously process a user message and return a run object.
The actual processing happens in the background, and the status can be checked using the run ID.

</dd>
</dl>
Expand All @@ -4743,7 +4741,7 @@ The actual processing happens in the background, and the status can be checked u
<dd>

```typescript
await client.agents.messages.createAsync("agent_id", {
await client.agents.messages.sendAsync("agent_id", {
messages: [
{
role: "user",
Expand Down
36 changes: 20 additions & 16 deletions src/api/resources/agents/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export class Agents {
request: Letta.AgentsListRequest = {},
requestOptions?: Agents.RequestOptions,
): Promise<Letta.AgentState[]> {
const { name, tags, matchAllTags, cursor, limit } = request;
const { name, tags, matchAllTags, cursor, limit, queryText } = request;
const _queryParams: Record<string, string | string[] | object | object[]> = {};
if (name != null) {
_queryParams["name"] = name;
Expand All @@ -123,13 +123,17 @@ export class Agents {
}

if (cursor != null) {
_queryParams["cursor"] = cursor.toString();
_queryParams["cursor"] = cursor;
}

if (limit != null) {
_queryParams["limit"] = limit.toString();
}

if (queryText != null) {
_queryParams["query_text"] = queryText;
}

const _response = await (this._options.fetcher ?? core.fetcher)({
url: urlJoin(
(await core.Supplier.get(this._options.baseUrl)) ??
Expand All @@ -141,8 +145,8 @@ export class Agents {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@letta-ai/letta-client",
"X-Fern-SDK-Version": "0.1.9",
"User-Agent": "@letta-ai/letta-client/0.1.9",
"X-Fern-SDK-Version": "0.1.10",
"User-Agent": "@letta-ai/letta-client/0.1.10",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -226,8 +230,8 @@ export class Agents {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@letta-ai/letta-client",
"X-Fern-SDK-Version": "0.1.9",
"User-Agent": "@letta-ai/letta-client/0.1.9",
"X-Fern-SDK-Version": "0.1.10",
"User-Agent": "@letta-ai/letta-client/0.1.10",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -308,8 +312,8 @@ export class Agents {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@letta-ai/letta-client",
"X-Fern-SDK-Version": "0.1.9",
"User-Agent": "@letta-ai/letta-client/0.1.9",
"X-Fern-SDK-Version": "0.1.10",
"User-Agent": "@letta-ai/letta-client/0.1.10",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -389,8 +393,8 @@ export class Agents {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@letta-ai/letta-client",
"X-Fern-SDK-Version": "0.1.9",
"User-Agent": "@letta-ai/letta-client/0.1.9",
"X-Fern-SDK-Version": "0.1.10",
"User-Agent": "@letta-ai/letta-client/0.1.10",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -469,8 +473,8 @@ export class Agents {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@letta-ai/letta-client",
"X-Fern-SDK-Version": "0.1.9",
"User-Agent": "@letta-ai/letta-client/0.1.9",
"X-Fern-SDK-Version": "0.1.10",
"User-Agent": "@letta-ai/letta-client/0.1.10",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -562,8 +566,8 @@ export class Agents {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@letta-ai/letta-client",
"X-Fern-SDK-Version": "0.1.9",
"User-Agent": "@letta-ai/letta-client/0.1.9",
"X-Fern-SDK-Version": "0.1.10",
"User-Agent": "@letta-ai/letta-client/0.1.10",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -649,8 +653,8 @@ export class Agents {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@letta-ai/letta-client",
"X-Fern-SDK-Version": "0.1.9",
"User-Agent": "@letta-ai/letta-client/0.1.9",
"X-Fern-SDK-Version": "0.1.10",
"User-Agent": "@letta-ai/letta-client/0.1.10",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,13 @@ export interface AgentsListRequest {
/**
* Cursor for pagination
*/
cursor?: number;
cursor?: string;
/**
* Limit for pagination
*/
limit?: number;
/**
* Search agents by name
*/
queryText?: string;
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ export interface CreateAgentRequest {
embeddingConfig?: Letta.EmbeddingConfig;
/** The initial set of messages to put in the agent's in-context memory. */
initialMessageSequence?: Letta.MessageCreate[];
/** The LLM configuration used by the agent. */
/** If true, attaches the Letta core tools (e.g. archival_memory and core_memory related functions). */
includeBaseTools?: boolean;
/** If true, attaches the Letta multi-agent tools (e.g. sending a message to another agent). */
includeMultiAgentTools?: boolean;
/** The description of the agent. */
description?: string;
/** The metadata of the agent. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ export class ArchivalMemory {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@letta-ai/letta-client",
"X-Fern-SDK-Version": "0.1.9",
"User-Agent": "@letta-ai/letta-client/0.1.9",
"X-Fern-SDK-Version": "0.1.10",
"User-Agent": "@letta-ai/letta-client/0.1.10",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -161,8 +161,8 @@ export class ArchivalMemory {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@letta-ai/letta-client",
"X-Fern-SDK-Version": "0.1.9",
"User-Agent": "@letta-ai/letta-client/0.1.9",
"X-Fern-SDK-Version": "0.1.10",
"User-Agent": "@letta-ai/letta-client/0.1.10",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -250,8 +250,8 @@ export class ArchivalMemory {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@letta-ai/letta-client",
"X-Fern-SDK-Version": "0.1.9",
"User-Agent": "@letta-ai/letta-client/0.1.9",
"X-Fern-SDK-Version": "0.1.10",
"User-Agent": "@letta-ai/letta-client/0.1.10",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -339,8 +339,8 @@ export class ArchivalMemory {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@letta-ai/letta-client",
"X-Fern-SDK-Version": "0.1.9",
"User-Agent": "@letta-ai/letta-client/0.1.9",
"X-Fern-SDK-Version": "0.1.10",
"User-Agent": "@letta-ai/letta-client/0.1.10",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down
4 changes: 2 additions & 2 deletions src/api/resources/agents/resources/context/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ export class Context {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@letta-ai/letta-client",
"X-Fern-SDK-Version": "0.1.9",
"User-Agent": "@letta-ai/letta-client/0.1.9",
"X-Fern-SDK-Version": "0.1.10",
"User-Agent": "@letta-ai/letta-client/0.1.10",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down
28 changes: 14 additions & 14 deletions src/api/resources/agents/resources/coreMemory/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ export class CoreMemory {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@letta-ai/letta-client",
"X-Fern-SDK-Version": "0.1.9",
"User-Agent": "@letta-ai/letta-client/0.1.9",
"X-Fern-SDK-Version": "0.1.10",
"User-Agent": "@letta-ai/letta-client/0.1.10",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -143,8 +143,8 @@ export class CoreMemory {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@letta-ai/letta-client",
"X-Fern-SDK-Version": "0.1.9",
"User-Agent": "@letta-ai/letta-client/0.1.9",
"X-Fern-SDK-Version": "0.1.10",
"User-Agent": "@letta-ai/letta-client/0.1.10",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -229,8 +229,8 @@ export class CoreMemory {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@letta-ai/letta-client",
"X-Fern-SDK-Version": "0.1.9",
"User-Agent": "@letta-ai/letta-client/0.1.9",
"X-Fern-SDK-Version": "0.1.10",
"User-Agent": "@letta-ai/letta-client/0.1.10",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -317,8 +317,8 @@ export class CoreMemory {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@letta-ai/letta-client",
"X-Fern-SDK-Version": "0.1.9",
"User-Agent": "@letta-ai/letta-client/0.1.9",
"X-Fern-SDK-Version": "0.1.10",
"User-Agent": "@letta-ai/letta-client/0.1.10",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -407,8 +407,8 @@ export class CoreMemory {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@letta-ai/letta-client",
"X-Fern-SDK-Version": "0.1.9",
"User-Agent": "@letta-ai/letta-client/0.1.9",
"X-Fern-SDK-Version": "0.1.10",
"User-Agent": "@letta-ai/letta-client/0.1.10",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -491,8 +491,8 @@ export class CoreMemory {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@letta-ai/letta-client",
"X-Fern-SDK-Version": "0.1.9",
"User-Agent": "@letta-ai/letta-client/0.1.9",
"X-Fern-SDK-Version": "0.1.10",
"User-Agent": "@letta-ai/letta-client/0.1.10",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down Expand Up @@ -582,8 +582,8 @@ export class CoreMemory {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@letta-ai/letta-client",
"X-Fern-SDK-Version": "0.1.9",
"User-Agent": "@letta-ai/letta-client/0.1.9",
"X-Fern-SDK-Version": "0.1.10",
"User-Agent": "@letta-ai/letta-client/0.1.10",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ export class MemoryVariables {
headers: {
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "@letta-ai/letta-client",
"X-Fern-SDK-Version": "0.1.9",
"User-Agent": "@letta-ai/letta-client/0.1.9",
"X-Fern-SDK-Version": "0.1.10",
"User-Agent": "@letta-ai/letta-client/0.1.10",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...(await this._getCustomAuthorizationHeaders()),
Expand Down
Loading

0 comments on commit 53d3e13

Please sign in to comment.