Skip to content
←Back to projects

Project

Tansy - Research-Oriented AI Assistant

A self-hosted, subagent-driven AI assistant for web research, interactive diagrams, and project-based work, with editable memory and reusable skills.

Team
1
Role
Developer and maintainer
Duration
2026 – Present

Stack

  • Next.js
  • React
  • TypeScript
  • TailwindCSS
  • Python
  • FastAPI
  • pydantic-deep
  • Prisma
  • PostgreSQL
  • Redis
  • Better Auth
  • Docker
  • K3s
  • Argo CD

Gallery

Tansy - Research-Oriented AI Assistant 1

Overview

Tansy is a personal project: a research-oriented AI assistant that can delegate work to subagents, search and read web sources, and turn findings into written or interactive outputs. It combines these tools with persistent memory, project workspaces, and isolated code execution. I develop the frontend, backend, and agent integrations, and maintain the self-hosted application on a K3s cluster.

Subagent-Driven Research

The lead agent can split a larger request into focused tasks, delegate them to subagents or team members, and bring their results together. Delegated team members have access to web search, so research is not limited to a single agent's sequence of searches.

Tavily-backed tools search the web and extract page content for closer reading. Source links remain visible in the conversation so users can inspect the material behind an answer. These tools support work such as literature reviews, comparing sources, and drafting research notes; the evaluation suite also includes literature-review and methodology-drafting tasks.

Interactive Diagrams and Visual Outputs

The agent can create interactive diagrams, charts, interface mockups, and small demos directly in the conversation, rather than only describing them in text. A generative UI toolset loads design guidelines before producing HTML or SVG widgets, with JavaScript for interactions.

Widgets appear progressively as they are generated. Users can save a completed visual to their library and reopen it outside the original conversation. This gives research and explanations a visual output when a diagram, chart, or interactive example communicates more clearly than prose.

Memory and Personalization

Each user has durable memory that carries context between conversations. Users can inspect and edit that memory in settings rather than relying on an opaque history of what the assistant remembers. Agent memory changes are also persisted after sandbox execution.

Personalization includes default response styles, reasoning effort, and thinking controls, with conversation-level overrides. User memory is stored as files on persistent storage, separately from the conversation records in PostgreSQL.

Project-Scoped Context

Projects group related conversations around shared instructions, knowledge files, and selected skills. A project journal preserves context from earlier conversations and is updated in the background after successful turns.

The agent receives the current project's instructions and journal at the start of a run and can read its shared files when needed. Ownership checks restrict access to the user's projects. This project context is separate from the user's cross-conversation memory.

Skills Library and Marketplace

Users can create and edit reusable skills or browse an external skills catalogue and import instructions into their personal library. The marketplace integration retrieves catalogue results from skills.sh and skill content from GitHub, retaining source attribution in imported instructions.

Skills can be attached to a project so their instructions apply throughout its conversations. Outside that project context, the agent can discover available skills by name and description and load their full instructions on demand.

Stack and Runtime

  • Interface: Next.js, React, TypeScript, and Tailwind CSS, with Better Auth for authentication.
  • Agent backend: Python and FastAPI with pydantic-deep for tool use, memory, and delegated tasks. Model routing supports OpenRouter and direct DeepSeek access; self-hosting the application does not mean hosting the models.
  • Data and streaming: Prisma and PostgreSQL for application records, Redis Streams for worker dispatch, and WebSockets for chat events.
  • Execution: Temporary Kubernetes pods isolate agent code from the application process, with non-root execution, restricted capabilities, and network policies.

Deployment and Data Protection

Docker workloads run on a single-node K3s cluster, with Argo CD managing GitOps deployment. Persistent volumes retain workspace files and memory. Logfire provides tracing for the agent backend, while automated evaluations cover research, shell tasks, memory, and project deliverables.

PostgreSQL backups run every six hours. The pipeline streams database dumps through age encryption to off-cluster S3-compatible object storage, checks the upload, and applies daily, weekly, and monthly retention. A documented restore procedure covers recovery into a separate database. These database backups do not include the file-based memory or workspace volumes; high availability is outside the current single-node setup.

Related Open-Source Work

The sandbox work also led to my contribution of a Kubernetes execution backend to pydantic-ai-backend. It provides a shared interface for running agent code in isolated pods.

Read about the Kubernetes Pod Sandbox contribution.

Project Access

The source repository is private. Open Tansy.