meepo
AGENTS.md4 starsChanged 9 months agoMITView on GitHub
Instructions for AI coding agents (Windsurf Cascade, Claude Code, Cursor, Copilot, etc.) working on this codebase. Always run cargo check after edits to catch compile errors early. Meepo is a local AI agent (Rust, macOS/Windows) that connects Claude to your digital life via Discord, Slack, iMessage, email, and more. It runs as a daemon with an autonomous observe/think/act loop, 75+ tools, MCP/A2A protocol support, and a persistent knowledge graph. Workspace: 7 crates in crates/ — see Cargo.toml for the full…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,700 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository2 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- .github/workflows/CLAUDE.mdCLAUDE.md
The file
We split this AGENTS.md into the rules it gives an agent
9 rules. About 0 are common, 3 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 13
Always run cargo check after edits to catch compile errors early.
- Distinctive: line 91
Test schemas, required fields, error cases, basic execution
- Very specific: line 105
Add config struct in crates/meepo-cli/src/config.rs
- Very specific: line 110
Add field with #[serde(default = "default_fn")] in config.rs
- Distinctive: line 111
Write the default function
- Very specific: line 116
Add #[allow(dead_code)] — remove unused code instead
- Very specific: line 117
Use unwrap() outside tests — use ?
- Distinctive: line 118
Import in the middle of a file — imports go at the top
- Very specific: line 119
Create files outside crates/, config/, scripts/, docs/ without asking
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Meepo — Agent Guidelines
Instructions for AI coding agents (Windsurf Cascade, Claude Code, Cursor, Copilot, etc.) working on this codebase.
Build & Verify
cargo build # Must pass before committing
cargo test --workspace # 167+ tests across 5 crates
cargo clippy --workspace # No warnings allowedAlways run cargo check after edits to catch compile errors early.
Project Overview
Meepo is a local AI agent (Rust, macOS/Windows) that connects Claude to your digital life via Discord, Slack, iMessage, email, and more. It runs as a daemon with an autonomous observe/think/act loop, 75+ tools, MCP/A2A protocol support, and a persistent knowledge graph.
Workspace: 7 crates in crates/ — see Cargo.toml for the full list.
| Crate | Role |
meepo-cli | Binary, CLI commands, daemon startup, config, templates |
meepo-core | Agent loop, API client, tools, orchestrator, autonomy, platform abstraction |
meepo-channels | Message bus + channel adapters (Discord, Slack, iMessage, email, Alexa, etc.) |
meepo-knowledge | SQLite + Tantivy knowledge graph |
meepo-scheduler | Watcher runner and persistence |
meepo-mcp | MCP server/client (STDIO JSON-RPC) |
meepo-a2a | A2A protocol server/client (HTTP) |
Key Files
crates/meepo-cli/src/main.rs— Daemon startup, tool registration, event loop (~3000 lines). Tools are registered in bothcmd_start()andcmd_mcp_server().crates/meepo-cli/src/config.rs— All config structs, env var expansion, TOML loading.crates/meepo-core/src/tools/mod.rs—ToolHandlertrait,ToolRegistry,json_schema()helper.crates/meepo-core/src/platform/mod.rs— OS abstraction traits and factory functions.crates/meepo-core/src/autonomy/mod.rs—AutonomousLoop(observe/think/act cycle).config/default.toml— Default config template with extensive comments.
Conventions
Rust
- Edition: 2024 — use
letchains,if letchains - Errors:
anyhow::Resultin application code,thiserrorfor library types - Logging:
tracingmacros (debug!,info!,warn!,error!) — neverprintln!in library code - Async:
tokioruntime,async_traitfor trait methods - Config:
serdewith#[serde(default = "fn_name")]for optional fields
Tool Pattern
pub struct MyTool { /* dependencies */ }
impl MyTool {
pub fn new(/* deps */) -> Self { Self { /* ... */ } }
}
#[async_trait]
impl ToolHandler for MyTool {
fn name(&self) -> &str { "my_tool" }
fn description(&self) -> &str { "What this tool does" }
fn input_schema(&self) -> Value {
json_schema(
serde_json::json!({
"param": { "type": "string", "description": "..." }
}),
vec!["param"],
)
}
async fn execute(&self, input: Value) -> Result<String> {
let param = input.get("param").and_then(|v| v.as_str())
.ok_or_else(|| anyhow::anyhow!("Missing 'param'"))?;
// validate inputs, do work, return string result
Ok("result".to_string())
}
}Security Rules
- No hardcoded secrets — use
${ENV_VAR}in config, customDebugimpls for secret-holding structs - Validate all inputs — string lengths, path traversal, branch name characters, command injection
- Timeout external commands —
tokio::time::timeout()(30-300s) - Sandbox file access — validate against
allowed_directoriesconfig
Platform Code
- OS-specific code behind traits in
meepo-core::platform - Gate with
#[cfg(target_os = "macos")]/#[cfg(target_os = "windows")] - Factory functions return
Box<dyn Trait>
Testing
- Tests in same file:
#[cfg(test)] mod tests { ... } - Test schemas, required fields, error cases, basic execution
#[tokio::test]for async tests- Temp dirs for database tests
Common Workflows
Add a tool
- Implement
ToolHandlerincrates/meepo-core/src/tools/ - Register in
main.rs→cmd_start()andcmd_mcp_server() - Add tests
- Run
cargo test -p meepo-core
Add a channel adapter
- Implement
MessageChannelincrates/meepo-channels/src/ - Add config struct in
crates/meepo-cli/src/config.rs - Register in
main.rs→cmd_start() - Add to
config/default.toml
Add a config option
- Add field with
#[serde(default = "default_fn")]inconfig.rs - Write the default function
- Document in
config/default.toml
Do NOT
- Add
#[allow(dead_code)]— remove unused code instead - Use
unwrap()outside tests — use?or.ok_or_else() - Import in the middle of a file — imports go at the top
- Create files outside
crates/,config/,scripts/,docs/without asking - Modify
Cargo.lockdirectly — let Cargo manage it
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

