@@ -9,13 +9,15 @@ AI Agent framework built on Convex.
99- Automatic storage of chat history, per-user or per-thread.
1010- RAG for chat context, via hybrid text & vector search, with configuration options.
1111 Or use the API to query the history yourself and do it your way.
12- - Opt-in search for messages from other threads (for the same specifieduser ).
12+ - Opt-in search for messages from other threads (for the same specified user ).
1313- Tool calls via the AI SDK, along with Convex-specific helpers.
1414- Easy workflow integration with the [ Workflow component] ( https://convex.dev/components/workflow ) .
1515- Reactive & realtime updates to asynchronous threads.
1616- Support for streaming text and storing the result in the database.
1717- Optionally filter tool calls out of the thread history.
1818
19+ [ Read the associated Stack post here] ( https://stack.convex.dev/ai-agents ) .
20+
1921Example usage:
2022
2123``` ts
@@ -31,7 +33,7 @@ const supportAgent = new Agent(components.agent, {
3133export const createThread = action ({
3234 args: { prompt: v .string () },
3335 handler : async (ctx , { prompt }) => {
34- const { threadId, thread } = await supportAgent .createThread (ctx , {} );
36+ const { threadId, thread } = await supportAgent .createThread (ctx );
3537 const result = await thread .generateText ({ prompt });
3638 return { threadId , text: result .text };
3739 },
@@ -68,7 +70,7 @@ export const supportAgentWorkflow = workflow.define({
6870});
6971```
7072
71- Also see the [ Stack article] ( https://stack.convex.dev/ai-agent ) .
73+ Also see the [ Stack article] ( https://stack.convex.dev/ai-agents ) .
7274
7375Coming soon:
7476
@@ -333,7 +335,7 @@ const messages = await ctx.runQuery(components.agent.embeddings.deleteBatch, {
333335```
334336
335337See example usage in [ example.ts] ( ./example/convex/example.ts ) .
336- Read more in [ this Stack post] ( https://stack.convex.dev/ai-agent ) .
338+ Read more in [ this Stack post] ( https://stack.convex.dev/ai-agents ) .
337339
338340``` sh
339341npm i @convex-dev/agent
0 commit comments