Spin up a complete, isolated test environment per agent task — stateful API mocks, an optional sandboxed runner, and one-command teardown.
Part of the SIN-Code agent-engineering stack.
Agents that touch external services (payments, third-party APIs, a database) either hit real systems (dangerous, flaky, costly) or rely on brittle, stateless stubs. EFSM builds a disposable full-stack environment: stateful mocks that remember what you POSTed, wired into a runner, so tests exercise realistic behavior and then vanish.
- Stateful mock server (FastAPI) — POST creates, GET returns what you created; per-resource in-memory state and scripted scenarios.
- Orchestrator — configures mocks + env vars from a task description
(
external_apis,requires_db,test_command). - Sandboxed execution — Docker when available, with an automatic subprocess fallback so it still runs without Docker.
- In-process dispatch for fast unit testing of mocks (no network needed).
- CLI (
efsm) to set up an environment and run tests in one shot.
pip install -e .
efsm setup mytask --api stripe --api github --db --test-cmd "pytest"Docker gives the strongest isolation. When Docker is not present, EFSM falls back to a resource-limited subprocess runner — convenient for local/CI use, but not a security boundary for untrusted code.
MIT — see LICENSE.