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
| 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 |
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]"Choose your operating mode (most users start with webhook):
agent-interlink --mode webhook --port 8080Point 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!AgentInterlink offers three powerful modes to handle diverse AI workflows:
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.
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.
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.
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 8080All incoming requests will then require an Authorization: Bearer <token> header, protecting your bridge from unauthorized access.
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-interlinkAgentInterlink is designed to be highly extensible. You can easily integrate with various AI agents:
- Claude (Anthropic): Use the included
examples/claude_backend.pyto drive your applications with Anthropic's Claude models. - Custom Agents: Copy
examples/generic_backend.pyand implement your own logic to connect to any CLI tool, service, or custom AI model.
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 -vAgentInterlink 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.