Skip to main content
Glama

Agent Talk

Agent Talk is a powerful Model Context Protocol (MCP) server that enables autonomous AI agents (Frontend and Backend) to communicate asynchronously and autonomously, manage API contracts, and coordinate their development efforts with zero manual synchronization overhead.

License: MIT TypeScript Node.js SQLite

Vision

In modern AI-driven development, multiple autonomous agents need to work together seamlessly:

  • Backend Agent implements APIs and publishes route contracts

  • Frontend Agent discovers available endpoints and integrates them

  • Integration Issues are reported and tracked bidirectionally

  • Context Efficiency is maintained through intelligent grouping

Agent Talk solves this coordination problem by providing:

  1. Contract-First API Management - Backend agents register their routes with OpenAPI 3.0 compatible schemas before implementation

  2. Autonomous Discovery - Frontend agents discover available APIs without human intervention

  3. Issue Tracking - Bidirectional feedback when integration problems occur

  4. Context Management - Routes grouped by domain to reduce LLM context usage in large projects

  5. Asynchronous Coordination - Agents update each other's status without blocking operations

Related MCP server: Agent Collab MCP

Features

Route Contract Management

  • Register and update API routes with OpenAPI 3.0 schemas

  • Group routes by domain/service for efficient context management

  • Track route status: draft → pending → active → deprecated

  • Search and list routes with powerful filtering

Issue Tracking & Feedback

  • Frontend agents report integration issues with detailed context

  • Backend agents monitor open issues for their routes

  • Mark issues as resolved with audit trail

  • Track issues by route, reporter, or status

Asynchronous Agent Communication

  • No blocking operations - agents operate independently

  • Pull-based architecture for efficient resource usage

  • Pagination support for large result sets

  • Rich metadata for informed decision-making

Enterprise-Grade Architecture

  • Modular design: repositories -> services -> tools

  • Type-safe with TypeScript

  • Comprehensive error handling and validation

  • SQLite for portability and zero dependencies

Quick Start

Installation

# Clone the repository
git clone https://github.com/yourusername/agent-talk.git
cd agent-talk

# Install dependencies
npm install

# Build the project
npm run build

# Start the server
npm start

Environment Setup

# Copy the example environment file
cp .env.example .env

# Customize if needed (optional)
# AGENT_TALK_DB_PATH=./data/agent_talk.db

Development

# Watch for changes and rebuild
npm run watch

# Run in development mode
npm run dev

# Format code
npm run format

# Lint code
npm run lint

Architecture

Single Project Architecture

Agent Talk MCP Server
├── Tools (MCP Interface)
│   ├── Route Tools (register, list, search)
│   └── Issue Tools (report, track, resolve)
├── Services (Business Logic)
│   ├── RouteService (contract management)
│   └── IssueService (issue tracking)
├── Repositories (Data Access)
│   ├── RouteRepository (route persistence)
│   └── IssueRepository (issue persistence)
├── Database (SQLite)
│   └── Tables: routes, issues
└── Utilities (Validation, Error Handling)
    ├── Validation (OpenAPI schema validation)
    └── Error Handling (custom error types)

When working on multiple full-stack projects simultaneously, use a centralized Agent Talk server:

Central MCP Server
┌──────────────────────────────────────┐
│   Agent Talk MCP Server (Central)    │
│   npm start (Terminal 1)             │
│   Listens for all agents             │
│   data/myapp-shared.db               │
└──────────────────────────────────────┘
           │
      ┌────┼────┬──────────┬──────────┐
      │    │    │          │          │
      ▼    ▼    ▼          ▼          ▼
   Backend Frontend Mobile  Desktop  Other
   Project Project  App     App      Projects
   (Node.js)(React) (RN)    (Electron)

Project Directory Structure:

myapp/
├── myapp-agent-talk/              (Central MCP Server)
│   ├── src/
│   ├── package.json
│   ├── .env                       (DB: ./data/myapp-shared.db)
│   ├── data/
│   │   └── myapp-shared.db        (All projects use this)
│   └── npm start
│
├── backend/                       (Node.js/Express API)
│   ├── src/
│   ├── .env                       (AGENT_TALK_DB_PATH=../myapp-agent-talk/data/myapp-shared.db)
│   └── npm start
│
├── frontend/                      (React/Vue UI)
│   ├── src/
│   ├── .env                       (AGENT_TALK_DB_PATH=../myapp-agent-talk/data/myapp-shared.db)
│   └── npm start
│
└── mobile/                        (React Native/Flutter)
    ├── src/
    ├── .env                       (AGENT_TALK_DB_PATH=../myapp-agent-talk/data/myapp-shared.db)
    └── npm start

Available Tools

Route Management

register_or_update_route

Backend agent registers a new API route or updates an existing one.

{
  "group_name": "users",
  "path": "/api/v1/users",
  "method": "POST",
  "description": "Create a new user",
  "request_schema": {
    "type": "object",
    "properties": {
      "name": { "type": "string" },
      "email": { "type": "string", "format": "email" }
    },
    "required": ["name", "email"]
  },
  "response_schema": {
    "201": {
      "type": "object",
      "properties": {
        "id": { "type": "string", "format": "uuid" },
        "name": { "type": "string" },
        "email": { "type": "string" }
      }
    },
    "400": {
      "type": "object",
      "properties": {
        "error": { "type": "string" }
      }
    }
  },
  "status": "active"
}

get_route_contract

Frontend agent retrieves the complete contract for a specific endpoint.

{
  "path": "/api/v1/users",
  "method": "POST"
}

list_groups

Frontend agent discovers all available route groups (for context efficiency).

{}

Returns:

{
  "groups": ["users", "auth", "products"],
  "total_groups": 3,
  "total_routes": 45,
  "routes_by_status": {
    "active": 40,
    "draft": 3,
    "pending_implementation": 2
  }
}

list_routes_by_group

Frontend agent fetches routes within a specific group.

{
  "group_name": "users",
  "limit": 50,
  "offset": 0
}

search_routes

Search routes by path or description.

{
  "query": "user",
  "limit": 10
}

Issue Management

report_route_issue

Frontend agent reports a problem with a route.

{
  "route_id": "550e8400-e29b-41d4-a716-446655440000",
  "reporter": "frontend_agent",
  "issue_description": "The POST /api/v1/users endpoint returns 400 instead of 201 when creating a user with valid data. Expected status 201, got 400. The response_schema specifies it should return user ID."
}

list_route_issues

Backend agent retrieves issues for their routes.

{
  "route_id": "550e8400-e29b-41d4-a716-446655440000",
  "status_filter": "open",
  "limit": 100
}

list_open_issues

Backend agent gets a dashboard view of all problems across the system.

{
  "limit": 50,
  "offset": 0
}

resolve_route_issue

Backend agent marks an issue as resolved after fixing it.

{
  "issue_id": "550e8400-e29b-41d4-a716-446655440001"
}

reopen_route_issue

Reopen a resolved issue if the problem resurfaces.

{
  "issue_id": "550e8400-e29b-41d4-a716-446655440001"
}

list_issues_by_group

Get all issues for a specific route group.

{
  "group_name": "users",
  "limit": 100
}

get_issue_statistics

System-wide issue dashboard metrics.

{}

Returns:

{
  "total_issues": 15,
  "open_issues": 3,
  "resolved_issues": 12,
  "issues_by_reporter": {
    "frontend_agent": 8,
    "backend_agent": 2
  }
}

Data Models

Route Contract

interface RouteContract {
  id: string;                              // UUID
  group_name: string;                      // "users", "auth", etc.
  path: string;                            // "/api/v1/users"
  method: string;                          // "GET", "POST", etc.
  status: "draft" | "pending_implementation" | "active" | "deprecated";
  description: string;                     // What this endpoint does
  request_schema: OpenAPISchema;           // Request validation schema
  response_schema: Record<number, OpenAPISchema>; // Status code → schema
  created_at: number;                      // Unix timestamp
  updated_at: number;                      // Unix timestamp
}

Route Issue

interface RouteIssue {
  id: string;                    // UUID
  route_id: string;              // Foreign key to route
  reporter: string;              // "frontend_agent", etc.
  issue_description: string;     // Detailed problem description
  status: "open" | "resolved";
  created_at: number;            // Unix timestamp
  updated_at: number;            // Unix timestamp
}

Multi-Project Setup Guide

When working on multiple full-stack projects with shared backend, use a centralized Agent Talk instance.

Setup Steps

Step 1: Create central Agent Talk instance

mkdir myapp
cd myapp
git clone https://github.com/yourusername/agent-talk.git myapp-agent-talk
cd myapp-agent-talk
npm install
cp .env.example .env

Step 2: Configure central Agent Talk

# myapp/myapp-agent-talk/.env
AGENT_TALK_DB_PATH=./data/myapp-shared.db
NODE_ENV=production

Step 3: Start central Agent Talk (keep running)

cd myapp/myapp-agent-talk
npm start
# Terminal stays open, listens for agents from all projects

Step 4: Configure Backend Project

# myapp/backend/.env
AGENT_TALK_DB_PATH=../myapp-agent-talk/data/myapp-shared.db
BACKEND_PORT=5000
cd myapp/backend
npm start
# Backend Agent registers routes to central Agent Talk

Step 5: Configure Frontend Project

# myapp/frontend/.env
AGENT_TALK_DB_PATH=../myapp-agent-talk/data/myapp-shared.db
FRONTEND_PORT=3000
cd myapp/frontend
npm start
# Frontend Agent discovers and uses Backend routes

Step 6: Configure Mobile Project

# myapp/mobile/.env
AGENT_TALK_DB_PATH=../myapp-agent-talk/data/myapp-shared.db
MOBILE_PORT=3001
cd myapp/mobile
npm start
# Mobile Agent uses same routes from central Agent Talk

Multi-Project Workflow Example

Monday - Backend Development

# Terminal 1: Central Agent Talk
cd myapp/myapp-agent-talk && npm start

# Terminal 2: Backend
cd myapp/backend && npm start
# Backend Agent registers: POST /api/users, GET /api/users/{id}, etc.
# Routes saved to: myapp-shared.db

Tuesday - Frontend Development

# Terminal 1: Central Agent Talk (still running from Monday)
# Terminal 3: Frontend
cd myapp/frontend && npm start
# Frontend Agent discovers Monday's Backend routes
# Retrieves POST /api/users contract with full schema
# Implements form to consume the API
# If problems occur: reports issue via report_route_issue

Wednesday - Mobile Development

# Terminal 1: Central Agent Talk (still running)
# Terminal 4: Mobile
cd myapp/mobile && npm start
# Mobile Agent accesses same Backend routes
# Uses identical schema as Frontend
# Consistency guaranteed by central Agent Talk

Thursday - Bug Fixes

# Frontend Agent discovered: POST /api/users returns 500 instead of 201
# Reports issue to central Agent Talk
# Backend Agent sees open issue via list_open_issues
# Backend Agent fixes the bug
# Backend Agent marks issue as resolved
# Frontend Agent automatically aware of fix

Benefits

  • Single source of truth (myapp-shared.db)

  • Routes never mix between projects

  • All agents coordinate through one server

  • No data duplication

  • Easy to add more projects

  • Perfect for microservices

Alternative: Isolated Databases

If projects are completely independent, use separate databases:

# backend/.env
AGENT_TALK_DB_PATH=../myapp-agent-talk/data/backend-only.db

# frontend/.env
AGENT_TALK_DB_PATH=../myapp-agent-talk/data/frontend-only.db

# mobile/.env
AGENT_TALK_DB_PATH=../myapp-agent-talk/data/mobile-only.db

Each project gets its own database - complete isolation but no coordination.

Use Cases

Backend Agent Workflow

  1. Register New Endpoint

    Call: register_or_update_route
    Input: {path, method, request_schema, response_schema, status: "draft"}
    Output: Route ID, confirmation
  2. Monitor Integration Issues

    Call: list_route_issues
    Input: {route_id, status_filter: "open"}
    Output: Open issues for this route
  3. Update Route Status

    Call: register_or_update_route (with same path/method)
    Input: {status: "active"}
    Output: Updated route
  4. Resolve Reported Issues

    Call: resolve_route_issue
    Input: {issue_id}
    Output: Confirmation

Frontend Agent Workflow

  1. Discover Available Groups

    Call: list_groups
    Output: ["users", "auth", "products", ...]
  2. Explore Routes in a Group

    Call: list_routes_by_group
    Input: {group_name: "users"}
    Output: Summary of routes in this group
  3. Get Full Contract

    Call: get_route_contract
    Input: {path: "/api/v1/users", method: "POST"}
    Output: Complete request/response schemas
  4. Report Integration Issue

    Call: report_route_issue
    Input: {route_id, reporter, issue_description}
    Output: Issue ID, confirmation

Error Handling

Agent Talk provides detailed error messages to help agents understand what went wrong:

{
  "success": false,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "group_name must contain only alphanumeric characters, hyphens, and underscores",
    "statusCode": 400,
    "details": {
      "field": "group_name",
      "requirement": "alphanumeric, hyphens, underscores"
    }
  }
}

Common error codes:

  • VALIDATION_ERROR - Input validation failed

  • SCHEMA_VALIDATION_ERROR - OpenAPI schema is malformed

  • NOT_FOUND - Resource doesn't exist

  • CONFLICT - Operation conflicts with existing state

  • DATABASE_ERROR - Database operation failed

  • TOOL_NOT_FOUND - Requested tool doesn't exist

Database

Agent Talk uses SQLite for maximum portability:

  • Location: ./data/agent_talk.db (configurable via AGENT_TALK_DB_PATH)

  • Schema: Auto-created on first run

  • Indexes: Optimized for common queries

  • Foreign Keys: Enabled for referential integrity

Database Tables

-- Routes table
CREATE TABLE routes (
  id TEXT PRIMARY KEY,
  group_name TEXT NOT NULL,
  path TEXT NOT NULL,
  method TEXT NOT NULL,
  status TEXT NOT NULL DEFAULT 'draft',
  description TEXT NOT NULL,
  request_schema TEXT NOT NULL,  -- JSON
  response_schema TEXT NOT NULL, -- JSON
  created_at INTEGER NOT NULL,
  updated_at INTEGER NOT NULL,
  UNIQUE(group_name, path, method)
);

-- Issues table
CREATE TABLE issues (
  id TEXT PRIMARY KEY,
  route_id TEXT NOT NULL,
  reporter TEXT NOT NULL,
  issue_description TEXT NOT NULL,
  status TEXT NOT NULL DEFAULT 'open',
  created_at INTEGER NOT NULL,
  updated_at INTEGER NOT NULL,
  FOREIGN KEY (route_id) REFERENCES routes(id) ON DELETE CASCADE
);

Performance Considerations

  • Pagination: All list operations support pagination with limit/offset

  • Indexing: Optimized indexes on common filter fields

  • Search: Full-text search on path and description

  • Grouping: Routes grouped by domain to reduce context in large projects

  • Status Tracking: Efficient filtering by status for workflow management

Testing

While Agent Talk is production-ready, you can extend it with tests:

# Run existing tests
npm test

# Add your own tests in src/**/*.test.ts

Contributing

We welcome contributions! See CONTRIBUTING.md for guidelines.

Project Structure

agent-talk/
├── src/
│   ├── db/                    # Database initialization
│   │   └── database.ts
│   ├── repositories/          # Data access layer
│   │   ├── routeRepository.ts
│   │   └── issueRepository.ts
│   ├── services/              # Business logic
│   │   ├── routeService.ts
│   │   └── issueService.ts
│   ├── tools/                 # MCP tool definitions
│   │   ├── routeTools.ts
│   │   └── issueTools.ts
│   ├── types/                 # TypeScript interfaces
│   │   └── index.ts
│   ├── utils/                 # Utilities
│   │   ├── errors.ts         # Custom error classes
│   │   └── validation.ts      # Input validation
│   └── index.ts              # MCP server entry point
├── package.json
├── tsconfig.json
├── .env.example
├── .gitignore
├── README.md
└── CONTRIBUTING.md

License

MIT License - see LICENSE file for details

Support

Acknowledgments

Built with:


Agent Talk - Empowering autonomous agents to build better APIs together.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables secure coordination between multiple LLM agents through authenticated messaging, status updates, and conversation management. Features automatic secret redaction, rate limiting, and audit trails for safe multi-agent collaboration in development environments.
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables multiple AI coding agents to collaborate on a project by coordinating tasks, file leases, and messages through a shared hub, preventing conflicts and enabling parallel development.
    MIT
  • F
    license
    Not graded
    quality
    A
    maintenance
    Coordinates AI coding agents across machines by sharing interface contracts, intent, and breaking-change alerts, enabling agents to negotiate changes before they break each other.
    -
  • A
    license
    Not graded
    quality
    C
    maintenance
    Provides AI coding agents with accurate OpenAPI contract details to prevent hallucinated API calls, supporting multi-version pinning, endpoint discovery, and request validation.
    38 npm
    Apache 2.0