Skip to main content
Send a single message to a running agent or enter an interactive REPL.

Usage

motus serve chat <url> [message] [options]

Options

FlagDefaultDescription
--sessionResume an existing session by ID instead of creating a new one
--keepfalsePreserve the session on exit and print its ID for later --session use
--paramKEY=VALUE parameter passed to the agent as user_params (repeatable). Numeric values are auto-coerced to int or float.

Examples

Single message

motus serve chat http://localhost:8000 "What is 2+2?"
Without --keep, chat creates a fresh session, sends the message, prints the response, and then deletes the session.

Interactive REPL

motus serve chat http://localhost:8000
Chat session started (Ctrl+C to quit)

> hello
hi there
> how are you?
I'm doing well!
^C
Bye!

Keep and resume a session

motus serve chat http://localhost:8000 --keep
Session: 550e8400-e29b-41d4-a716-446655440000 (use --session to resume)
> hello
hi there
^C
Bye!

# Resume later
motus serve chat http://localhost:8000 --session 550e8400-e29b-41d4-a716-446655440000
> where were we?