Skip to content

Any agent: the aexp CLI and MCP server (story 28.8) - #224

Merged
fabbrik merged 7 commits into
mainfrom
feat/28-8-mcp-cli
Oct 31, 2026
Merged

fabbrik merged 7 commits into
mainfrom
feat/28-8-mcp-cli

Conversation

@fabbrik

@fabbrik fabbrik commented Oct 31, 2026

Copy link
Copy Markdown
Owner

Story 28.8 of Epic 28. A new dotnet tool, AgentExperience.Cli (aexp), lets any agent use the library: a CLI and an MCP stdio server over the SQLite store (or PostgreSQL).

  • CLI: run start|call|end, finalize (the configured verifier, in a later process if need be), recall (the block, or the failure hint), lessons, export, benefit, runs prune, trust.
  • MCP (aexp mcp): experience_recall, experience_failure_hint, experience_record_call, experience_finish, experience_lessons; bounded output; fixed error messages to the model.
  • Same rules as the MAF adapter: the block and hint come from a probe (a real ChatClientAgent with UseAgentExperience over a scripted client, no model call), so writer, eligibility, recall bounds and holdout are the adapter's; capture and finalization call Core directly with the library's sanitizer.
  • Trust model: identity, scope, store and the verifier come only from .aexp/config.json (discovery stops at the repository root). A config may drive the verifier or accept an exit code only after a human runs aexp trust, which records its hash outside the project; an edited config is refused until re-approved. The verifier program is resolved from PATH or inside the project, never the current directory; finalize validates the run before spawning anything; journals are written atomically; export paths are confined to the project.
  • InternalsVisibleTo from the MAF package to the tool (it bundles that exact assembly); ModelContextProtocol.Core 2.3.0. No public API change. Guide: docs/guide/cli-and-mcp.md.

Tests: Cli.Tests 44 (in-process and the packed tool over real stdio), MAF 1458, Release 199, every Docker-free project; pack and verify-packages (8 packages).

🤖 Generated with Claude Code

https://claude.ai/code/session_01GPXz56QPQAzDSyJTxbQTTy

fabbrik and others added 7 commits October 30, 2026 19:22
…8, part 1)

AgentExperience.Cli (command aexp): run start/call/end, finalize with the
configured verifier, recall of the block and of a failure hint, lessons,
export and benefit, and an MCP stdio server with the same operations. Block
and hint come from a probe agent wired with UseAgentExperience, so they are
the library's own; capture and finalization drive Core directly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GPXz56QPQAzDSyJTxbQTTy
…over MCP (story 28.8)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GPXz56QPQAzDSyJTxbQTTy
…P (story 28.8)

Eight packages: verify-packages checks a tool package (its command, tools/
layout, bundled libraries at this release), release.yml counts eight, the
public API baseline gains the tool's (empty) surface. Tool references are
not library floors. Guide page, README section, CHANGELOG, CONTRIBUTING.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GPXz56QPQAzDSyJTxbQTTy
…tory 28.8)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GPXz56QPQAzDSyJTxbQTTy
… and errors (story 28.8)

aexp trust approves a config's exact bytes in the user's own config dir;
the verifier runs (and a reported exit code counts) only for a trusted
config. The verifier's program is resolved by aexp (PATH only, or inside
the project). Discovery stops at the repository root or home; a config
another user owns is refused. finalize checks the run before spawning
anything; experience_finish keeps an ended run for a retry. Journals are
written atomically under a lock file; task text is sanitized; runs prune.
Written files stay inside the project; MCP errors are fixed messages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GPXz56QPQAzDSyJTxbQTTy
…ournals (story 28.8)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GPXz56QPQAzDSyJTxbQTTy
@fabbrik
fabbrik merged commit 513e054 into main Oct 31, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant