File tree Expand file tree Collapse file tree 5 files changed +7
-7
lines changed
apps/client-cli-example/src Expand file tree Collapse file tree 5 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -145,7 +145,7 @@ export const agent = new MastraAgent({
145145 agent: new Agent ({
146146 name: " AG-UI Assistant" ,
147147 instructions: `
148- You are a helpful AI assistant. Be friendly, conversational, and helpful.
148+ You are a helpful AI assistant. Be friendly, conversational, and helpful.
149149 Answer questions to the best of your ability and engage in natural conversation.
150150 ` ,
151151 model: openai (" gpt-4o" ),
@@ -175,7 +175,7 @@ Now let's create the interactive chat interface. Create `src/index.ts`:
175175``` typescript
176176import * as readline from " readline"
177177import { agent } from " ./agent"
178- import { randomUUID } from " node:crypto "
178+ import { randomUUID } from " @ag-ui/client "
179179
180180const rl = readline .createInterface ({
181181 input: process .stdin ,
Original file line number Diff line number Diff line change 11import * as readline from "readline" ;
22import { agent } from "./agent" ;
3- import { randomUUID } from "node:crypto " ;
3+ import { randomUUID } from "@ag-ui/client " ;
44
55const rl = readline . createInterface ( {
66 input : process . stdin ,
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ import { A2AClient } from "@a2a-js/sdk/client";
1919import { AgentCard , SendMessageResponse , SendMessageSuccessResponse } from "@a2a-js/sdk" ;
2020import { Observable , Subscriber , tap } from "rxjs" ;
2121import { createSystemPrompt , sendMessageToA2AAgentTool } from "./utils" ;
22- import { randomUUID } from "crypto " ;
22+ import { randomUUID } from "@ag-ui/client " ;
2323
2424export interface A2AAgentConfig extends AgentConfig {
2525 agentUrls : string [ ] ;
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import {
1111 Interrupt ,
1212 Thread ,
1313} from "@langchain/langgraph-sdk" ;
14- import { randomUUID } from "node:crypto " ;
14+ import { randomUUID } from "@ag-ui/client " ;
1515import {
1616 LangGraphPlatformMessage ,
1717 CustomEventNames ,
@@ -960,7 +960,7 @@ export class LangGraphAgent extends AbstractAgent {
960960 if ( ! retrievedAssistant ) {
961961 console . error ( `
962962 No agent found with graph ID ${ this . graphId } found..\n
963-
963+
964964 These are the available agents: [${ assistants . map ( ( a ) => `${ a . graph_id } (ID: ${ a . assistant_id } )` ) . join ( ", " ) } ]
965965 ` ) ;
966966 throw new Error ( "No agent id found" ) ;
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ import { AbstractAgent, EventType } from "@ag-ui/client";
1515import type { StorageThreadType } from "@mastra/core" ;
1616import { Agent as LocalMastraAgent } from "@mastra/core/agent" ;
1717import { RuntimeContext } from "@mastra/core/runtime-context" ;
18- import { randomUUID } from "crypto " ;
18+ import { randomUUID } from "@ag-ui/client " ;
1919import { Observable } from "rxjs" ;
2020import { MastraClient } from "@mastra/client-js" ;
2121type RemoteMastraAgent = ReturnType < MastraClient [ "getAgent" ] > ;
You can’t perform that action at this time.
0 commit comments