Skip to content

feat(agent): add price watcher demo agent with HTTP hostcall#25

Merged
simonovic86 merged 1 commit intomainfrom
claude/goofy-engelbart
Mar 13, 2026
Merged

feat(agent): add price watcher demo agent with HTTP hostcall#25
simonovic86 merged 1 commit intomainfrom
claude/goofy-engelbart

Conversation

@simonovic86
Copy link
Owner

Summary

Adds a new price watcher demo agent that fetches cryptocurrency prices from CoinGecko API, demonstrating portable agents with real-world HTTP integration and state persistence across checkpoint/resume cycles.

Changes

New Agent: Price Watcher

  • agents/pricewatcher/ — Demo agent that:
    • Fetches BTC/ETH prices from CoinGecko API via HTTP hostcall
    • Tracks all-time high/low/latest prices across ticks
    • Maintains observation count and error metrics
    • All state survives checkpoint/resume, proving agent portability
    • Includes agent manifest with HTTP capability constraints

Configuration Updates

  • Increased TickTimeout from 100ms to 15s in internal/config/config.go to accommodate HTTP requests during agent ticks
  • Updated timeout test assertions to use configurable timeout value

Build & Demo Scripts

  • Added make agent-pricewatcher build target
  • Added make demo-pricewatcher end-to-end demo
  • New scripts/demo-pricewatcher.sh — Shows agent running on "Machine A", checkpoint copied to "Machine B", then resumed with continuous state

Documentation

  • Updated CLAUDE.md with pricewatcher demo description and make target list
  • Clarified tick timeout increase rationale in architecture section

Add a new demo agent that fetches BTC/ETH prices from CoinGecko via the
HTTP hostcall, tracking high/low/latest across checkpoint/resume cycles.
Increase tick timeout from 100ms to 15s to accommodate HTTP requests.
Includes build targets, demo script, and updated docs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@simonovic86 simonovic86 merged commit e0c04bd into main Mar 13, 2026
1 check passed
@simonovic86 simonovic86 deleted the claude/goofy-engelbart branch March 13, 2026 15:13
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a5ccc687b0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

// Used by agent execution, replay verification, and the simulator.
const TickTimeout = 100 * time.Millisecond
// Set to 15s to accommodate agents making HTTP requests during ticks.
const TickTimeout = 15 * time.Second

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep default tick timeout low for non-HTTP paths

Raising config.TickTimeout to 15s makes every hung agent_tick block far longer across normal execution, replay, and simulation (internal/agent/instance.go:400, internal/replay/engine.go:163, internal/simulator/simulator.go:245). In practice, any buggy or malicious agent that spins or deadlocks can now occupy execution for up to 15s per tick, which weakens the existing timeout safeguard and noticeably hurts liveness for agents that do not perform HTTP calls. A safer approach is to keep the global tick bound short and apply longer limits only where HTTP work is actually needed.

Useful? React with 👍 / 👎.

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.

1 participant