DEV Community

Agenium platform
Agenium platform

Posted on

Build a Discoverable AI Agent in 5 Minutes

Last time, we talked about why MCP without agent discovery is like the web without DNS. Today, let's build one.

You'll go from zero to a working AI agent β€” publicly discoverable at agent://your-agent.agenium.net β€” in about 5 minutes. Other agents will be able to find it, inspect its capabilities, and call it. No config files to share. No READMEs to paste. Just a name.

What We're Building

A simple agent with three tools: echo, ping, and info. Trivial on purpose β€” the interesting part isn't what it does, it's how other agents find it.

By the end:

  • Your agent runs locally (or in Docker)
  • It has a unique identity: agent://your-name.agenium.net
  • Any agent on the network can discover and call it
  • Its capabilities are published in a machine-readable manifest

Stack: Node.js + TypeScript. Python SDK also available (pip install agenium) β€” same concepts, different syntax.

Prerequisites

  • Node.js 18+
  • npm or yarn
  • ~5 minutes

That's it. No cloud account needed. No API keys for the basic flow.

Step 1: Scaffold

npx @agenium/create-agent my-agent
cd my-agent
npm install
Enter fullscreen mode Exit fullscreen mode

The CLI wizard asks a few questions:

πŸ€–  create-agenium-agent
Build your first agent:// in under 3 minutes

? Agent name β€Ί my-agent
? Description β€Ί My first discoverable agent
? Template β€Ί echo (minimal β€” echo, ping, info tools)
Enter fullscreen mode Exit fullscreen mode

You get a clean project structure:

my-agent/
β”œβ”€β”€ src/index.ts       # Your agent logic
β”œβ”€β”€ package.json       # Dependencies (agenium@^0.2.0)
β”œβ”€β”€ tsconfig.json
β”œβ”€β”€ Dockerfile         # Production-ready image
β”œβ”€β”€ .env.example
└── README.md
Enter fullscreen mode Exit fullscreen mode

Skip the wizard: npx @agenium/create-agent my-agent --yes uses sensible defaults.

Step 2: Look at the Code

Open src/index.ts. Here's the core of what the echo template generates:

import { Agent } from 'agenium';

const agent = new Agent({
  name: 'my-agent',
  description: 'My first discoverable agent',
  version: '0.1.0',
});

// Define tools β€” these show up in your capability manifest
agent.tool('echo', {
  description: 'Echo back any message',
  parameters: {
    message: { type: 'string', description: 'Message to echo' }
  },
  handler: async ({ message }) => {
    return { echo: message, timestamp: new Date().toISOString() };
  }
});

agent.tool('ping', {
  description: 'Health check',
  handler: async () => {
    return { status: 'ok', uptime: process.uptime() };
  }
});

agent.tool('info', {
  description: 'Agent metadata',
  handler: async () => {
    return {
      name: agent.name,
      version: agent.version,
      tools: agent.listTools(),
    };
  }
});

agent.start();
Enter fullscreen mode Exit fullscreen mode

That's it. No boilerplate. No config ceremony. The Agent class handles:

  • HTTP/2 server with mTLS
  • Capability manifest generation (from your tool() definitions)
  • Session management
  • Health checks and metrics

Step 3: Run It

npm run dev
Enter fullscreen mode Exit fullscreen mode
πŸ€– my-agent v0.1.0 starting...
   Transport: HTTP/2 + mTLS
   Tools: echo, ping, info
   Local: https://localhost:3000
   Status: ready
Enter fullscreen mode Exit fullscreen mode

Your agent is running. But right now only you know about it. Let's fix that.

Step 4: Register on the Network

This is where it gets interesting. Head to agenium.net, create an account, and grab an API key. Then:

# Add your API key
echo "AGENIUM_API_KEY=ak_..." >> .env

# Register your agent
npx agenium register
Enter fullscreen mode Exit fullscreen mode
βœ… Registered: agent://my-agent.agenium.net
   Capabilities: echo, ping, info
   Discovery: active
   Certificate: issued (mTLS)
Enter fullscreen mode Exit fullscreen mode

What just happened:

  1. Your agent's name (my-agent) was registered in the AGENIUM naming system β€” like registering a domain
  2. Your capability manifest was published β€” other agents can see what tools you offer
  3. An mTLS certificate was issued β€” all communication is encrypted and authenticated
  4. DNS records were created β€” agent://my-agent.agenium.net now resolves to your agent

Step 5: Test Discovery

From any machine with the AGENIUM client:

import { resolve } from 'agenium';

// Discover the agent by name
const agent = await resolve('agent://my-agent.agenium.net');

console.log(agent.name);        // "my-agent"
console.log(agent.tools);       // ["echo", "ping", "info"]
console.log(agent.version);     // "0.1.0"
console.log(agent.endpoint);    // "https://..."
console.log(agent.certificate); // mTLS cert fingerprint
Enter fullscreen mode Exit fullscreen mode

Or try it live at demo.agenium.net β€” paste any agent:// URI and see the resolution in real time.

Compare this with MCP today:

MCP (current) agent://
Find a server Browse a directory, copy JSON config resolve('agent://name')
Know its capabilities Read the README agent.tools β€” machine-readable
Verify identity Hope the URL is right mTLS certificate chain
Use it Paste config into mcp.json agent.call('tool', params)

The Architecture (30-Second Version)

Your Agent                    AGENIUM Network
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ my-agent │──register──────▢│   Platform    β”‚
β”‚          β”‚                 β”‚  (naming +    β”‚
β”‚ echo     β”‚                 β”‚   discovery)  β”‚
β”‚ ping     β”‚                 β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜
β”‚ info     β”‚                        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                        β”‚
      β–²                             β”‚
      β”‚                             β–Ό
      β”‚                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
      └────mTLS session────│ Other Agent  β”‚
                           β”‚              β”‚
                           β”‚ resolve(     β”‚
                           β”‚  "agent://   β”‚
                           β”‚   my-agent") β”‚
                           β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
Enter fullscreen mode Exit fullscreen mode
  1. You register β†’ your name and capabilities enter the network
  2. Someone resolves β†’ agent://my-agent.agenium.net β†’ gets your endpoint + manifest
  3. Direct connection β†’ mTLS session between agents, no middleman for data

The naming system is the DNS. The platform is the registrar. Your agent's URI is its domain name. Same pattern that scaled the web β€” applied to agents.

Going Further: Add Real Logic

The echo template is a starting point. The tools and api templates give you more:

# Custom tools template
npx @agenium/create-agent my-tool-agent --template=tools

# API wrapper template (expose a REST API as agent tools)
npx @agenium/create-agent my-api-agent --template=api
Enter fullscreen mode Exit fullscreen mode

Or add tools to any existing agent:

agent.tool('analyze-logs', {
  description: 'Analyze server logs for anomalies',
  parameters: {
    logs: { type: 'string', description: 'Raw log text' },
    severity: { type: 'string', enum: ['all', 'error', 'warn'] }
  },
  handler: async ({ logs, severity }) => {
    // Your actual logic here
    const anomalies = detectAnomalies(logs, severity);
    return { anomalies, count: anomalies.length };
  }
});
Enter fullscreen mode Exit fullscreen mode

Once you redeploy, the capability manifest updates automatically. Any agent discovering yours will see the new analyze-logs tool β€” no config changes needed on their end.

Bonus: MCP Compatibility

Already have an MCP server? The AGENIUM MCP Bridge lets you give it a name without rewriting anything:

npm install @agenium/mcp-server
Enter fullscreen mode Exit fullscreen mode
import { MCPBridge } from '@agenium/mcp-server';

const bridge = new MCPBridge({
  name: 'my-mcp-server',
  mcpConfig: './mcp.json',  // Your existing MCP config
});

bridge.start();
// Your MCP server is now discoverable at agent://my-mcp-server.agenium.net
Enter fullscreen mode Exit fullscreen mode

Same tools, same logic β€” now with a name and discovery built in. Read more in the MCP Bridge docs.

What Agent Would YOU Build?

We're in the early days of agent-to-agent communication. The protocol works. The naming system works. The discovery works. What's missing is you β€” building agents that solve real problems.

Some ideas we're excited about:

  • Code review agent β€” analyze PRs, suggest fixes, talk to other agents for context
  • Monitoring agent β€” watch your infra, alert other agents when things break
  • Data pipeline agent β€” chain with other agents for ETL workflows
  • Knowledge base agent β€” answer questions using your internal docs

Try it now:

We're interviewing developers building in the MCP/agent ecosystem. If you have 15 minutes and opinions about agent discovery, we'd love to hear from you β†’ research@agenium.net


This is Part 2 of our series on agent identity and discovery. Part 1: Your MCP Server Has No Name covers the "why". This post covers the "how".

πŸ” Try our MCP server search β†’ agenium.net/search β€” Find any MCP server in seconds.

Built by the AGENIUM team. Open source. MIT licensed.

Top comments (0)