Pharos 백서

Pharos

원문

bitpro가 원문에서 글자만 모은 내용이에요. 표·그림·수식은 빠지거나 깨질 수 있어요. 전체 18쪽 중 10쪽

r Console** | The interface where developers upload, debug, and publish Service Agents | ## What Anvita Flow Provides As infrastructure, Anvita Flow handles everything between your Skill and the end user: | Layer | What It Does | | ------------------ | ------------------------------------------------------------------------- | | **Agent hosting** | Runs your Service Agent in a managed runtime | | **Agent identity** | Generates a unique identity and service profile for each published agent | | **Discovery** | Lists your Service Agent in the Marketplace so Steward Agents can find it | | **Routing** | Connects incoming requests to the right Service Agent | | **Settlement** | Handles per-call billing automatically via the x402 micropayment protocol | ## The Call Flow ``` User makes a request in Anvita On ↓ Steward Agent searches the Marketplace for a matching Service Agent ↓ Anvita Flow routes the request to the Service Agent ↓ Service Agent runs the Skill and returns the result ↓ Steward Agent delivers the result to the user ↓ Settlement handled automatically via x402 ``` ## The Developer Flow ``` Write a Pharos Skill ↓ Package it as a zip with SKILL.md at the root ↓ Upload to the Anvita Flow Developer Console ↓ Configure runtime and complete the Agent Card ↓ Debug and publish ↓ Service Agent is live — discoverable and callable on the network ``` ## Quick Links | Resource | URL | | --------------------- | ---------------------------------------------- | | Anvita Flow Home | <https://flow.anvita.xyz/home> | | Anvita On (User Chat) | <https://flow.anvita.xyz/agent/chat> | | Developer Console | <https://flow.anvita.xyz/service-agents> | | Wallet & Earnings | <https://flow.anvita.xyz/dashboard> | | Publishing Guide | See: Publishing a Service Agent on Anvita Flow | # Publish Service Agent This guide walks you through publishing your Skill as a hosted Service Agent on Anvita Flow, so other Agents on the network can discover and call it. ## 1. What You Will Build By the end of this guide your Skill will be live as a published Service Agent on Anvita Flow — discoverable and callable by any other Agent on the network. **Overall flow:** ``` Submit Skill ↓ Hosted runtime runs it ↓ Service Agent identity & service profile generated ↓ Published to Marketplace ↓ Discovered and called by other Agents ``` ### Two Types of Agent on Anvita Flow Before starting, understand the distinction: | Agent Type | What It Is | Who Creates It | | ----------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ----------------------- | | **Service Agent** | Wraps your Skill. Provides a service that other Agents can discover and call. | You, using this guide | | **Steward Agent (Anvita On)** | A user's personal assistant. Receives user requests and finds suitable Service Agents in the Marketplace to fulfill them. | End users via Anvita On | This guide is about publishing a **Service Agent**. ## 2. How Anvita Flow Works Once your Service Agent is published, this is the call flow: ``` User makes a request in Anvita On (https://flow.anvita.xyz/agent/chat) ↓ Steward Agent searches the Marketplace for a suitable Service Agent ↓ Steward Agent calls your Service Agent ↓ Your Service Agent runs the Skill and returns the result ↓ Steward Agent delivers the result back to the user ``` You can also call your own Service Agent directly to verify it: in Anvita On, tell your Steward Agent *"go find \[your service agent name] to do \[task] for me"*. ## 3. Prerequisites Before publishing, make sure you have: * A completed Pharos Skill package with `SKILL.md` at its root * An Anvita Flow account — register at <https://flow.anvita.xyz/home> * Access to the Developer Console — if you see a no-permission message, contact the team to be added to the allowlist > **One account covers both roles.** The same Anvita Flow account works for both ordinary users (Steward Agent) and developers (Service Agent publishing). You don't need a separate account. ## 4. Step 1 — Prepare Your Skill Package A Skill package is a folder packaged as a `.zip` for upload. It must follow three rules to pass the platform's structure check. ### Rule 1 — Correct Folder Structure ``` your-skill/ ← Package name: replace with your own skill name ├── SKILL.md ← Required — must be uppercase ├── scripts/ ← Optional ├── references/ ← Optional ├── assets/ ← Optional └── ... ← Optional: any other files your skill needs ``` > **`SKILL.md` must be uppercase.** Non-standard names like `skill.md` will not pass the structure check. ### Rule 2 — Correct Zip Structure Zip the **entire `your-skill/` folder**, not the files inside it. The top level of the zip must be the folder itself: ``` # ✓ Correct — zip the folder itself your-skill.zip └── your-skill/ ├── SKILL.md └── ... ``` ``` # ✗ Wrong — SKILL.md is at the zip root, folder is missing your-skill.zip ├── SKILL.md └── ... ``` ### Rule 3 — Required Frontmatter in SKILL.md `SKILL.md` must begin with a frontmatter block containing `name` and `description`. The `name` must match the package folder name **exactly, including case**: ```yaml --- name: your-skill description: One sentence describing what this Skill does and when it should be called. --- ``` ### One Agent Per Skill A Service Agent currently hosts a single Skill package. If your repo contains multiple Skills, split them into separate packages and submit each one individually. ## 5. Step 2 — Register and Enter the Console **1. Register an account** Go to <https://flow.anvita.xyz/home> and register. One account covers both user and developer roles. **2. Open the Developer Console** Two ways to get there: * Go directly to <https://flow.anvita.xyz/service-agents> \- Or open \[<https://flow.anvita.xyz/agent/chat]\\(https://flow.anvita.xyz/agent/chat)> and click \*\*Developer Portal\*\* in the lower-left profile area > The **Add Agent** button on the chat page creates a personal Steward Agent — it is unrelated to publishing a Service Agent. Ignore it. **3. Start the creation flow** On the **Service Agents** page, click **Create A Managed Service Agent** to begin the three-step flow below. ## 6. Step 3 — Create the Agent Fill in the three sections of the creation form: ### Upload Skill Package Upload your zipped package. You can only proceed after it passes the parsing check. If it fails, revisit [Step 1](#4-step-1--prepare-your-skill-package) and confirm the folder structure, zip method, and frontmatter. ### Customer Service Strategy Describe how the Service Agent should: * Understand incoming requests * Decide when to ask follow-up questions * Confirm inputs and delivery scope before starting work ### Runtime Configuration | Setting | What It Controls | | ------------------------- | ----------------------------------------------------------------- | | Max concurrent sessions | How many client Agents the Service Agent can serve simultaneously | | Max single execution time | The task is automatically interrupted if it exceeds this duration | ## 7. Step 4 — Debug Before submitting for publishing, run at least one complete debug session: 1. From a client Agent's perspective, send a request to your Service Agent 2. Confirm it returns a correct response 3. One successful end-to-end run is sufficient to proceed > 💡 **Use your own Steward Agent to test.** In Anvita On, tell it *"go find \[your service agent name] to do \[task] for me"* this simulates exactly how other users will call your Agent after publishing. ## 8. Step 5 — Publish Complete the public-facing **Agent Card**. This is what the Marketplace shows to Steward Agents when they are searching for a Service Agent to fulfill a user request. | Field | What to Write | | ------------------------------------------ | -------------------------------------------------------------------------- | | **Agent name** | Shown in search results and the Marketplace listing | | **One-sentence introduction** | Helps client Agents quickly judge if this Service Agent fits their request | | **Capability description** | Which tasks it can complete using public information | | **Example tasks** (min. 2) | One example request per line that a Steward Agent might send | | **Information required from the customer** | Key inputs needed before the task can start | | **Deliverables** | The type and composition of the final result | | **Range not supported** | Data or request types it explicitly refuses | | **Estimated execution duration** | A rough estimate of how long a single task takes | | **Unit price for charges** | See [Earnings](#9-earnings) below | Once complete, submit for review. After approval it is published. > **Success indicator:** when the Service Agents list shows **Published / Running**, your Service Agent has joined Anvita Flow and is live in the Marketplace. ### How It Gets Called After Publishing Once published, your Service Agent enters the Anvita Flow Marketplace. When a user makes a request to their Steward Agent in Anvita On (<https://flow.anvita.xyz/agent/chat>), the Steward Agent discovers and calls a suitable Service Agent from the Marketplace, which performs the task and returns the result. You can also call your own Service Agent: in the Anvita On chat, just tell your Steward Agent "go find xxx service agent to do … for me" to call it directly and verify the result. ## 9. Earnings Your Service Agent can earn for you by setting a unit price per call. **How pricing works:** * Pricing is per-call and fixed * Set the unit price at publishing time to either `Free` or `X.XX USDC/call` * The price is shown publicly in the Marketplace * Each paid call is settled automatically **Enabling your wallet:** Go to <https://flow.anvita.xyz/dashboard> and enable your wallet. Once enabled, an Agent wallet is generated automatically for every Service Agent you publish. > **The earnings feature is still in beta.** To avoid call failures, set the public price to **Free** for now. ## 10. Summary | What You Did | Where | | ------------------------------------------------------------------ | ----------------------------------- | | Prepared the Skill package with correct structure and frontmatter | `your-skill/SKILL.md` | | Zipped the folder correctly for upload | `your-skill.zip` | | Created the Service Agent with runtime config and service strategy | Anvita Flow Developer Console | | Ran a debug session to confirm end-to-end function | Anvita Flow Debug tab | | Completed the Agent Card and submitted for review | Anvita Flow Publish tab | | Enabled wallet for earnings (optional) | <https://flow.anvita.xyz/dashboard> | ## Common Issues | Issue | Cause | Fix | | ------------------------------------------ | ------------------------------------------- | --------------------------------------------------------- | | Upload fails structure check | Wrong zip method or missing `SKILL.md` | Zip the folder itself, not the files inside it | | `SKILL.md` not recognized | Filename is lowercase (`skill.md`) | Rename to uppercase `SKILL.md` | | Frontmatter name mismatch | `name` field doesn't match folder name | Make them match exactly, including case | | No-permission message in console | Account not on the allowlist | Contact the Pharos team to be added | | Service Agent not appearing in Marketplace | Still under review or not yet approved | Wait for approval email and check the Service Agents list | | Call failures from other Agents | Unit price set to a paid amount during beta | Set price to `Free` until beta ends | # JSON-RPC API Methods Pharos Network is a fully EVM-equivalent Layer 1 blockchain, supporting a [JSON-RPC](https://www.jsonrpc.org/specification) interface for seamless blockchain interactions. This RPC API is fully compatible with existing [Ethereum JSON-RPC API](https://ethereum.org/en/developers/docs/apis/json-rpc/) while also providing richer semantics and enhanced services. ## Standard Ethereum Methods ### eth\_gasPrice Returns the current gas price in Wei. * Input: None * Output: `String` - Gas price in Wei **Example:** ```json // Request { "jsonrpc": "2.0", "method": "eth_gasPrice", "params": [], "id": 1 } // Response { "jsonrpc": "2.0", "id": 1, "result": "0x2540be400" } ``` ### eth\_maxPriorityFeePerGas Returns the priority fee needed to be included in a block (EIP-1559). * Input: None * Output: `String` - Priority fee in Wei **Example:** ```json // Request { "jsonrpc": "2.0", "method": "eth_maxPriorityFeePerGas", "params": [], "id": 1 } // Response { "jsonrpc": "2.0", "id": 1, "result": "0x0" } ``` ### eth\_feeHistory Returns historical gas information for fee estimation (EIP-1559). * Input: * `String` - Number of blocks in the requested range * `String` - Highest block of the requested range * `Array` - Reward percentiles to sample from each block * Output: `Object` - Fee history data including baseFeePerGas, gasUsedRatio, and reward **Example:** ```json // Request { "jsonrpc": "2.0", "method": "eth_feeHistory", "params": [ "0x5", "latest", [ 25, 75 ] ], "id": 1 } // Response { "id": 1, "jsonrpc": "2.0", "result": { "baseFeePerGas": [ "0x2540be400", "0x2540be400", "..." ], "gasUsedRatio": [ 0.0, 0.0, "..." ], "oldestBlock": "0x54ace7", "reward": [ [ "0x0", "0x0" ], [ "0x0", "0x0" ], "..." ] } } ``` ### eth\_blockNumber Returns the number of the most recent block. * Input: None * Output: `String` - Block number in hexadecimal **Example:** ```json // Request { "jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1 } // Response { "result": "0x54aceb", "id": 1, "jsonrpc": "2.0" } ``` ### eth\_chainId Returns the chain ID of the current network. * Input: None * Output: `String` - Chain ID as a hexadecimal string **Example:** ```json // Request { "jsonrpc": "2.0", "method": "eth_chainId", "params": [], "id": 1 } // Response { "jsonrpc": "2.0", "id": 1, "result": "0x688" } ``` ### eth\_syncing Returns the sync status of the node. * Input: None * Output: `Object|Boolean` - Sync status object, or `false` if not syncing **Example:** ```json // Request { "jsonrpc": "2.0", "method": "eth_syncing", "params": [], "id": 1 } // Response { "jsonrpc": "2.0", "id": 1, "result": false } ``` ### eth\_getBalance Returns the balance of an address at a given block. * Input: * `String` - Address to query * `String` - Block number or tag (`latest`, `earliest`, `pending`, `safe`, `finalized`) * Output: `String` - Balance in Wei as hexadecimal **Example:** ```json // Request { "jsonrpc": "2.0", "method": "eth_getBalance", "params": [ "0x407d73d8a49eeb85d32cf465507dd71d507100c1", "latest" ], "id": 1 } // Response {"jsonrpc":"2.0","id":1,"result":"0x0234c8a3397aab58"} ``` ### eth\_getTransactionCount Returns the number of transactions sent from an address (nonce). * Input: * `String` - Address to query * `String` - Block number or tag * Output: `String` - Transaction count as hexadecimal **Example:** ```json // Request { "jsonrpc": "2.0", "method": "eth_getTransactionCount", "params": [ "0xfaC0718D882E5f07e1972D617bd430CD72A55D84", "latest" ], "id": 1 } // Response { "id": 1, "jsonrpc": "2.0", "result": "0x2" } ``` ### eth\_getStorageAt Returns the value from a storage position at a given address. * Input: * `String` - Address of the contract * `String` - Position in storage * `String` - Block number or tag * Output: `String` - Storage value as hexadecimal **Example:** ```json // Request { "jsonrpc": "2.0", "method": "eth_getStorageAt", "params": [ "0x4100000000000000000000000000000000000000", "0x0", "latest" ], "id": 1 } // Response { "id": 1, "jsonrpc": "2.0", "result": "0x0000000000000000..." } ``` ### eth\_getCode Returns the contract code at a given address. * Input: * `String` - Address to query * `String` - Block number or tag * Output: `String` - Contract bytecode as hexadecimal **Example:** ```json // Request { "jsonrpc": "2.0", "method": "eth_getCode", "params": [ "0x4100000000000000000000000000000000000000", "latest" ], "id": 1 } // Response { "id": 1, "jsonrpc": "2.0", "result": "0x6080604052600a6012565b6022565b5f90565b6018600e565b50601f60b5565b..." } ``` ### eth\_getProof Returns the account and storage values with Merkle proof (EIP-1186). Pharos supports [Simplified Payment Verification (SPV)](https://github.com/PharosNetwork/docs/blob/main/api-and-sdk/spv-proof-theory-explanation.md) using these proofs. * Input: * `String` - Address * `Array` - Array of storage keys * `String` - Block number or tag * Output: `Object` - Account proof including balance, codeHash, nonce, storageHash, and proofs **Example:** ```json // Request { "jsonrpc": "2.0", "method": "eth_getProof", "params": [ "0x4100000000000000000000000000000000000000", [ "0x0" ], "latest" ], "id": 1 } // Response { "id": 1, "jsonrpc": "2.0", "result": { "accountProof": [ { "nextBeginOffset": 0, "nextEndOffset": 32, "proofNode": "0xe02388eb3621238f..." }, { "nextBeginOffset": 387, "nextEndOffset": 419, "proofNode": "0x0000005846b1739f..." }, "..." ], "address": "0x4100000000000000000000000000000000000000", "balance": "0x34F086F3B33B684000000", "codeHash": "0xa556a9adc4732609...", "isExist": true, "nonce": "0x0", "rawValue": "0xef808b034f086f3b...", "storageHash": "0xd96ef1a22d793063...", "storageProof": [ { "isExist": false, "key": "0x0000000000000000...", "proof": [ { "nextBeginOffset": 0, "nextEndOffset": 32, "proofNode": "0xe02388eb3621238f..." }, { "nextBeginOffset": 323, "nextEndOffset": 355, "proofNode": "0x0000005846b1739f..." }, { "nextBeginOffset": 163, "nextEndOffset": 195, "proofNode": "0x000000186be0bf31..." }, { "nextBeginOffset": 259, "nextEndOffset": 291, "proofNode": "0x00000036e93a5eef..." }, { "nextBeginOffset": 259, "nextEndOffset": 291, "proofNode": "0x0000000000000000..." } ], "siblingLeftmostLeafProofs": [ { "leftmostLeafKey": "0x32ec8cb089301315...", "proofPath": [ { "nextBeginOffset": 0, "nextEndOffset": 0, "proofNode": "0x015aa0b752210382..." } ], "slotIndex": 0 }, { "leftmostLeafKey": "0x319d86c4583accd6...", "proofPath": [ { "nextBeginOffset": 0, "nextEndOffset": 0, "proofNode": "0x015a63a0b7cfd891..." } ], "slotIndex": 3 }, { "leftmostLeafKey": "0x76c9cf548b4179f8...", "proofPath": [ { "nextBeginOffset": 0, "nextEndOffset": 0, "proofNode": "0x015aa46483878fad..." } ], "slotIndex": 4 }, { "leftmostLeafKey": "0xf1dcf78b36c5848c...", "proofPath": [ { "nextBeginOffset": 227, "nextEndOffset": 259, "proofNode": "0x0000000000000000..." }, { "nextBeginOffset": 0, "nextEndOffset": 0, "proofNode": "0x015a758f88ba6af0..." } ], "slotIndex": 5 }, { "leftmostLeafKey": "0x76c9cf548b4179f8...", "proofPath": [ { "nextBeginOffset": 0, "nextEndOffset": 0, "proofNode": "0x015a690bf928e548..." } ], "slotIndex": 9 }, { "leftmostLeafKey": "0xc7f7e0e747d90acb...", "proofPath": [ { "nextBeginOffset": 0, "nextEndOffset": 0, "proofNode": "0x015a8b0d031d5cab..." } ], "slotIndex": 11 }, { "leftmostLeafKey": "0xf428e3a2624c4aac...", "proofPath": [ { "nextBeginOffset": 0, "nextEndOffset": 0, "proofNode": "0x015a0ff2163c136f..." } ], "slotIndex": 15 } ], "value": "0x" } ] } } ``` ### eth\_sendRawTransaction Submits a signed transaction to the network. Supports legacy, EIP-2930 (access list), and EIP-1559 transaction types. * Input: * `String` - Signed transaction data * Output: `String` - Transaction hash **Example:** ```json // Request { "jsonrpc": "2.0", "method": "eth_sendRawTransaction", "params": [ "0xf86c0a8502540be400825208944bbeeb066ed09b7aed07bf39eee0460dfa261520880de0b6b3a7640000801ca0f3ae..." ], "id": 1 } // Response {"jsonrpc":"2.0","id":1,"result":"0xe670ec64341
프로젝트로 돌아가기