pragma README

The project's README from github.com/pqpo/pragma. As one markdown file: README.md.

launher

Pragma

English | 简体中文

Build Your Agent Team Once. Use It Everywhere.

Build portable AI agent teams across models and harnesses — combine the right models, tools, context, and workflows for each task. Run them directly through Pragma Desktop or CLI; bring them into Codex, Claude Code, and other tools without changing your workflow; or integrate them into your own AI system with the SDK.

Latest preview release Project status: preview Desktop platform: macOS License: AGPL-3.0

Download · Quick start · Document · Examples

Pragma is a cross-harness platform for turning AI-native working methods into runnable, reusable agent teams. A team can combine Experts, ExpertTeams, Flows, tools, Skills, shared context, memory, permissions, and human checkpoints—not just a prompt.

Unlike a single chat product or Coding Agent, Pragma treats the Agent Team and its working method as the portable unit. Define it as YAML DSL and build it in Desktop, run it from the terminal through the CLI, or embed the same team in your own application with the SDK.

During a Mission, work can move between specialists without losing decisions, artifacts, or accumulated experience. The same team can coordinate different models and harnesses for different steps while keeping context, permissions, handoffs, and execution under one governance model.

Pragma Desktop running a multi-expert mission

Pragma Desktop running a multi-expert mission

Pragma Desktop running a multi-expert mission

[!IMPORTANT] Pragma is currently a preview. The latest Desktop release provides builds for macOS Apple Silicon and Intel. Verify that a package comes from the official release before installing it.

Quick start

Run Pragma Desktop

Download the package for your Mac from GitHub Releases, install it, and then:

  1. Open Settings and connect a model provider or an installed local runtime.
  2. Choose the workspace Pragma is allowed to use.
  3. Talk with Pragma to create your own Expert, ExpertTeam, or Flow.
  4. Start a task with the result and use it as much as you like. As Missions accumulate, cross-harness memory turns repeated experience into stable knowledge and reusable Skills.

To open a Desktop release, use this order:

  1. Try opening Pragma normally.
  2. If macOS blocks it, open System Settings → Privacy & Security and choose Open Anyway.
  3. Only if it still cannot open, and you have verified that the package came from the official release, clear the app's quarantine attribute:
sudo xattr -r -d com.apple.quarantine /Applications/Pragma.app

You do not need to change the global Allow apps downloaded from setting.

The Desktop distribution guide explains the release contents, checksums, and installation process.

Build Desktop from source

Requirements: Node.js 22 or later and pnpm 10.12.1.

git clone https://github.com/pqpo/pragma.git
cd pragma
pnpm install --frozen-lockfile
pnpm --filter @pragma/desktop dev

Development builds use ~/.pragma-development/ by default so unreleased storage migrations cannot modify data owned by the installed Desktop app. Set PRAGMA_HOME explicitly only when a task intentionally needs another isolated data root.

Try the SDK and runtime adapters

The repository includes runnable examples rather than abbreviated API fragments:

# ContextStore operations; no model credentials required
pnpm --filter @pragma/examples example:context

# Use an installed and authenticated local agent CLI
pnpm --filter @pragma/examples example:runtime-codex
pnpm --filter @pragma/examples example:runtime-claude-code

See the examples guide for Expert sessions, delegation, ExpertTeams, Flows, human review gates, MCP, Skills, plugins, memory, recovery, and portable bundles.

What Pragma makes reusable

Pragma's three compounding assets: workflows, private knowledge, and private evaluation sets

AI working methods

Compose Experts, ExpertTeams, Flows, subflows, tools, and human checkpoints. Each step can bind the model, agent harness, permissions, and context that fit the task. The resulting method can be versioned, evaluated, exported, and shared.

Private knowledge

Pragma treats context as a Host-owned ContextStore instead of trapping it inside one chat product. Events from different tasks, harnesses, and models enter a shared Memory Pipeline and become evidence-backed episodic and semantic memory. As that dynamic memory accumulates, background work can automatically start a policy-controlled promotion workflow that turns it into stable knowledge or reusable Skills; authoritative changes are activated only after the required review.

The ContextStore contract is extensible. This repository currently includes in-memory, JSON, filesystem, Mission Board, and Memory-backed implementations; other databases or retrieval systems can be added through Host adapters.

Private evaluation sets

Reusable workflows need regression signals. Evaluations capture the tasks and expectations that matter to you, so changes to a prompt, Flow, model, runtime, or context source can be checked at the system level instead of judged from a single demo.

These assets compound: workflows produce evidence, memory turns evidence into knowledge, and evaluations reveal whether the next revision is actually better.

Why Pragma

Flow         = Expert + ExpertTeam + SubFlow + Human checkpoints
Expert tools = Expert + ExpertTeam + Flow

Example: an AI-native delivery mission

An example collaborative delivery workflow

In this example configuration, UI design, requirements, architecture, implementation, and independent review use different specialists. Accepted decisions and artifacts flow between stages, and useful facts, experience, and Skills remain available to the next Mission.

The model and runtime names in the diagram are illustrative. Routing is a Host binding: the reusable method is not coupled to those exact providers.

Choose how to build and run your Agent Team

Pragma meets you at three levels: a full-featured Desktop workspace, direct CLI invocation, or SDK integration into your own system.

Desktop — the most intuitive entry point

Use Pragma Desktop as the most intuitive and configurable way to build and run teams. Configure model providers, local runtimes, permissions, context, memory, tools, and evaluations; create Experts and Flows in Studio; run Missions; inspect results; and import or export .pragma bundles.

CLI — call teams directly from the terminal

Install @pqpo/pragma to discover Experts, run or resume Missions, inspect results and events, answer HumanTask interactions, and manage Mission queues from the terminal. JSON and JSONL output provide stable envelopes for scripts and other Agent tools, while the CLI and Desktop share the same Local Host application semantics.

SDK — integrate teams into your own system

Save an Agent Team as versioned YAML DSL, load and compile it with @pragma/interpreter, and invoke the compiled team directly from your own application through @pragma/core. This path lets you embed Agent Team execution into a product or AI system while keeping the team definition portable and reviewable. Start with the portable bundle example and the DSL architecture guide; runnable integrations live in examples/src.

Available capabilities

Area Capabilities
Desktop macOS Apple Silicon and Intel packages
CLI macOS and Windows npm package with human-readable, JSON, and JSONL output
Runtime adapters Claude Code, Codex, PI, Qoder CLI, and Antigravity
Composition Expert, ExpertTeam, Flow, SubFlow, HumanTask, and governed delegation
Context In-memory, JSON, filesystem, Mission Board, and Memory-backed stores
Memory Evidence pipeline, episodic and semantic modules, Knowledge, and Skill refinement
Evaluation Versioned Evaluation resources and Flow Run Dry
Portability .pragma bundle import, export, validation, binding, compilation, and Git bundle sources
Recovery Durable Mission commands, Execution events, Runtime Session ownership, and schema migrations

For detailed implementation boundaries, see the current architecture overview.

Documentation

Contributing and support

Read the Contributing Guide before opening a pull request. Use GitHub Issues for reproducible bugs and feature proposals, and follow the Security Policy for vulnerability reports.

License

Pragma is licensed under the GNU Affero General Public License v3.0 only (AGPL-3.0-only). If you modify Pragma and offer that modified version for remote network interaction, AGPL-3.0 requires you to offer those users access to the corresponding source code. Pragma names, logos, and official identity are governed separately by the Trademark Policy.

pragma (pqpo/pragma)

Searching Database…

251 ·GitHub
这是什么?Pragma 是一个跨运行框架的平台,把 AI 原生的工作方法变成可复用的代理团队,将模型、工具、上下文、记忆和工作流组合在一起,让你可以在 Desktop、CLI 中运行同一个团队,或通过 SDK 嵌入。
它是桌面应用、CLI,还是库?三者都是:一个用于可视化构建和运行团队的 macOS Desktop 应用,一个用于在终端调用团队的 CLI(@pqpo/pragma),以及一个用于把编译好的团队嵌入自己应用的 SDK(@pragma/interpreter 加 @pragma/core)。
怎么上手 Pragma?从 GitHub Releases 下载适配你 Mac 的 Desktop 安装包并安装,打开设置连接一个模型服务商或本地运行时,然后与 Pragma 对话来创建你自己的 Expert、ExpertTeam 或 Flow。也可以通过 npm 安装 CLI,或从源码构建 Desktop。
Pragma 现在稳定到可以依赖了吗?还不行,项目明确自称预览版,而且 Desktop 发行版目前只提供 macOS Apple Silicon 和 Intel 构建,所以安装前应核实安装包来自官方发行渠道。
Pragma Desktop 也能在 Windows 或 Linux 上运行吗?Desktop 安装包目前只面向 macOS(Apple Silicon 和 Intel);CLI npm 包另外还支持 Windows。未提及 Linux 支持。
AGPL 许可证有什么限制?Pragma 采用 AGPL-3.0-only,这意味着如果你修改了它,并通过网络向用户提供修改后的版本,就必须向这些用户提供相应的源代码。
Pragma 里的 Mission 是什么?Mission 是代理团队的一次运行,工作在各专家之间流转而不丢失决策、产物或任务状态,产生的证据会汇入 Memory 和 Evaluations。
Pragma 可以把工作路由给哪些 AI 运行框架?当前的运行时适配器覆盖 Claude Code、Codex、PI、Qoder CLI 和 Antigravity,因此同一个团队可以在不同步骤中组合不同的模型和运行框架,而不被单一厂商锁定。
.pragma 包里装的是什么?.pragma 包打包了代理团队的可移植 YAML DSL 定义,外加精选的项目资产,Desktop 可以导入它,其他 Host 也可以通过 @pragma/interpreter 和 @pragma/core 加载并运行它。
Pragma 如何把过去的任务变成可复用的 Skills?任务产生的事件流入共享的 Memory Pipeline,形成有证据支撑的情景记忆和语义记忆;一个受策略管控的晋升工作流可以在审核之后把这些记忆转化为稳定知识或可复用的 Skills。
Creator
pqpo
Size
44.2 MB
Stars
251
Updated
CommitOct 17
Age
3mo
Commits · 90 Days