Skip to content

Repository files navigation

EditFlow Demo Agent

EditFlow is a small, public image-editing Agent built with Agno. It exists to demonstrate a real prompt-regression workflow with AgentRig: the model chooses tools, AgentRig can execute either deterministic fixtures or the public EditFlow MCP tool backend, and every tool decision is observable and repeatable without calling an image-processing service.

Prompt-regression exercise: tag recording-baseline-v1 keeps the intentionally broad routing baseline. The current working tree contains the evidence-backed candidate: retouch_photo is limited to pixel adjustments and dedicated background/crop tools retain their boundaries. Use the included $prompt-regression-governance Skill to reproduce the Before/Candidate workflow. There is no hard-coded phrase router in the HTTP layer.

What is real

  • agno==2.6.11 runs a single ReAct-style Agent with an OpenAI-compatible model.
  • Five Agno tools use native external_execution=True pause/continue semantics.
  • PostgreSQL persists completed history and paused runs in one editflow_sessions table.
  • FastAPI exposes an AgentRig-compatible HTTP/SSE protocol.
  • A streamable-HTTP MCP backend executes all five public tool contracts locally.
  • Tool inputs and external results are validated with JSON Schema.

No image bytes are uploaded and no image API is called. Fixtures and the MCP backend return fictional image references such as image-demo-edit-01, so image-processing cost is zero.

Quick start

Requirements: Python 3.12/3.13, uv, Docker, and an DeepSeek API key. The checked-in defaults use deepseek-v4-flash through DeepSeek's OpenAI-compatible endpoint.

cp .env.example .env
# Edit .env and set DEEPSEEK_API_KEY. EDITFLOW_MODEL_API_KEY remains a supported override.
docker compose up -d postgres
uv sync --all-extras
uv run editflow

Start the public tool backend in another terminal:

uv run editflow-tools-mcp --port 8091

Or use bash scripts/start.sh after preparing .env.

The target listens on http://127.0.0.1:8090 by default:

curl http://127.0.0.1:8090/health
curl http://127.0.0.1:8090/capabilities

Seed its public Target, three Profiles (Fixture, real-MCP capture, approved-Sample replay), and seven cases into a running AgentRig instance:

uv run editflow-seed-agentrig --recording --base-url http://127.0.0.1:8020 \
  --target-endpoint http://127.0.0.1:8090

--recording also verifies that the catalog starts with exactly seven Draft cases, no Sample, no Run, and no pre-created case_editflow_one_step_mixed_chain. It fails fast when a previous rehearsal would make the recorded “live New Case” claim untrue.

For the Sample-capture recording, start AgentRig with the checked-in safe deployment config:

cd ../agentrig
AGENTRIG_CONFIG_FILE="../editflow-demo-agent/agentrig/agentrig.capture.toml" \
  uv run agentrig serve --port 8020

The capture Profile calls the MCP backend once. Codex then creates a draft Sample from the persisted tool_call event through AgentRig MCP, a user approves it in the Web UI, and the Sample-only Profile replays it five times without calling the MCP backend again.

See docs/protocol.md, docs/evaluation.md, and docs/security.md for the public contracts and evaluation boundaries. The architecture and recording path describe the complete competition demo.

Development

uv run ruff check .
uv run pytest -m "not live"

The PostgreSQL integration tests use the same local compose database. A real-model smoke test is opt-in and is skipped unless DEEPSEEK_API_KEY or EDITFLOW_MODEL_API_KEY is configured.

License

MIT. All names, schemas, prompts, IDs, and fixtures in this repository were written for this public demo and do not contain customer data or private image-agent source code.

About

Public Agno image-editing agent for AgentRig prompt-regression evaluation

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages