Skip to content
Merged
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
2 changes: 1 addition & 1 deletion docs/design/agent-workflows/documentation/adapters/pi.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pages first. This page assumes the relay and the wire contract.
## How Pi runs

Pi runs over ACP, through sandbox-agent (`engines/sandbox_agent.ts`). The harness value
`pi_core` (plain Pi) and `pi_agenta` (Pi with Agenta's forced opinion) both map to the `pi`
`pi_core` (and the legacy `pi_agenta` spelling of a removed experiment) both map to the `pi`
ACP agent. This is the one engine the runner has. The sandbox-agent daemon starts the
`pi-acp` adapter, which starts the `pi` CLI.

Expand Down
19 changes: 8 additions & 11 deletions docs/design/agent-workflows/documentation/agent-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ Its fields and defaults:
| `model` | `str` | `"gpt-5.5"` | `x-parameter: grouped_choice`, plain string |
| `tools` | `List[ToolConfig]` | empty list | typed discriminated union |
| `mcp_servers` | `List[MCPServerConfig]` | empty list | typed |
| `harness` | `Literal["pi_core","claude","pi_agenta"]` | `"pi_core"` | enum |
| `harness` | `Literal["pi_core","claude","codex"]` | `"pi_core"` | enum |
| `sandbox` | `Literal["local","daytona"]` | `"local"` | enum |
| `runner.permissions.default` | `Literal["allow","ask","deny","allow_reads"]` | `"allow_reads"` | enum, four modes |

Expand Down Expand Up @@ -218,23 +218,20 @@ Legend: (a) catalog/schema, (b) SDK neutral config, (c) runtime.
| model / provider | yes, `model: str` | yes, `Optional[str]` | wired to the runner | Loose string. No `ModelRef`, no provider enum. There is no separate provider field. |
| tools | yes, strict list | yes, lenient coercion | wired, resolved to builtin names + tool specs | Entries strict, list lenient. The shipped default template fills it with Pi's four default built-ins (`read`, `bash`, `edit`, `write`); see [Tools](tools.md). |
| mcp_servers | yes, strict list | yes | wired, resolved to runner MCP servers | Strict per entry. Claude supports external HTTP servers; Pi refuses them until its bridge exists. |
| skills | yes, embed/inline list | yes | wired | Author-settable (`SkillConfig` inline or `@ag.embed` references). The playground build-kit overlay embeds one skill, the `build-an-agent` playbook; the `pi_agenta` harness additionally force-unions `getting-started`. See below. |
| persona | no | no | wired but forced only | Not a config field. The Agenta harness hardcodes an append-system preamble. See below. |
| skills | yes, embed/inline list | yes | wired | Author-settable (`SkillConfig` inline or `@ag.embed` references). The playground build-kit overlay embeds one skill, the `build-an-agent` playbook. See below. |
| persona | no | no | removed | Not a config field. It was the removed `pi_agenta` harness's hardcoded append-system preamble. See below. |
| agents_md | yes, `agents_md: str` | yes, as `instructions` | wired to `agentsMd` | The schema names it `agents_md`. The neutral config names it `instructions`. |
| harness | yes, enum | yes, on `AgentConfig` | wired, picks the harness class | Enum-enforced. The runtime validates via `make_harness`. |
| sandbox | yes, enum | yes, on `AgentConfig` | wired to the backend, absent from `SessionConfig` | Backend concern, not agent identity. |
| runner.permissions.default | yes, enum (4 modes) | yes, as `permission_default` on `AgentConfig` | wired to `SessionConfig` and the run request's `permissions.default` | Enforced for both harnesses: Claude at its settings file and the ACP responder, Pi at the tool relay. No longer decorative on Pi. |

## Notable gaps and quirks

`persona` is not author config; it is a runtime injection of the Agenta harness only (a forced
append-system string). `skills` used to work the same way, but is author config now: inline
`SkillConfig` packages or `@ag.embed` references the backend inlines before the runner sees
them. Two platform skills still arrive without the author writing anything: the playground
build-kit overlay embeds the `build-an-agent` playbook, and the `pi_agenta` harness
force-unions the `getting-started` skill (`AGENTA_FORCED_SKILLS` in
`sdks/python/agenta/sdk/agents/adapters/agenta_builtins.py`). Each is delivered exactly once.
Pi (`pi_core`) and Claude harnesses get no forced skills or persona.
`persona` is gone with the removed `pi_agenta` harness (it was that harness's forced
append-system string). `skills` is author config: inline `SkillConfig` packages or
`@ag.embed` references the backend inlines before the runner sees them. One platform skill
still arrives without the author writing anything: the playground build-kit overlay embeds
the `build-an-agent` playbook. No harness forces skills or a persona.

Per-harness divergence is real in other ways, but not in permission enforcement anymore: the
permission policy is now enforced on both Claude and Pi. Builtin tool names are dropped for
Expand Down
16 changes: 8 additions & 8 deletions docs/design/agent-workflows/documentation/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ The runtime keeps two run choices configurable as fields on `AgentConfig`
(`sdks/python/agenta/sdk/agents/dtos.py`):

- **Harness:** which agent runs. Supported values are `pi_core`, `claude`, and experimental
`pi_agenta`. Default `pi_core`. `pi_core` and `pi_agenta` both drive the `pi` ACP agent;
`pi_agenta` is Pi with Agenta's forced opinion.
Default `pi_core`, which drives the `pi` ACP agent. (`pi_agenta`, a removed experiment,
is still read as `pi_core` so old stored configs run.)
- **Sandbox:** where the run happens. Supported values are `local` and `daytona`. Default
`local`.

Expand Down Expand Up @@ -66,11 +66,12 @@ and tool credentials and passes them only in the scoped `/run` payloads that nee

The deployed handler always uses `SandboxAgentBackend`. `select_backend` in
`services/oss/src/agent/app.py:49` constructs `SandboxAgentBackend` for every run, regardless
of harness. So `pi_core`, `claude`, and `pi_agenta` all run through the sandbox-agent daemon
of harness. So `pi_core`, `claude`, and `codex` all run through the sandbox-agent daemon
over ACP.

The runner has one engine, the sandbox-agent ACP path (`engines/sandbox_agent.ts`). The
`harness` field on the `/run` request selects the ACP agent: `pi_core` and `pi_agenta` both
`harness` field on the `/run` request selects the ACP agent: `pi_core` (and the legacy
`pi_agenta` spelling) both
map to the `pi` ACP agent, `claude` maps to `claude`. There is no engine selector on the wire.
A legacy in-process Pi engine and an `InProcessPiBackend` adapter existed during the POC; both
were removed.
Expand All @@ -82,23 +83,22 @@ The SDK runtime models engines as `Backend` adapters

| Backend | Status | Harnesses | Sandbox support | Notes |
| --- | --- | --- | --- | --- |
| `SandboxAgentBackend` | Implemented | `pi_core`, `claude`, `pi_agenta` | `local`, `daytona` | The deployed path and the only engine. Drives `engines/sandbox_agent.ts`: starts the sandbox-agent daemon and an ACP adapter. `supported_harnesses` is `{pi_core, claude, pi_agenta}` (`adapters/sandbox_agent.py:121`). |
| `SandboxAgentBackend` | Implemented | `pi_core`, `claude`, `codex` | `local`, `daytona` | The deployed path and the only engine. Drives `engines/sandbox_agent.ts`: starts the sandbox-agent daemon and an ACP adapter. `supported_harnesses` is `{pi_core, claude, codex}` (`adapters/sandbox_agent.py`). |
| `LocalBackend` | Not implemented | Intended: `pi_core`, `claude` | Local machine | Public class exists; `create_sandbox` and `create_session` raise `NotImplementedError` (`adapters/local.py:34`). |

## Harnesses

The SDK runtime models agent-specific behavior as `Harness` adapters
(`sdks/python/agenta/sdk/agents/adapters/harnesses.py`). The Python class names are unchanged;
only the harness string values changed (`HarnessType.PI` is `"pi_core"`, `HarnessType.AGENTA`
is `"pi_agenta"`, `HarnessType.CLAUDE` is `"claude"`).
is removed, `HarnessType.CLAUDE` is `"claude"`).

| Harness | Value | Status | Notes |
| --- | --- | --- | --- |
| `PiHarness` | `pi_core` | Implemented | Native Pi tools, Pi prompt overrides, Pi tracing extension. Drives the `pi` ACP agent. |
| `ClaudeHarness` | `claude` | Implemented | MCP-delivered tools, permission policy, runner-built tracing. No Pi built-in tools. Drives the `claude` ACP agent. |
| `AgentaHarness` | `pi_agenta` | Experimental | Pi with forced tools, forced skills, a base AGENTS.md preamble, and a persona. Drives the `pi` ACP agent plus forced extras. Content is still placeholder. |

The `pi_agenta` harness runs on the sandbox-agent path. The runner treats it as the `pi` ACP
The removed `pi_agenta` value still reads as the `pi` ACP
agent and layers the forced skills and prompt extras on top
(`services/agent/src/engines/sandbox_agent/run-plan.ts`). The QA matrix verified it on
sandbox-agent local and Daytona (`projects/qa/findings.md`, F-002).
Expand Down
2 changes: 1 addition & 1 deletion docs/design/agent-workflows/documentation/skills.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ says.

`agent-workflows-qa` (shared) defines the test matrix for the agent runtime. Its three axes
are the environment (sandbox-agent local, sandbox-agent Daytona, and the local SDK), the
harness (`pi_core`, `pi_agenta`, `claude`), and the capability under test. "Test with daytona,
harness (`pi_core`, `claude`, `codex`), and the capability under test. "Test with daytona,
local pi, and claude, on both the SDK and the UI" is exactly a walk across these cells. Each
test forces a capability with a token the model cannot guess, so a pass proves the capability
ran.
Expand Down
7 changes: 3 additions & 4 deletions docs/docs/reference/agents/01-agent-configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Which providers, deployments, and connection modes each harness can reach is ser
GET /api/workflows/catalog/harnesses/{harness}
```

In the shipped table, `pi_core` and `pi_agenta` reach `openai`, `anthropic`, `gemini`, `mistral`, `groq`, `minimax`, `together_ai`, and `openrouter`, with deployments `direct` and `custom`. `claude` reaches `anthropic` only, with deployments `direct`, `custom`, `bedrock`, and `vertex_ai`, and selects its model by alias rather than by a `provider/model` string.
In the shipped table, `pi_core` reaches `openai`, `anthropic`, `gemini`, `mistral`, `groq`, `minimax`, `together_ai`, and `openrouter`, with deployments `direct` and `custom`. `claude` reaches `anthropic` only, with deployments `direct`, `custom`, `bedrock`, and `vertex_ai`, and selects its model by alias rather than by a `provider/model` string.

## tools

Expand Down Expand Up @@ -195,18 +195,17 @@ Each entry is an inline skill package. See [Skills](/concepts/skills).

| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| `kind` | `"pi_core"` \| `"pi_agenta"` \| `"claude"` \| `"codex"` | No | `"pi_core"` | Which coding agent to drive. |
| `kind` | `"pi_core"` \| `"claude"` \| `"codex"` | No | `"pi_core"` | Which coding agent to drive. |
| `permissions` | object | No | see [harness.permissions](#harnesspermissions) | Tool-use gating posture, applied by harnesses that gate. |
| `extras` | object | No | `{}` | Per-harness knobs passed through unchanged. For Pi, `system` replaces the base system prompt and `append_system` adds to it. Both are independent of `instructions.agents_md`. |

| `kind` | Display name | Versioned slug |
|---|---|---|
| `pi_core` | Pi | `agenta:harness:pi_core:v0` |
| `pi_agenta` | Pi (Agenta) | `agenta:harness:pi_agenta:v0` |
| `claude` | Claude Code | `agenta:harness:claude:v0` |
| `codex` | Codex | `agenta:harness:codex:v0` |

`pi_agenta` runs the same engine as `pi_core` with Agenta's own skills, tools, and base instructions forced on.
`pi_agenta` was an experimental Pi variant, removed in August 2026. A stored config that still carries the value runs as `pi_core`.

### harness.permissions

Expand Down
1 change: 0 additions & 1 deletion sdks/python/agenta/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
# `agenta.Message` already names the prompt message type; import the agents one from
# `agenta.sdk.agents` when needed.
from .sdk.agents import ( # noqa: F401
AgentaHarness,
AgentTemplate,
ClaudeHarness,
Environment,
Expand Down
4 changes: 0 additions & 4 deletions sdks/python/agenta/sdk/agents/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
"""

from .adapters import (
AgentaHarness,
ClaudeHarness,
CodexHarness,
LocalBackend,
Expand Down Expand Up @@ -55,7 +54,6 @@
UnsupportedProviderError,
)
from .dtos import (
AgentaAgentTemplate,
AgentTemplate,
AgentTemplateShapeError,
Event,
Expand Down Expand Up @@ -166,7 +164,6 @@
"PiAgentTemplate",
"ClaudeAgentTemplate",
"CodexAgentTemplate",
"AgentaAgentTemplate",
"HarnessKind",
"HarnessIdentity",
"HARNESS_IDENTITIES",
Expand Down Expand Up @@ -284,6 +281,5 @@
"PiHarness",
"ClaudeHarness",
"CodexHarness",
"AgentaHarness",
"make_harness",
]
4 changes: 1 addition & 3 deletions sdks/python/agenta/sdk/agents/adapters/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@

- Backend adapters: ``SandboxAgentBackend`` (sandbox-agent over ACP),
``LocalBackend`` (standalone SDK runs; not yet implemented).
- Harness adapters: ``PiHarness``, ``ClaudeHarness``, ``CodexHarness``, ``AgentaHarness``
- Harness adapters: ``PiHarness``, ``ClaudeHarness``, ``CodexHarness``
(+ ``make_harness``).
- HTTP/browser protocol adapters live in subpackages, e.g. ``adapters.vercel``.

Shared plumbing for the runner-backed adapters lives in ``agents/utils``.
"""

from .harnesses import (
AgentaHarness,
ClaudeHarness,
CodexHarness,
PiHarness,
Expand All @@ -25,6 +24,5 @@
"PiHarness",
"ClaudeHarness",
"CodexHarness",
"AgentaHarness",
"make_harness",
]
Loading
Loading