How to Build & Register a Production AI Agent
From concept to verified listing: Design your agent around the "One Job Done Well" rule, build a robust ReAct core loop in 50 lines of Python, package for 1-click execution, and publish to the open-source aiagent.org registry.
Design a Focused Agent (The "One Job Done Well" Rule)
The most successful agents on our registry are not generic conversation bots. They are purpose-built autonomous operators designed to solve a single high-friction task without hallucinating or running off the rails.
| Archetype | Real-World Goal | Required Tooling | Failure Mode to Avoid |
|---|---|---|---|
| Autonomous SWE | Resolves GitHub issues, patches AST, and validates against test suites. | Git CLI, File Editor, Pytest | Rewriting whole files instead of pinpoint diffs. |
| DevOps & SRE | Triages pod crash loops, checks logs, and drafts rollback runbooks. | Kubectl API, Datadog, Bash | Executing destructive writes without human-in-the-loop gates. |
| Data & Text-to-SQL | Translates business questions into optimized, benchmarked SQL queries. | Postgres Read-only, Schema AST | Unbounded queries without LIMIT or explain analyze. |
| Browser Automation | Navigates dynamic portals, multi-step checkout forms, and scraping. | Playwright, Chromium DOM, Vision | Fragile coordinate clicking; use accessible element IDs. |
Build the Core Loop (50 Lines of Clean Python)
A production agent consists of three simple pieces:
- Deterministic Tool Gateway: Concrete Python functions that return bounded strings (never expose dangerous raw shell commands without parameter sanitization).
- Strict System Persona: Tells the model what tools it has, the required output format, and stop criteria.
- Perception-Action Loop: The model evaluates output, triggers tools, observes results, and iterates until the goal is achieved.
import os, sys, subprocess
from google import genai
from google.genai import types
client = genai.Client(api_key=os.environ.get("GEMINI_API_KEY"))
# 1. Deterministic Tool Layer (Outside the LLM)
def inspect_git_diff() -> str:
"""Returns uncommitted git changes in the current workspace."""
out = subprocess.getoutput("git diff")
return out if out.strip() else "Workspace is clean. No diff detected."
def run_tests() -> str:
"""Executes the test suite and returns the test summary."""
return subprocess.getoutput("pytest -q")
tools = [inspect_git_diff, run_tests]
# 2. Strict Persona & Privilege Bounds
config = types.GenerateContentConfig(
system_instruction=(
"You are GitFixer, an autonomous engineering agent. "
"Inspect the git diff, run local unit tests, and propose concise fixes. "
"Never run destructive commands like 'git reset --hard'."
),
tools=tools,
temperature=0.2
)
# 3. Perception-Action ReAct Loop
def run_agent(goal: str):
print(f"🤖 [GitFixer Started] Goal: {goal}")
chat = client.chats.create(model="gemini-2.5-flash", config=config)
response = chat.send_message(goal)
print("\n" + response.text)
if __name__ == "__main__":
if not os.environ.get("GEMINI_API_KEY"):
print("❌ Please run: export GEMINI_API_KEY='your_key'")
sys.exit(1)
run_agent("Inspect the workspace diff, run tests, and report status.")
Package for 1-Click Execution (Pip, NPM, or Docker)
Developers will only use your agent if they can test it in 10 seconds. Provide a single working CLI command in your manifest.
Python Pip Package
Expose a console script via pyproject.toml or setup.py.
NPX / NPM Binary
Expose a "bin" property in your package.json for instant zero-install runs.
Docker Container
Use for agents that execute arbitrary code, need custom OS binaries, or browser sandboxes.
Author Your Agent Manifest (your-agent.json)
Create a JSON file named strictly after your agent ID (e.g. agents/git-fixer.json).
{
"id": "git-fixer",
"name": "GitFixer AI",
"slug": "git-fixer",
"tagline": "Autonomous agent that inspects uncommitted diffs, runs test suites, and crafts clean commits.",
"category": "coding",
"categoryLabel": "Coding & SWE",
"framework": "standalone",
"frameworkLabel": "Python / Standalone",
"author": "YourGitHubUsername",
"github": "https://github.com/YourUsername/git-fixer",
"stars": "100+",
"license": "MIT",
"verified": true,
"featured": false,
"recommendedModels": [
"gemini-2.5-flash",
"claude-3-5-sonnet"
],
"toolsRequired": [
"Git CLI",
"Pytest Runner"
],
"tags": [
"git",
"swe",
"testing",
"autonomous"
],
"description": "GitFixer examines unstaged and staged changes, runs local test suites, and crafts clean conventional commits.",
"quickstart": {
"type": "Python Pip",
"command": "pip install git-fixer && git-fixer review"
}
}
idandslugmust match the filename and only contain lowercase letters, numbers, and hyphens (^[a-z0-9-]+$).githubmust start withhttps://github.com/.categorymust be one of:coding,research,multiagent,productivity,devops,data.- No string may contain unescaped raw HTML,
<script>tags, or JavaScript pseudo-protocols.
Submit to the Registry (Two Methods)
Choose the workflow that fits your team:
Instant GitHub Issue Web Form
Zero Git cloning needed. Fill out our structured issue form on GitHub. Our automation validates your submission and opens the manifest PR automatically.
Direct Pull Request
Fork ashishcsingh/aiagents, copy template.json into agents/<id>.json, run the local linter, and open a PR.
The Distribution Moat (What Happens After Merge)
When your manifest is merged, your agent instantly receives global distribution across three surfaces:
Appears on aiagent.org/agents with interactive filtering and 1-click terminal execution copy.
Indexed in aiagent.org/llms.txt so reasoning models (Claude, ChatGPT, Gemini) cite and recommend your agent.
Searchable instantly across all 135+ documentation pages, benchmarks, and tutorials on aiagent.org.
Ready to register your AI Agent?
Join 15+ verified autonomous agents on the premier open-source registry.