Skip to main content

Automatically convert any API into AI-ready tools in 30 seconds

Project description

Agent Nexus

Automatically convert any API into AI-ready tools in 30 seconds

⚠️ Experimental: This project is in active development. Review all generated code before use in production. Contributions welcome to improve safety and reliability.

Agent Nexus eliminates the need for manual API integration code. Point it at any API URL and get production-ready Python tools that AI agents can use immediately.

What It Does

Developers spend hours writing integration code for every API their AI agents need to use. Agent Nexus automates this entirely.

Give it an API URL → Get working Python code + searchable catalog entry in under 30 seconds.

How It Works

Agent Nexus uses 4 specialized agents working together:

  1. API Introspector - Discovers API endpoints automatically (OpenAPI spec or intelligent probing)
  2. Tool Generator - Creates clean Python integration code with authentication
  3. Catalog Search - Indexes tools with AI embeddings for semantic search
  4. Tool Orchestrator - Coordinates multi-tool workflows

Tech Stack

  • Python 3.11+
  • Elasticsearch 8.15+ (storage, vector search, ES|QL)
  • sentence-transformers (AI embeddings)
  • Click (CLI)
  • Docker & Docker Compose

Installation

# Install from PyPI
pip install agentnexus-tools

# Or install from source
git clone https://github.com/lcgani/agent-nexus
cd agent-nexus
pip install -e .

Quick Start

# 1. Start Elasticsearch (optional - use --skip-index for faster generation)
docker-compose up -d

# 2. Generate your first tool
agent-nexus generate https://api.github.com

# 3. Use the generated tool
python your_script.py

Usage Examples

Generate Tool from Any API

# GitHub
agent-nexus generate https://api.github.com

# Stripe
agent-nexus generate https://api.stripe.com

# Fast mode (skip Elasticsearch indexing)
agent-nexus generate https://api.github.com --skip-index

Search with Natural Language

# Find payment APIs
python -m src.cli search "payment processing credit cards"

# Find weather APIs
python -m src.cli search "weather forecast temperature"

# Find code hosting APIs
python -m src.cli search "git repositories version control"

Use Generated Tools

# Import auto-generated tool
exec(open('generated_tools/api.github.com.py').read())
github = ApiGithubCom()

# Make API calls
import requests
response = requests.get(
    f"{github.base_url}/users/octocat",
    headers=github._headers()
)
print(response.json())

Architecture

API URL Input
     ↓
Agent 1: Introspector (discovers endpoints)
     ↓
Elasticsearch (stores discovery data)
     ↓
Agent 2: Generator (creates Python code)
     ↓
Elasticsearch (stores tool + embeddings)
     ↓
Agent 3: Search (semantic search)
     ↓
Agent 4: Orchestrator (multi-tool workflows)

Project Structure

agent-nexus/
├── src/
│   ├── agents/
│   │   ├── introspector.py    # API discovery
│   │   ├── generator.py       # Code generation
│   │   ├── search.py          # Vector search
│   │   └── orchestrator.py    # Workflow coordination
│   ├── elasticsearch/
│   │   ├── client.py          # ES connection
│   │   └── schemas.py         # Index mappings
│   ├── cli.py                 # CLI interface
│   └── config.py              # Configuration
├── generated_tools/           # Auto-generated tools
├── docker-compose.yml         # Elasticsearch setup
├── requirements.txt
└── README.md

Performance Targets

  • Tool generation: <30 seconds per API
  • Search relevance: >90% accuracy
  • Catalog size: 50+ tools tested
  • End-to-end: <1 minute from URL to working tool

Commands

# Setup Elasticsearch indexes
python -m src.cli setup

# Generate tool from API
python -m src.cli generate <API_URL>

# Search tool catalog
python -m src.cli search "<query>"

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agentnexus_tools-0.1.1.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agentnexus_tools-0.1.1-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

Details for the file agentnexus_tools-0.1.1.tar.gz.

File metadata

  • Download URL: agentnexus_tools-0.1.1.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for agentnexus_tools-0.1.1.tar.gz
Algorithm Hash digest
SHA256 2161cb13b0dc5bf380e172f1c51df4cb6b501b252e4a64bd3430dcb4ca99bed5
MD5 948987128ec3523d66ef8bfdcb96a90a
BLAKE2b-256 977b49f0376db7e7dd4d2df4f63796ff3193f2c1f3509f19a0d9ba5448add0d4

See more details on using hashes here.

File details

Details for the file agentnexus_tools-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for agentnexus_tools-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0bff0d618deab52e4e74cc397ddc572bad436bdde8e5bb3d997303d86e0fd3af
MD5 839280f22bfcc2b62f48e8a0a50a331e
BLAKE2b-256 64c15bfc6ab17f50c64c0eacb18323e004eca716fa14e5ce26f062a6349c4563

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page