Open
Conversation
- agentflow Python package: types, exceptions, voucher signing, AgentflowClient - Voucher CBOR encoding matches TypeScript implementation byte-for-byte - Simulation mode for demo without live ICP canister - FastMCP server exposing 7 tools: setup_identity, call_canister, request_session_intent, open_session, session_call, close_session, get_session_status, approve_icrc2 (stub) - end-to-end demo script (examples/demo.py) - pip install -e python/ then agentflow-mcp to run Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…content tool - Rename package agentflow → ic402, env vars AGENTFLOW_* → IC402_* - Add content delivery types: ContentRef, AccessGrant, DeliveryMethod, ContentDelivery, ContentEntry (mirrors new src/ic402/Types.mo) - Add fetch_content MCP tool supporting inline, httpUrl, assetCanister, and canisterQuery delivery methods (matches integration/mcp fetch_content) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Exposes ic402 payment tools via Gradio's MCP interface.
Tools: setup_identity, request_session_intent, open_session,
session_query, close_session, get_sessions, fetch_content.
Connect to Claude Desktop:
{ "mcpServers": { "ic402": { "url": "http://localhost:7860/gradio_api/mcp/sse" } } }
Run: python python/gradio_mcp.py --simulation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ister calls
- icp.yaml: fix init_args syntax for icp-cli v0.2.1 (path object form)
- main.mo: swap mainnet ckUSDC address for local ledger canister ID so
openSession / getContent work against the local replica
- gradio_mcp.py: pin server_port=7861, fix MCP endpoint URL in docs
- client.py: multiple ic-py compatibility fixes:
· Replace removed BasicIdentity with Identity(privkey=hex, type='ed25519')
· update_raw now returns pre-decoded list — remove stale decode() call
· Add _remap_fields() to translate hashed Candid field IDs (_1234) back
to human-readable names (network, token, suggestedDeposit, etc.)
· Add _candid_open_session() — typed Record encoding for SessionConfig
and PaymentSignature (ic-py encode requires explicit type objects)
· Add _candid_session_query() — typed Voucher record + Text encoding
· Add _candid_text_call() — single Text arg helper used by endSession
· Use [] instead of None for Opt null values in ic-py record encoding
All five MCP tools verified live against local ICP replica:
setup_identity → request_session_intent → open_session →
session_query (×N, voucher-signed) → get_sessions ✓
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Covers installation, quickstart, full API reference for AgentflowClient and SessionHandle, all types and exceptions, MCP server setup (FastMCP + Gradio), Claude Desktop integration, voucher crypto, simulation mode, and known limitations. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
6 sections: identity setup, charge flow (402), budget guard, voucher signing (CBOR + Ed25519 verification), session flow (escrow + 5 streaming vouchers + receipt), content delivery types. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Tabs: charge flow (402 + budget guard), voucher signing (Ed25519 + CBOR verification), session flow (open/query/close with live balance meter), activity log. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Tabs were hidden when identity wasn't configured because st.stop() prevented further rendering. Now shows an info message only, keeping all four demo tabs accessible at all times. Co-Authored-By: Claude Sonnet 4.6 <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.
No description provided.