AGIJobManager Prime is an Ethereum smart-contract system for escrowed AGI work agreements, with optional ENS-backed public job pages.
Important
New here? Start with the AGIJobManager Prime Genesis Console.
This is the fastest way to open the current hosted standalone Prime mainnet console.
Repo-pinned equivalent artifact: ui/agijobmanager_genesis_job_mainnet_2026-04-01.html (historical canonical snapshot: v45)
Current standalone/operator guide path: docs/ui/GENESIS_JOB_MAINNET_HTML_UI.md
Deployment / cutover authority remains: hardhat/README.md and docs/DEPLOYMENT/README.md
| Need | Go here |
|---|---|
| Launch the hosted Genesis Console | AGIJobManager Prime Genesis Console |
| Inspect the pinned repo artifact | ui/agijobmanager_genesis_job_mainnet_2026-04-01.html |
| Current standalone/operator guide path | docs/ui/GENESIS_JOB_MAINNET_HTML_UI.md |
| Standalone UI inventory | docs/ui/STANDALONE_HTML_UIS.md |
| Broader UI docs | docs/ui/README.md and ui/README.md |
| Deployment/operator runbooks | hardhat/README.md and docs/DEPLOYMENT/README.md |
Operational policy: intended for autonomous AI-agent execution with accountable human owner/operator oversight. This is policy intent and is not fully enforced on-chain.
This repository now contains both the legacy settlement contract and the Prime two-layer architecture:
contracts/AGIJobManagerPrime.sol: settlement-first kernel preserving escrow, bonds, validator review, disputes, challenge windows, conservative pause/owner controls, and solvency accounting.contracts/AGIJobDiscoveryPrime.sol: procurement-first premium discovery (sealed commit, reveal, shortlist from bounded historical signal, paid finalist trials, validator commit/reveal scoring, designated winner handoff, fallback promotion).contracts/interfaces/IAGIJobManagerPrime.sol: canonical bridge interface used by discovery to invoke settlement safely.
Why Prime exists: legacy first-touch assignment could let a merely fast applicant lock high-value jobs before best-agent discovery. Prime introduces procurement-first premium selection while keeping settlement guarantees conservative and auditable.
Canonical deployment path for Prime is now Hardhat (hardhat/scripts/deploy.js, documented in hardhat/README.md). Legacy Truffle deployment remains for compatibility and historical reproducibility.
- Newcomer / evaluator / reviewer: start with the AGIJobManager Prime Genesis Console, then use
ui/agijobmanager_genesis_job_mainnet_2026-04-01.htmlfor the repo-pinned artifact anddocs/ui/GENESIS_JOB_MAINNET_HTML_UI.mdas supporting operator context. - New operator / deployer: start with
hardhat/README.md(official path) and then the deployment indexdocs/DEPLOYMENT/README.md. - Contract owner (Etherscan-first): start with
docs/DEPLOYMENT/OWNER_MAINNET_DEPLOYMENT_AND_OPERATIONS_GUIDE.md, thendocs/OWNER_RUNBOOK.md. - ENSJobPages replacement operator: use one canonical flow in
docs/DEPLOYMENT/ENS_JOB_PAGES_MAINNET_REPLACEMENT.md. - Troubleshooting during deployment/cutover: go to
docs/TROUBLESHOOTING_DEPLOYMENT_AND_ENS.md. - Standalone HTML UI operator/reviewer: start with the AGIJobManager Prime Genesis Console. For the repo-pinned versioned artifact, use
ui/agijobmanager_genesis_job_mainnet_2026-04-01.html. Usedocs/ui/GENESIS_JOB_MAINNET_HTML_UI.mdas secondary operator/reference documentation. - Broader/full UI contributor: use
docs/ui/README.mdfor Next.js UI roadmap, runbooks, and release/testing docs.
- Canonical deployment path: Hardhat (
hardhat/README.md). Truffle is legacy/supported. - Canonical ENS replacement flow: deploy new ENSJobPages -> NameWrapper approval ->
setEnsJobPages-> legacy migration if needed -> lock only after validation. - Canonical ENS naming format:
<prefix><jobId>.<jobsRootName>with default prefixagijob-. - Canonical ownership split:
AGIJobManagerPrime ownercontrolssetEnsJobPages(...)and Prime settlement/discovery governance knobs.wrapped-root ownercontrols NameWrapper approval needed for wrapped-root ENS writes.
- Canonical safety rule: ENS hooks are best-effort side effects; settlement/dispute outcomes remain authoritative on
AGIJobManagerPrime. - Canonical ownership model: manager uses one-step transfer (for strict bytecode headroom), discovery uses two-step handoff (
transferOwnership->acceptOwnership) withpendingOwner/cancelOwnershipTransfer;renounceOwnershipis disabled on Prime contracts. - Canonical pause model: intake pause (new risk), settlement freeze (value-moving settlement), and full emergency pause (break-glass). Discovery emergency pause is pause-safe (in-flight procurement windows freeze/resume), and manager-owned deadlines (selected acceptance, per-job apply, checkpoint, completion/challenge/dispute windows) now also run on pause-adjusted effective time so owner pauses do not consume user windows.
- Prime runbook:
docs/PRIME_OWNERSHIP_AND_PAUSE_RUNBOOK.md.
| Action | Automated by deploy scripts | Manual caller |
|---|---|---|
Deploy Prime (AGIJobManagerPrime + AGIJobDiscoveryPrime) / deploy new ENSJobPages |
Yes | deployer key |
NameWrapper approval setApprovalForAll(newEnsJobPages, true) |
No | wrapped-root owner |
AGIJobManagerPrime.setEnsJobPages(newEnsJobPages) |
No | AGIJobManagerPrime owner |
Legacy migration migrateLegacyWrappedJobPage(jobId, exactLabel) |
No | ENSJobPages owner (if needed) |
lockConfiguration() / lockIdentityConfiguration() |
No | owner(s), only after validation |
Before any irreversible action:
- Confirm which key is AGIJobManagerPrime owner vs wrapped-root owner.
- Confirm manual steps are complete:
setApprovalForAll(newEnsJobPages, true)thensetEnsJobPages(newEnsJobPages). - Confirm at least one future job hook succeeds and legacy migration status is known.
Irreversible actions (delay until validated):
AGIJobManager.lockIdentityConfiguration()(legacy manager only, if you are operating the legacy ENS identity path)ENSJobPages.lockConfiguration()
- Hosted newcomer console (canonical first click): AGIJobManager Prime Genesis Console
- Repo-pinned standalone HTML artifact (versioned):
ui/agijobmanager_genesis_job_mainnet_2026-04-01.html - Current standalone/operator guide path:
docs/ui/GENESIS_JOB_MAINNET_HTML_UI.md - Standalone inventory / broader UI docs:
docs/ui/STANDALONE_HTML_UIS.md,ui/README.md,docs/ui/README.md - Deployment/operator tooling (official):
hardhat/+docs/DEPLOYMENT/ - Smart contracts (authoritative protocol state):
contracts/(AGIJobManager + ENSJobPages integration). - ENS identity layer (additive): ENSJobPages docs in
docs/ENS/and replacement flow indocs/DEPLOYMENT/ENS_JOB_PAGES_MAINNET_REPLACEMENT.md.
| If you need to... | Use this | Why |
|---|---|---|
| Open the current standalone Prime mainnet UI immediately | AGIJobManager Prime Genesis Console | Fastest newcomer/operator entry point for the current standalone Prime console. |
| Inspect the repo-pinned standalone artifact | ui/agijobmanager_genesis_job_mainnet_2026-04-01.html |
Versioned, in-repo equivalent artifact for provenance, review, and pinned inspection. |
| Read current standalone/operator context | docs/ui/GENESIS_JOB_MAINNET_HTML_UI.md |
Secondary operator/reference guide path for the standalone surface. |
| Browse standalone artifact inventory or broader UI docs | docs/ui/STANDALONE_HTML_UIS.md, ui/README.md, docs/ui/README.md |
Artifact inventory and broader UI/documentation context. |
| Deploy/replace contracts and ENS components | hardhat/README.md + docs/DEPLOYMENT/README.md |
Canonical deployment and operator runbooks; the UI is not the deployment authority. |
UI safety boundary: the hosted and repo-pinned standalone UI is action-capable, but contract deployment, ownership wiring, and ENS replacement authority remain in Hardhat/deployment runbooks.
contracts/AGIJobManager.sol: core escrow, role checks, job lifecycle, settlement, dispute flow, owner controls.contracts/ens/ENSJobPages.sol: optional ENS per-job page manager, naming, resolver updates, permission hooks, and legacy wrapped-page migration.contracts/utils/*.sol: linked libraries used byAGIJobManagerin official Hardhat deployment.
hardhat/: official/recommended deployment and Etherscan verification flow.- Root Truffle config + migration scripts: legacy/supported deployment flow for backward compatibility and reproducibility.
- Hosted Genesis Console (newcomer entry): AGIJobManager Prime Genesis Console
- Repo-pinned standalone artifact:
ui/agijobmanager_genesis_job_mainnet_2026-04-01.html - Current standalone/operator guide path:
docs/ui/GENESIS_JOB_MAINNET_HTML_UI.md - Standalone inventory:
docs/ui/STANDALONE_HTML_UIS.md - Canonical deployment index:
docs/DEPLOYMENT/README.md - Official Hardhat operator guide:
hardhat/README.md - ENSJobPages replacement runbook (mainnet):
docs/DEPLOYMENT/ENS_JOB_PAGES_MAINNET_REPLACEMENT.md - ENS naming/behavior reference:
docs/ENS/ENS_JOB_PAGES_OVERVIEW.md - Deployment troubleshooting:
docs/TROUBLESHOOTING_DEPLOYMENT_AND_ENS.md - UI directory inventory:
ui/README.md
Use Hardhat for production deployment and verification of the Prime suite:
AGIJobManagerPrime(settlement kernel)AGIJobDiscoveryPrime(premium procurement layer)
Legacy AGIJobManager remains available for historical reproducibility and legacy operations.
Start here: hardhat/README.md
Truffle remains available for historical reproducibility and existing operational environments.
Legacy docs:
docs/DEPLOYMENT/MAINNET_TRUFFLE_DEPLOYMENT.mddocs/DEPLOYMENT/TRUFFLE_MAINNET_DEPLOY.mddocs/DEPLOYMENT/TRUFFLE_PRODUCTION_DEPLOY.md
AGIJobManagerprovides the numericjobId.ENSJobPagesprovides the label prefix (jobLabelPrefix, defaultagijob-) and root suffix (jobsRootName, e.g.alpha.jobs.agi.eth).- Effective ENS name format is:
<prefix><jobId>.<jobsRootName>. - With current defaults, names are:
agijob-0.alpha.jobs.agi.ethagijob-1.alpha.jobs.agi.eth
- Prefix updates only affect jobs whose labels are not yet snapshotted.
- ENS hooks are best-effort and non-fatal to core settlement; protocol settlement can succeed even when ENS writes fail.
See full behavior details: docs/ENS/ENS_JOB_PAGES_OVERVIEW.md
previewJobEnsLabel/name/URI/nodeare projections from the current mutable root + prefix config.effectiveJobEnsLabel/name/URI/nodeare authoritative only afterENSJobPageshas snapshotted authority for that job.- Compatibility getters (
jobEnsLabel,jobEnsName,jobEnsURI,jobEnsNode) are mixed-mode convenience surfaces: they return effective values once authority exists, otherwise preview values. Do not present them as always-authoritative. - Under the current unchanged
AGIJobManagerPrimeABI, automatic authority issuance can still occur throughhandleHook(uint8,uint256), but spec/completion text hydration may require explicit keeper/operator repair using log-driven scripts when rich V1 getters are unavailable. - Hardhat deploy tooling now preflights Prime↔ENS compatibility mode before wiring (
richvsleanvsnone) and refuses unsafeLOCK_CONFIGin keeper-required modes. jobEnsIssuedandjobEnsReadyare chain-observed compatibility bits, not sticky write-attempt caches.jobEnsReadymeans authority exists, the node exists, the configured resolver is installed, and the required base metadata texts (schema,agijobs.spec.public) are observable onchain.
Canonical audit / gap docs for the current branch live in:
docs/ENS/CURRENT_BASELINE_AUDIT.mddocs/ENS/PRIME_ENS_COMPATIBILITY_GAP.mddocs/ENS/CHANGE_MINIMIZATION_PLAN.md
- Read the official Hardhat guide and prepare
.env+ deploy config. - From
hardhat/, compile (cd hardhat && npx hardhat compile) and dry-run (DRY_RUN=1 ...). - Deploy the Prime suite (
AGIJobManagerPrime+AGIJobDiscoveryPrime) with the mainnet confirmation gate. Network/chainId mismatches are rejected by the canonical deploy script. - Verify deployment outputs on Etherscan and in
hardhat/deployments/<network>/artifacts (including persistedcompletionNFTfrom the manager constructor). - Transfer ownership to the intended final owner if required by your operational policy.
Expected result after Prime deployment:
- Premium jobs use procurement-first winner discovery before assignment (not first-touch lock capture).
- Settlement retains conservative escrow/bond/dispute/finalization behavior.
- Optional ENSJobPages lifecycle hooks can be configured on Prime via
setEnsJobPages(...)and remain best-effort/non-fatal. Prime does not expose auseEnsJobTokenURIflag; completion NFT metadata remains IPFS/completion-URI based unless a future, separately sized manager release changes that.
Prime exposes keeper/bot-friendly autonomy surfaces for deterministic procurement progression in discovery (AGIJobDiscoveryPrime): isShortlistFinalizable, isWinnerFinalizable, isFallbackPromotable, nextActionForProcurement, getAutonomyStatus, and permissionless advanceProcurement for timeout-driven stage advancement.
If you are also operating legacy AGIJobManager + ENSJobPages, use the separate legacy ENS runbook flow:
- Deploy/replace
ENSJobPagesviahardhat/scripts/deploy-ens-job-pages.js. - Perform manual wiring on mainnet:
NameWrapper.setApprovalForAll(newEnsJobPages, true)by wrapped-root owner.AGIJobManager.setEnsJobPages(newEnsJobPages)by legacy AGIJobManager owner.
- If legacy jobs must retain historical labels, run per-job migration (
migrateLegacyWrappedJobPage(jobId, exactLabel)). - Only lock ENS/identity configuration after post-cutover validation.
Expected result after legacy ENS cutover:
- New legacy-manager jobs use
<prefix><jobId>.<jobsRootName>(defaultagijob-...alpha.jobs.agi.eth). - AGIJobManager lifecycle and settlement continue even if an ENS side-effect fails.
- Legacy labels remain stable unless explicitly migrated/imported.
- Ordinary job: create directly on
AGIJobManagerPrimeand allow open applications (first valid taker path). - Premium job: create through
AGIJobDiscoveryPrime.createPremiumJobWithDiscovery(...)so procurement is completed first. - Existing job upgrade (eligible jobs only): use
AGIJobDiscoveryPrime.attachProcurementToExistingJob(...)only when the caller is the employer and the target job is still unassigned in SelectedAgentOnly intake mode; ordinary OpenFirstCome jobs are not attach-compatible and will revert. - Budget planning: pre-quote procurement requirements via
AGIJobDiscoveryPrime.quoteProcurementBudget(...).
Premium handoff sequence is: authorized+qualified commit/reveal applications -> deterministic shortlist (score then address tie-break) -> paid finalist trial -> validator commit/reveal scoring -> designated winner assignment into settlement -> fallback finalist promotion if the designated winner fails to take the job within the configured acceptance window. If a procurement becomes orphaned before winner finalization, employer/owner can explicitly unwind via cancelProcurement(...) (stakes/bonds/budget returned to claimable balances).
- Do not assume scripts perform NameWrapper approval or
setEnsJobPages(...); those remain manual. - Do not call
lockConfiguration()/lockIdentityConfiguration()before deploy, wiring, and migration validation. - Do not assume changing
jobLabelPrefixrewrites existing legacy/snapshotted names. - Do not treat ENS hook failures as settlement failures; check both protocol events and ENS hook events.
Detailed procedures and expected outputs:
hardhat/README.mddocs/DEPLOYMENT/ENS_JOB_PAGES_MAINNET_REPLACEMENT.mddocs/PRIME_ECONOMIC_GAME_THEORY_REVIEW.md
npm ci
cd hardhat && npm ci && cd ..
npm run test:prime:ci
npm run test:size:benchmarkUseful operator commands:
npm run deploy:prime:dry-run:mainnet
npm run deploy:prime:mainnet
npm run deploy:prime:sepoliaLegacy Truffle build/test flows remain available for reference compatibility (npm run build, npm test), but Prime hardening/deployment should use the Hardhat-first commands above.
- Main documentation index:
docs/README.md - UI docs hub (broader UI):
docs/ui/README.md - Hosted Genesis Console: AGIJobManager Prime Genesis Console
- Pinned standalone artifact (repo):
ui/agijobmanager_genesis_job_mainnet_2026-04-01.html - Current standalone/operator guide path:
docs/ui/GENESIS_JOB_MAINNET_HTML_UI.md - UI directory inventory:
ui/README.md - Quintessential walkthrough:
docs/QUINTESSENTIAL_USE_CASE.md
Maintenance commands:
npm run docs:gen
npm run docs:check
npm run check:no-binariesAlias note: check-no-binaries is exposed as npm run check:no-binaries.
- Intended use policy:
docs/POLICY/AI_AGENTS_ONLY.md - Terms & Conditions:
docs/LEGAL/TERMS_AND_CONDITIONS.md - Security policy:
SECURITY.md
- Preview ENS values are projections from the current prefix/root configuration.
- Effective ENS values are authoritative per-job snapshots stored in
ENSJobPages. AGIJobManagerPrimeremains on the existinghandleHook(uint8,uint256)ABI; authority repair, migration, resolver repair, and finalization live on the ENS side. Preview getters are projections only; authoritative values come from ENSJobPages per-job snapshots.- Re-run
scripts/ens/audit-mainnet.tsandscripts/ens/inventory-job-pages.tsfrom a networked operator environment before mainnet cutover because chain state is the source of truth. - Treat
previewJobEns*as projected values only; treateffectiveJobEns*as authoritative only after the inventory/status scripts confirm authority snapshot readiness for that job. - The production-safe Prime path is keeper-assisted authoritative ENS, not fully automated on-chain ENS hydration: operators may need to call
createJobPage,onAgentAssigned,onCompletionRequested,repairAuthoritySnapshot,repairResolver,repairTexts,repairAuthorisations, andlockJobENSusing event-driven runbooks.