<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Kiu</title>
    <description>The latest articles on DEV Community by Kiu (@kiu).</description>
    <link>https://dev.to/kiu</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2628880%2F42e6b5bb-37f1-476a-a089-7cd14db3433b.png</url>
      <title>DEV Community: Kiu</title>
      <link>https://dev.to/kiu</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kiu"/>
    <language>en</language>
    <item>
      <title>Create your own n8n custom node</title>
      <dc:creator>Kiu</dc:creator>
      <pubDate>Mon, 02 Jun 2025 16:32:38 +0000</pubDate>
      <link>https://dev.to/kiu/create-your-own-n8n-custom-node-3f1l</link>
      <guid>https://dev.to/kiu/create-your-own-n8n-custom-node-3f1l</guid>
      <description>&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/0AibU9wZC3c"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;In some cases, the existing n8n nodes are not enough. You may want to add support for a new service or simplify an existing node for your own needs. This tutorial shows you how to build a custom n8n node from scratch. As an example, we will create a node that uses the Binance API to get the current price of a cryptocurrency.&lt;/p&gt;

&lt;p&gt;We begin by setting up a local development environment. We use Git and Docker Desktop on a Windows PC. Starting with a fresh system, we clone the n8n self-hosted AI Starter Kit from GitHub. After adjusting the configuration for our setup (such as using the CPU profile), Docker downloads the needed images and sets up the container environment.&lt;/p&gt;

&lt;p&gt;Once the n8n instance is running, we open it in the browser and create the admin account. Before we can deploy custom nodes, we must create a folder called custom inside the Docker container. We do this by accessing the container shell and creating the folder at /home/node/.n8n/custom.&lt;/p&gt;

&lt;p&gt;Next, we prepare our custom node. We clone the n8n-nodes-starter repository and rename it to follow the community naming convention (e.g., n8n-nodes-b24-custom-nodes). We edit the package.json, update the project name, and configure additional metadata. We also install required tools like pnpm and rimraf, and set up a script to build and deploy the node into the Docker container.&lt;/p&gt;

&lt;p&gt;We then create our actual node by copying the example node and renaming it. We call our new node B24CryptoManager. It will fetch the price of a coin using Binance's public API, which does not require authentication. We clean up the code, remove the unused execute method, and add a single parameter: the symbol of the coin, like BTCUSDT.&lt;/p&gt;

&lt;p&gt;After building the project, we deploy it using our custom script. Once deployed, we open n8n again and create a test workflow. Our custom node appears in the node search. We add it, enter a coin symbol, and execute the node. The current price is returned as JSON—just like with any standard n8n node.&lt;/p&gt;

&lt;p&gt;To make the node dynamic, we add a Set node that passes a symbol value like ETHUSDT. We configure our custom node to use that input value instead of the default. After running the workflow again, it returns the Ethereum price correctly. This confirms that everything works as expected.&lt;/p&gt;

&lt;p&gt;With that, we’ve successfully built and deployed our first custom n8n node. In the next part, we will explore how to add authentication to custom nodes for services that require API keys or tokens.&lt;/p&gt;

&lt;p&gt;If you are interested in AI, Automation or finance you can join:&lt;br&gt;
&lt;a href="https://www.skool.com/business24ai" rel="noopener noreferrer"&gt;https://www.skool.com/business24ai&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Create your own MCP Server</title>
      <dc:creator>Kiu</dc:creator>
      <pubDate>Mon, 24 Mar 2025 18:45:25 +0000</pubDate>
      <link>https://dev.to/kiu/create-your-own-mcp-server-4a85</link>
      <guid>https://dev.to/kiu/create-your-own-mcp-server-4a85</guid>
      <description>&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/QHlajR8LXR4"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Setting up your own MCP server allows seamless integration with Cursor, Windsurf, and Claude Desktop using a single configuration.&lt;/p&gt;

&lt;p&gt;After creating the MCP server with FastMCP, verifying it with MCP Inspector, and adding tools, the same configuration can be used across all three IDEs.&lt;/p&gt;

&lt;p&gt;Simply copy the MCP settings like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
    "mcpServers": {
        "my-mcp-server-ratio": {
            "command": "uv",
            "args": [
                "--directory",
                "/Users/kiu/dev/my-mcp-server-ratio",
                "run",
                "main.py"
            ]
        }
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;into each platform's configuration file—Cursor's mcp.json, Windsurf's mcp_config.json, and Claude Desktop's Claude_Desktop_Config.json —then restart or refresh the IDE to establish the connection.&lt;/p&gt;

&lt;p&gt;Once set up, the MCP tools can be used effortlessly, with options for manual approval or auto-run mode for a smoother workflow.&lt;/p&gt;

&lt;p&gt;🚀 Watch the video below for a step-by-step guide!&lt;/p&gt;

&lt;p&gt;Github:&lt;br&gt;
&lt;a href="https://github.com/business24ai/my-mcp-server-ratio" rel="noopener noreferrer"&gt;https://github.com/business24ai/my-mcp-server-ratio&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Create an AI Agent with PydanticAI in Minutes</title>
      <dc:creator>Kiu</dc:creator>
      <pubDate>Sat, 18 Jan 2025 21:41:54 +0000</pubDate>
      <link>https://dev.to/business24ai/create-an-ai-agent-with-pydanticai-in-minutes-3k07</link>
      <guid>https://dev.to/business24ai/create-an-ai-agent-with-pydanticai-in-minutes-3k07</guid>
      <description>&lt;p&gt;Creating an AI agent might sound like a daunting task, but with modern tools like Pydantic and OpenAI, it's surprisingly straightforward. In this guide, we’ll walk through building a simple AI agent step by step.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/ptsWI7YsKN0"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Set Up Your Environment&lt;/strong&gt;&lt;br&gt;
To begin, we’ll create a virtual environment and install the required library: pydantic-ai. A virtual environment ensures your project dependencies are isolated and manageable.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;python -m venv venv  
source venv/bin/activate  # Use `venv\Scripts\activate` on Windows
pip install pydantic-ai
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 2: Configure Your OpenAI API Key&lt;/strong&gt;&lt;br&gt;
Before interacting with OpenAI’s models, you’ll need an API key. Set this as an environment variable to keep it secure:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;OPENAI_API_KEY="your_openai_api_key"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 3: Write the Script&lt;/strong&gt;&lt;br&gt;
Now, let’s create the main script for our AI agent. The agent will use a system prompt and answer user questions by leveraging OpenAI’s API.&lt;/p&gt;

&lt;p&gt;Import Libraries&lt;br&gt;
We’ll begin by importing the necessary modules:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from pydantic_ai import Agent
from pydantic_ai.models.openai import OpenAIModel
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Define the Model and Agent&lt;br&gt;
Next, define the model and create an agent instance:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# define the model
model = OpenAIModel("gpt-4o")

# define the agent
agent = Agent(
    model=model,
    system_prompt="Be concise, reply with one sentence.",
)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Finally, we use the run_sync method to send a query to the agent and print the response:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# run the agent
result = agent.run_sync("What does AGI mean?")

# print the result
print("\n=== Data ===")
print(result.data)

# print the Usage
print("\n=== usage ===")
print(result.usage())

# print the Messages
print("\n=== messages ===")
print(result.all_messages())
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Step 4: Execute the Script&lt;br&gt;
Run the script to see the agent in action:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;python your_script_name.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When executed, the agent will communicate with OpenAI’s API, process the query, and return a response. For example, if you ask, “What does AGI mean?” the agent might reply:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;=== Data ===
AGI stands for Artificial General Intelligence, which refers to a machine's ability to understand, learn, and apply intelligence across any task like a human.

=== usage ===
Usage(requests=1, request_tokens=25, response_tokens=31, total_tokens=56, details={'accepted_prediction_tokens': 0, 'audio_tokens': 0, 'reasoning_tokens': 0, 'rejected_prediction_tokens': 0, 'cached_tokens': 0})

=== messages ===
[ModelRequest(parts=[SystemPromptPart(content='Be concise, reply with one sentence.', dynamic_ref=None, part_kind='system-prompt'), UserPromptPart(content='What does AGI mean?', timestamp=datetime.datetime(2025, 1, 18, 19, 17, 51, 503464, tzinfo=datetime.timezone.utc), part_kind='user-prompt')], kind='request'), ModelResponse(parts=[TextPart(content="AGI stands for Artificial General Intelligence, which refers to a machine's ability to understand, learn, and apply intelligence across any task like a human.", part_kind='text')], timestamp=datetime.datetime(2025, 1, 18, 19, 17, 52, tzinfo=datetime.timezone.utc), kind='response')]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
In just a few lines of code, we built a functional AI agent using Pydantic and OpenAI. This setup provides a robust foundation for building more complex AI-driven applications. Whether you’re answering questions, summarizing text, or performing advanced data analysis, this simple architecture can adapt to a variety of use cases.&lt;/p&gt;

&lt;p&gt;Let us know what you’ll create with your new AI agent!&lt;/p&gt;

&lt;p&gt;Links:&lt;br&gt;
&lt;a href="https://www.skool.com/business24ai" rel="noopener noreferrer"&gt;AI Agents Community on Skool&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.youtube.com/shorts/ptsWI7YsKN0" rel="noopener noreferrer"&gt;YouTube&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/business24ai/pydantic-ai-setup-short" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/p&gt;

</description>
      <category>pydanticai</category>
      <category>python</category>
      <category>openai</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
