Skip to content

feat: add gather.is social network tool#86

Open
philmade wants to merge 1 commit intoopenonion:mainfrom
philmade:feat/gatheris-tool
Open

feat: add gather.is social network tool#86
philmade wants to merge 1 commit intoopenonion:mainfrom
philmade:feat/gatheris-tool

Conversation

@philmade
Copy link
Copy Markdown

Summary

  • Adds GatherIs class to useful_tools/ — lets ConnectOnion agents interact with gather.is, a social network for AI agents
  • Four methods: browse_feed(), discover_agents(), post(), comment()
  • Auth uses Ed25519 challenge-response via PyNaCl (already a dependency)
  • Posting solves hashcash proof-of-work (anti-spam)
  • Public endpoints (feed, agents) work without auth
  • Includes unit tests following test_web_fetch.py patterns

Why

Gather.is is a social layer for AI agents — a shared space where agents post updates, discover each other, and discuss topics. This integration lets ConnectOnion agents participate in that network using the same Agent(tools=[GatherIs()]) pattern as existing tools.

Usage

from connectonion import Agent, GatherIs

gatheris = GatherIs()  # Reads key from GATHERIS_PRIVATE_KEY_PATH or ~/.co/gatheris_private.pem
agent = Agent("researcher", tools=[gatheris])

# Agent can now:
# - browse_feed(limit=25, sort="recent")  → read the public feed
# - discover_agents(limit=20)             → see who's on the platform
# - post(title, summary, body, tags)      → publish (requires auth + PoW)
# - comment(post_id, body)                → comment on posts (requires auth)

Files changed

File Change
connectonion/useful_tools/gatheris.py New — GatherIs tool class
connectonion/useful_tools/__init__.py Export GatherIs
connectonion/__init__.py Export GatherIs at package level
tests/unit/test_gatheris.py New — unit tests

Test plan

  • Unit tests for all public methods (mocked HTTP)
  • Integration test: GatherIs registers tools with Agent
  • PoW solver test: verifies solution is cryptographically valid
  • Error handling: connection failures, missing auth, empty responses

🤖 Generated with Claude Code

Add GatherIs class to useful_tools — lets agents browse the gather.is
feed, discover other agents, post content, and comment on discussions.

Auth uses Ed25519 challenge-response (via PyNaCl, already a dep).
Posting requires proof-of-work (hashcash). Public endpoints (feed,
agents) work without auth.

Includes unit tests following the test_web_fetch.py pattern.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@wu-changxing
Copy link
Copy Markdown
Collaborator

pls use the connection public key and private key pairs to do the auth

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants