<p align="center">
  <img src="jae-mascot.png" alt="Agent JAE" width="180">
</p>

<h1 align="center">Agent JAE</h1>

<p align="center">
  <strong>Your AI-powered terminal coding agent.</strong><br>
  Build, debug, and ship code — directly from the command line.
</p>

<p align="center">
  <a href="https://agent.jaeswift.xyz"><img alt="Website" src="https://img.shields.io/badge/website-agent.jaeswift.xyz-orange?style=flat-square" /></a>
  <a href="https://jaeswift.xyz/agent/docs"><img alt="Docs" src="https://img.shields.io/badge/docs-online-blue?style=flat-square" /></a>
  <a href="https://skills.jaeswift.xyz"><img alt="Skills Marketplace" src="https://img.shields.io/badge/skills-marketplace-green?style=flat-square" /></a>
  <a href="https://git.jaeswift.xyz/jae/Agent-JAE"><img alt="Forgejo" src="https://img.shields.io/badge/repo-Forgejo-red?style=flat-square" /></a>
</p>

---

## What is Agent JAE?

Agent JAE is an **interactive AI coding assistant** that lives in your terminal. It understands your codebase, executes commands, edits files, runs tests, and helps you build software faster — all through natural conversation.

Think of it as a senior developer pair-programming with you, but it never sleeps and never judges your variable names.

### Key Features

🐉 **Terminal-Native** — Full TUI (Terminal UI) with syntax highlighting, diff views, and interactive panels. No browser required.

🤖 **Multi-Provider AI** — Works with **24+ LLM providers** and **811+ models** including OpenAI, Anthropic, Google, Venice AI, DeepSeek, Mistral, Groq, and more.

🛠️ **Built-in Tools** — Read, write, and edit files. Run bash commands. Search codebases. Execute tests. All integrated.

🧩 **Extensible Skills System** — Install community skills from the [marketplace](https://skills.jaeswift.xyz) or create your own. Hot-loadable, no restart required.

🔌 **16 Default Extensions** — Replay sessions, PR review, project DNA analysis, cost tracking, swarm mode, checkpoints, teach mode, and more — all built in.

🎨 **Venice AI Integration** — 11 pre-installed Venice skills for image generation, video creation, text-to-speech, model benchmarking, and chat.

📡 **Multiple Interfaces** — TUI mode for interactive sessions, CLI mode for scripting and CI/CD, RPC mode for programmatic access, and a Web UI.

💾 **Session Memory** — Conversations persist across sessions. Pick up right where you left off.

🔒 **Sandboxed Execution** — Code runs safely with configurable permissions and Docker isolation support.

---

## Quick Start

### Prerequisites

- **Node.js v18+** (includes npm) — [nodejs.org](https://nodejs.org/)
- An API key from a supported provider (Venice AI, OpenAI, Anthropic, etc.)

> **Linux users:** Before installing, fix npm global permissions to avoid `EACCES` errors:
> ```bash
> mkdir ~/.npm-global
> npm config set prefix '~/.npm-global'
> echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
> source ~/.bashrc
> ```
> This only needs to be done once. Alternatively you can use `sudo npm install -g ...` but the prefix fix is cleaner.

### Install

```bash
npm install -g @jaeswift/jae-coding-agent
```

### Run

```bash
# Interactive TUI mode
jae

# CLI mode (pipe-friendly)
jae -p "explain this codebase"

# With a specific provider
jae --provider venice --model kimi-k2-5
```

### Configure

On first run, Agent JAE will prompt for your API key. Or set it manually:

```bash
# Venice AI (recommended)
export JAE_API_KEY=your-venice-api-key
export JAE_PROVIDER=venice

# Or any supported provider
export OPENAI_API_KEY=your-key
export ANTHROPIC_API_KEY=your-key
```

Configuration is stored in `~/.jae/` and can be customized per-project.

---

## Architecture

Agent JAE is built as a modular monorepo with the following packages:

| Package | Description |
|---------|-------------|
| **[@jaeswift/jae-coding-agent](packages/coding-agent)** | The main interactive coding agent CLI |
| **[@jaeswift/jae-ai](packages/ai)** | Unified multi-provider LLM API |
| **[@jaeswift/jae-agent-core](packages/agent)** | Agent runtime with tool calling and state management |
| **[@jaeswift/jae-tui](packages/tui)** | Terminal UI library with differential rendering |
| **[@jaeswift/jae-web-ui](packages/web-ui)** | Web components for AI chat interfaces |
| **[@jaeswift/jae-mom](packages/mom)** | Slack bot integration |
| **[@jaeswift/jae-pods](packages/pods)** | CLI for managing vLLM deployments on GPU pods |

---

## Tools

Agent JAE comes with powerful built-in tools:

| Tool | What it does |
|------|-------------|
| `read_file` | Read any file in your project |
| `write_file` | Create or overwrite files |
| `edit_file` | Surgical find-and-replace edits |
| `bash` | Execute any shell command |
| `search_files` | Regex search across your codebase |
| `test_runner` | Run and analyze test suites |
| `install_skill` | Add new skills from the marketplace |
| `list_skills` | View available and installed skills |

---

## Extensions

Agent JAE ships with **16 built-in extensions** that supercharge your workflow:

| Extension | Description |
|-----------|-------------|
| 🔄 **Replay** | Record and replay coding sessions as shareable HTML |
| 👀 **PR Review** | Automated pull request analysis with security checks |
| 🧬 **Project DNA** | Generate a codebase fingerprint and architecture map |
| 💰 **Cost Tracker** | Real-time token usage and cost monitoring |
| 🐉 **Swarm Mode** | Multi-agent parallel task execution |
| 📸 **Checkpoints** | Git-based snapshots with one-command rollback |
| 📚 **Teach Mode** | Save reusable patterns and coding conventions |
| 🛒 **Skill Marketplace** | Browse, install, and publish community skills |
| ⏰ **Pomodoro** | Built-in focus timer for deep work sessions |
| 📊 **Benchmark** | Performance profiling for your code |
| 📝 **Changelog** | Auto-generate changelogs from git history |
| 🔗 **Git Hooks** | Automated pre-commit quality checks |
| 📖 **Docs Generator** | Generate documentation from code |
| 🔐 **Secrets Scanner** | Detect leaked credentials in your codebase |
| 🏗️ **Scaffolder** | Project templates and boilerplate generator |
| 🎨 **Theme Engine** | Customize the TUI appearance |

---

## Venice AI Skills

11 pre-installed skills powered by [Venice AI](https://venice.ai):

- 🖼️ **Image Generation** — Generate images from text prompts
- 🎬 **Video Generation** — Create AI videos from descriptions
- 🗣️ **Text-to-Speech** — Convert text to natural-sounding audio
- 💬 **Chat** — Direct conversational AI
- 📋 **List Text Models** — Browse available text models
- 🖼️ **List Image Models** — Browse available image models
- 🎬 **List Video Models** — Browse available video models
- 🔊 **List Voice Models** — Browse available voice models
- 📊 **Benchmark** — Compare model performance
- 🎬 **Video Quote** — Generate stylized video quotes
- 🖼️ **Upscale Image** — Enhance image resolution

---

## Supported Providers

Agent JAE works with virtually any LLM provider:

| Provider | Models |
|----------|--------|
| Venice AI | kimi-k2-5, llama-3.3-70b, deepseek-r1-671b, and more |
| OpenAI | GPT-4o, GPT-4.1, o3, o4-mini |
| Anthropic | Claude 4 Sonnet, Claude 4 Opus |
| Google | Gemini 2.5 Pro, Gemini 2.5 Flash |
| DeepSeek | DeepSeek-V3, DeepSeek-R1 |
| Mistral | Mistral Large, Codestral |
| Groq | Ultra-fast inference |
| AWS Bedrock | Enterprise-grade access |
| Azure OpenAI | Enterprise deployments |
| Ollama | Local models, fully offline |
| ...and 14+ more | See [full provider list](https://jaeswift.xyz/agent/docs/providers) |

---

## Development

```bash
git clone https://git.jaeswift.xyz/jae/Agent-JAE.git
cd Agent-JAE
npm install
npm run build
./jae-test.sh    # Run from sources
```

```bash
npm run check    # Lint, format, type check (requires build first)
./test.sh        # Run tests (skips LLM tests without API keys)
```

---

## Documentation

📖 **Full docs:** [jaeswift.xyz/agent/docs](https://jaeswift.xyz/agent/docs)

- [Getting Started](https://jaeswift.xyz/agent/docs)
- [Features Overview](https://jaeswift.xyz/agent/docs/features)
- [Configuration Guide](https://jaeswift.xyz/agent/docs/configuration)
- [Tools Reference](https://jaeswift.xyz/agent/docs/tools)
- [Extensions Guide](https://jaeswift.xyz/agent/docs/extensions)
- [Venice AI Skills](https://jaeswift.xyz/agent/docs/venice-skills)
- [Marketplace](https://jaeswift.xyz/agent/docs/marketplace)
- [Provider Setup](https://jaeswift.xyz/agent/docs/providers)
- [CLI Commands](https://jaeswift.xyz/agent/docs/commands)

---

## License

MIT

---

<p align="center">
  <img src="jae-mascot.png" alt="Agent JAE" width="64"><br>
  <sub>Built with 🔥 by <a href="https://jaeswift.xyz">JaeSwift</a></sub>
</p>
