agentleFS
RightNow-AIRightNow-AI/openfang/CLAUDE.md

openfang

CLAUDE.md18k starsChanged 9 months agoApache-2.0View on GitHub

The daemon command is start (not daemon).

  • Reads credentials
  • Sends data out

Trending

Less talk lately.about the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 2 mentionsMar 2026: 40 mentionsApr 2026: 7 mentionsMay 2026: 2 mentionsJun 2026: 3 mentionsJul 2026: 1 mentionAug 2026: 0 mentionsSep 2026: 1 mentionOct 2026: 2 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the RightNow-AI/openfang repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about RightNow-AI/openfang

The biggest 5 of 58 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 58

Talked about on GitHub, Bluesky and Hacker News (58 times).

On GitHub · 50

45 more on GitHub

On Bluesky · 7

2 more on Bluesky

On Hacker News · 1

  • In this repositoryOne other file it gives its agents.

The file

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

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    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. Distinctive:

    After every feature implementation, run ALL THREE checks:

    line 10
  2. Very specific:

    After an LLM call, verify that any metering/cost/usage tracking updated:

    line 74

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

OpenFang — Agent Instructions

Project Overview

OpenFang is an open-source Agent Operating System written in Rust (14 crates).

  • Config: ~/.openfang/config.toml
  • Default API: http://127.0.0.1:4200
  • CLI binary: target/release/openfang.exe (or target/debug/openfang.exe)

Build & Verify Workflow

After every feature implementation, run ALL THREE checks:

cargo build --workspace --lib          # Must compile (use --lib if exe is locked)
cargo test --workspace                 # All tests must pass (currently 1744+)
cargo clippy --workspace --all-targets -- -D warnings  # Zero warnings

MANDATORY: Live Integration Testing

After implementing any new endpoint, feature, or wiring change, you MUST run live integration tests. Unit tests alone are not enough — they can pass while the feature is actually dead code. Live tests catch:

  • Missing route registrations in server.rs
  • Config fields not being deserialized from TOML
  • Type mismatches between kernel and API layers
  • Endpoints that compile but return wrong/empty data

How to Run Live Integration Tests

Step 1: Stop any running daemon

tasklist | grep -i openfang
taskkill //PID <pid> //F
# Wait 2-3 seconds for port to release
sleep 3

Step 2: Build fresh release binary

cargo build --release -p openfang-cli

Step 3: Start daemon with required API keys

GROQ_API_KEY=<key> target/release/openfang.exe start &
sleep 6  # Wait for full boot
curl -s http://127.0.0.1:4200/api/health  # Verify it's up

The daemon command is start (not daemon).

Step 4: Test every new endpoint

# GET endpoints — verify they return real data, not empty/null
curl -s http://127.0.0.1:4200/api/<new-endpoint>

# POST/PUT endpoints — send real payloads
curl -s -X POST http://127.0.0.1:4200/api/<endpoint> \
  -H "Content-Type: application/json" \
  -d '{"field": "value"}'

# Verify write endpoints persist — read back after writing
curl -s -X PUT http://127.0.0.1:4200/api/<endpoint> -d '...'
curl -s http://127.0.0.1:4200/api/<endpoint>  # Should reflect the update

Step 5: Test real LLM integration

# Get an agent ID
curl -s http://127.0.0.1:4200/api/agents | python3 -c "import sys,json; print(json.load(sys.stdin)[0]['id'])"

# Send a real message (triggers actual LLM call to Groq/OpenAI)
curl -s -X POST "http://127.0.0.1:4200/api/agents/<id>/message" \
  -H "Content-Type: application/json" \
  -d '{"message": "Say hello in 5 words."}'

Step 6: Verify side effects

After an LLM call, verify that any metering/cost/usage tracking updated:

curl -s http://127.0.0.1:4200/api/budget       # Cost should have increased
curl -s http://127.0.0.1:4200/api/budget/agents  # Per-agent spend should show

Step 7: Verify dashboard HTML

# Check that new UI components exist in the served HTML
curl -s http://127.0.0.1:4200/ | grep -c "newComponentName"
# Should return > 0

Step 8: Cleanup

tasklist | grep -i openfang
taskkill //PID <pid> //F

Key API Endpoints for Testing

EndpointMethodPurpose
/api/healthGETBasic health check
/api/agentsGETList all agents
/api/agents/{id}/messagePOSTSend message (triggers LLM)
/api/budgetGET/PUTGlobal budget status/update
/api/budget/agentsGETPer-agent cost ranking
/api/budget/agents/{id}GETSingle agent budget detail
/api/network/statusGETOFP network status
/api/peersGETConnected OFP peers
/api/a2a/agentsGETExternal A2A agents
/api/a2a/discoverPOSTDiscover A2A agent at URL
/api/a2a/sendPOSTSend task to external A2A agent
/api/a2a/tasks/{id}/statusGETCheck external A2A task status

Architecture Notes

  • Don't touch openfang-cli — user is actively building the interactive CLI
  • KernelHandle trait avoids circular deps between runtime and kernel
  • AppState in server.rs bridges kernel to API routes
  • New routes must be registered in server.rs router AND implemented in routes.rs
  • Dashboard is Alpine.js SPA in static/index_body.html — new tabs need both HTML and JS data/methods
  • Config fields need: struct field + #[serde(default)] + Default impl entry + Serialize/Deserialize derives

Common Gotchas

  • openfang.exe may be locked if daemon is running — use --lib flag or kill daemon first
  • PeerRegistry is Option<PeerRegistry> on kernel but Option<Arc<PeerRegistry>> on AppState — wrap with .as_ref().map(|r| Arc::new(r.clone()))
  • Config fields added to KernelConfig struct MUST also be added to the Default impl or build fails
  • AgentLoopResult field is .response not .response_text
  • CLI command to start daemon is start not daemon
  • On Windows: use taskkill //PID <pid> //F (double slashes in MSYS2/Git Bash)

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.