ai-control
v0.1.24
Published
AI control CLI for Airflow and platform operations
Downloads
2,588
Readme
ai-control-cli
ai-control-cli is a local Node.js CLI for Airflow and Agent Hub operations.
Features
- Airflow connection management and DAG operations
- Agent Hub configuration, registration, interaction listing, and invocation
Install
npm install -g ai-control@latestConfiguration
The CLI stores local configuration in:
~/.ai-control-cli/config.jsonAirflow
Default values used by the CLI:
- URL:
http://10.219.40.75:8080 - Username:
admin - Password:
admin
Save a connection once:
ai-control airflow connect --url http://10.219.40.75:8080 --username admin --password adminAgent Hub
Agent Hub uses the backend path prefix /api/agent-hub.
Default value used by the CLI:
- Base URL:
http://127.0.0.1:9080/api/agent-hub
Save the platform token and base URL once:
ai-control agent-hub setConfig --base-url http://127.0.0.1:9080/api/agent-hub --token <platform-issued-token>The token is issued by the platform first and stored locally by the CLI.
Command reference
General
ai-control commandsAirflow
ai-control airflow connect --url <url> --username <username> --password <password>
ai-control airflow list
ai-control airflow show <dagId>
ai-control airflow trigger <dagId> --conf '{"key":"value"}'Agent Hub
ai-control agent-hub setConfig --base-url <url> --token <token>
ai-control agent-hub register --agent-id <agentId> --profile <profile>
ai-control agent-hub interactions
ai-control agent-hub invoke <interactionId> --payload '{"input":"hello"}'Recommended Agent Hub flow
- Obtain a token from the platform.
- Save the token and Agent Hub base URL locally.
- Register the current agent with
agent-idandprofile. - Query published interactions.
- Invoke an interaction when needed.
Example:
ai-control agent-hub setConfig --base-url http://127.0.0.1:9080/api/agent-hub --token <platform-issued-token>
ai-control agent-hub register --agent-id <agentId> --profile <profile>
ai-control agent-hub interactions
ai-control agent-hub invoke <interactionId> --payload '{"input":"hello"}'Backend API expectations
The Agent Hub CLI expects these endpoints:
POST /api/agent-hub/agents/registerGET /api/agent-hub/interactionsPOST /api/agent-hub/interactions/{interactionId}/invokeGET /api/agent-hub/tokensPOST /api/agent-hub/tokensDELETE /api/agent-hub/tokens/{tokenId}GET /api/agent-hub/permissionsPOST /api/agent-hub/permissions/grantPOST /api/agent-hub/permissions/revoke
Build
pnpm buildRun locally
After building:
node dist/index.cjs commands
node dist/index.cjs airflow list
node dist/index.cjs agent-hub interactionsPublish
npm config set //registry.npmjs.org/:_authToken=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
npm run build
npm version patch
npm publish --registry=https://registry.npmjs.org
npm install -g ai-control@latestpnpm dev agent-hub setConfig --token ah_3253f80c7575468987bbec8855b3affc pnpm dev agent-hub register --agent-code claude-code-test --profile claude-code pnpm dev agent-hub list-agents
ai-control agent-hub setConfig --token ah_712124056b1340fa8f05fc64fbd12da9 ai-control agent-hub register --agent-code claude-code-test --profile claude-code ai-control agent-hub list-agents ai-control agent-hub generate-agent
claude --resume
