Add Jintel financial intelligence (41 tools, x402 pay-per-query)#318
Open
0xtechdean wants to merge 1 commit into
Open
Add Jintel financial intelligence (41 tools, x402 pay-per-query)#3180xtechdean wants to merge 1 commit into
0xtechdean wants to merge 1 commit into
Conversation
* Add Jintel financial intelligence tools via x402 Integrates the Jintel GraphQL API (https://api.jintel.ai) as 41 native agent tools that pay per-query in USDC on Base. Tool definitions are ported from YojinHQ/yojin's `src/jintel/tools.ts` and adapted to the AutomatonTool shape; payments route through the existing `x402Fetch` path so the treasury policy's `maxX402PaymentCents` cap applies. - src/jintel/client.ts: JintelClient factory using a custom fetch that wraps `x402Fetch` (no parallel x402 path, no x402-fetch dep) - src/jintel/yojin-tools.ts: ported tool definitions, stripped of signal-ingestion and portfolio-snapshot bits unique to upstream - src/jintel/agent-tools.ts: zod -> JSON Schema, ToolResult -> string adapter; per-call client construction so each invocation uses the current automaton's wallet and treasury cap - Tools auto-register via `...createJintelAgentTools()` in `createBuiltinTools`; spend tracking dispatches through `JINTEL_TOOL_NAMES` against `api.jintel.ai` - Solana wallets are blocked at the tool boundary, matching the existing `x402_fetch` guard - Adds a `jintel` SKILL.md to default skills with a tool index so the agent knows when to reach for each one Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * Rename yojin-tools.ts → tool-definitions.ts The file holds the source-of-truth Jintel tool definitions (zod params, upstream shape). Pairing it with `agent-tools.ts` (the AutomatonTool adapter) reads better as `definitions → adapter` rather than naming the file after its origin repo. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
WingedGuardian
added a commit
to WingedGuardian/automaton
that referenced
this pull request
May 30, 2026
… fix (#1) * cherry-pick(0xwork): import Conway-Research#254 from tyxben — agent revenue marketplace Surgically extracted the oxwork-specific additions from PR Conway-Research#254, skipping the bundled harness architecture refactoring. Adds 4 tools (oxwork_browse, oxwork_claim, oxwork_submit, oxwork_status), a 30-min heartbeat scanner, the service_revenue ledger type, and 17 unit tests (17/17 pass). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * cherry-pick(jintel): import Conway-Research#318 from 0xtechdean — 41 x402-paid financial intelligence tools Isolated extraction of the Jintel integration: src/jintel/ directory (7 files), jintel adapter test (8/8 pass), default skill registration, spread into tools array, and spend tracking in executeTool. Adds @yojinhq/jintel-client, zod, zod-to-json-schema deps. All 138 tests pass with zero regressions. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * cherry-pick(orchestration): import Conway-Research#298 from wanikua — deadlock recovery, balance reporting Surgically extracted the orchestration improvements from PR Conway-Research#298, skipping the bundled harness refactoring. Adds: stale task recovery count cap (3 retries before failing), deadlock detection (pending tasks + no workers = fail goal), child agent balance reporting via status_report KV cache, and 44 new tests. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(inference): cascade past 404 model_not_found instead of failing the turn RETRYABLE_STATUS_CODES only covered 429/500/503, so a 404 from a deprecated model (e.g. Cerebras qwen-3-235b) would hard-fail the whole turn with no fallback. Now isRetryableError() returns true for 404 and executeWithRetries immediately cascades to the next provider without wasting the retry budget on a model that will never come back. Regression test verifies the cascade and confirms non-404 errors (400) still hard-fail as before. Fixes Billy's 4-week Cerebras-404 error loop (Conway-Research#266). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Genesis <genesis@wingedguardian.dev> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why this matters for automatons
An automaton's whole survival loop depends on two things: finding work it can do for money and avoiding decisions that would kill its credit balance. Until now the agent has shell, file I/O, web fetch, and x402 — but no structured ground truth about the world it's transacting in.
This PR plugs in Jintel, a unified GraphQL endpoint for financial intelligence, as 41 native agent tools that pay per query in USDC on Base. No API key, no signup, no human onboarding — the agent's existing wallet auto-identifies itself via x402 v2, and the floor is ~$0.015/query. The treasury policy's `maxX402PaymentCents` cap applies to every call, so agents that haven't earned can't accidentally drain themselves.
Concretely, an automaton can now:
The integration pattern itself is the second deliverable: a custom `fetch` impl wrapping `x402Fetch` lets us reuse the existing wallet + treasury cap path instead of bolting on `x402-fetch` as a parallel payment system. The same shape will apply to the next x402-native API the network surfaces.
What's in the box
41 tools covering:
Definitions are ported from YojinHQ/yojin's `src/jintel/tools.ts` and adapted to the `AutomatonTool` shape.
Architecture
Test plan
🤖 Generated with Claude Code