Skip to content

About

OpenAI-compatible proxy for agent-to-agent communication. 393-line core routes to OpenAI, Claude, local models or a human.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

AgentInterlink: The Universal Adapter for Agentic AI 🔌

CI License: MIT

Decouple your AI applications from specific LLM providers. Plug into any agent, any model, any time.

In the rapidly evolving world of AI, applications are often hard-coded to work with a single Large Language Model (LLM) provider. This creates a significant challenge: what happens when you want to switch from OpenAI to Claude, integrate a local model for privacy, or even bring a human into the loop for critical decisions? Typically, it means extensive code changes and vendor lock-in.

AgentInterlink solves this by acting as a Universal Adapter for your AI applications. It speaks the standard OpenAI Chat Completions protocol on the front end, allowing your existing tools (like LangChain, AutoGen, or custom SDKs) to seamlessly connect. On the backend, it intelligently routes these requests to any AI agent, local model, or human-in-the-loop system you choose.

[ Your Application ]   ← Any OpenAI-compatible client (LangChain, AutoGen, Custom SDK)
        ↓
POST /v1/chat/completions
        ↓
[ AgentInterlink ]      ← This Project: The Universal Adapter
        ↓
[ ANY AI AGENT ]      ← Claude, Aider, Cursor, Local LLM, or Human
        ↓
Response → The client receives a standard OpenAI-formatted response

Why AgentInterlink is Essential for Your AI Strategy

Feature Traditional LLM Integration AgentInterlink
Flexibility Locked to one provider Use any agent or model (Claude, local LLM, human)
Cost Control Pay per token (fixed) Leverage subscription-based agents or cheaper local models
Intelligence Static LLM response Dynamic agents with tools, memory, and context
Resilience Requires constant internet Works offline via file-drop mode
Transparency Black-box calls Full structured logging of all traffic for auditing
Future-Proofing Vulnerable to provider changes Adapt to new models/providers without code changes

Quickstart: Get AgentInterlink Running in Minutes

1. Installation

pip install agent-interlink
# For the Claude example backend, install with:
pip install "agent-interlink[claude]"

From source:

git clone https://github.com/Ehsas317/AgentInterlink.git
cd AgentInterlink
pip install -e ".[dev,claude]"

2. Start the Proxy

Choose your operating mode (most users start with webhook):

agent-interlink --mode webhook --port 8080

3. Connect Your Application

Point your OpenAI-compatible client to AgentInterlink:

export OPENAI_BASE_URL=http://localhost:8080/v1
export OPENAI_API_KEY=anything-you-want # AgentInterlink doesn't use this key directly
export OPENAI_MODEL=your-target-agent # Optional: use this to route to specific agents

# Now, your application will send requests to AgentInterlink!

Operating Modes: Tailor AgentInterlink to Your Needs

AgentInterlink offers three powerful modes to handle diverse AI workflows:

1. webhook — The Live Queue (Recommended for Interactive Agents)

Best for live demos, interactive agent loops, and scenarios where an external process or human needs to respond in real-time. Requests are queued, and the proxy waits for a response to be submitted via the /bridge/{id}/fill REST API endpoint.

2. file-drop — The Offline Buffer (Ideal for Resilient & Local Workflows)

Operates entirely via the filesystem. The proxy writes incoming prompts to .request.json files in a designated log directory and then watches for a matching .response.txt file. This mode is perfect for unstable network environments, air-gapped systems, or integrating with agents that prefer filesystem-based communication.

3. openai-passthrough — The Transparent Proxy (For Logging & Augmentation)

Forwards requests directly to a real OpenAI-compatible upstream API (e.g., OpenAI, Azure OpenAI, Groq, Together). This mode is invaluable for adding a logging layer, debugging traffic, or implementing custom authentication/rate-limiting in front of an existing LLM service without modifying the client application.

Advanced Usage & Integrations

Securing Your Deployment

If exposing AgentInterlink publicly, it's highly recommended to set an authentication token:

export BRIDGE_AUTH_TOKEN=your-secure-token
agent-interlink --mode webhook --port 8080

All incoming requests will then require an Authorization: Bearer <token> header, protecting your bridge from unauthorized access.

Running with Docker

For containerized deployments, use the provided Dockerfile:

docker build -t agent-interlink .
docker run -p 8080:8080 -v "$(pwd)/bridge-logs:/data/bridge-logs" agent-interlink

Agent Integration Examples

AgentInterlink is designed to be highly extensible. You can easily integrate with various AI agents:

  • Claude (Anthropic): Use the included examples/claude_backend.py to drive your applications with Anthropic's Claude models.
  • Custom Agents: Copy examples/generic_backend.py and implement your own logic to connect to any CLI tool, service, or custom AI model.

Development & Contribution

We welcome contributions! To set up your development environment and run tests:

git clone https://github.com/Ehsas317/AgentInterlink.git
cd AgentInterlink
pip install -e ".[dev,claude]"
pytest -v

License

AgentInterlink is released under the MIT License. See the LICENSE file for details.


AgentInterlink — Bridging the gap between static APIs and dynamic agentic intelligence. Authored by Ehsas.

About

OpenAI-compatible proxy for agent-to-agent communication. 393-line core routes to OpenAI, Claude, local models or a human.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Sponsor this project

Packages

Contributors

Languages