Tulip Logo IconTulip

Overview

Build tool-using agents, streaming chat, MCP endpoints, and composable assistant UI with the AI package.

@tulip-systems/ai is the Tulip package for building application-aware AI experiences. It wraps the AI SDK with Tulip conventions for agents, tools, runs, approvals, chat and MCP.

An agent is defined once and used everywhere: in the in-app chat, from a button, on a domain event, on a schedule, or as tools for an MCP app. Every run is checked the same way and recorded.

It exposes:

  • agents (defineAgent) that run for a user or as themselves, with typed output
  • tool definitions that agents and MCP both use, with permissions and confirmations, built from one tool base (toolBuilder)
  • Agents, which runs agents, records runs, keeps approvals and activates agents per workspace
  • approvals that wait for a person, in the chat or later from a notification
  • Chat, for saved, streaming chats, with useAssistantChat and composable chat components
  • Mcp, which serves the tools to MCP apps, with per-user settings

The three services are independent: use only Mcp, only Agents, or Agents with Chat. See Installation.

Start here

What AI is good at

  • an assistant in the app that looks things up and makes changes the user approves
  • buttons that stream text into a field or fill a form with suggestions
  • background agents on events and schedules, running with their own grants
  • changes that wait for a person's approval, even when nobody is watching
  • the same tools for the in-app agents and for MCP apps such as Claude

Package entrypoints

import { toolBuilder } from "@tulip-systems/ai/tools/server";
import { Agents, defineAgent } from "@tulip-systems/ai/agents/server";
import { Chat } from "@tulip-systems/ai/chat/server";
import { Mcp, text, json, table } from "@tulip-systems/ai/mcp/server";
import {
  aiAgentsDrizzleAdapter,
  aiChatDrizzleAdapter,
  aiMcpDrizzleAdapter,
} from "@tulip-systems/ai/drizzle";
import { ChatThread, ChatComposer, useAssistantChat } from "@tulip-systems/ai/chat/client";
import { AgentContext, useAgentContext } from "@tulip-systems/ai/context/client";
import type { AgentPolicy, AiChatRequest } from "@tulip-systems/ai/types";

Documentation map

  • Getting Started: installation and first agent/chat integration
  • Concepts: agents, tools, the services, runs, approvals, chat and MCP
  • Recipes: one pattern per way to use an agent, and managing agents
  • Reference: exports, public types, and gotchas

On this page