Examples Overview | Agent Tool Protocol
Skip to main content

Examples Overview

Explore practical examples demonstrating Agent Tool Protocol features and use cases.

Getting Started Examples

Start here if you're new to ATP:

Client Features

Learn about client capabilities:

Security Examples

Implement security features:

Integration Examples

Integrate with popular frameworks:

Production Examples

Production-ready implementations:

By Difficulty

Beginner:

  • Simple Server
  • Simple Client
  • Custom API

Intermediate:

  • LLM Integration
  • Client Tools
  • LangChain Agent

Advanced:

  • Security Policies
  • LangGraph Agent
  • Full-Stack App

By Feature

Execution:

APIs:

LLM:

Security:

Scaling:

Running Examples

Clone the Repository

git clone https://github.com/mondaycom/agent-tool-protocol.git
cd agent-tool-protocol

Install Dependencies

yarn install

Run an Example

cd examples/quickstart
npx tsx server.ts

In another terminal:

cd examples/quickstart
npx tsx client.ts

Example Structure

Each example includes:

  • README.md: Explanation and instructions
  • server.ts: Server implementation (if applicable)
  • client.ts: Client implementation
  • package.json: Dependencies
  • env.example: Environment variable template

Common Setup

Most examples use this basic setup:

Server

import { createServer } from '@mondaydotcomorg/atp-server';

const server = createServer({
execution: {
timeout: 30000,
memory: 128 * 1024 * 1024,
},
});

// Register APIs
server.registerAPI('example', {
// API functions
});

server.listen(3333);

Client

import { AgentToolProtocolClient } from '@mondaydotcomorg/atp-client';

const client = new AgentToolProtocolClient({
baseUrl: 'http://localhost:3333',
});

await client.init();
await client.connect();

const result = await client.execute(`
// Your code here
`);

Environment Setup

Most examples require environment variables:

# .env
ANTHROPIC_API_KEY=your-key-here
OPENAI_API_KEY=your-key-here
REDIS_URL=redis://localhost:6379

Copy env.example to .env and fill in your values:

cp env.example .env

Troubleshooting

Port Already in Use

If port 3333 is taken:

// Change port in both server and client
server.listen(3334);

const client = new AgentToolProtocolClient({
baseUrl: 'http://localhost:3334',
});

Missing API Keys

Most LLM examples require API keys:

export ANTHROPIC_API_KEY=your-key
# or
export OPENAI_API_KEY=your-key

TypeScript Errors

Make sure you've built the packages:

yarn build

Contributing Examples

We welcome example contributions! See CONTRIBUTING.md.

Example Template

/**
* Example: [Name]
*
* Description: Brief description of what this example demonstrates
*
* Key Features:
* - Feature 1
* - Feature 2
*
* Prerequisites:
* - Prerequisite 1
* - Prerequisite 2
*/

// Implementation...

Next Steps

Support

  • GitHub Issues: Report bugs or request features
  • Discussions: Ask questions and share ideas
  • Examples Directory: Browse all examples in the repo
Agent Tool Protocol | ATP - Code Execution for AI Agents