Rivet

repository·main·Indexed 26 days ago

https://github.com/ironclad/rivet

An IDE and runtime for building complex AI agents and prompt chains. Rivet provides a visual desktop application for graph construction and a TypeScript/Node.js core library (@ironclad/rivet-core) for embedding agentic workflows into production applications. It supports LLMs from OpenAI, Anthropic, and AssemblyAI, as well as vector databases like Pinecone. The ecosystem includes trivet for testing and a dedicated App Executor CLI for dynamic graph execution and debugging.

Tokens
77.2K
Snippets
70
Records
553
Agent score
88%

What's inside Rivet

  1. Overview of Rivet

    main

    Rivet is an IDE designed for creating complex AI agents and prompt chaining. It provides both a desktop application for visual graph creation and a core library for embedding those graphs into your own applications.

    Key Capabilities:

    • LLM Support: OpenAI (GPT-3.5, GPT-4), Anthropic (Claude Instant, Claude 2, Claude 3 Haiku, Sonnet, and Opus), and AssemblyAI LeMUR.
    • Vector Database Support: OpenAI Embeddings and Pinecone.
    • Integrations: Speech-to-Text from AssemblyAI.
  2. Overview of Rivet components

    main

    Rivet is an IDE and library for building AI agents using a visual, graph-based interface. It is composed of two primary parts:

    1. Rivet Application: A visual editor/IDE used to design complex prompt chains and AI agents. It includes tools like a prompt designer, A/B testing node variations, and integrated testing suites. The application produces project files that are designed for execution.

    2. Rivet Core/Rivet Node: TypeScript libraries used to execute the project files created in the Rivet Application. These libraries allow you to treat your visual AI graphs as executable functions within your own software.

  3. Use `@ironclad/rivet-node` for Node.js applications

    main

    @ironclad/rivet-node is a Node.js binding for Rivet core. It provides helper APIs specifically for loading Rivet graphs from the filesystem and executing them.

    Because it re-exports all types from @ironclad/rivet-core, you can use @ironclad/rivet-node as a drop-in replacement for the core package in Node.js environments.

  4. Explore Rivet built-in plugins

    main

    Rivet provides several built-in plugins for integrating with external AI services, data providers, and evaluation tools. The available built-in plugins are:

    • Anthropic: Integration with Anthropic's models.
    • AssemblyAI: Integration with AssemblyAI for audio processing.
    • Autoevals: Tools for automated evaluations.
    • Gentrace: Integration with Gentrace.
    • Google: Integration with Google services.
    • HuggingFace: Integration with HuggingFace models and datasets.
    • Pinecone: Integration with Pinecone vector database.

    Refer to the specific documentation for each plugin to learn about its configuration, required API keys, and node usage.

  5. Use the Prompt Node to create chat messages

    main

    The Prompt Node creates a chat-message object, which consists of a text string, a message type (User, Assistant, or System), and an optional name. It supports dynamic text interpolation using {{variable_name}} syntax, similar to a Text Node.

    Key Capabilities

    • Interpolation: Dynamically insert values into the prompt text by creating custom input ports based on the names used in the {{}} placeholders.
    • Token Counting: If Compute Token Count is enabled in the editor settings, the node provides a Token Count output (number) representing the size of the generated message.
    • Function Call Attachment: If Enable Function Call is enabled, you can attach a function call object to the chat message via a Function Call input port.
  6. Use `@ironclad/rivet-core` for environment-agnostic Rivet APIs

    main
    @ironclad/rivet-core is a pure ESM package containing the core Rivet APIs. It has no dependencies on browser or Node.js APIs, making it suitable for any modern ESM JavaScript environment, including embedded environments like PythonMonkey. Use this package if you need to run Rivet graphs in non-Node.js environments.
  7. Connect a Chat Node to LM Studio

    main

    To use a local LLM provider like LM Studio instead of OpenAI:

    1. Add a Chat node to your graph.
    2. Add a Text node and place your message inside it (e.g., replacing {{input}} with your message).
    3. Connect the output of the Text node to the Prompt input of the Chat node.
    4. In the Chat node settings, set the Endpoint to http://localhost:1234/v1/chat/completions.
    5. Load your model in LM Studio and ensure CORS is enabled in the LM Studio Server Options.
    6. Run your graph.