Skip to content
This documentation covers the kagent 1.0 alpha. For the latest 0.x release, see the 0.x docs.

For the complete documentation index, see llms.txt. Markdown versions of all docs pages are available by appending .md to any docs URL.

kagent agent invoke

Page as Markdown

Invoke a Session.

Invoke an existing Session through the A2A API.

kagent agent invoke [flags]

Flags:

  • -f, --file string - Read task text from a file or - for stdin
  • -h, --help - help for invoke
  • --session string - Session ID
  • -S, --stream - Stream the response
  • -t, --task string - Task text
  • --token string - Model API key passed through as an A2A Bearer token

Global Flags:

  • --api-url string - KAgent control-plane API URL (default “http://localhost:8083”)
  • --ca-file string - CA certificate file for KAgent endpoints
  • --gateway-url string - KAgent A2A and MCP gateway URL (default “http://localhost:8083”)
  • -n, --namespace string - Namespace (default “kagent”)
  • -o, --output-format string - Output format (default “table”)
  • --server-name string - TLS server name for KAgent endpoints
  • --timeout duration - Timeout (default 5m0s)
  • --user-id string - Caller identity used to select the server-side data partition (default “admin@kagent.dev”)
  • -v, --verbose - Verbose output

Example

kagent agent invoke --session 8bd650a8-9775-488f-8bc1-0d52bf7bdcab --task "Get all the pods"