Purpose
Identify real, high-value gaps in the PraisonAI SDK by comparing it with OpenCode (anomalyco/opencode). The goal is to improve praisonaiagents, praisonai, praisonai-tools, and praisonai-plugins where appropriate — not a feature wishlist.
North star: PraisonAI must be simpler, more extensible, faster, and better for production than OpenCode for CLI-first agent workflows. OpenCode is the reference benchmark; PraisonAI is what we ship.
Reference model — OpenCode is CLI-first (validate in clone)
OpenCode is marketed and architected as the open source AI coding agent with a terminal-first experience:
| Signal |
Evidence (validate in fork) |
| Primary install |
npm i -g opencode-ai, Homebrew, install script |
| Entry binary |
packages/opencode/bin/opencode |
| Terminal UI |
packages/tui, README terminal screenshot |
| Agent loop |
Terminal session driving tools against a codebase |
| Desktop |
Beta secondary surface — not the primary comparison axis |
OpenClaw comparison was gateway-centric. This analysis is CLI-centric.
| OpenCode |
PraisonAI equivalent |
Global opencode binary |
praisonai CLI — src/praisonai/praisonai/cli/ |
| Terminal TUI / interactive session |
CLI commands, optional UI (praisonai/cli/commands/ui.py) |
| Project/cwd-scoped agent |
Agent, Session, YAML/Python config |
| Coding-agent tool loop |
Agent.start() / Agent.run() + @tool / MCP |
| Config + model selection in terminal |
Wrapper config, ExecutionConfig, env, YAML |
Wrapper is the main battleground: install friction, first run, praisonai agent run, defaults, tool discovery, session continuity, and “few lines to first success”. Core SDK stays protocol-driven; wrapper must feel world-class.
Environment constraints
This work runs remotely in a container with no local checkout of OpenCode.
Before any analysis:
-
Clone the synced fork (auto-updated every 6 hours from upstream via GitHub Actions):
git clone https://github.com/MervinPraison/opencode.git
cd opencode && git checkout dev
- Upstream:
anomalyco/opencode
- Default branch:
dev (not main)
- Sync workflow:
.github/workflows/sync-upstream.yml
-
Treat the cloned repo as read-only reference material for comparison.
-
PraisonAI code lives in the workspace:
src/praisonai-agents/praisonaiagents/ (core SDK)
src/praisonai/praisonai/ (wrapper — CLI, YAML, resolver)
/Users/praison/PraisonAI-Tools (praisonai-tools)
/Users/praison/PraisonAI-Plugins (praisonai-plugins)
-
Also clone (no fork sync — we own these):
git clone https://github.com/MervinPraison/PraisonAI-Tools.git
git clone https://github.com/MervinPraison/PraisonAI-Plugins.git
Do not assume either repo is already understood. Build understanding from source.
Cursor rule: .cursor/rules/sdk-opencode-gap-analysis.mdc
Phase 0 — Parallel repo exploration (mandatory)
Use multiple sub-agents in parallel before writing any gap conclusions.
Sub-agent batch A — Understand PraisonAI (launch in parallel)
| Sub-agent |
Focus |
| A1 — Core agent runtime |
Agent lifecycle, start/run, tool loop, hooks, errors, streaming |
| A2 — Tools & extension |
@tool, registry, MCP, protocols/adapters, lazy imports |
| A3 — Memory, session, context |
Memory adapters, sessions, context/artifacts, persistence |
| A4 — Multi-agent & workflows |
AgentTeam, AgentFlow, workflows, handoffs, scheduler |
| A5 — Wrapper layer (priority) |
src/praisonai/praisonai/cli/, YAML, tool_resolver, install/first-run UX |
| A6 — Tools & plugins |
PraisonAI-Tools, PraisonAI-Plugins — discovery, entry points |
Each sub-agent must return:
- Key modules and entry points (file paths)
- Public APIs developers actually use
- Extension points (protocols, hooks, configs)
- What PraisonAI already does well (avoid false gaps)
Sub-agent batch B — Understand OpenCode (launch in parallel, after clone)
| Sub-agent |
Focus |
| B1 — CLI & TUI |
packages/opencode/bin, command tree, yargs/CLI routing, terminal UX |
| B2 — Agent loop in terminal |
Main loop, planning, tool execution, retries, streaming to terminal |
| B3 — Session & project model |
cwd, config files, auth, model/provider selection, session resume |
| B4 — Coding-agent tools |
File edit, shell, search, codebase context, sandbox if present |
| B5 — Developer UX |
Install path, defaults, config hierarchy, patterns that reduce boilerplate |
Each sub-agent must return:
- Concrete file paths and symbols
- Behaviours that create clear user/developer value in the terminal
- Patterns worth learning from, not copying blindly
Synthesise sub-agent outputs into a short internal map:
- OpenCode terminal flows → PraisonAI wrapper + core equivalents
- Where PraisonAI wrapper already wins (document explicitly)
Phase 1 — In-depth comparative analysis
Compare at the capability level, not naming or cosmetic API differences.
Strict gap filter (all must pass)
- Real value — PraisonAI users would miss this in production or daily CLI/SDK use
- OpenCode-validated — Cloned repo implements a working pattern; cite exact paths
- SDK-relevant — Belongs in core, wrapper, tools, or plugins — not app-only logic
- Layer-validated — Exactly one primary layer assigned; wrong-layer solutions rejected
- PraisonAI-aligned — Fits agent-centric, protocol-first, lazy-import, backward-compatible design (
AGENTS.md)
- Validated — Traced in both codebases; no speculative gaps
Reject (do not report)
- Documentation, tests, coverage-only work
- File size, line count, style-only refactors
- Micro-optimisations without user impact
- Features that duplicate existing PraisonAI capability under another name
- OpenCode desktop/TUI pixels ported wholesale into core
- Heavy integrations placed in core
- Agent-callable API tools placed in plugins (→ tools)
- Lifecycle guardrails/tracing placed in tools (→ plugins)
- Built-in tools duplicated in
praisonai-tools (→ already in praisonaiagents.tools)
- “Nice to have” items with no OpenCode precedent
Layer placement (mandatory — validate before filing any gap)
Every gap must assign exactly one primary layer.
| Layer |
Path |
Package |
Use when |
| Core |
src/praisonai-agents/praisonaiagents/ |
praisonaiagents |
Agent runtime, protocols, hooks, built-in tools, plugin manager |
| Wrapper |
src/praisonai/praisonai/ |
praisonai |
CLI, YAML, resolver, install UX, session CLI, BotOS, heavy integrations |
| Tools |
/Users/praison/PraisonAI-Tools |
praisonai-tools |
Agent-callable integrations, optional/heavy third-party deps |
| Plugins |
/Users/praison/PraisonAI-Plugins |
praisonai-plugins |
Lifecycle hooks, guardrails, policies, skills, cross-cutting extensions |
Decision rules:
- Core — protocol/hook/contract only; no heavy third-party imports at module level
- Wrapper — how users run and configure from the terminal; wires optional packages
- Tools — agent calls during a task (
pip install praisonai-tools)
- Plugins — framework wraps lifecycle (
praisonai.plugins entry points)
CLI-first gaps → usually wrapper (primary) + optional core hook/protocol.
Per-gap layer validation (required):
- Primary layer — exactly one: core | wrapper | tools | plugins
- Why not the other three — one line each
- Secondary touch (optional) — e.g. core protocol + wrapper CLI
- 3-way surface — CLI + YAML + Python: yes/no (prefer yes for user-facing gaps)
Output: exactly top 3 gaps (or fewer if only 1–2 pass the filter)
For each gap:
| Field |
Content |
| Title |
Unique, specific to the capability gap |
| Why it matters |
User/developer impact for CLI-first workflows (one paragraph) |
| OpenCode pattern |
File paths + short code citation from cloned repo (internal report only) |
| PraisonAI today |
Where weak/missing/harder; cite praisonaiagents / praisonai paths |
| Severity |
Critical / High / Medium + one-line justification |
| Proposed direction |
Primary layer + optional secondary; extension point; minimal API sketch |
| Layer validation |
Primary layer; why not core/wrapper/tools/plugins (one line each) |
| Resolution sketch |
Before/after or pseudocode for PraisonAI users |
| Validation |
Files read, behaviour traced, absence confirmed |
Also include 2–5 explicit non-gaps: OpenCode features considered and rejected, with one line each.
Also include 2–5 PraisonAI advantages: where wrapper/core already beats OpenCode CLI UX (avoid fixing what isn’t broken).
Phase 2 — Create GitHub issues (child issues)
Create one GitHub issue per validated gap (max 3). Link them to this issue.
Issue writing rules (critical)
- Do not mention OpenCode by name anywhere in gap issues: not in title, body, labels, or comments
- Do not link to the OpenCode repo or use its branding in gap issues
- Frame every issue as a PraisonAI SDK improvement grounded in user value and code evidence
- Use PraisonAI terminology only: Agent, tools, hooks, protocols, workflows, CLI, etc.
Issue template (per gap)
## Summary
[What PraisonAI lacks and why it matters for SDK/CLI users]
## Current behaviour
[Code citations from praisonaiagents / praisonai / praisonai-tools / praisonai-plugins]
## Desired behaviour
[Concrete capability users should have from terminal, YAML, or Python]
## Layer placement
- **Primary layer:** core | wrapper | tools | plugins
- **Why not core:** …
- **Why not wrapper:** …
- **Why not tools:** …
- **Why not plugins:** …
- **Secondary touch (optional):** …
- **3-way surface (CLI + YAML + Python):** yes | no
## Proposed approach
- Extension point: protocol | hook | config | tool | CLI | plugin entry point
- Minimal API sketch (few lines)
## Resolution sketch
```python
# Before (today)
...
# After (proposed)
...
Severity
Critical | High | Medium — [one-line justification]
Validation
[How this gap was confirmed in the PraisonAI codebase]
Example titles (good):
- “CLI lacks first-class project-scoped session resume”
- “Wrapper install path does not match single-command terminal onboarding”
Example titles (bad):
- “Gap vs OpenCode…”
- “Port feature X from OpenCode…”
---
## Philosophy & principles (must hold)
Simpler · More extensible · Faster · Agent-centric
| Pillar | Rule |
|--------|------|
| Agent-centric | Design centers on Agents, workflows, sessions, tools, memory |
| Protocol-driven | Core: protocols/hooks/adapters only; heavy code in wrapper/tools |
| Minimal API | Fewer params, sensible defaults, explicit overrides |
| Performance-first | Lazy loading, optional deps, no hot-path regressions |
| Production-ready | Safe by default, multi-agent safe, async-safe |
| 3-way surface | Every feature: **CLI + YAML + Python** |
| Real agentic test | `agent.start("real task")` must call LLM — object construction alone insufficient |
### Architecture layers
praisonaiagents (core) → praisonai (wrapper) → praisonai-tools → praisonai-plugins
/src/praisonai-agents /src/praisonai PraisonAI-Tools PraisonAI-Plugins
### Canonical paths
| Name | Path |
|------|------|
| Core SDK | `/Users/praison/praisonai-package/src/praisonai-agents` |
| Wrapper | `/Users/praison/praisonai-package/src/praisonai` |
| Tools | `/Users/praison/PraisonAI-Tools` |
| Plugins | `/Users/praison/PraisonAI-Plugins` |
| Examples | `/Users/praison/praisonai-package/examples/` |
| AGENTS.md | `/Users/praison/praisonai-package/src/praisonai-agents/AGENTS.md` |
---
## Global rules
- **Depth over breadth** — 3 validated gaps beat 20 shallow ones
- **No bloat** — Do not invent gaps to fill a list
- **Code evidence required** — Every claim cites PraisonAI paths; OpenCode analysis stays internal to the agent run
- **British English** in all prose
- **Do not commit or push** unless explicitly asked
- Sub-agents are for **understanding only**; final gap list and child issues are written by the coordinating agent after synthesis
---
## Execution checklist
```text
[ ] Clone https://github.com/MervinPraison/opencode.git (branch dev)
[ ] Launch PraisonAI sub-agents A1–A6 (parallel)
[ ] Launch OpenCode sub-agents B1–B5 (parallel) — CLI/TUI focus
[ ] Synthesise CLI-centric map (OpenCode terminal → PraisonAI wrapper/core)
[ ] Document PraisonAI advantages + non-gaps
[ ] Run gap filter + layer validation
[ ] Document top 3 gaps with code citations (internal report may note OpenCode paths)
[ ] Create child GitHub issues — PraisonAI-only wording, no OpenCode names
[ ] Link child issues to this issue
Deliverables
- Internal synthesis note (may reference OpenCode paths)
- Up to 3 child GitHub issues (PraisonAI-only wording)
- Short comment on this issue summarising findings and linking children
Purpose
Identify real, high-value gaps in the PraisonAI SDK by comparing it with OpenCode (
anomalyco/opencode). The goal is to improvepraisonaiagents,praisonai,praisonai-tools, andpraisonai-pluginswhere appropriate — not a feature wishlist.North star: PraisonAI must be simpler, more extensible, faster, and better for production than OpenCode for CLI-first agent workflows. OpenCode is the reference benchmark; PraisonAI is what we ship.
Reference model — OpenCode is CLI-first (validate in clone)
OpenCode is marketed and architected as the open source AI coding agent with a terminal-first experience:
npm i -g opencode-ai, Homebrew, install scriptpackages/opencode/bin/opencodepackages/tui, README terminal screenshotOpenClaw comparison was gateway-centric. This analysis is CLI-centric.
opencodebinarypraisonaiCLI —src/praisonai/praisonai/cli/praisonai/cli/commands/ui.py)Agent,Session, YAML/Python configAgent.start()/Agent.run()+@tool/ MCPExecutionConfig, env, YAMLWrapper is the main battleground: install friction, first run,
praisonai agent run, defaults, tool discovery, session continuity, and “few lines to first success”. Core SDK stays protocol-driven; wrapper must feel world-class.Environment constraints
This work runs remotely in a container with no local checkout of OpenCode.
Before any analysis:
Clone the synced fork (auto-updated every 6 hours from upstream via GitHub Actions):
anomalyco/opencodedev(notmain).github/workflows/sync-upstream.ymlTreat the cloned repo as read-only reference material for comparison.
PraisonAI code lives in the workspace:
src/praisonai-agents/praisonaiagents/(core SDK)src/praisonai/praisonai/(wrapper — CLI, YAML, resolver)/Users/praison/PraisonAI-Tools(praisonai-tools)/Users/praison/PraisonAI-Plugins(praisonai-plugins)Also clone (no fork sync — we own these):
Do not assume either repo is already understood. Build understanding from source.
Cursor rule:
.cursor/rules/sdk-opencode-gap-analysis.mdcPhase 0 — Parallel repo exploration (mandatory)
Use multiple sub-agents in parallel before writing any gap conclusions.
Sub-agent batch A — Understand PraisonAI (launch in parallel)
Agentlifecycle,start/run, tool loop, hooks, errors, streaming@tool, registry, MCP, protocols/adapters, lazy importsAgentTeam,AgentFlow, workflows, handoffs, schedulersrc/praisonai/praisonai/cli/, YAML,tool_resolver, install/first-run UXPraisonAI-Tools,PraisonAI-Plugins— discovery, entry pointsEach sub-agent must return:
Sub-agent batch B — Understand OpenCode (launch in parallel, after clone)
packages/opencode/bin, command tree, yargs/CLI routing, terminal UXEach sub-agent must return:
Synthesise sub-agent outputs into a short internal map:
Phase 1 — In-depth comparative analysis
Compare at the capability level, not naming or cosmetic API differences.
Strict gap filter (all must pass)
AGENTS.md)Reject (do not report)
praisonai-tools(→ already inpraisonaiagents.tools)Layer placement (mandatory — validate before filing any gap)
Every gap must assign exactly one primary layer.
src/praisonai-agents/praisonaiagents/praisonaiagentssrc/praisonai/praisonai/praisonai/Users/praison/PraisonAI-Toolspraisonai-tools/Users/praison/PraisonAI-Pluginspraisonai-pluginsDecision rules:
pip install praisonai-tools)praisonai.pluginsentry points)CLI-first gaps → usually wrapper (primary) + optional core hook/protocol.
Per-gap layer validation (required):
Output: exactly top 3 gaps (or fewer if only 1–2 pass the filter)
For each gap:
praisonaiagents/praisonaipathsAlso include 2–5 explicit non-gaps: OpenCode features considered and rejected, with one line each.
Also include 2–5 PraisonAI advantages: where wrapper/core already beats OpenCode CLI UX (avoid fixing what isn’t broken).
Phase 2 — Create GitHub issues (child issues)
Create one GitHub issue per validated gap (max 3). Link them to this issue.
Issue writing rules (critical)
Issue template (per gap)
Severity
Critical | High | Medium — [one-line justification]
Validation
[How this gap was confirmed in the PraisonAI codebase]
Simpler · More extensible · Faster · Agent-centric
praisonaiagents (core) → praisonai (wrapper) → praisonai-tools → praisonai-plugins
/src/praisonai-agents /src/praisonai PraisonAI-Tools PraisonAI-Plugins
Deliverables