Logo Jiva - Versatile Autonomous AI Agent

Jiva - Versatile Autonomous AI Agent

Tổ chức
KarmaloopAI

Jiva is a CLI-first, open source autonomous AI agent and open alternative to Claude. Written in TypeScript with native support for Sarvam-105B and gpt-oss-120b, it autonomously plans and executes tasks from your terminal. Supports MCP servers, a built-in Skills system, and Jiva Personas - a plugin framework fully compatible with Claude Plugins.

Nhà phát hànhKarmaloopAI
Kho mãJiva
Ngôn ngữTypeScript
Bản fork
8
Sao
35
Công cụ có sẵn
0
Phương thức truyền tảistdio, streamable-http
Danh mục
Giấy phépMIT
Liên kết
  • Kết nối công cụ với quy trình làm việc AI

    Jiva - Versatile Autonomous AI Agent cung cấp các chức năng MCP cho các ứng dụng khách AI và tác nhân AI tương thích.

  • 0 công cụ có sẵn

    Xem các thao tác có thể gọi bên dưới, kèm tên và mô tả nếu máy chủ cung cấp.

  • Mẫu cấu hình có thể sao chép ngay

    Dùng các đoạn cấu hình mẫu để thiết lập máy chủ này trong ứng dụng khách MCP bạn muốn dùng.

  • Mức độ quan tâm của cộng đồng đến kho mã

    35 sao và 8 bản fork từ kho mã được liên kết.

Jiva

npm version License GitHub stars

Jiva is an autonomous AI agent for the terminal and cloud. It works with any OpenAI-compatible model provider and supports two execution modes — a general-purpose two-agent system (Manager + Worker) for complex tasks, and a code-optimized single-loop engine with LSP integration for software engineering.

Demo

Demo


Installation

bash
npm install -g jiva-core
jiva setup

# Verify your model + config can do code mode well:
jiva benchmark

The setup wizard opens with a provider selection menu. Choose your provider and Jiva auto-fills the endpoint, model name, and tool format — you only supply your API key. Supported providers: Krutrim, Groq, Sarvam, OpenAI, and any OpenAI-compatible endpoint.

After setup, run jiva benchmark to confirm your chosen model and configuration work optimally in code mode. It runs the baseline (taskstore) suite — a deterministic set of coding tasks — against your config; a healthy setup passes all of them. See Benchmarking for tuning and capability comparison.

Development install

bash
git clone https://github.com/KarmaloopAI/Jiva.git
cd Jiva
npm install && npm run build && npm link
jiva setup

Quick Start

bash
# General-purpose interactive session
jiva chat

# Code mode — optimized for software engineering tasks
jiva chat --code

# Code mode with plan-then-approve flow
jiva chat --code --plan

# Single prompt
jiva run "What changed in the last 5 commits?"

# Single prompt in code mode
jiva run "Add error handling to the database module" --code

REPL commands

CommandDescription
/helpShow available commands
/toolsList active tools
/serversShow MCP server status
/saveSave current conversation
/loadResume a saved conversation
/listBrowse all saved conversations
/resetClear conversation history
/<skill-name>Load a skill (e.g. /graphify)
/exitExit Jiva

Execution Modes

General mode (default)

A two-agent pipeline designed for complex, multi-step tasks:

User Request
    ↓
Manager Agent    — plans, decomposes, and synthesizes
    ↓
Worker Agent     — executes subtasks with MCP tools
    ↓
Response

The Worker has access to any configured MCP server (filesystem, browser automation, shell commands, etc.). The Manager synthesizes results from all subtasks into a final coherent response. Simple conversational messages are answered directly without executing subtasks.

Code mode (--code)

A single streaming loop optimized for coding tasks:

User Request
    ↓
CodeAgent
    loop until done:
        LLM call with tool definitions
        ↓
        Tool execution (in-process, no subprocess)
        ↓
        LSP feedback after file edits
    ↓
Response

Code mode reduces latency by eliminating inter-agent overhead and running all file tools directly in the Node.js process. It includes a multi-strategy edit engine that reliably handles indentation drift and whitespace inconsistencies.

Available tools in code mode:

ToolDescription
read_fileRead files with line numbers, list directories
edit_fileMulti-strategy string replacement (9 strategies)
write_fileCreate or overwrite files
globFind files by pattern
grepRegex content search
bashRun shell commands
spawn_code_agentDelegate a sub-task to a child agent

MCP servers in code mode: Code mode does not load all MCP servers by default (too many tools bloat the context). You opt in explicitly:

bash
# Per-invocation: pass server names via --mcp (comma-separated)
jiva chat --code --mcp browser
jiva chat --code --mcp browser,postgres

# Persistent: set codeMode:true on any server in your config
jiva config
# or edit ~/.config/jiva/config.json:
# "mcpServers": { "browser": { "command": "...", "codeMode": true } }

When MCP servers are active in code mode, their tool names (e.g. browser__screenshot) are listed in the startup banner and the agent's system prompt.

LSP integration: After each file edit, Jiva notifies the appropriate language server and appends any compiler errors to the tool result. Language servers are auto-detected from your PATH. If none is installed for a given language, the tool continues silently.

bash
# Install language servers (optional but recommended for code mode)
npm install -g typescript-language-server typescript   # TypeScript / JavaScript
pip install python-lsp-server                          # Python
go install golang.org/x/tools/gopls@latest             # Go
rustup component add rust-analyzer                     # Rust

For a complete technical reference see Code Mode Architecture.


Configuration

bash
# Run setup wizard
jiva setup

# View or update settings interactively
jiva config

# View current configuration and file path
jiva config --show

Configuration is stored at ~/.config/jiva-nodejs/config.json (Linux/macOS) or %APPDATA%\jiva-nodejs\config.json (Windows).

Provider examples

Krutrim (gpt-oss-120b)

json
{
  "models": {
    "reasoning": {
      "endpoint": "https://cloud.olakrutrim.com/v1/chat/completions",
      "apiKey": "kr-...",
      "model": "gpt-oss-120b",
      "type": "reasoning",
      "useHarmonyFormat": true,
      "reasoningEffortStrategy": "system_prompt"
    }
  }
}

Groq

json
{
  "models": {
    "reasoning": {
      "endpoint": "https://api.groq.com/openai/v1/chat/completions",
      "apiKey": "gsk_...",
      "model": "openai/gpt-oss-120b",
      "type": "reasoning",
      "reasoningEffortStrategy": "api_param"
    }
  }
}

Sarvam (sarvam-105b) — fully supported reasoning model with internal chain-of-thought. Jiva handles Sarvam's XML-format tool calls transparently and recovers automatically when large file writes hit the token limit.

json
{
  "models": {
    "reasoning": {
      "endpoint": "https://api.sarvam.ai/v1/chat/completions",
      "apiKey": "your-sarvam-key",
      "model": "sarvam-105b",
      "type": "reasoning",
      "reasoningEffortStrategy": "api_param",
      "defaultMaxTokens": 4096
    }
  }
}

Sarvam's API caps completion output at 4096 tokens. Tasks needing larger single outputs (e.g. writing a big file in one shot) will be limited by this — the benchmark flags such failures as [output-limited].

Ollama (local)

json
{
  "models": {
    "reasoning": {
      "endpoint": "http://localhost:11434/v1/chat/completions",
      "apiKey": "not-needed",
      "model": "llama3.1",
      "type": "reasoning"
    }
  }
}

Any other OpenAI-compatible endpoint works the same way — set endpoint, apiKey, and model; Jiva handles the rest.

Code mode configuration

json
{
  "codeMode": {
    "enabled": true,
    "lsp": { "enabled": true },
    "maxIterations": 50
  }
}

Full configuration reference: Configuration Guide


Benchmarking

Jiva ships a built-in benchmark to measure how well your model + configuration performs in code mode. Tasks run in isolated throwaway workspaces and are scored deterministically with Node's built-in test runner — no LLM judge, no network.

bash
jiva benchmark                 # baseline (taskstore) suite — verify your setup works
jiva benchmark --list          # list available suites and tasks
jiva benchmark --suite microcrm --max-iterations 60   # capability suite (Node 22.5+)
jiva benchmark --output report.json                   # save a JSON report to compare configs

Two suites, two purposes:

SuiteScoringUse it to…
taskstore (baseline)pass/fail, 8 tiers that build on each otherConfirm a model + config can do code mode at all. A healthy setup passes everything.
microcrm (capability)% of spec testsDifferentiate models and tune configuration. The agent builds a Node + SQLite REST API and adds harder features (atomic bulk, advanced queries, analytics, idempotency).

The report shows per-task iterations, tokens, and wall-time, lists exactly which spec tests were missed, and flags failures caused by a model's output-token limit as [output-limited] (distinct from logic failures). Run it after jiva setup, and re-run it as you tune defaultMaxTokens, maxIterations, or switch models — the config with the best score-per-token is your optimal setup.

Full guide: Benchmark Suite


Directive Files

Create a jiva-directive.md in your project root to orient the agent to your codebase:

markdown
# Purpose
Code review assistant for a Django web application.

# Tasks
- Scan for security vulnerabilities (SQLi, XSS, CSRF)
- Identify performance bottlenecks
- Suggest modern Python best practices

# Constraints
- Only analyze .py files
- Do not modify files without explicit approval

# Context
PostgreSQL backend, GDPR-sensitive user data.

Jiva searches for directive files automatically, in this order:

  1. Path given via --directive
  2. jiva-directive.md in the workspace root
  3. CLAUDE.md in the workspace root
  4. AGENTS.md in the workspace root
  5. .jiva/directive.md in the workspace root

MCP Servers (general mode)

General mode uses MCP servers to extend the agent's capabilities. Jiva ships with the filesystem server enabled; additional servers can be added via jiva config.

Recommended servers

Playwright — browser automation, web scraping, screenshot capture

bash
jiva config
# MCP Servers > Add Server
# Name: playwright  Command: npx  Args: @playwright/mcp@latest

Desktop Commander — shell command execution, process management

bash
# Name: desktop-commander  Command: npx  Args: -y desktop-commander

Other popular servers: GitHub, Postgres, Slack, Google Maps — see modelcontextprotocol/servers.


Cloud Deployment

Jiva can be deployed as a stateless, auto-scaling HTTP/WebSocket service on Google Cloud Run with GCS-backed session persistence and multi-tenant isolation.

bash
git clone https://github.com/KarmaloopAI/Jiva.git
cd Jiva
./deploy.sh YOUR_PROJECT_ID us-central1

The deployment script enables required GCP APIs, creates the GCS bucket, configures IAM roles, and deploys the container. After deployment:

bash
SERVICE_URL=$(gcloud run services describe jiva --region=us-central1 --format='value(status.url)')

# Health check
curl $SERVICE_URL/health

# Chat via REST
curl -X POST $SERVICE_URL/api/chat \
  -H "Content-Type: application/json" \
  -H "X-Session-Id: my-session" \
  -d '{"message": "Hello, Jiva!"}'

Code mode in the cloud:

bash
gcloud run services update jiva \
  --set-env-vars JIVA_CODE_MODE=true \
  --region us-central1

Full guide: Cloud Run Deployment


Skills

Skills are reusable workflow modules defined by a SKILL.md file. They work standalone (no persona needed) and in both chat and code mode.

Standalone skills — drop a skill into ~/.claude/skills/<name>/SKILL.md (Claude-compatible format) and Jiva discovers it automatically at startup. The skill's metadata appears in the agent's system prompt so it can be invoked by description.

Slash commands — invoke any skill from the REPL:

/graphify
> visualise the dependency graph for this repo

Jiva loads the skill's instructions and prepends them to your message before sending it to the agent.

Persona-based skills — for teams, skills can be grouped into personas that bundle MCP servers, directives, and model behavior:

bash
jiva persona list
jiva persona activate data-analyst
jiva persona create-skill my-skill --description "Custom capability" --author "Your Name"

Skills bundle MCP servers, directives, and model behavior overrides into portable .skill files. See Personas Guide.


Programmatic Usage

typescript
import { DualAgent, CodeAgent, createModelClient, ModelOrchestrator,
         MCPServerManager, WorkspaceManager, ConversationManager,
         createStorageProvider } from 'jiva-core';

const reasoningModel = createModelClient({
  endpoint: 'https://api.groq.com/openai/v1/chat/completions',
  apiKey: process.env.API_KEY!,
  model: 'openai/gpt-oss-120b',
  type: 'reasoning',
  reasoningEffortStrategy: 'api_param',
});
const orchestrator = new ModelOrchestrator({ reasoningModel });
const storageProvider = await createStorageProvider();
const workspace = new WorkspaceManager(storageProvider);
await workspace.initialize();
const conversationManager = new ConversationManager(storageProvider);

// General mode
const mcpManager = new MCPServerManager();
await mcpManager.initialize({
  filesystem: { command: 'npx', args: ['-y', '@modelcontextprotocol/server-filesystem', process.cwd()], enabled: true },
});
const agent = new DualAgent({ orchestrator, mcpManager, workspace, conversationManager });
const response = await agent.chat('What files are in this directory?');
console.log(response.content);
await agent.cleanup();

// Code mode
const codeAgent = new CodeAgent({ orchestrator, workspace, conversationManager, maxIterations: 50, lspEnabled: true });
const codeResponse = await codeAgent.chat('Refactor the auth module to use async/await');
console.log(codeResponse.content);
await codeAgent.cleanup();

Both DualAgent and CodeAgent implement the IAgent interface and are interchangeable in application code.


Development

bash
npm run build        # compile TypeScript
npm run dev          # watch mode
npm run type-check   # type-check without emit

Documentation

DocumentDescription
Quick StartGet running in 30 seconds
Configuration GuideAll config options and provider examples
Code Mode ArchitectureHow code mode works internally
Cloud Run DeploymentProduction deployment guide
Personas GuideSkills and persona system
TroubleshootingCommon issues and fixes
Release NotesVersion history

Contributing

Contributions are welcome. Please ensure new features include error handling and that documentation is updated. Open a PR against the develop branch.

License

MIT

References

Cài đặt

TypingMind
Yêu cầu:

Node.js 18+

{
  "mcpServers": {
    "karmaloopai-jiva": {
      "command": "npx",
      "args": [
        "-y",
        "jiva-core"
      ]
    }
  }
}

Dùng MCP Jiva - Versatile Autonomous AI Agent với nhiều mô hình AI

TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên sau khi kết nối Jiva - Versatile Autonomous AI Agent, bạn có thể dùng với nhiều mô hình AI khác nhau trong TypingMind thay vì phải thiết lập riêng cho từng mô hình. Bạn có thể chạy MCP ngay trên thiết bị của mình hoặc kết nối qua URL của máy chủ MCP từ xa.

Cách 1: Dùng trình kết nối cục bộ

Dùng cách này khi máy chủ MCP cần truy cập các tệp, ứng dụng hoặc tài nguyên riêng tư trên máy tính của bạn.

1

Mở cài đặt MCP

Trong TypingMind, vào Cài đặt, Cài đặt nâng cao, rồi đến Giao thức ngữ cảnh mô hình và chọn Thiết lập trình kết nối.

  1. Mở TypingMind trong trình duyệt của bạn.
  2. Nhấp vào biểu tượng Cài đặt.
  3. Vào Cài đặt nâng cao.
  4. Mở mục Giao thức ngữ cảnh mô hình.
  5. Nhấp vào Thiết lập trình kết nối rồi chọn Thiết bị này.
Màn hình thiết lập trình kết nối MCP của TypingMind với tùy chọn Thiết bị này được chọn
2

Chạy lệnh thiết lập trình kết nối

Chọn Thiết bị này, sao chép lệnh từ TypingMind và chạy trong Terminal. Để tiến trình tiếp tục chạy trong khi bạn dùng MCP.

  1. Sao chép lệnh thiết lập hiển thị trong TypingMind.
  2. Mở Terminal trên macOS hoặc Windows Terminal trên Windows.
  3. Dán và chạy lệnh.
  4. Xác nhận cài đặt gói nếu Terminal hỏi bạn có muốn tiếp tục không.
  5. Để tiến trình tiếp tục chạy trong cửa sổ Terminal khi bạn dùng các công cụ MCP.
3

Thêm Jiva - Versatile Autonomous AI Agent làm máy chủ

Khi trạng thái trình kết nối là Sẵn sàng, nhấp vào Sửa máy chủ và dán cấu hình máy chủ MCP.

  1. Đợi đến khi trạng thái trình kết nối hiển thị Sẵn sàng.
  2. Nhấp vào Sửa máy chủ.
  3. Dán cấu hình máy chủ MCP của Jiva - Versatile Autonomous AI Agent.
  4. Lưu danh sách máy chủ.
  5. Làm mới nếu bạn muốn xác nhận trình kết nối vẫn sẵn sàng.
Cài đặt MCP của TypingMind hiển thị máy chủ đang hoạt động và nút Sửa máy chủ
{
  "mcpServers": {
    "karmaloopai-jiva": {
      "command": "npx",
      "args": [
        "-y",
        "jiva-core"
      ]
    }
  }
}
4

Dùng kết nối với nhiều mô hình

Lưu danh sách máy chủ, mở Plugin, bật các công cụ MCP của Jiva - Versatile Autonomous AI Agent, sau đó chọn bất kỳ mô hình AI nào được hỗ trợ trong TypingMind và dùng các công cụ trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.

  1. Mở trang Plugin trong TypingMind.
  2. Bật các công cụ MCP của Jiva - Versatile Autonomous AI Agent.
  3. Bắt đầu cuộc trò chuyện và chọn mô hình AI bạn muốn dùng.
  4. Dùng các công cụ MCP trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.
  5. Chuyển sang mô hình AI khác bất cứ khi nào cần mà không phải kết nối lại MCP.
Cuộc trò chuyện trên TypingMind dùng các công cụ MCP đã bật với mô hình AI đã chọn
Bạn có thể dùng Jiva - Versatile Autonomous AI Agent giúp tôi làm việc này không?
Jiva - Versatile Autonomous AI Agent
Được. Tôi đọc rồi.
Đây là kết quả tôi tìm được bằng Jiva - Versatile Autonomous AI Agent.

Cách 2: Thêm URL máy chủ MCP

Dùng cách này khi Jiva - Versatile Autonomous AI Agent đã chạy trên máy chủ từ xa hoặc nhóm của bạn muốn có một trình kết nối dùng chung cho nhiều người dùng.

1

Mở mục Trình kết nối MCP

Trong TypingMind, vào Plugin, mở mục Trình kết nối MCP, rồi chọn Thêm URL.

  1. Mở TypingMind trong trình duyệt của bạn.
  2. Vào mục Plugin.
  3. Mở mục Trình kết nối MCP.
  4. Nhấp vào Thêm URL.
Biểu mẫu Thêm URL máy chủ MCP tùy chỉnh của TypingMind
2

Dán URL máy chủ

Nhập URL máy chủ của bạn vào trường URL máy chủ. Thêm tên kết nối, mô tả, biểu tượng, header HTTP tùy chỉnh hoặc cài đặt ứng dụng khách OAuth nếu máy chủ yêu cầu.

  1. Dán URL máy chủ của bạn vào trường URL máy chủ.
  2. Nhập tên kết nối cho Jiva - Versatile Autonomous AI Agent.
  3. Thêm mô tả và biểu tượng nếu bạn muốn dễ nhận biết kết nối hơn.
  4. Thêm header HTTP tùy chỉnh hoặc thông tin ứng dụng khách OAuth nếu máy chủ yêu cầu xác thực.
3

Tạo kết nối

Nhấp vào Tạo kết nối, sau đó quay lại danh sách Plugin và xác nhận kết nối MCP mới đang hoạt động.

  1. Nhấp vào Tạo kết nối.
  2. Quay lại danh sách trình kết nối MCP.
  3. Xác nhận kết nối Jiva - Versatile Autonomous AI Agent hiển thị trạng thái đang hoạt động.
  4. Làm mới danh sách plugin nếu kết nối chưa xuất hiện ngay.
4

Đổi mô hình mà không cần kết nối lại

Bắt đầu cuộc trò chuyện với mô hình bạn thích, bật các công cụ của Jiva - Versatile Autonomous AI Agent trong mục Plugin và chuyển sang mô hình khác khi cần. Kết nối MCP vẫn sẵn dùng trong không gian làm việc TypingMind.

  1. Bắt đầu cuộc trò chuyện mới trong TypingMind.
  2. Chọn mô hình AI bạn muốn dùng.
  3. Bật các công cụ của Jiva - Versatile Autonomous AI Agent trong mục Plugin.
  4. Yêu cầu mô hình dùng công cụ khi cần.
  5. Chuyển sang mô hình AI khác và tiếp tục dùng kết nối MCP hiện có.
Cuộc trò chuyện trên TypingMind dùng các công cụ MCP đã bật với mô hình AI đã chọn
Bạn có thể dùng Jiva - Versatile Autonomous AI Agent giúp tôi làm việc này không?
Jiva - Versatile Autonomous AI Agent
Được. Tôi đọc rồi.
Đây là kết quả tôi tìm được bằng Jiva - Versatile Autonomous AI Agent.

Câu hỏi thường gặp

Máy chủ MCP Jiva - Versatile Autonomous AI Agent dùng để làm gì?

Jiva - Versatile Autonomous AI Agent là máy chủ MCP cho phép các ứng dụng AI tương thích kết nối với công cụ và ngữ cảnh bên ngoài. Trong TypingMind, bạn chỉ cần thêm máy chủ MCP này một lần để các công cụ của nó có sẵn trong không gian làm việc AI của bạn.

Bạn có thể dùng MCP Jiva - Versatile Autonomous AI Agent với nhiều mô hình AI trong TypingMind không?

Có. TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên bạn có thể dùng Jiva - Versatile Autonomous AI Agent với nhiều mô hình AI như Claude, ChatGPT, Gemini hoặc các mô hình khác đã cấu hình trong TypingMind mà không cần thiết lập máy chủ MCP riêng cho từng mô hình.

Vì sao nên dùng MCP Jiva - Versatile Autonomous AI Agent với TypingMind?

TypingMind là một trong những giao diện trò chuyện với LLM tốt nhất vì tập hợp nhiều mô hình AI, prompt, plugin, tác nhân AI, khóa API và công cụ MCP vào một không gian làm việc. Khi kết nối Jiva - Versatile Autonomous AI Agent, bạn có thể dùng các công cụ MCP của dịch vụ này với những mô hình ưa thích, đồng thời giữ quy trình trò chuyện gọn gàng trong TypingMind.

Làm cách nào để kết nối MCP Jiva - Versatile Autonomous AI Agent với TypingMind?

Bạn có thể kết nối Jiva - Versatile Autonomous AI Agent trong TypingMind bằng trình kết nối MCP cục bộ hoặc bằng cách thêm URL máy chủ MCP từ xa. Dùng trình kết nối cục bộ khi máy chủ cần truy cập tệp, ứng dụng hoặc tài nguyên riêng trên thiết bị của bạn; dùng URL máy chủ khi máy chủ MCP được lưu trữ từ xa.

MCP Jiva - Versatile Autonomous AI Agent cung cấp những công cụ nào trong TypingMind?

Jiva - Versatile Autonomous AI Agent cung cấp các chức năng MCP mà bạn có thể bật từ trang Plugin của TypingMind để dùng trong trò chuyện hoặc gán cho tác nhân AI.

Bạn có cần chia sẻ khóa API với TypingMind để dùng MCP Jiva - Versatile Autonomous AI Agent không?

Không. TypingMind ưu tiên xử lý cục bộ và cho phép bạn kiểm soát nhà cung cấp mô hình, khóa API, prompt và cấu hình MCP. Nếu Jiva - Versatile Autonomous AI Agent yêu cầu xác thực, hãy thêm các header, cài đặt OAuth hoặc cấu hình cục bộ cần thiết cho máy chủ MCP đó khi tạo kết nối.

Máy chủ MCP liên quan

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇