Sol.College

Structure lesson (licence does not allow quoting code)

agent-guild

Swarm Core — Open-source AI agent fleet orchestration platform. Deploy, manage, and scale autonomous AI agents. Extend with paid mods from the Swarm marketplace.

Original
SwarmProtocol-fun/agent-guild
SuperStack fork
Blockchains/agent-guild @ a01263e
Stars
0
Last push (original)
2026-10-21
Languages
TypeScript, JavaScript, CSS, Python, Rust, Solidity
Detected stack
AnchorMetaplexNext.jsweb3.js
Categories
AI & Agents
Licence
NOASSERTION: code not quoted on Sol.College
Homepage
https://swarm-open-source.vercel.app

Architecture

1209 source files. By extension: .ts ×834, .tsx ×328, .js ×21, .py ×13, .rs ×7, .sol ×6.

Top-level directorySource files
AgentGuildApp1189
solana-program9
contracts9
GatewayAgent1
hub1

On-chain programs: solana-program/programs/agent_guild

How it works: instructions and accounts

Each instruction handler and the accounts struct it validates, found by reading the Rust source. Links go to the exact line at the pinned commit.

InstructionAccountsSource
initializeInitializesolana-program/programs/agent_guild/src/lib.rs:29
update_skillsUpdateSkillssolana-program/programs/agent_guild/src/lib.rs:54
deactivate_agentDeactivateAgentsolana-program/programs/agent_guild/src/lib.rs:58
update_creditUpdateCreditsolana-program/programs/agent_guild/src/lib.rs:62
expire_taskExpireTasksolana-program/programs/agent_guild/src/lib.rs:79
claim_taskClaimTasksolana-program/programs/agent_guild/src/lib.rs:83
submit_deliverySubmitDeliverysolana-program/programs/agent_guild/src/lib.rs:87
approve_deliveryApproveDeliverysolana-program/programs/agent_guild/src/lib.rs:91
dispute_deliveryDisputeDeliverysolana-program/programs/agent_guild/src/lib.rs:95
resolve_disputeResolveDisputesolana-program/programs/agent_guild/src/lib.rs:99
resolve_penalty_proposalResolvePenaltyProposalsolana-program/programs/agent_guild/src/lib.rs:114
initialize_treasuryInitializeTreasurysolana-program/programs/agent_guild/src/lib.rs:120
set_agent_addressSetAgentAddresssolana-program/programs/agent_guild/src/lib.rs:124
deposit_revenueDepositRevenuesolana-program/programs/agent_guild/src/lib.rs:128
withdrawWithdrawTreasurysolana-program/programs/agent_guild/src/lib.rs:132
initializeInitializesolana-program/programs/agent_guild/src/registry.rs:54
update_skillsUpdateSkillssolana-program/programs/agent_guild/src/registry.rs:199
deactivate_agentDeactivateAgentsolana-program/programs/agent_guild/src/registry.rs:231
update_creditUpdateCreditsolana-program/programs/agent_guild/src/registry.rs:253
expire_taskExpireTasksolana-program/programs/agent_guild/src/task_board.rs:106
claim_taskClaimTasksolana-program/programs/agent_guild/src/task_board.rs:135
submit_deliverySubmitDeliverysolana-program/programs/agent_guild/src/task_board.rs:163
approve_deliveryApproveDeliverysolana-program/programs/agent_guild/src/task_board.rs:188
dispute_deliveryDisputeDeliverysolana-program/programs/agent_guild/src/task_board.rs:213
resolve_disputeResolveDisputesolana-program/programs/agent_guild/src/task_board.rs:243
resolve_penalty_proposalResolvePenaltyProposalsolana-program/programs/agent_guild/src/governance.rs:76
initialize_treasuryInitializeTreasurysolana-program/programs/agent_guild/src/treasury.rs:34
set_agent_addressSetAgentAddresssolana-program/programs/agent_guild/src/treasury.rs:60
deposit_revenueDepositRevenuesolana-program/programs/agent_guild/src/treasury.rs:76
withdrawWithdrawTreasurysolana-program/programs/agent_guild/src/treasury.rs:135

Where the Solana code lives

Source files that import a Solana SDK, ranked by how many Solana APIs they use, with the APIs each one calls. Read them in this order to see how the app talks to the chain.

FileSolana APIs used
AgentGuildApp/src/lib/solana/client.tsPublicKey, Connection, Program, findProgramAddressSync, AnchorProvider, Transaction
solana-program/tests/agent_guild.tsPublicKey, findProgramAddressSync, Keypair, SystemProgram, getBalance, Program
AgentGuildApp/mods/solana-settlement/devtools.tsPublicKey, Connection, seeds, Program, findProgramAddressSync, getAccountInfo
AgentGuildApp/mods/solana-settlement/txbuilder.tsPublicKey, Keypair, transfer, Connection, ComputeBudgetProgram, VersionedTransaction
AgentGuildApp/src/lib/lending/agent-wallet-send.tstransfer, PublicKey, Connection, getAssociatedTokenAddressSync, SystemProgram, Transaction
AgentGuildApp/mods/solana-settlement/inspect-tools.tsxProgram, seeds, requestAirdrop, PublicKey, Transaction, getLatestBlockhash
AgentGuildApp/mods/solana-settlement/agent.tsPublicKey, Connection, SystemProgram, Transaction, sendAndConfirmTransaction, Keypair
AgentGuildApp/src/lib/solana/platform.tsPublicKey, Keypair, VersionedTransaction, Transaction, createMint, mintTo
AgentGuildApp/src/lib/mods/__tests__/solana-chainchecks.test.tsKeypair, PublicKey, transfer, SystemProgram, TransactionMessage, VersionedTransaction
AgentGuildApp/mods/solana-settlement/server.tstransfer, PublicKey, seeds, getBalance, Connection
AgentGuildApp/src/lib/mods/__tests__/solana-devtools.test.tsPublicKey, seeds, getBalance, findProgramAddressSync, Program
AgentGuildApp/mods/solana-settlement/chainchecks.tstransfer, PublicKey, Connection, VersionedTransaction, Program, Transaction

Dapp: devnet deploy pending

⏳ Devnet deploy pending — goes live when the devnet wallet is topped up. This fork's own dapp is not deployed yet, so there is no program address or transaction to show. It is queued in dapp-queue.txt; once devnet SOL is available it is deployed, exercised with real devnet transactions, and this section switches to the live dapp at /dapps/agent-guild/. Until then, the lesson and step-by-step guide below are complete, and you can run it locally with the commands below.

How to run, build and test

These commands come from the repo's own manifests (package.json scripts, Anchor.toml, Cargo, go.mod, Makefile). Check the README for prerequisites and environment variables.

DirectoryCommandRuns
solana-programnpm run lint
contractsnpm run test
GatewayAgentnpm run test
hubnpm run dev
hubnpm run start
hubnpm run test
AgentGuildAppnpm run dev
AgentGuildAppnpm run start
AgentGuildAppnpm run build
AgentGuildAppnpm run test
AgentGuildAppnpm run lint
solana-programanchor build
solana-programanchor test
solana-programanchor run test

What you could build from it