Robot agent command line
Run one-shot requests or an interactive robot-agent session.
quit and exit end the session; clear removes conversation history. Tool traces truncate long text. python3 -m beambot.agent calls main(); importing the module does not start a session.
beambot.agent.__main__ · Source
Clients and integrations · Guide · Symbol index
How it is used
python3 -m beambot.agent opens the interactive client; command-line text is handled as one request. main() connects a RobotAgent, prints tool traces and responses, then disconnects on exit.
This client can invoke the tools exposed by its MCP configuration, including robot operations. For embedding the conversation loop in another interface, use RobotAgent instead of the terminal input loop.
Start here
Callable |
Purpose |
|---|---|
Create a RobotAgent, connect, execute joined argv as one query or run an input loop, and disconnect in finally after the connection attempt. |
Functions
main()
Create a RobotAgent, connect, execute joined argv as one query or run an input loop, and disconnect in finally after the connection attempt.
Entry point · Source
async main()
Returns: None after one-shot completion or interactive exit/EOF.
Errors: Model/API, input, callback and connection errors propagate. The finally block disconnects after connect or later operations fail; RobotAgent construction happens before that block.
Side effects: Reads arguments/stdin, prints responses/tool traces, connects model/MCP resources and can execute robot tools.
Internal callbacks and helpers
main.on_tool_call()
Print a tool-call trace with JSON arguments limited to 100 characters and result text limited to 200 characters plus an ellipsis.
Callback · Source
on_tool_call(name, args, result)
Parameter |
Meaning |
|---|---|
|
Tool name displayed verbatim. |
|
JSON-serializable tool argument mapping. |
|
Tool result string to truncate for display. |
Returns: None.
Errors: JSON serialization or non-string result operations can raise.
Side effects: Writes a formatted trace to stdout.
Referenced in source (1)
main— beambot.agent.__main__