Clarissa is a command-line AI agent built with Bun and Ink. It provides a conversational interface powered by OpenRouter, 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).
MCP Tool Explorer
{
"tool": "read_file",
"path": "./src/agent.ts"
}Read the contents of a file
This is a simulated demo. The actual MCP server processes requests from AI assistants like Claude.
Key Features
- ReAct Agent Pattern: Implements the Reasoning + Acting loop for intelligent task execution
- 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
/rememberand/memories - Context Management: Automatic token tracking and intelligent context truncation
- Tool Confirmation: Approve or reject potentially dangerous operations
The ReAct Loop
The agent implements an iterative loop where it:
- Receives user input and sends it to the LLM with available tool definitions
- If the LLM responds with tool calls, executes them and feeds results back
- 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
# 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"