GitHub - open-clone/openclone: Freely converse with AI clones trained on real people
Service

GitHub - open-clone/openclone: Freely converse with AI clones trained on real people

open-clone
2026.05.01
·GitHub·by 임근석/부산/NLP
#Agent#AI#CLI#LLM#Persona

Key Points

  • 1openclone is a versatile tool enabling users to create and interact with AI persona clones, accessible either as a skill within Claude Code or through a standalone command-line interface.
  • 2It facilitates individual and group conversations with clones, allows broadcasting questions to entire categories of personas, and supports ingesting knowledge from various sources to enhance clone intelligence.
  • 3A core feature is its commitment to privacy and local control, storing all user data, conversations, and clone knowledge directly on the user's computer in Markdown format, eliminating the need for servers or accounts.

Openclone is an open-source project designed to create and interact with AI persona clones directly on a local machine, without relying on external servers, accounts, or Software-as-a-Service (SaaS) platforms. All data, including persona definitions, knowledge bases, and conversational history, is stored locally in Markdown and JSON files within the user's ~/.openclone/ directory.

The core methodology revolves around representing AI personas as "clones." Each clone is defined by a persona.md file and a collection of knowledge files within a clones/<slug>/knowledge/clones/<slug>/knowledge/ directory. Knowledge acquisition is facilitated through an ingest command, which allows the active clone to learn from various sources such as URLs, video subtitles, or local documents. This ingested knowledge is then saved as local files, forming the clone's accessible information base.

Interactions with these clones can occur in several modes:

  1. Direct Chat: Users can engage in one-on-one conversations with a specific activated clone using openclonechat<slug>openclone chat <slug> or /openclone<name∣N>/openclone <name|N>.
  2. Room (Group Chat): Multiple clones can be brought into a "room" (/opencloneroom<A><B>.../openclone room <A> <B> ...). In this mode, the system automatically determines the most relevant clone to respond to a user's prompt.
  3. Category Panel: Users can broadcast a question to all clones belonging to a specific category (e.g., "vc", "tech", "founder") using /openclonepanel<category>"..."/openclone panel <category> "...", allowing for comparative perspectives.
  4. Clone Creation: New clones can be created interactively through an interview process via /openclonenew<name>/openclone new <name>.

The system integrates with various Large Language Models (LLMs) through configurable providers:

  • OpenAI-compatible APIs: Configured via environment variables like OPENCLONE_API_KEY and OPENCLONE_MODEL (e.g., gpt-5.5).
  • Codex OAuth: For users already logged into Codex CLI, enabling interaction with OpenAI Codex models. The CLI specifically handles multi-turn conversations by sending the full messages array for each turn, even when response persistence is disabled (e.g., store=falsestore=false for ChatGPT backend with general user tokens) to ensure continuity without relying on previous_response_id.
  • Local Ollama Models: Supports local LLMs served by Ollama (e.g., --provider ollama --model llama3.2).

Conversation management in interactive mode (openclonechat<slug>openclone chat <slug>) is sophisticated. Each conversation turn, and the final state upon session termination (/bye), is saved as plain JSON in ~/.openclone/conversations/<slug>/<sessionId>.json. Sessions can be resumed using --resume or --resume=<SESSION_ID>, with the entire previous dialogue re-printed to the terminal. For long conversations, an automatic summarization mechanism is employed: if the conversation length exceeds a threshold (default OPENCLONE_COMPACT_MAX_CHARS = 24,000 characters), older messages are summarized while a configurable number of recent turns (default OPENCLONE_COMPACT_KEEP_TURNS = 6) are retained in their original form. The summary length is adjustable via OPENCLONE_COMPACT_SUMMARY_MAX_CHARS (default 6,000 characters). This compressed summary is also persisted in the session JSON, allowing for accurate restoration.

Openclone offers two primary installation pathways:

  1. Claude Code Skill: Designed for integration within the Claude Code environment. This involves a git clone into ~/.claude/skills/openclone, followed by a ./setup script that configures Claude Code to recognize /openclone slash commands and other interaction features. The skill's description is added to ~/.claude/CLAUDE.md for natural language recognition by Claude Code.
  2. Standalone CLI: A global npm package (npm install -g @openclone/openclone) that provides the openclone command for use in any terminal. This package includes built-in clones and knowledge files for immediate use. It also integrates with Vercel Agent Skills, allowing AI coding agents to provide context-aware help for CLI usage based on internal SKILL.md and references/*.md files.

The project emphasizes local data control, a modular architecture for persona and knowledge management, and flexible integration with various LLM providers.