---
title: "Clarissa"
description: "An AI-powered terminal assistant that executes tools, built with Bun and Ink, featuring streaming responses, MCP integration, and session persistence."
impact: "Brings AI assistance to the command line with multi-model support and extensible tools"
github_url: "https://github.com/cameronrye/clarissa"
demo_url: "https://clarissa.run"
demo_label: "Visit Site"
blog_post: "building-clarissa-ai-terminal-assistant"
technologies: ["TypeScript", "Bun", "Ink", "React", "MCP", "OpenRouter"]
featured: false
order: 9
publishedAt: 2025-12-07T00:00:00.000Z
architecture: "flowchart LR\n    subgraph Input\n        A[User Message]\n        B[Piped Content]\n    end\n    subgraph Clarissa\n        C[Agent Loop]\n        D[LLM Client]\n        E[Tool Registry]\n        F[Context Manager]\n    end\n    subgraph External\n        G[OpenRouter API]\n        H[MCP Servers]\n    end\n    A --> C\n    B --> C\n    C <--> D\n    C <--> E\n    C <--> F\n    D <--> G\n    E -.-> H\n"
problem: "Developers want AI assistance in terminal workflows, but existing solutions can't execute tools, persist context across sessions, or extend through a standard protocol. Most terminal AI tools are just chat interfaces; they can't take action on the user's behalf."
solution: "Built an AI agent that implements the ReAct (Reasoning + Acting) pattern, enabling the LLM to reason about tasks and execute tools in an iterative loop. The agent features built-in tools for file operations, Git integration, and shell commands, with extensibility through the Model Context Protocol (MCP). Session persistence and a memory system allow context to carry across conversations."
results: ["Multi-model support via OpenRouter (Claude, GPT-4, Gemini, Llama, DeepSeek)", "Real-time streaming responses with automatic context management", "Session persistence and cross-session memory system", "MCP integration for extensibility without code changes"]
metrics: [{"label":"Built-in Tools","value":"14"}]
canonical_url: https://rye.dev/projects/clarissa/
---

Clarissa is a command-line AI agent built with [Bun](https://bun.sh) and [Ink](https://github.com/vadimdemedes/ink). It provides a conversational interface powered by [OpenRouter](https://openrouter.ai), enabling access to various LLMs like Claude, GPT-4, Gemini, and more. The agent can execute tools, manage files, run shell commands, and integrate with external services via the Model Context Protocol (MCP).

_Interactive demo: https://rye.dev/projects/clarissa/_

## Key Features

- **ReAct Agent Pattern**: Implements the Reasoning + Acting loop for multi-step tasks
- **Multi-model Support**: Switch between Claude, GPT-4, Gemini, Llama, and more via OpenRouter
- **Tool Execution**: Built-in tools for files, Git, shell commands, and web fetching
- **MCP Integration**: Extend with external tools through the Model Context Protocol
- **Session Persistence**: Save and restore conversation history across sessions
- **Memory System**: Remember facts across sessions with `/remember` and `/memories`
- **Context Management**: Automatic token tracking and context truncation
- **Tool Confirmation**: Approve or reject potentially dangerous operations

## The ReAct Loop

The agent implements an iterative loop where it:

1. Receives user input and sends it to the LLM with available tool definitions
2. If the LLM responds with tool calls, executes them and feeds results back
3. Repeats until the LLM provides a final answer without requesting tools

This pattern enables complex multi-step tasks while maintaining safety through tool confirmation.

## Usage Modes

```bash
# Interactive mode
clarissa

# One-shot mode
clarissa "What files are in this directory?"

# Piped input
git diff | clarissa "Write a commit message for these changes"
```