FabricFabricHarness
CLI

console

Interact with jobs, persistent agents, streams, tool calls, and approvals from a terminal.

fh console is a lightweight terminal client for the public Fabric HTTP protocol. It does not start a second runtime or bypass server policy. Authentication, tenant isolation, durable admission, offsets, tool events, and approval resolution behave the same as other clients.

Start the server in one terminal:

FABRIC_HARNESS_API_TOKEN=local-token fh dev --mock

Then open the interactive console:

FABRIC_HARNESS_API_TOKEN=local-token fh console

The console reads /admin/agents, lets you choose a finite job or persistent agent, and prompts for an instance id when needed. Persistent messages are admitted asynchronously. The console follows the conversation from the returned offset and prints assistant messages, tool calls, tool results, approval events, errors, and terminal settlement.

One-shot jobs

fh console --job report --input '{"topic":"weekly usage"}'

Input must be JSON. The job uses the authenticated /jobs/:name route and prints the complete result envelope.

One-shot persistent messages

fh console \
  --agent support \
  --id customer-42 \
  --session billing \
  --message "Where is invoice 1007?"

Use --url for a deployed server, --tenant for explicit operator tenant selection, and --token-env when the bearer token is stored under a different environment variable:

PROD_AGENT_TOKEN=... fh console \
  --url https://agents.example.com \
  --token-env PROD_AGENT_TOKEN \
  --tenant acme \
  --agent support --id customer-42 --message "Retry the export"

Tokens are read from the environment rather than command arguments, so they do not appear in shell history or process listings.

Interactive commands

CommandEffect
:approvals <session-id>List approval requests for a session.
:approve <session-id> <approval-id> [reason]Approve through the server's RBAC route.
:reject <session-id> <approval-id> [reason]Reject through the same route.
:quitClose the terminal client.

The identity used to resolve an approval comes from the authenticated server principal. Text typed after the approval id is a reason, not an actor override.