noya-agent
Interact with the Noya AI agent for crypto trading, prediction markets, token analysis, and DCA strategies via curl. Use when the user wants to trade tokens, check portfolios, analyze markets, manage DCA strategies, or interact with Polymarket/Rain prediction markets.
Packaged view
This page reorganizes the original catalog entry around fit, installability, and workflow context first. The original raw source lives below.
Install command
npx @skill-hub/cli install openclaw-skills-noya-agent
Repository
Skill path: skills/ali-hajeh/noya-agent
Interact with the Noya AI agent for crypto trading, prediction markets, token analysis, and DCA strategies via curl. Use when the user wants to trade tokens, check portfolios, analyze markets, manage DCA strategies, or interact with Polymarket/Rain prediction markets.
Open repositoryBest for
Primary workflow: Analyze Data & AI.
Technical facets: Full Stack, Data / AI.
Target audience: everyone.
License: Unknown.
Original source
Catalog source: SkillHub Club.
Repository owner: openclaw.
This is still a mirrored public skill entry. Review the repository before installing into production workflows.
What it helps with
- Install noya-agent into Claude Code, Codex CLI, Gemini CLI, or OpenCode workflows
- Review https://github.com/openclaw/skills before adding noya-agent to shared team environments
- Use noya-agent for development workflows
Works across
Favorites: 0.
Sub-skills: 0.
Aggregator: No.
Original source / Raw SKILL.md
---
name: noya-agent
description: Interact with the Noya AI agent for crypto trading, prediction markets, token analysis, and DCA strategies via curl. Use when the user wants to trade tokens, check portfolios, analyze markets, manage DCA strategies, or interact with Polymarket/Rain prediction markets.
metadata: {"openclaw":{"emoji":"š¤","homepage":"https://agent.noya.ai","requires":{"env":["NOYA_API_KEY"],"bins":["curl","jq"]},"primaryEnv":"NOYA_API_KEY"}}
---
# Noya Agent
Noya is a multi-agent AI system for crypto trading, prediction markets (Polymarket, Rain), token analysis, and DCA strategies. All transactions are gas-sponsored ā users pay no gas fees.
- **Website:** [agent.noya.ai](https://agent.noya.ai)
- **API Base URL:** `https://safenet.one`
## Trust & Security
- All API calls use HTTPS. Only `NOYA_API_KEY` is read from the environment.
- All on-chain transactions require explicit user confirmation via an interrupt prompt before execution.
- Use a short-lived API key (30-day) for testing. Revoke it from Settings > API Keys if compromised.
## Setup
1. Create an account at [agent.noya.ai](https://agent.noya.ai)
2. Go to Settings > API Keys and generate a key
3. Store the key securely ā it is only shown once
4. Set the environment variable:
```bash
export NOYA_API_KEY="noya_your_key_here"
```
Configure in `~/.openclaw/openclaw.json`:
```json
{
"skills": {
"entries": {
"noya-agent": {
"enabled": true,
"apiKey": "noya_your_key_here",
"env": {
"NOYA_API_KEY": "noya_your_key_here"
}
}
}
}
}
```
## When to Use
Use Noya when users want to:
- Check token prices or portfolio balances
- Swap, bridge, or send tokens (cross-chain supported)
- Analyze tokens and market trends
- Trade on Polymarket or Rain prediction markets
- Set up or manage DCA (dollar-cost averaging) strategies
- View DeFi positions
**Don't use for:** Non-crypto tasks, local file operations, or general knowledge questions.
## Core Workflow
Every interaction uses the Noya REST API via curl. The main endpoint is `POST /api/messages/stream` which streams responses. A helper script is provided for this.
### 1. Discover Capabilities (first use)
```bash
curl -s -H "x-api-key: $NOYA_API_KEY" \
"https://safenet.one/api/agents/summarize" | jq '.data'
```
Returns all available agent types (token analysis, prediction markets, DCA, etc.) and their tools. Call this once to understand what Noya can do.
### 2. Generate a Thread ID (new conversation)
Generate a UUID v4 for each new conversation topic:
```bash
python3 -c "import uuid; print(uuid.uuid4())"
```
Or on macOS/Linux:
```bash
uuidgen | tr '[:upper:]' '[:lower:]'
```
Each conversation needs a unique UUID. Generate one per topic and reuse it for follow-ups.
### 3. Send Messages (streaming)
Use the provided script to send a message and receive the parsed response:
```bash
bash {baseDir}/noya-message.sh "What tokens do I have in my portfolio?" "THREAD_ID_HERE"
```
The script handles the streaming response, parses `--breakpoint--` delimited JSON chunks, and outputs formatted text including messages, tool results, progress indicators, and interrupt prompts.
### 4. Continue the Conversation
Reuse the same thread ID for follow-ups ā Noya maintains context:
```bash
bash {baseDir}/noya-message.sh "Swap 0.1 ETH to USDC" "SAME_THREAD_ID"
```
### 5. Respond to Interrupts
When the agent needs confirmation (e.g., before executing a swap), the output includes `[REQUIRES INPUT]` with options. Send the user's answer as a follow-up in the same thread:
```bash
bash {baseDir}/noya-message.sh "Yes" "SAME_THREAD_ID"
```
## API Reference (curl commands)
All endpoints require the `x-api-key` header. Base URL: `https://safenet.one`
### Send Message (streaming) ā use the script
```bash
bash {baseDir}/noya-message.sh "<message>" "<threadId>"
```
If you need the raw stream for any reason:
```bash
curl -s -X POST "https://safenet.one/api/messages/stream" \
-H "Content-Type: application/json" \
-H "x-api-key: $NOYA_API_KEY" \
-H "x-timezone-name: America/New_York" \
-d '{"message": "What is the price of ETH?", "threadId": "YOUR_UUID"}'
```
The raw response is `--breakpoint--\n` delimited JSON chunks with `keep-alive\n\n` pings. Chunk types: `message`, `tool`, `interrupt`, `progress`, `reasonForExecution`, `executionSteps`, `error`.
### List Threads
```bash
curl -s -H "x-api-key: $NOYA_API_KEY" \
"https://safenet.one/api/threads" | jq '.data.threads'
```
### Get Thread Messages
```bash
curl -s -H "x-api-key: $NOYA_API_KEY" \
"https://safenet.one/api/threads/THREAD_ID/messages" | jq '.data.messages'
```
### Delete Thread
```bash
curl -s -X DELETE -H "x-api-key: $NOYA_API_KEY" \
"https://safenet.one/api/threads/THREAD_ID"
```
### Get Agent Summary
```bash
curl -s -H "x-api-key: $NOYA_API_KEY" \
"https://safenet.one/api/agents/summarize" | jq '.data'
```
### Chat Completion (OpenAI-compatible, no agent tools)
```bash
curl -s -X POST "https://safenet.one/api/chat/completions" \
-H "Content-Type: application/json" \
-H "x-api-key: $NOYA_API_KEY" \
-d '{"sessionId": "SESSION_ID", "message": "Hello, what can you do?"}'
```
### Get Session History
```bash
curl -s -H "x-api-key: $NOYA_API_KEY" \
"https://safenet.one/api/chat/session/SESSION_ID" | jq '.messages'
```
### Clear Session
```bash
curl -s -X DELETE -H "x-api-key: $NOYA_API_KEY" \
"https://safenet.one/api/chat/session/SESSION_ID"
```
## Common Patterns
### Check Portfolio
```
User: "What's in my wallet?"
1. Generate a thread ID: uuidgen | tr '[:upper:]' '[:lower:]'
2. bash {baseDir}/noya-message.sh "What tokens do I have in my portfolio?" "$THREAD_ID"
ā Returns wallet address, token balances, and portfolio data
```
### Token Swap
```
User: "Swap 0.5 ETH to USDC"
1. Generate a thread ID
2. bash {baseDir}/noya-message.sh "Swap 0.5 ETH to USDC" "$THREAD_ID"
ā Noya prepares the swap, asks for confirmation (interrupt), then executes.
All gas fees are sponsored. User must confirm before execution.
3. bash {baseDir}/noya-message.sh "Yes" "$THREAD_ID" # after user confirms
```
### Token Analysis
```
User: "Analyze SOL for me"
1. Generate a thread ID
2. bash {baseDir}/noya-message.sh "Give me a detailed analysis of SOL" "$THREAD_ID"
ā Returns price data, market trends, and analysis
```
### DCA Strategy
```
User: "Set up a DCA for ETH"
1. Generate a thread ID
2. bash {baseDir}/noya-message.sh "Set up a weekly DCA strategy for ETH with $50" "$THREAD_ID"
ā Noya configures the DCA strategy and confirms details
```
### Prediction Markets
```
User: "What are the top Polymarket events?"
1. Generate a thread ID
2. bash {baseDir}/noya-message.sh "Show me the top trending Polymarket events" "$THREAD_ID"
ā Returns current events, markets, and trading options
```
## Important Notes
### Transaction Confirmation
Noya always asks for user confirmation before executing on-chain transactions (swaps, bridges, transfers, orders). The response will include a `[REQUIRES INPUT]` section with details and options. Always relay this to the user and send their answer as a follow-up in the same thread. Never auto-confirm transactions.
### Wallet Delegation (Website Only)
If Noya responds with a **delegation request**, the user must complete this on the website:
```
"To delegate your wallet, visit https://agent.noya.ai and click
'Delegate Wallet' in the chat. This is a one-time action."
```
### Safe Deployment (Website Only)
If Noya responds with a **Safe deployment request**, the user must complete this on the website:
```
"To deploy your Polymarket Safe, visit https://agent.noya.ai and click
'Deploy Safe Now'. This is free, takes ~30 seconds, and only needs to be done once."
```
## Error Handling
| Error | Solution |
|-------|----------|
| `401 Unauthorized` | API key is invalid, expired, or revoked. Generate a new one at agent.noya.ai |
| `400 Bad Request` | Missing `message` or `threadId` in request body |
| `429 Rate limit` | Wait a few minutes. Limit is 15 requests per 5-minute window |
## Scripts
This skill includes the following script in its directory:
| Script | Purpose |
|--------|---------|
| `noya-message.sh` | Send a message to the Noya agent and parse the streamed response. Usage: `bash {baseDir}/noya-message.sh "<message>" "<threadId>"` |
## Additional Resources
- For the complete REST API specification, see [{baseDir}/reference.md](reference.md)
---
## Referenced Files
> The following files are referenced in this skill and included for context.
### reference.md
```markdown
# Noya Agent API Reference
Base URL: `https://safenet.one`
All endpoints require authentication via the `x-api-key` header (except where noted).
---
## Authentication
| Header | Value | Description |
| --------- | ------------ | ------------------------------ |
| x-api-key | `noya_<key>` | API key generated from the app |
API keys are created with a duration: `thirty_days`, `ninety_days`, or `one_year`. Expired or revoked keys return `401`.
---
## POST /api/messages/stream
Send a message to the Noya agent and receive a streamed response.
### Request
**Content-Type:** `application/json`
```json
{
"message": "What is the price of ETH?",
"threadId": "unique-thread-id"
}
```
| Field | Type | Required | Description |
| -------- | ------ | -------- | ------------------------------------------------- |
| message | string | Yes | User message text |
| threadId | string | Yes | UUID v4 thread identifier. Creates thread if new. |
### Response
**Content-Type:** `text/plain; charset=utf-8`
**Transfer-Encoding:** `chunked`
The response is a text stream. Each chunk is a JSON object followed by `--breakpoint--\n`. Keep-alive pings (`keep-alive\n\n`) are sent every second.
### Chunk Types
#### message
```json
{
"type": "message",
"threadId": "t1",
"messageId": "msg-uuid",
"message": "The current price of ETH is..."
}
```
#### tool
```json
{
"type": "tool",
"threadId": "t1",
"messageId": "msg-uuid",
"content": {
"type": "token_price",
"data": { ... }
}
}
```
Non-visible tool results have `content.type` set to `"non_visible"`.
#### progress
```json
{
"type": "progress",
"threadId": "t1",
"current": 1,
"total": 3,
"message": "Analyzing token metrics..."
}
```
#### interrupt
Sent when the agent needs user confirmation before proceeding.
```json
{
"type": "interrupt",
"threadId": "t1",
"content": {
"type": "interrupt",
"question": "Do you want to proceed with this swap?",
"options": ["Yes", "No"]
}
}
```
To respond to an interrupt, send another message to the same thread with the user's answer.
#### reasonForExecution
```json
{
"type": "reasonForExecution",
"threadId": "t1",
"message": "Looking up current market data for ETH"
}
```
#### executionSteps
```json
{
"type": "executionSteps",
"threadId": "t1",
"steps": ["Fetching price data", "Analyzing trends", "Generating summary"]
}
```
#### error
```json
{
"type": "error",
"message": "I couldn't find your wallet address. Please try reloading the page."
}
```
### Error Responses
| Status | Condition |
| ------ | --------------------------- |
| 400 | Missing message or threadId |
| 401 | Unauthorized |
---
## GET /api/threads
List all conversation threads for the authenticated user.
### Response `200 OK`
```json
{
"success": true,
"data": {
"threads": [
{
"id": "abc123",
"name": "ETH Analysis",
"userId": "user-id",
"created_at": "2026-02-16T00:00:00.000Z",
"updated_at": "2026-02-16T12:00:00.000Z"
}
]
}
}
```
### Error Responses
| Status | Condition |
| ------ | ------------ |
| 401 | Unauthorized |
| 500 | Server error |
---
## GET /api/threads/:threadId/messages
Get all messages from a specific thread. The threadId in the URL is the user-facing ID (the server internally prefixes it with the user ID).
### Response `200 OK`
```json
{
"success": true,
"data": {
"messages": [
{
"id": ["HumanMessage"],
"kwargs": {
"id": "msg-uuid",
"content": "What is ETH price?"
}
},
{
"id": ["AIMessage"],
"kwargs": {
"id": "msg-uuid",
"content": "ETH is currently trading at..."
}
}
]
}
}
```
Messages follow LangChain message format. Types include `HumanMessage`, `AIMessage`, `ToolMessage`, and `InterruptMessage`.
### Error Responses
| Status | Condition |
| ------ | ------------ |
| 401 | Unauthorized |
| 500 | Server error |
---
## DELETE /api/threads/:threadId
Delete a conversation thread.
### Response `200 OK`
```json
{
"success": true,
"message": "Thread deleted successfully"
}
```
### Error Responses
| Status | Condition |
| ------ | ---------------- |
| 401 | Unauthorized |
| 404 | Thread not found |
| 500 | Server error |
---
## POST /api/chat/completions
OpenAI-compatible chat completion endpoint. Maintains message history per session in Redis.
### Request
```json
{
"sessionId": "session-1",
"message": "Hello, what can you do?",
"config": {},
"tools": [],
"toolResults": []
}
```
| Field | Type | Required | Description |
| ----------- | ------ | -------- | --------------------------------------- |
| sessionId | string | Yes | Session identifier for history tracking |
| message | string | Yes | User message |
| config | object | No | Model configuration overrides |
| tools | array | No | OpenAI-format tool definitions |
| toolResults | array | No | Tool call results from previous turn |
Each entry in `toolResults`:
| Field | Type | Description |
| ------------ | ------ | ------------------- |
| tool_call_id | string | ID of the tool call |
| content | string | Result content |
### Response `200 OK`
```json
{
"success": true,
"response": {
"id": "chatcmpl-xxx",
"object": "chat.completion",
"created": 1708000000,
"model": "gpt-4o",
"choices": [
{
"message": {
"role": "assistant",
"content": "I can help with...",
"tool_calls": null
},
"finish_reason": "stop"
}
]
},
"usage": {
"prompt_tokens": 50,
"completion_tokens": 100,
"total_tokens": 150
}
}
```
### Error Responses
| Status | Condition |
| ------ | -------------------- |
| 400 | Invalid request data |
| 401 | Unauthorized |
| 429 | Rate limit exceeded |
| 500 | Server error |
---
## GET /api/chat/session/:sessionId
Get the message history for a chat session.
### Response `200 OK`
```json
{
"success": true,
"sessionId": "session-1",
"messages": [
{ "role": "user", "content": "Hello" },
{ "role": "assistant", "content": "Hi! How can I help?" }
],
"count": 2
}
```
---
## DELETE /api/chat/session/:sessionId
Clear all message history for a session.
### Response `200 OK`
```json
{
"success": true,
"message": "Chat history cleared successfully"
}
```
---
## GET /api/agents/summarize
Returns all available agent types, their specialties, and the tools they have access to.
### Response `200 OK`
```json
{
"success": true,
"data": "The available agent types are:\n - tokenAnalysis: Name: Token Analysis, Speciality: ...\n tools:\n - name: getTokenPrice\n description: ...\n ..."
}
```
The `data` field is a YAML-formatted string describing all agents and their tools.
---
## API Key Management
These endpoints require Privy token authentication (not API key auth). They are included for reference but are not accessible via API keys.
### POST /api/keys
Create a new API key.
**Request:**
```json
{
"name": "My integration key",
"duration": "ninety_days"
}
```
| Field | Type | Required | Description |
| -------- | ------ | -------- | ------------------------------------------------ |
| name | string | No | Label for the key (max 255 chars) |
| duration | string | Yes | One of: `thirty_days`, `ninety_days`, `one_year` |
**Response `201 Created`:**
```json
{
"success": true,
"data": {
"id": "uuid",
"key": "noya_abc123...",
"prefix": "noya_abc",
"name": "My integration key",
"duration": "ninety_days",
"expires_at": "2026-05-17T00:00:00.000Z",
"created_at": "2026-02-16T00:00:00.000Z"
}
}
```
The `key` field is only returned once at creation.
### GET /api/keys
List all API keys for the authenticated user. Returns prefixes only, never full keys.
### DELETE /api/keys/:id
Revoke an API key (soft delete).
---
## Common Error Format
All error responses follow this structure:
```json
{
"success": false,
"message": "Human-readable error description"
}
```
## Rate Limiting
The `/api/messages/stream` endpoint is rate-limited to 15 requests per 5-minute window per user.
```
---
## Skill Companion Files
> Additional files collected from the skill directory layout.
### _meta.json
```json
{
"owner": "ali-hajeh",
"slug": "noya-agent",
"displayName": "Noya Agent",
"latest": {
"version": "1.0.13",
"publishedAt": 1771442470871,
"commit": "https://github.com/openclaw/skills/commit/7885899ed40109ba5b415c4707c1e2c14c2d60e4"
},
"history": [
{
"version": "1.0.12",
"publishedAt": 1771440385844,
"commit": "https://github.com/openclaw/skills/commit/7603dc2c2c992d32014dc314a20d2ba541250bbb"
},
{
"version": "1.0.1",
"publishedAt": 1771322613632,
"commit": "https://github.com/openclaw/skills/commit/bb4d3bfcd903acd34600f8d252670f011eda4fca"
}
]
}
```