Skip to main content
ouroborai is structured as a Bun workspace monorepo. Packages are scoped under @arb-agent/ and apps live in the apps/ directory.

Dependency Graph

@arb-agent/sdk
  |
  +-- @arb-agent/adapters
  |     |
  |     +-- @arb-agent/skills
  |     +-- apps/api
  |     +-- apps/mcp-server
  |
  +-- @arb-agent/timeboost
  |     |
  |     +-- apps/api
  |     +-- apps/mcp-server
  |
  +-- @arb-agent/smart-account
        |
        +-- apps/api
        +-- apps/mcp-server
Build order: sdk first, then adapters, skills, timeboost, and smart-account in parallel, and finally the apps.

@arb-agent/sdk

Path: packages/sdk/ The foundation package containing chain configuration, contract addresses, type definitions, token resolution, and wallet utilities.

Key Exports

ExportModuleDescription
arbitrumOnechain.tsArbitrum One chain definition (id: 42161)
robinhoodChainchain.tsRobinhood Chain definition (id: 46630)
CONTRACTSchain.tsAll contract addresses (DEX, lending, tokens, etc.)
CHAINLINK_FEEDSchain.tsChainlink price feed addresses
ArbWalletwallet.tsWallet wrapper (public + wallet clients, balance queries)
resolveTokentokens.tsSymbol-to-address resolution

Type Exports

Core types used across all packages:
TypeDescription
SwapParams, SwapQuoteTrade parameter and quote types
OpenPerpParams, PerpPosition, PerpSidePerpetual position types
SupplyParams, BorrowParams, AccountDataLending types
ExpressLaneBid, ExpressLaneStatusTimeBoost types
Job, JobStatusJob queue types
Thread, ThreadMessage, ThreadRoleConversation thread types
RwaStockInfoTokenized RWA stock types
SkillSkill metadata type
ApiKey, ApiKeyTierAPI key types
BridgeParams, BridgeQuote, BridgeRouteCross-chain bridge types
TokenLaunchParams, LaunchedTokenToken launchpad types
PredictionMarket, MarketOutcomePrediction market types
AlchemixVariant, AlchemixAccountDataAlchemix V2 types

Contract Addresses

CONTRACTS includes addresses for:
  • DEX: Uniswap V3 Universal Router, SwapRouter02, Camelot Router, Pendle Router
  • Lending: Aave V3 Pool, Data Provider, Oracle
  • Account Abstraction: EntryPoint v0.6, Pimlico EntryPoint v1
  • TimeBoost: Auction contract
  • Tokens: USDC, USDC.e, WETH, ARB, WBTC, PENDLE, GRAIL, aUSDC
  • Alchemix: AlchemistV2 (alETH + alUSD), Transmuters, WETH Gateway

@arb-agent/adapters

Path: packages/adapters/ Protocol-specific adapters that wrap on-chain interactions behind a uniform interface. Each adapter takes a PublicClient, WalletClient, and account address.

Exports

AdapterProtocolCapabilities
UniswapV3AdapterUniswap V3quote, swap
CamelotAdapterCamelot DEXquote, swap
GmxV2AdapterGMX V2openPosition, closePosition, getPositions
AaveV3AdapterAave V3supply, borrow, repay, getAccountData
RwaAdapterRobinhood ChainfindBySymbol, getStockInfo, getRegistryStats
BridgeAdapterCross-chain bridgesquote, getSupportedChains
AlchemixAdapterAlchemix V2getAccountData, getSupportedTokens
PolymarketAdapterPolymarketsearchMarkets, getTopMarkets, getMarket

@arb-agent/timeboost

Path: packages/timeboost/ TimeBoost express lane bidder and reseller.

Exports

ExportDescription
TimeBoostBidderMain bidder class with bid loop, MEV estimation, resale
TimeBoostConfigConfiguration type for the bidder
RoundOpportunityRound profit estimation type
AuctioneerStatsAggregate auctioneer statistics type
ResaleSlotExpress lane resale slot type
See Configure TimeBoost for usage details.

@arb-agent/smart-account

Path: packages/smart-account/ ERC-4337 smart account wrapper using ZeroDev Kernel.

Exports

ExportDescription
AgentSmartAccountKernel smart account with session key management
createSessionKeyCreate a scoped session key with spending limits
Session keys allow the agent to trade autonomously within defined constraints (allowed protocols, spending limits, time window) without exposing the master private key.

@arb-agent/skills

Path: packages/skills/ Skill loader for fetching and caching SKILL.md documentation bundles.

Exports

ExportDescription
SkillLoaderClass for loading skills by name or URL
skillLoaderSingleton instance with 1-hour cache
Built-in skills: arb-trade, gmx, camelot, pendle, aave, kyan, rwa-stocks, timeboost-bid. See Add a Skill for details on creating custom skills.

Apps

AppPathDescription
apiapps/api/Hono REST API server
webapps/web/Next.js 15 web terminal
telegramapps/telegram/grammY Telegram bot
mcp-serverapps/mcp-server/MCP server for Claude Code integration

Build Notes

  • @zerodev/*, permissionless, and tslib must be marked --external in Bun build to avoid bundling errors
  • Bun stores resolved packages in node_modules/.bun/
  • The web app inlines types from @arb-agent/sdk to avoid pulling Node.js-only modules (ArbWallet) into client bundles