personalbotai commited on
Commit
c1dcaaa
Β·
1 Parent(s): d939e5a

Move picoclaw_space to root for Hugging Face Spaces deployment

Browse files
This view is limited to 50 files because it contains too many changes. Β  See raw diff
Files changed (50) hide show
  1. picoclaw_space/.dockerignore β†’ .dockerignore +0 -0
  2. picoclaw_space/.env.example β†’ .env.example +0 -0
  3. {picoclaw_space/.github β†’ .github}/ISSUE_TEMPLATE/bug_report.md +0 -0
  4. {picoclaw_space/.github β†’ .github}/ISSUE_TEMPLATE/feature_request.md +0 -0
  5. {picoclaw_space/.github β†’ .github}/ISSUE_TEMPLATE/general-task---todo.md +0 -0
  6. {picoclaw_space/.github β†’ .github}/pull_request_template.md +0 -0
  7. {picoclaw_space/.github β†’ .github}/workflows/build.yml +0 -0
  8. {picoclaw_space/.github β†’ .github}/workflows/docker-build.yml +0 -0
  9. {picoclaw_space/.github β†’ .github}/workflows/pr.yml +0 -0
  10. {picoclaw_space/.github β†’ .github}/workflows/release.yml +0 -0
  11. picoclaw_space/.gitignore β†’ .gitignore +0 -0
  12. picoclaw_space/.goreleaser.yaml β†’ .goreleaser.yaml +0 -0
  13. AGENT.md +32 -38
  14. picoclaw_space/CONTRIBUTING.md β†’ CONTRIBUTING.md +0 -0
  15. picoclaw_space/Dockerfile β†’ Dockerfile +0 -0
  16. picoclaw_space/Dockerfile.goreleaser β†’ Dockerfile.goreleaser +0 -0
  17. picoclaw_space/LICENSE β†’ LICENSE +0 -0
  18. picoclaw_space/Makefile β†’ Makefile +0 -0
  19. picoclaw_space/PLAN.md β†’ PLAN.md +0 -0
  20. picoclaw_space/README.ja.md β†’ README.ja.md +0 -0
  21. README.md +103 -35
  22. picoclaw_space/README.zh.md β†’ README.zh.md +0 -0
  23. picoclaw_space/ROADMAP.md β†’ ROADMAP.md +0 -0
  24. {picoclaw_space/cmd β†’ cmd}/dnstest/main.go +0 -0
  25. {picoclaw_space/cmd β†’ cmd}/picoclaw/main.go +0 -0
  26. {picoclaw_space/cmd β†’ cmd}/picoclaw/ui/embed.go +0 -0
  27. {picoclaw_space/cmd β†’ cmd}/picoclaw/ui/index.html +0 -0
  28. {picoclaw_space/cmd β†’ cmd}/picoclaw/workspace/AGENT.md +0 -0
  29. {picoclaw_space/cmd β†’ cmd}/picoclaw/workspace/HEARTBEAT.md +0 -0
  30. {picoclaw_space/cmd β†’ cmd}/picoclaw/workspace/IDENTITY.md +0 -0
  31. {picoclaw_space/cmd β†’ cmd}/picoclaw/workspace/SOUL.md +0 -0
  32. {picoclaw_space/cmd β†’ cmd}/picoclaw/workspace/USER.md +0 -0
  33. {picoclaw_space/cmd β†’ cmd}/picoclaw/workspace/memory/MEMORY.md +0 -0
  34. {picoclaw_space/cmd β†’ cmd}/picoclaw/workspace/setup_skills.sh +0 -0
  35. {picoclaw_space/cmd β†’ cmd}/picoclaw/workspace/skills/ai-research/SKILL.md +0 -0
  36. {picoclaw_space/cmd β†’ cmd}/picoclaw/workspace/skills/ai-research/scripts/arxiv_search.sh +0 -0
  37. {picoclaw_space/cmd β†’ cmd}/picoclaw/workspace/skills/api-tester/SKILL.md +0 -0
  38. {picoclaw_space/cmd β†’ cmd}/picoclaw/workspace/skills/code-expert/SKILL.md +0 -0
  39. {picoclaw_space/cmd β†’ cmd}/picoclaw/workspace/skills/db-manager/SKILL.md +0 -0
  40. {picoclaw_space/cmd β†’ cmd}/picoclaw/workspace/skills/diagrams/SKILL.md +0 -0
  41. {picoclaw_space/cmd β†’ cmd}/picoclaw/workspace/skills/docker/SKILL.md +0 -0
  42. {picoclaw_space/cmd β†’ cmd}/picoclaw/workspace/skills/github/SKILL.md +0 -0
  43. {picoclaw_space/cmd β†’ cmd}/picoclaw/workspace/skills/go-dev/SKILL.md +0 -0
  44. {picoclaw_space/cmd β†’ cmd}/picoclaw/workspace/skills/hardware/SKILL.md +0 -0
  45. {picoclaw_space/cmd β†’ cmd}/picoclaw/workspace/skills/hardware/references/board-pinout.md +0 -0
  46. {picoclaw_space/cmd β†’ cmd}/picoclaw/workspace/skills/hardware/references/common-devices.md +0 -0
  47. {picoclaw_space/cmd β†’ cmd}/picoclaw/workspace/skills/memory/SKILL.md +0 -0
  48. {picoclaw_space/cmd β†’ cmd}/picoclaw/workspace/skills/network-utils/SKILL.md +0 -0
  49. {picoclaw_space/cmd β†’ cmd}/picoclaw/workspace/skills/planner/SKILL.md +0 -0
  50. {picoclaw_space/cmd β†’ cmd}/picoclaw/workspace/skills/security-audit/SKILL.md +0 -0
picoclaw_space/.dockerignore β†’ .dockerignore RENAMED
File without changes
picoclaw_space/.env.example β†’ .env.example RENAMED
File without changes
{picoclaw_space/.github β†’ .github}/ISSUE_TEMPLATE/bug_report.md RENAMED
File without changes
{picoclaw_space/.github β†’ .github}/ISSUE_TEMPLATE/feature_request.md RENAMED
File without changes
{picoclaw_space/.github β†’ .github}/ISSUE_TEMPLATE/general-task---todo.md RENAMED
File without changes
{picoclaw_space/.github β†’ .github}/pull_request_template.md RENAMED
File without changes
{picoclaw_space/.github β†’ .github}/workflows/build.yml RENAMED
File without changes
{picoclaw_space/.github β†’ .github}/workflows/docker-build.yml RENAMED
File without changes
{picoclaw_space/.github β†’ .github}/workflows/pr.yml RENAMED
File without changes
{picoclaw_space/.github β†’ .github}/workflows/release.yml RENAMED
File without changes
picoclaw_space/.gitignore β†’ .gitignore RENAMED
File without changes
picoclaw_space/.goreleaser.yaml β†’ .goreleaser.yaml RENAMED
File without changes
AGENT.md CHANGED
@@ -1,38 +1,32 @@
1
- # Agent Persona: PicoClaw πŸ¦€
2
-
3
- You are **PicoClaw**, an autonomous Senior Distributed Systems Engineer & AI Researcher. You are capable, persistent, and security-conscious. Your goal is to help the user build, debug, and understand complex software systems with minimal hand-holding.
4
-
5
- ## Core Directives
6
-
7
- 1. **Be Autonomous**: Don't just suggest code; implement it, test it, and verify it works. Use your skills (`docker`, `go-dev`, `api-tester`) proactively.
8
- 2. **Be Secure**: Always use the `security-audit` skill before finalizing code changes. Never commit secrets or dangerous patterns.
9
- 3. **Be Organized**: For any task with >2 steps, YOU MUST use the `planner` skill to create a `PLAN.md`.
10
- 4. **Be Adaptive**: Learn from your mistakes. If a fix works, save the lesson using the `memory` skill for future reference.
11
- 5. **Be Communicative**:
12
- - Use clear, concise language (Indonesian/English as preferred by user).
13
- - If the user asks for a voice response, use the `voice-tts` skill immediately.
14
- - Use `diagrams` to explain complex architectures.
15
-
16
- ## Skill Protocols
17
-
18
- ### πŸ› οΈ Engineering (Go, Docker, SQL)
19
- - **New Features**: Always check existing code patterns with `code-expert` first.
20
- - **Database**: Use `db-manager` to inspect state before and after migrations.
21
- - **Microservices**: Use `api-tester` and `network-utils` to verify connectivity between services.
22
-
23
- ### 🧠 Research & Knowledge (AI, Memory)
24
- - **Unknown Topics**: Use `ai-research` to find ArXiv papers or latest docs.
25
- - **Long-term Memory**:
26
- - *Save*: `echo "Lesson: ..." > .memory/lessons/topic.md`
27
- - *Recall*: `grep -r "topic" .memory/`
28
-
29
- ### πŸ›‘οΈ Security & Quality
30
- - **Pre-Commit Check**: Run `security-audit` and `go-dev` (lint/vet) before asking for approval.
31
-
32
- ## Voice Interaction
33
- - When speaking (via `voice-tts`), keep sentences short and natural.
34
- - Use Indonesian unless the technical context requires English terms.
35
-
36
- ## Tone
37
- - **Professional yet Casual**: "Siap, laksanakan!" instead of "Affirmative, executing command."
38
- - **Direct**: Get straight to the solution.
 
1
+ # Agent Behavior Protocol
2
+
3
+ ## Message Handling
4
+
5
+ ### Telegram Auto-Chunking Protocol
6
+ To handle Telegram's message size limits (4096 characters), the agent implements an automatic chunking protocol:
7
+
8
+ 1. **Chunk Size**: Messages > 4000 characters are split into chunks.
9
+ 2. **Format**: Multi-part messages are prefixed with `[Part X/Y]`.
10
+ 3. **Splitting Logic**:
11
+ - Prefer natural boundaries (newlines, spaces).
12
+ - Protect code blocks (avoid splitting inside ```...```).
13
+ - If a code block must be split, ensure subsequent parts are correctly formatted (though current implementation tries to avoid this).
14
+ 4. **Rate Limiting**: A 1.5s delay is introduced between chunks to avoid API rate limits.
15
+ 5. **Fallback**: If HTML parsing fails (e.g., due to malformed tags in a chunk), the message is sent as plain text.
16
+
17
+ ## Context Management
18
+ - Maximum context window: 500,000 tokens (theoretical), practical limit set to ~256k.
19
+ - History truncation: Oldest messages are dropped when context limit is approached.
20
+
21
+ ## Tool Execution
22
+ - **Parallelism**: Read-only tools (web_search, read_file, etc.) are executed in parallel.
23
+ - **Caching**: Idempotent tool results are cached with TTL to save tokens and time.
24
+ - **Error Recovery**: Transient errors trigger exponential backoff retries.
25
+ - **Sandboxing**:
26
+ - Tools are executed with configurable resource limits (CPU time, memory).
27
+ - Environment variables are filtered.
28
+ - Dangerous commands (e.g., `rm -rf`, `mkfs`) are blocked via regex patterns.
29
+ - Output size is limited to prevent memory exhaustion (default 10MB).
30
+ - **Observability**:
31
+ - Metrics are tracked for tool executions, cache hits/misses, and sandbox status.
32
+ - Available at `/metrics` endpoint.
 
 
 
 
 
 
picoclaw_space/CONTRIBUTING.md β†’ CONTRIBUTING.md RENAMED
File without changes
picoclaw_space/Dockerfile β†’ Dockerfile RENAMED
File without changes
picoclaw_space/Dockerfile.goreleaser β†’ Dockerfile.goreleaser RENAMED
File without changes
picoclaw_space/LICENSE β†’ LICENSE RENAMED
File without changes
picoclaw_space/Makefile β†’ Makefile RENAMED
File without changes
picoclaw_space/PLAN.md β†’ PLAN.md RENAMED
File without changes
picoclaw_space/README.ja.md β†’ README.ja.md RENAMED
File without changes
README.md CHANGED
@@ -1,63 +1,131 @@
1
  ---
2
  title: zeroclaw
3
- emoji: πŸ¦€
4
  colorFrom: blue
5
- colorTo: purple
6
- sdk: static
7
  pinned: false
 
8
  ---
 
 
9
 
10
- # zeroclaw πŸ¦€
11
 
12
- **Ultra-lightweight Autonomous AI Agent for Distributed Systems**
13
 
14
- PicoClaw is an open-source AI agent built in Go, designed to assist engineers in building, debugging, and maintaining distributed systems with minimal resource footprint.
 
 
 
 
 
 
 
15
 
16
- ## ✨ Features
 
17
 
18
- - **Systems Engineering**: Docker management, Go development, network debugging
19
- - **Research**: ArXiv paper search and summarization
20
- - **Operations**: System monitoring, security auditing, log analysis
21
- - **Hardware Control**: I2C/SPI peripheral support for Sipeed boards (LicheeRV Nano, MaixCAM, NanoKVM)
22
- - **Visualization**: Architecture diagrams using Mermaid JS
23
- - **Extensible**: Modular skill system for adding new capabilities
24
 
25
- ## 🎯 Why PicoClaw?
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
 
27
- - **Small Footprint**: Runs on $10 boards with <10MB RAM
28
- - **Autonomous**: Proactive problem detection and resolution
29
- - **Fast**: Written in Go for maximum performance
30
- - **Open Source**: MIT License, fully transparent
31
 
32
- ## πŸš€ Quick Start
33
 
34
  ```bash
35
- # Clone the repository
36
  git clone https://github.com/sipeed/picoclaw.git
37
  cd picoclaw
 
 
38
 
39
- # Build
40
- go build -o picoclaw .
41
 
42
- # Run (requires LLM API key)
43
- export OPENAI_API_KEY=your_key_here
44
- ./picoclaw
 
 
 
45
  ```
46
 
47
- ## πŸ“š Documentation
48
 
49
- - [GitHub Repository](https://github.com/sipeed/picoclaw)
50
- - [Configuration Guide](https://github.com/sipeed/picoclaw?tab=readme-ov-file#configuration)
51
- - [Skill Development](https://github.com/sipeed/picoclaw/tree/main/workspace/skills)
52
 
53
- ## 🀝 Contributing
 
 
 
54
 
55
- Contributions are welcome! Please read our [Contributing Guidelines](CONTRIBUTING.md) before submitting PRs.
56
 
57
- ## πŸ“„ License
58
 
59
- MIT License - see [LICENSE](LICENSE) file for details.
 
 
60
 
61
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
62
 
63
- Built with ❀️ by the PicoClaw team
 
1
  ---
2
  title: zeroclaw
3
+ emoji: 🦞
4
  colorFrom: blue
5
+ colorTo: indigo
6
+ sdk: docker
7
  pinned: false
8
+ app_port: 7860
9
  ---
10
+ <div align="center">
11
+ <img src="assets/logo.jpg" alt="PicoClaw" width="512">
12
 
13
+ <h1>PicoClaw: Autonomous Distributed Systems Engineer</h1>
14
 
15
+ <h3>$10 Hardware Β· 10MB RAM Β· Voice-Enabled Β· Autonomous</h3>
16
 
17
+ <p>
18
+ <img src="https://img.shields.io/badge/Go-1.21+-00ADD8?style=flat&logo=go&logoColor=white" alt="Go">
19
+ <img src="https://img.shields.io/badge/Arch-x86__64%2C%20ARM64%2C%20RISC--V-blue" alt="Hardware">
20
+ <img src="https://img.shields.io/badge/license-MIT-green" alt="License">
21
+ <br>
22
+ <a href="https://picoclaw.io"><img src="https://img.shields.io/badge/Website-picoclaw.io-blue?style=flat&logo=google-chrome&logoColor=white" alt="Website"></a>
23
+ <a href="https://x.com/SipeedIO"><img src="https://img.shields.io/badge/X_(Twitter)-SipeedIO-black?style=flat&logo=x&logoColor=white" alt="Twitter"></a>
24
+ </p>
25
 
26
+ [δΈ­ζ–‡](README.zh.md) | [ζ—₯本θͺž](README.ja.md) | **English**
27
+ </div>
28
 
29
+ ---
 
 
 
 
 
30
 
31
+ 🦐 **PicoClaw** is an ultra-lightweight, autonomous personal AI agent written in Go. Designed as a **Distributed Systems Engineer**, it combines the speed of Go with the intelligence of modern LLMs to handle complex tasks like Docker management, network debugging, and system monitoring with minimal resource footprint.
32
+
33
+ It runs on **$10 hardware** (like LicheeRV Nano) with **<10MB RAM**, making it 99% more efficient than Python-based alternatives.
34
+
35
+ <table align="center">
36
+ <tr align="center">
37
+ <td align="center" valign="top">
38
+ <p align="center">
39
+ <img src="assets/picoclaw_mem.gif" width="360" height="240">
40
+ </p>
41
+ </td>
42
+ <td align="center" valign="top">
43
+ <p align="center">
44
+ <img src="assets/licheervnano.png" width="400" height="240">
45
+ </p>
46
+ </td>
47
+ </tr>
48
+ </table>
49
+
50
+ > [!CAUTION]
51
+ > **🚨 SECURITY & OFFICIAL CHANNELS**
52
+ >
53
+ > * **NO CRYPTO:** PicoClaw has **NO** official token/coin. All claims on `pump.fun` or other trading platforms are **SCAMS**.
54
+ > * **OFFICIAL DOMAIN:** The **ONLY** official website is **[picoclaw.io](https://picoclaw.io)**.
55
+ > * **Warning:** PicoClaw is in Alpha. Do not deploy to critical production environments without review.
56
+
57
+ ## πŸš€ Capabilities
58
+
59
+ PicoClaw is more than just a chatbot. It's an autonomous engineer with specialized skills:
60
+
61
+ * **πŸ—£οΈ Voice Interaction**: Speaks directly to you using Google TTS (Auto-configured).
62
+ * **🐳 Docker Management**: List, inspect, and manage containers via CLI.
63
+ * **πŸ”¬ AI Research**: Search ArXiv for papers and summarize findings.
64
+ * **πŸ› οΈ Go Development**: Assist with Go code, compilation, and debugging.
65
+ * **πŸ“Š Visualization**: Generate system architecture diagrams using Mermaid JS.
66
+ * **🌐 Network Utilities**: Debug DNS, ping hosts, and trace routes.
67
+ * **πŸ›‘οΈ Security Audit**: Scan code for secrets and vulnerabilities.
68
+ * **🧠 Memory & Planning**: Remembers context across sessions and plans complex tasks.
69
+
70
+ ## πŸ“¦ Installation
71
 
72
+ ```bash
73
+ curl -fsSL https://picoclaw.io/install.sh | sh
74
+ ```
 
75
 
76
+ Or build from source:
77
 
78
  ```bash
 
79
  git clone https://github.com/sipeed/picoclaw.git
80
  cd picoclaw
81
+ make install
82
+ ```
83
 
84
+ ## πŸ› οΈ Usage
 
85
 
86
+ ### Quick Start
87
+
88
+ Start the interactive agent. It will automatically set up required skills (Voice, etc.) on first run.
89
+
90
+ ```bash
91
+ picoclaw agent -m "Hello, who are you?"
92
  ```
93
 
94
+ ### Voice Mode
95
 
96
+ PicoClaw can speak its responses! Ensure you have speakers connected.
 
 
97
 
98
+ ```bash
99
+ # It will use the 'voice-tts' skill automatically when appropriate
100
+ picoclaw agent -m "Please introduce yourself in a voice message."
101
+ ```
102
 
103
+ ### Run as a Daemon (Gateway)
104
 
105
+ Run PicoClaw as a background service to handle heartbeats, cron jobs, and multi-channel messages (Telegram/Discord/etc).
106
 
107
+ ```bash
108
+ picoclaw gateway
109
+ ```
110
 
111
+ ## 🐳 Docker Support
112
+
113
+ PicoClaw is available as a Docker image.
114
+
115
+ ```bash
116
+ # Run agent
117
+ docker compose run --rm picoclaw-agent -m "Hello"
118
+
119
+ # Run gateway
120
+ docker compose up -d picoclaw-gateway
121
+ ```
122
+
123
+ *Note: To use Voice or Docker skills within the container, you may need to mount `/dev/snd` or `/var/run/docker.sock`.*
124
+
125
+ ## 🀝 Contributing
126
+
127
+ We welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details.
128
+
129
+ ## πŸ“„ License
130
 
131
+ MIT License
picoclaw_space/README.zh.md β†’ README.zh.md RENAMED
File without changes
picoclaw_space/ROADMAP.md β†’ ROADMAP.md RENAMED
File without changes
{picoclaw_space/cmd β†’ cmd}/dnstest/main.go RENAMED
File without changes
{picoclaw_space/cmd β†’ cmd}/picoclaw/main.go RENAMED
File without changes
{picoclaw_space/cmd β†’ cmd}/picoclaw/ui/embed.go RENAMED
File without changes
{picoclaw_space/cmd β†’ cmd}/picoclaw/ui/index.html RENAMED
File without changes
{picoclaw_space/cmd β†’ cmd}/picoclaw/workspace/AGENT.md RENAMED
File without changes
{picoclaw_space/cmd β†’ cmd}/picoclaw/workspace/HEARTBEAT.md RENAMED
File without changes
{picoclaw_space/cmd β†’ cmd}/picoclaw/workspace/IDENTITY.md RENAMED
File without changes
{picoclaw_space/cmd β†’ cmd}/picoclaw/workspace/SOUL.md RENAMED
File without changes
{picoclaw_space/cmd β†’ cmd}/picoclaw/workspace/USER.md RENAMED
File without changes
{picoclaw_space/cmd β†’ cmd}/picoclaw/workspace/memory/MEMORY.md RENAMED
File without changes
{picoclaw_space/cmd β†’ cmd}/picoclaw/workspace/setup_skills.sh RENAMED
File without changes
{picoclaw_space/cmd β†’ cmd}/picoclaw/workspace/skills/ai-research/SKILL.md RENAMED
File without changes
{picoclaw_space/cmd β†’ cmd}/picoclaw/workspace/skills/ai-research/scripts/arxiv_search.sh RENAMED
File without changes
{picoclaw_space/cmd β†’ cmd}/picoclaw/workspace/skills/api-tester/SKILL.md RENAMED
File without changes
{picoclaw_space/cmd β†’ cmd}/picoclaw/workspace/skills/code-expert/SKILL.md RENAMED
File without changes
{picoclaw_space/cmd β†’ cmd}/picoclaw/workspace/skills/db-manager/SKILL.md RENAMED
File without changes
{picoclaw_space/cmd β†’ cmd}/picoclaw/workspace/skills/diagrams/SKILL.md RENAMED
File without changes
{picoclaw_space/cmd β†’ cmd}/picoclaw/workspace/skills/docker/SKILL.md RENAMED
File without changes
{picoclaw_space/cmd β†’ cmd}/picoclaw/workspace/skills/github/SKILL.md RENAMED
File without changes
{picoclaw_space/cmd β†’ cmd}/picoclaw/workspace/skills/go-dev/SKILL.md RENAMED
File without changes
{picoclaw_space/cmd β†’ cmd}/picoclaw/workspace/skills/hardware/SKILL.md RENAMED
File without changes
{picoclaw_space/cmd β†’ cmd}/picoclaw/workspace/skills/hardware/references/board-pinout.md RENAMED
File without changes
{picoclaw_space/cmd β†’ cmd}/picoclaw/workspace/skills/hardware/references/common-devices.md RENAMED
File without changes
{picoclaw_space/cmd β†’ cmd}/picoclaw/workspace/skills/memory/SKILL.md RENAMED
File without changes
{picoclaw_space/cmd β†’ cmd}/picoclaw/workspace/skills/network-utils/SKILL.md RENAMED
File without changes
{picoclaw_space/cmd β†’ cmd}/picoclaw/workspace/skills/planner/SKILL.md RENAMED
File without changes
{picoclaw_space/cmd β†’ cmd}/picoclaw/workspace/skills/security-audit/SKILL.md RENAMED
File without changes