PicoClAWS is a lightweight, "pico-scale" agentic framework designed specifically for AWS Lambda. It brings the power of persistent, tool-equipped agents to a serverless environment with minimal footprint and maximum efficiency.
PicoClAWS leverages the "Claw" (tool-using) capabilities of LLMs within the "Pico" (serverless/micro) architecture of AWS. It provides:
- Ephemeral Compute, Persistent Memory: Agents run on AWS Lambda but maintain state via S3-backed workspace synchronization.
- Embedded Toolset: Bundles a full suite of 300+ shell utilities via a static BusyBox binary, making standard Linux tools available in the restricted Lambda environment.
- Python Support: Ready-to-use Python environment for data processing and automation.
- Telegram Integration: Native support for Telegram as a primary communication channel.
PicoClAWS is a specialized AWS Lambda distribution of the core PicoClaw engine. It adapts the original project's tool-using (Claw) philosophy to a purely serverless environment.
- Dynamic Symlink Engine: Automatically generates a full set of Linux commands (
ls,grep,sed,awk,find, etc.) during build, keeping the deployment package under 15MB. - Smart Workspace Sync: Transparently archives and restores the agent's working directory to S3, including support for symlinks and complex directory structures.
- ARM64 Native: Optimized for AWS Graviton (ARM64) for better performance and lower costs.
PicoClAWS handles state with a persistent-first approach, ensuring any work the agent does is saved and restorable across serverless invocations.
/reset(The Honest Reset): Performs a multi-layer wipe:- Cloud: Deletes the persistent workspace archive from S3.
- Local: Wipes the ephemeral
/tmpdirectory on the Lambda worker. - AI: Sends a system-level nudge to the LLM to verify it has started fresh with a clean slate (restored from the default
skeletonassets).
/start&/help: These are passed directly to the agent's core, allowing its unique "Soul" and "Identity" to define the response.
- Go 1.25+
- Node.js & NPM (for Serverless framework)
- AWS CLI configured
-
Clone the repository
-
Download essential binaries and generate symlinks:
make download-bins
-
Build the Lambda packages:
make build-lambdas
Deploy to AWS using the Serverless framework:
make deployPicoClAWS features a robust system for handling long-running tasks (like image generation) without blocking the primary agent loop or hitting Lambda timeouts.
- Submission: An agent calls a skill tool (e.g.,
draw). If the task is long-running, the worker sends an HTTP request to the Executor Lambda. - Monitoring: The Executor starts the task and, if it receives a
task_id, queues a message in the Task SQS Queue. - Polling: The Waiter Lambda is triggered by the queue. It periodically calls the skill's
checkcommand. - Completion: Once the task is finished, the Waiter sends the result to the Updates SQS Queue, which triggers the Worker to notify the user.
For a skill to support background execution, its Python engine must implement:
submitcommand: Returns a JSON containing anidfield.check --id <ID>command: Returns a JSON with{"done": true}or{"faulted": true}.- Statelessness: The Executor runs in a temporary directory. Any state needed for the final result (like original promp metadata) should be returned in the
submitresponse as_metadata, which PicoClAWS will automatically persist and restore in the user's workspace.
cmd/: Entry points for Webhook and Worker Lambdas.internal/app/: Core application logic (Worker driver, Telegram handlers).internal/: Shared utilities (Archive, Assets management, Transcriber).assets/: Bundled binaries and Python dependencies (populated during build).deployment/: Serverless configuration and infrastructure as code.