#Does OpenClaw support Python

1 messages · Page 1 of 1 (latest)

rancid lodge
#

I tried to add .py files in workspace/hookers but agent said OpenClaw doesn't support python but I don't see any documentation about OpenClaw supporting/not supporting specific language. Those .py files will be going to used for storing log files MongoDB Atlas server

velvet jasperBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> âś… Mark Solution

rancid lodge
#

Does OpenClaw support Python

grizzled pastureBOT
#

You can put .py files in the OpenClaw workspace — OpenClaw doesn’t have a “supported file types” list. The confusion is usually about what OpenClaw can automatically execute/load as automation.

1) Hooks are TypeScript/Node, not Python

If you’re trying to make something run automatically via “hooks”, OpenClaw’s hooks system expects a hook folder like:

  • <workspace>/hooks/<hook-name>/HOOK.md
  • <workspace>/hooks/<hook-name>/handler.ts

So a .py file in workspace/hookers won’t be discovered/run (also: the documented folder name is hooks, not hookers).

Docs:

2) If you want to use Python anyway: run it from a hook (or via system.run)

Python isn’t a first-class hook runtime, but you can still:

  • write a TS hook that spawns python3 your_script.py, or
#
  • have the agent run Python via system.run (often through a node), assuming exec approvals/tool policy allow it.

3) For “store logs to MongoDB Atlas”

Two common approaches:

  • Use the built-in command-logger hook (logs to a file), then run a separate shipper to push into Mongo.
  • Write a custom hook (TS) that sends events to an HTTP endpoint (your service) that writes to MongoDB Atlas.

If you tell me which event you want to log (every inbound message? only /new//reset? errors?), I can point you to the exact hook event (message:received, command:new, etc.) and the cleanest implementation path.