npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

n8n-nodes-devana

v1.5.0

Published

n8n node for Devana AI API

Readme

n8n-nodes-devana

Devana AI

Powerful AI workflows with Devana AI in n8n

npm version License: MIT

Connect your n8n workflows to Devana AI's powerful RAG and Agentic AI capabilities. Build intelligent automation with access to your knowledge base, documents, and AI agents.

✨ Features

  • 🤖 Dynamic Agent Selection - Dropdown list with searchable agent picker
  • 📊 Rich Metadata Output - Separate outputs for response and metadata (tokens, sources, scores)
  • 🎯 JSON Mode Support - Get structured JSON responses automatically parsed
  • 🔄 Dual Outputs - Response on first output, metadata & sources on second output
  • 🌍 Multi-language Support - 10+ languages including EN, FR, ES, DE, IT, PT, ZH, AR, HI, ID
  • 📁 File Attachments - Upload and attach files to conversations
  • 💬 Conversation Management - Continue existing conversations with context
  • 🎨 Custom Parameters - Stop sequences, custom metadata, identity override, hidden mode

🚀 Installation

Via n8n Community Nodes (Recommended)

  1. Open your n8n instance
  2. Go to SettingsCommunity Nodes
  3. Click Install
  4. Enter n8n-nodes-devana
  5. Click Install

Via npm

npm install n8n-nodes-devana

Then restart n8n.

🔑 Credentials Setup

  1. In n8n, go to CredentialsNew
  2. Search for "Devana API"
  3. Fill in:
    • API Key: Your Devana AI API key
    • Base URL: https://api.devana.ai (default)

Getting an API Key

  1. Log in to Devana AI
  2. Navigate to your agent settings
  3. Generate an API key in the "API Access" section

📖 Resources

Chat

Chat Completion

Send messages to your Devana AI agents and get intelligent responses powered by RAG.

Required Parameters:

  • Agent ID (Model): Select from your agents list or enter manually
  • Messages: At least one message (role + content)

Optional Parameters:

  • Temperature (0-1): Control randomness. Higher = more creative
  • Max Tokens: Maximum tokens to generate
  • Top P (0-1): Nucleus sampling for diversity control
  • Stream: Enable streaming responses
  • Conversation ID: Continue an existing conversation
  • Language: Response language (en, fr, es, de, it, pt, zh, ar, hi, id)
  • Response Format:
    • text: Plain text response (default)
    • json_object: Structured JSON output (auto-parsed)
  • Files: Comma-separated file IDs to attach
  • Frequency Penalty (-2 to 2): Reduce repetition
  • Presence Penalty (-2 to 2): Encourage new topics
  • Stop Sequences: Comma-separated stop sequences
  • Metadata: Custom JSON metadata
  • Identity: Custom identity override
  • Hidden Mode: No tracking mode

Outputs:

  1. Response: The AI message content
  2. Metadata & Sources: Usage stats (tokens), sources with RAG scores, finish reason

Agent

Manage your Devana AI agents programmatically.

Operations:

  • List: Get all your agents
  • Get: Retrieve a specific agent by ID
  • Create: Create a new agent
  • Update: Update an existing agent
  • Delete: Delete an agent

Conversation

Manage conversation history.

Operations:

  • Get Messages: Retrieve all messages from a conversation
  • Delete: Delete a conversation

File

Upload files to your Devana knowledge base.

Operations:

  • Upload: Upload a file from binary data

💡 Example Workflows

Simple Chat

┌─────────────┐      ┌──────────────┐      ┌─────────────┐
│   Webhook   │─────▶│    Devana    │─────▶│  Response   │
│   Trigger   │      │  Chat (GPT)  │      │   Format    │
└─────────────┘      └──────────────┘      └─────────────┘

Advanced RAG Workflow

┌─────────────┐      ┌──────────────┐      ┌──────────────┐      ┌──────────────┐
│   Manual    │─────▶│    Devana    │─────▶│  Filter by   │─────▶│   Send to    │
│   Trigger   │      │  (RAG Mode)  │      │  RAG Score   │      │    Slack     │
└─────────────┘      └──────────────┘      └──────────────┘      └──────────────┘
                              │
                              │ (Metadata Output)
                              ▼
                      ┌──────────────┐
                      │  Log Tokens  │
                      │   & Sources  │
                      └──────────────┘

JSON Mode Example

Set Response Format to "JSON Object" and prompt:

"Return a JSON object with fields: summary, sentiment (positive/negative/neutral), and key_points (array)"

The node will automatically parse the JSON response into an object you can use in subsequent nodes.

📊 Output Structure

Response Output (Output 1)

{
  "message": "The AI response text or parsed JSON object"
}

Metadata Output (Output 2)

{
  "usage": {
    "prompt_tokens": 150,
    "completion_tokens": 85,
    "total_tokens": 235
  },
  "finish_reason": "stop",
  "model": "agent_id",
  "response_format": "text",
  "sources": [
    {
      "content": "Source content...",
      "score": 0.95,
      "metadata": {...}
    }
  ],
  "score": 0.92
}

🎯 Use Cases

Customer Support Automation

Email → Devana AI (RAG on knowledge base) → Auto-reply or escalate to human

Content Generation

Trigger → Devana AI (JSON mode) → Parse structured data → Save to database

Document Analysis

Upload file → Devana AI (with file attachment) → Extract insights → Send report

Multi-language Support

Detect language → Devana AI (with lang parameter) → Translate & respond

🔧 Advanced Features

Token Usage Tracking

Use the Metadata output to track token consumption:

// In a Code node after Devana
const tokens = $input.item.json.usage.total_tokens;
if (tokens > 1000) {
  // Alert or log high usage
}

RAG Score Filtering

Filter responses based on source confidence:

// In a Filter node on Metadata output
const score = $json.score;
return score > 0.8; // Only high-confidence responses

Conversation Threading

Build multi-turn conversations:

// Store conversation_id from first response
// Pass it back in subsequent Devana nodes

🛠️ Development

Build Commands

npm run build     # Compile TypeScript
npm run dev       # Watch mode for development
npm run format    # Format code with Prettier
npm run lint      # Check code with ESLint
npm run lintfix   # Auto-fix ESLint errors

Project Structure

n8n-nodes-devana/
├── credentials/
│   └── DevanaApi.credentials.ts    # API credentials configuration
├── nodes/
│   └── Devana/
│       ├── Devana.node.ts          # Main node implementation
│       └── devana.svg              # Node icon
├── dist/                            # Compiled JavaScript (auto-generated)
├── package.json                     # Package configuration
├── tsconfig.json                    # TypeScript config
└── README.md                        # This file

📚 Resources

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📄 License

MIT © Devana AI