Implement agentd CLI

t-320.6·WorkTask·
·
·
·Omni/Agentd/Cli.hs
Parent:t-320·Created1 month ago·Updated1 month ago

Dependencies

Description

Edit

Summary

Command-line interface for agentd.

Commands

agentd run <spec.md>         # Run a workflow
agentd ps                    # List running agents
agentd logs <run-id>         # Show logs for a run
agentd stop <run-id>         # Stop a running agent

run

agentd run workflow.md
agentd run workflow.md "override task"
cat input.json | agentd run workflow.md
  • Parse spec
  • Check/build OCI image
  • Run container
  • Stream output to terminal AND log file
  • Exit with agent's exit code

ps

agentd ps

Output:

RUN ID                          SPEC          STARTED              STATUS
20250101-143052-deploy-a1b2c3   deploy.md     2025-01-01 14:30:52  running
20250101-142000-test-b2c3d4     test.md       2025-01-01 14:20:00  exited (0)

Implementation: podman ps --filter name=agentd-* + parse meta.json from log dirs

logs

agentd logs 20250101-143052-deploy-a1b2c3
agentd logs 20250101-143052-deploy-a1b2c3 -f  # follow
  • Read from _/logs/agentd/<run-id>/output.log
  • -f uses tail -f

stop

agentd stop 20250101-143052-deploy-a1b2c3
  • podman stop <run-id>

Build Output

-- Omni/Agentd/Cli.hs
-- : out agentd
-- : dep Omni/Agentd/Spec.hs
-- : dep Omni/Agentd/Runner.hs

Deliverables

  • [ ] Omni/Agentd/Cli.hs
  • [ ] All 4 commands work
  • [ ] --help for each command
  • [ ] Builds to _/bin/agentd

Timeline (2)

🔄[human]Open → InProgress1 month ago
🔄[human]InProgress → Done1 month ago