Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Project Overview

**Remote Agentic Coding Platform**: Control AI coding assistants (Claude Code SDK, Codex SDK) remotely from Slack, Telegram, and GitHub. Built with **Bun + TypeScript + SQLite/PostgreSQL**, single-developer tool for AI-assisted development practitioners. Architecture prioritizes simplicity, flexibility, and user control.
**Remote Agentic Coding Platform**: Control AI coding assistants (Claude Code SDK, Codex SDK, Qwen Code SDK) remotely from Slack, Telegram, and GitHub. Built with **Bun + TypeScript + SQLite/PostgreSQL**, single-developer tool for AI-assisted development practitioners. Architecture prioritizes simplicity, flexibility, and user control.

## Core Principles

Expand Down Expand Up @@ -443,8 +443,18 @@ import type { DagNode, WorkflowDefinition } from '@/lib/api';
- Implement `IAssistantClient` interface
- **ClaudeClient**: `@anthropic-ai/claude-agent-sdk`
- **CodexClient**: `@openai/codex-sdk`
- **QwenClient**: `@qwen-code/sdk`
- Streaming: `for await (const event of events) { await platform.send(event) }`

**Qwen Support Boundaries**
- Archon uses `@qwen-code/sdk` and can select Qwen as the active assistant when configured.
- `pathToQwenExecutable` is optional and only needed when pointing at a custom Qwen binary.
- Archon does not provision Qwen credentials; by default it follows the Qwen Code auth/config
already present on the machine unless `assistants.qwen.authType` is set explicitly.
- Claude-only options do not apply to Qwen: `settingSources`, `effort`, `thinking`,
`maxBudgetUsd`, `fallbackModel`, `betas`, `sandbox`, `hooks`, and `skills`.
- Structured `output_format` is not currently forwarded to Qwen workflow nodes.

### Configuration

**Environment Variables:**
Expand All @@ -470,6 +480,12 @@ assistants:
additionalDirectories:
- /absolute/path/to/other/repo
codexBinaryPath: /usr/local/bin/codex # Optional: custom Codex CLI binary path
qwen:
model: qwen-max
pathToQwenExecutable: qwen # Optional: custom Qwen CLI executable path
permissionMode: yolo # 'default' | 'plan' | 'auto-edit' | 'yolo'
authType: openai # 'openai' | 'qwen-oauth'
includePartialMessages: true

# docs:
# path: docs # Optional: default is docs/
Expand All @@ -483,6 +499,7 @@ assistants:
**Model Validation:**
- Workflows are validated at load time for provider/model compatibility
- Claude models: `sonnet`, `opus`, `haiku`, `claude-*`, `inherit`
- Qwen models: `qwen-*`, `qwq-*`, `qvq-*`
- Codex models: Any model except Claude-specific aliases
- Invalid combinations fail workflow loading with clear error messages

Expand Down Expand Up @@ -681,7 +698,7 @@ async function createSession(conversationId: string, codebaseId: string) {
2. **Workflows** (YAML-based):
- Stored in `.archon/workflows/` (searched recursively)
- Multi-step AI execution chains, discovered at runtime
- **`nodes:` (DAG format)**: Nodes with explicit `depends_on` edges; independent nodes in the same topological layer run concurrently. Node types: `command:` (named command file), `prompt:` (inline prompt), `bash:` (shell script, stdout captured as `$nodeId.output`, no AI), `loop:` (iterative AI prompt until completion signal), `approval:` (human gate; pauses until user approves or rejects; `capture_response: true` stores the user's comment as `$<node-id>.output` for downstream nodes, default false), `script:` (inline TypeScript/Python or named script from `.archon/scripts/`, runs via `bun` or `uv`, stdout captured as `$nodeId.output`, no AI, supports `deps:` for dependency installation and `timeout:` in ms, requires `runtime: bun` or `runtime: uv`) . Supports `when:` conditions, `trigger_rule` join semantics, `$nodeId.output` substitution, `output_format` for structured JSON output (Claude and Codex), `allowed_tools`/`denied_tools` for per-node tool restrictions (Claude only), `hooks` for per-node SDK hook callbacks (Claude only), `mcp` for per-node MCP server config files (Claude only, env vars expanded at execution time), and `skills` for per-node skill preloading via AgentDefinition wrapping (Claude only), and `effort`/`thinking`/`maxBudgetUsd`/`systemPrompt`/`fallbackModel`/`betas`/`sandbox` for Claude SDK advanced options (Claude only, also settable at workflow level)
- **`nodes:` (DAG format)**: Nodes with explicit `depends_on` edges; independent nodes in the same topological layer run concurrently. Node types: `command:` (named command file), `prompt:` (inline prompt), `bash:` (shell script, stdout captured as `$nodeId.output`, no AI), `loop:` (iterative AI prompt until completion signal), `approval:` (human gate; pauses until user approves or rejects; `capture_response: true` stores the user's comment as `$<node-id>.output` for downstream nodes, default false), `script:` (inline TypeScript/Python or named script from `.archon/scripts/`, runs via `bun` or `uv`, stdout captured as `$nodeId.output`, no AI, supports `deps:` for dependency installation and `timeout:` in ms, requires `runtime: bun` or `runtime: uv`) . Supports `when:` conditions, `trigger_rule` join semantics, `$nodeId.output` substitution, `output_format` for structured JSON output (Claude and Codex; Qwen support is currently limited), `allowed_tools`/`denied_tools` for per-node tool restrictions (Claude/Codex/Qwen), `hooks` for per-node SDK hook callbacks (Claude only), `mcp` for per-node MCP server config files (Claude/Codex/Qwen), and `skills` for per-node skill preloading via AgentDefinition wrapping (Claude only), and `effort`/`thinking`/`maxBudgetUsd`/`systemPrompt`/`fallbackModel`/`betas`/`sandbox` for Claude SDK advanced options (Claude only, also settable at workflow level)
- Provider inherited from `.archon/config.yaml` unless explicitly set; per-node `provider` and `model` overrides supported
- Model and options can be set per workflow or inherited from config defaults
- `interactive: true` at the workflow level forces foreground execution on web (required for approval-gate workflows in the web UI)
Expand Down
65 changes: 63 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ The Web UI and CLI work out of the box. Optionally connect a chat platform for r
▼ ▼ ▼ ▼
┌───────────┐ ┌────────────┐ ┌──────────────────────────┐
│ Command │ │ Workflow │ │ AI Assistant Clients │
│ Handler │ │ Executor │ │ (Claude / Codex)
│ Handler │ │ Executor │ │ (Claude / Codex / Qwen)
│ (Slash) │ │ (YAML) │ │ │
└───────────┘ └────────────┘ └──────────────────────────┘
│ │ │
Expand All @@ -294,11 +294,72 @@ Full documentation is available at **[archon.diy](https://archon.diy)**.
| [Authoring Workflows](https://archon.diy/guides/authoring-workflows/) | Create custom YAML workflows |
| [Authoring Commands](https://archon.diy/guides/authoring-commands/) | Create reusable AI commands |
| [Configuration](https://archon.diy/reference/configuration/) | All config options, env vars, YAML settings |
| [AI Assistants](https://archon.diy/getting-started/ai-assistants/) | Claude and Codex setup details |
| [AI Assistants](https://archon.diy/getting-started/ai-assistants/) | Claude, Codex, and Qwen setup details |
| [Deployment](https://archon.diy/deployment/) | Docker, VPS, production setup |
| [Architecture](https://archon.diy/reference/architecture/) | System design and internals |
| [Troubleshooting](https://archon.diy/reference/troubleshooting/) | Common issues and fixes |

### Supported AI Assistants

Archon supports three first-class AI assistants:

| Assistant | SDK | Best For | Setup Guide |
|-----------|-----|----------|-------------|
| **Claude** | Claude Code SDK | General-purpose coding, complex reasoning | [Claude Setup](https://archon.diy/getting-started/ai-assistants/) |
| **Codex** | Codex CLI | OpenAI ecosystem integration | [Codex Setup](https://archon.diy/getting-started/ai-assistants/) |
| **Qwen** | Qwen Code SDK | Code generation, cost-effective workflows | [Qwen Setup](./docs/qwen-setup.md) |

All three assistants support:
- ✅ Full workflow execution (plan, implement, review, PR creation)
- ✅ Streaming responses with real-time output
- ✅ Tool use and MCP server integration
- ✅ Worktree isolation for parallel development
- ✅ Session resume capability
- ✅ AI-powered title generation

You can mix assistants within a single workflow:

```yaml
nodes:
- id: plan
prompt: "Create implementation plan"
model: qwen-max # Use Qwen for planning

- id: implement
depends_on: [plan]
prompt: "Implement the plan"
model: claude-sonnet-4-5 # Use Claude for coding

- id: review
depends_on: [implement]
prompt: "Review changes"
model: qwen-coder # Use Qwen for code review
```

### Qwen Support Details

For comprehensive Qwen setup and configuration, see the **[Qwen Setup Guide](./docs/qwen-setup.md)**.

Quick highlights:
- **Authentication**: Follows your existing Qwen Code CLI auth (OAuth or API key)
- **Models**: Auto-detects `qwen-max`, `qwen-coder`, `qwen-turbo`, `qwen-plus`, `qwq-*`, `qvq-*`, and more
- **Configuration**: Set via `~/.archon/config.yaml` under `assistants.qwen`
- **Per-workflow override**: Specify `model: qwen-max` in any workflow node

### Qwen Support Boundaries

Archon integrates Qwen through `@qwen-code/sdk` and can select it as the active assistant
when configured globally, per repository, or per workflow node.

- Qwen works with Archon's normal assistant selection and MCP wiring.
- `pathToQwenExecutable` is optional; use it only if you want to point Archon at a specific
Qwen CLI binary.
- Archon does not provision Qwen credentials for you; by default it follows your existing
Qwen Code auth/config unless you explicitly override `assistants.qwen.authType`.
- Claude-only workflow features do not apply to Qwen: `settingSources`, `effort`,
`thinking`, `maxBudgetUsd`, `fallbackModel`, `betas`, `sandbox`, `hooks`, and `skills`.
- Structured `output_format` is not currently forwarded to Qwen workflow nodes.

## Contributing

Contributions welcome! See the open [issues](https://github.com/coleam00/Archon/issues) for things to work on.
Expand Down
23 changes: 13 additions & 10 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading