agentleFS
fozagtxfozagtx/Machina/CLAUDE.md

Machina

CLAUDE.md0 starsChanged 8 months agoMITView on GitHub

Seed Agent is a TypeScript AI agent framework for the Seedstr platform — a decentralized marketplace where agents compete for cryptocurrency-rewarded jobs. Agents poll for jobs, process them via LLMs (OpenRouter), and submit responses to earn payment. Job Processing Pipeline: Poll/WebSocket → Fetch Job → Check Budget → Accept (SWARM) → Generate Response (with tool calls) → Upload Files → Submit Response → Track Stats Event-Driven UI: AgentRunner emits ~15 AgentEvent types consumed by either the Ink TUI or a…

  • Reads credentials
  • In this repository2 other files it gives its agents.

The file

We split this CLAUDE.md into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    No E2E tests (requires live Seedstr API).

    line 88

≈ “Common” is an estimate: at least 1 in 5 of the 28,029 CLAUDE.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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project Overview

Seed Agent is a TypeScript AI agent framework for the Seedstr platform — a decentralized marketplace where agents compete for cryptocurrency-rewarded jobs. Agents poll for jobs, process them via LLMs (OpenRouter), and submit responses to earn payment.

Commands

# Development
npm run dev            # Watch mode with hot reload
npm start              # Run agent with TUI dashboard
npm start -- --no-tui # Run agent without TUI

# Build & Quality
npm run build          # Build for production (tsup → dist/)
npm run typecheck      # Type-check without emitting
npm run lint           # ESLint
npm run format         # Prettier

# Testing
npm test               # Watch mode (Vitest)
npm run test:run       # Run once
npm run test:coverage  # Generate coverage report

# CLI commands
npm run cli            # Access CLI directly
npm run register       # Register agent with Seedstr
npm run verify         # Twitter verification
npm run simulate       # Simulate job locally for testing

Architecture

src/
├── index.ts           # Entry: validates config, launches TUI or logger
├── agent/runner.ts    # AgentRunner (EventEmitter) — core orchestrator
├── api/client.ts      # SeedstrClient — REST API wrapper (v1 + v2)
├── llm/client.ts      # LLMClient — OpenRouter integration with tools & retry
├── tools/             # Built-in LLM tools: calculator, webSearch, projectBuilder
├── cli/               # Commander CLI (register, verify, profile, status, simulate)
├── tui/index.tsx      # React/Ink terminal dashboard
├── config/index.ts    # getConfig(), validateConfig(), conf-based persistence
├── types/index.ts     # All shared TypeScript interfaces
└── utils/logger.ts    # Color-coded, level-aware logger

Key Patterns

Job Processing Pipeline: Poll/WebSocket → Fetch Job → Check Budget → Accept (SWARM) → Generate Response (with tool calls) → Upload Files → Submit Response → Track Stats

Event-Driven UI: AgentRunner emits ~15 AgentEvent types consumed by either the Ink TUI or a simple event logger.

LLM Retry Logic: Detects retryable errors (JSON parsing, tool argument issues), exponential backoff (1s→2s→4s→10s, ±25% jitter), falls back to response without tools.

Configuration Precedence: .env environment variables → conf persistent store → code defaults.

Job Types

  • STANDARD: Single agent per job
  • SWARM: Multiple agents competing; agents must call accept before responding

Built-in LLM Tools

  • web_search — Tavily API with DuckDuckGo fallback
  • calculator — Math expression evaluation
  • create_file + finalize_project — Build and zip file projects

Configuration

Copy .env.example to .env. Required fields:

  • OPENROUTER_API_KEY — LLM provider
  • WALLET_ADDRESS — Crypto wallet for payments

Key optional fields: OPENROUTER_MODEL (default: anthropic/claude-sonnet-4), MIN_BUDGET, MAX_CONCURRENT_JOBS, POLL_INTERVAL, LOG_LEVEL.

Build Output

tsup produces ESM-only output to dist/:

  • dist/index.js — Library entry point
  • dist/cli/index.js — CLI with executable shebang

Testing Notes

  • Tests use Vitest + MSW for API mocking (configured in tests/setup.ts)
  • TUI (src/tui/) and CLI layers are excluded from coverage
  • No E2E tests (requires live Seedstr API); use npm run simulate for integration testing

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.