@@ -114,6 +114,10 @@ Spins up 3 agent wallets, funds them via airdrop, and executes cross-agent trans
114114
115115Navigate to [ http://localhost:3000 ] ( http://localhost:3000 ) to view agents, wallets, transactions, and policies in the web UI.
116116
117+ ### Deploy to production
118+
119+ See [ docs/DEPLOY.md] ( docs/DEPLOY.md ) for Docker Compose, Render (full cloud), Vercel + backends, and production checklist.
120+
117121## Project Structure
118122
119123```
@@ -163,75 +167,75 @@ solana-agent/
163167
164168### Wallets (Wallet Engine — port 3002)
165169
166- | Method | Endpoint | Description |
167- | -------- | ----------| -------------|
168- | POST | ` /api/v1/wallets ` | Create a new wallet |
169- | GET | ` /api/v1/wallets/:walletId ` | Get wallet details |
170- | GET | ` /api/v1/wallets/:walletId/balance ` | Get SOL balance |
171- | GET | ` /api/v1/wallets/:walletId/tokens ` | Get SPL token balances |
172- | POST | ` /api/v1/wallets/:walletId/sign ` | Sign a transaction |
173- | POST | ` /api/v1/wallets/:walletId/recover ` | Recover a wallet |
174- | DELETE | ` /api/v1/wallets/:walletId ` | Deactivate a wallet |
175- | GET | ` /api/v1/agents/:agentId/wallets ` | List wallets for an agent |
170+ | Method | Endpoint | Description |
171+ | ------ | -- --------------------------------- | ------------------------- |
172+ | POST | ` /api/v1/wallets ` | Create a new wallet |
173+ | GET | ` /api/v1/wallets/:walletId ` | Get wallet details |
174+ | GET | ` /api/v1/wallets/:walletId/balance ` | Get SOL balance |
175+ | GET | ` /api/v1/wallets/:walletId/tokens ` | Get SPL token balances |
176+ | POST | ` /api/v1/wallets/:walletId/sign ` | Sign a transaction |
177+ | POST | ` /api/v1/wallets/:walletId/recover ` | Recover a wallet |
178+ | DELETE | ` /api/v1/wallets/:walletId ` | Deactivate a wallet |
179+ | GET | ` /api/v1/agents/:agentId/wallets ` | List wallets for an agent |
176180
177181### Transactions (Transaction Engine — port 3004)
178182
179- | Method | Endpoint | Description |
180- | -------- | ----------| -------------|
181- | POST | ` /api/v1/transactions ` | Create and submit a transaction |
182- | GET | ` /api/v1/transactions/:txId ` | Get transaction status |
183- | POST | ` /api/v1/transactions/:txId/retry ` | Retry a failed transaction |
184- | GET | ` /api/v1/wallets/:walletId/transactions ` | List wallet transactions |
183+ | Method | Endpoint | Description |
184+ | ------ | -- -------------------------------------- | ------------------------------- |
185+ | POST | ` /api/v1/transactions ` | Create and submit a transaction |
186+ | GET | ` /api/v1/transactions/:txId ` | Get transaction status |
187+ | POST | ` /api/v1/transactions/:txId/retry ` | Retry a failed transaction |
188+ | GET | ` /api/v1/wallets/:walletId/transactions ` | List wallet transactions |
185189
186190### Policies (Policy Engine — port 3003)
187191
188- | Method | Endpoint | Description |
189- | -------- | ----------| -------------|
190- | POST | ` /api/v1/policies ` | Create a policy |
191- | GET | ` /api/v1/policies/:policyId ` | Get policy details |
192- | PUT | ` /api/v1/policies/:policyId ` | Update a policy |
193- | DELETE | ` /api/v1/policies/:policyId ` | Deactivate a policy |
194- | POST | ` /api/v1/policies/:policyId/activate ` | Reactivate a policy |
195- | GET | ` /api/v1/wallets/:walletId/policies ` | List wallet policies |
196- | POST | ` /api/v1/evaluate ` | Evaluate a transaction against policies |
192+ | Method | Endpoint | Description |
193+ | ------ | -- ----------------------------------- | --------------------------------------- |
194+ | POST | ` /api/v1/policies ` | Create a policy |
195+ | GET | ` /api/v1/policies/:policyId ` | Get policy details |
196+ | PUT | ` /api/v1/policies/:policyId ` | Update a policy |
197+ | DELETE | ` /api/v1/policies/:policyId ` | Deactivate a policy |
198+ | POST | ` /api/v1/policies/:policyId/activate ` | Reactivate a policy |
199+ | GET | ` /api/v1/wallets/:walletId/policies ` | List wallet policies |
200+ | POST | ` /api/v1/evaluate ` | Evaluate a transaction against policies |
197201
198202### DeFi (DeFi Integration — port 3005)
199203
200- | Method | Endpoint | Description |
201- | -------- | ----------| -------------|
202- | GET | ` /api/v1/defi/quote ` | Get a swap quote |
203- | POST | ` /api/v1/defi/swap ` | Execute a token swap |
204- | POST | ` /api/v1/defi/stake ` | Stake SOL |
205- | POST | ` /api/v1/defi/unstake ` | Unstake SOL |
206- | GET | ` /api/v1/defi/price/:mint ` | Get token price |
207- | GET | ` /api/v1/defi/protocols ` | List supported protocols |
208- | GET | ` /api/v1/defi/pools/:protocol/:poolId ` | Get pool info |
204+ | Method | Endpoint | Description |
205+ | ------ | -- ------------------------------------ | ------------------------ |
206+ | GET | ` /api/v1/defi/quote ` | Get a swap quote |
207+ | POST | ` /api/v1/defi/swap ` | Execute a token swap |
208+ | POST | ` /api/v1/defi/stake ` | Stake SOL |
209+ | POST | ` /api/v1/defi/unstake ` | Unstake SOL |
210+ | GET | ` /api/v1/defi/price/:mint ` | Get token price |
211+ | GET | ` /api/v1/defi/protocols ` | List supported protocols |
212+ | GET | ` /api/v1/defi/pools/:protocol/:poolId ` | Get pool info |
209213
210214### Agents (Agent Runtime — port 3001)
211215
212- | Method | Endpoint | Description |
213- | -------- | ----------| -------------|
214- | POST | ` /api/v1/agents ` | Create an agent |
215- | GET | ` /api/v1/agents/:agentId ` | Get agent details |
216- | PUT | ` /api/v1/agents/:agentId ` | Update agent configuration |
217- | POST | ` /api/v1/agents/:agentId/start ` | Start an agent |
218- | POST | ` /api/v1/agents/:agentId/pause ` | Pause an agent |
219- | POST | ` /api/v1/agents/:agentId/stop ` | Stop an agent |
220- | POST | ` /api/v1/agents/:agentId/execute ` | Execute an agent action |
221- | DELETE | ` /api/v1/agents/:agentId ` | Delete an agent |
222- | GET | ` /api/v1/orgs/:orgId/agents ` | List agents for an organization |
216+ | Method | Endpoint | Description |
217+ | ------ | -- ------------------------------- | ------------------------------- |
218+ | POST | ` /api/v1/agents ` | Create an agent |
219+ | GET | ` /api/v1/agents/:agentId ` | Get agent details |
220+ | PUT | ` /api/v1/agents/:agentId ` | Update agent configuration |
221+ | POST | ` /api/v1/agents/:agentId/start ` | Start an agent |
222+ | POST | ` /api/v1/agents/:agentId/pause ` | Pause an agent |
223+ | POST | ` /api/v1/agents/:agentId/stop ` | Stop an agent |
224+ | POST | ` /api/v1/agents/:agentId/execute ` | Execute an agent action |
225+ | DELETE | ` /api/v1/agents/:agentId ` | Delete an agent |
226+ | GET | ` /api/v1/orgs/:orgId/agents ` | List agents for an organization |
223227
224228### Notifications (Notification Service — port 3006)
225229
226- | Method | Endpoint | Description |
227- | -------- | ----------| -------------|
228- | POST | ` /api/v1/webhooks ` | Register a webhook |
229- | GET | ` /api/v1/webhooks/:webhookId ` | Get webhook details |
230- | PUT | ` /api/v1/webhooks/:webhookId ` | Update a webhook |
231- | DELETE | ` /api/v1/webhooks/:webhookId ` | Delete a webhook |
232- | POST | ` /api/v1/alerts ` | Create an alert rule |
233- | GET | ` /api/v1/orgs/:orgId/alerts ` | List organization alerts |
234- | WS | ` /ws?orgId=... ` | WebSocket stream for real-time events |
230+ | Method | Endpoint | Description |
231+ | ------ | -- --------------------------- | ------------------------------------- |
232+ | POST | ` /api/v1/webhooks ` | Register a webhook |
233+ | GET | ` /api/v1/webhooks/:webhookId ` | Get webhook details |
234+ | PUT | ` /api/v1/webhooks/:webhookId ` | Update a webhook |
235+ | DELETE | ` /api/v1/webhooks/:webhookId ` | Delete a webhook |
236+ | POST | ` /api/v1/alerts ` | Create an alert rule |
237+ | GET | ` /api/v1/orgs/:orgId/alerts ` | List organization alerts |
238+ | WS | ` /ws?orgId=... ` | WebSocket stream for real-time events |
235239
236240All endpoints are accessible through the API Gateway at ` http://localhost:8080 ` with the same paths.
237241
@@ -314,20 +318,20 @@ Both scripts include retry logic for devnet airdrop rate limits and produce Sola
314318
315319## Environment Variables
316320
317- | Variable | Default | Description |
318- | ----------| ---------| -------------|
319- | ` DATABASE_URL ` | ` postgresql://solagent:dev_password@localhost:5432/solagent ` | PostgreSQL connection |
320- | ` REDIS_URL ` | ` redis://localhost:6379 ` | Redis connection |
321- | ` REDPANDA_BROKERS ` | ` localhost:9092 ` | RedPanda/Kafka brokers |
322- | ` SOLANA_RPC_URL ` | ` https://api.devnet.solana.com ` | Solana RPC endpoint |
323- | ` SOLANA_NETWORK ` | ` devnet ` | Solana network |
324- | ` KORA_URL ` | ` http://localhost:8911 ` | Kora fee relayer |
325- | ` API_GATEWAY_PORT ` | ` 8080 ` | Gateway port |
326- | ` RATE_LIMIT_RPM ` | ` 100 ` | Rate limit (requests/min) |
327- | ` HELIUS_API_KEY ` | — | Optional Helius RPC key |
328- | ` TURNKEY_API_KEY ` | — | Turnkey HSM API key |
329- | ` TURNKEY_ORGANIZATION_ID ` | — | Turnkey organization |
330- | ` LOG_LEVEL ` | ` debug ` | Logging verbosity |
321+ | Variable | Default | Description |
322+ | ------------------------- | ------------------------------------------------------------ | ------------------------- |
323+ | ` DATABASE_URL ` | ` postgresql://solagent:dev_password@localhost:5432/solagent ` | PostgreSQL connection |
324+ | ` REDIS_URL ` | ` redis://localhost:6379 ` | Redis connection |
325+ | ` REDPANDA_BROKERS ` | ` localhost:9092 ` | RedPanda/Kafka brokers |
326+ | ` SOLANA_RPC_URL ` | ` https://api.devnet.solana.com ` | Solana RPC endpoint |
327+ | ` SOLANA_NETWORK ` | ` devnet ` | Solana network |
328+ | ` KORA_URL ` | ` http://localhost:8911 ` | Kora fee relayer |
329+ | ` API_GATEWAY_PORT ` | ` 8080 ` | Gateway port |
330+ | ` RATE_LIMIT_RPM ` | ` 100 ` | Rate limit (requests/min) |
331+ | ` HELIUS_API_KEY ` | — | Optional Helius RPC key |
332+ | ` TURNKEY_API_KEY ` | — | Turnkey HSM API key |
333+ | ` TURNKEY_ORGANIZATION_ID ` | — | Turnkey organization |
334+ | ` LOG_LEVEL ` | ` debug ` | Logging verbosity |
331335
332336## Observability
333337
0 commit comments