> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agentrpc.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Get started with AgentRPC in minutes

### 1. Get an API Key

**1. Create an account**

Visit [AgentRPC Dashboard](https://app.agentrpc.com) and sign up for a free account.

**2. Generate an API key**

Once logged in, navigate to Cluster Settings > API Keys section and create a new API key.

**3. Copy your API key**

Copy your API key to use in the next steps. Keep this key secure as it provides access to your AgentRPC account.

### 2. Register a Tool

Choose your preferred language to register a tool with AgentRPC:

> [tab] TypeScript
>
> ```ts theme={null}
> import { AgentRPC } from 'agentrpc';
> import { z } from 'zod';
>
> const rpc = new AgentRPC({
>   apiSecret: process.env.AGENTRPC_API_SECRET!,
> });
>
> rpc.register({
>   name: 'getWeather',
>   description: 'Return weather information at a given location',
>   schema: z.object({ location: z.string() }),
>   handler: async ({ location }) => {
>     return {
>       location: location,
>       temperature: 'variable',
>       parcipitation: 'probably',
>     };
>   },
> });
>
> rpc.listen();
>
> ```

> [tab] Go
>
> ```go theme={null}
> package main
>
> import (
> 	"os"
> 	"os/signal"
> 	"syscall"
>
> 	"github.com/agentrpc/agentrpc/sdk-go"
> )
>
> func main() {
> 	rpc, _ := agentrpc.New(agentrpc.Options{
> 		APISecret: os.Getenv("AGENTRPC_API_SECRET"),
> 	})
>
> 	rpc.Register(agentrpc.Tool{
> 		Name:        "getWeather",
> 		Description: "Return weather information at a given location",
> 		Handler: func(input struct{ Location string }) string {
> 			return "probably raining"
> 		},
> 	})
>
> 	go func() {
> 		rpc.Listen()
> 	}()
>
> 	sigChan := make(chan os.Signal, 1)
> 	signal.Notify(sigChan, os.Interrupt, syscall.SIGTERM)
>
> 	<-sigChan
> 	defer rpc.Unlisten()
> }
>
> ```

For more detailed examples, check out the SDK repositories:

* [TypeScript SDK](https://github.com/agentrpc/agentrpc/tree/main/sdk-node)
* [Go SDK](https://github.com/agentrpc/agentrpc/tree/main/sdk-go)
* [Python SDK](https://github.com/agentrpc/agentrpc/tree/main/sdk-python)

### 3. Connect to an Agent

> [tab] OpenAI Completions SDK
>
> ```ts theme={null}
> import { OpenAI } from 'openai';
> import { AgentRPC } from 'agentrpc';
>
> const openai = new OpenAI({ apiKey: process.env.OPENAI_API_KEY });
> const rpc = new AgentRPC({ apiSecret: process.env.AGENTRPC_API_SECRET });
>
> const main = async () => {
>   const tools = await rpc.OpenAI.getTools();
>   const completion = await openai.chat.completions.create({
>     model: 'gpt-4o',
>     messages: [
>       {
>         role: 'user',
>         content: 'What is the weather in Melbourne?',
>       },
>     ],
>     tools,
>   });
>
>   const message = completion.choices[0]?.message;
>
>   if (message?.tool_calls) {
>     for (const toolCall of message.tool_calls) {
>       console.log('Agent is calling Tool', toolCall.function.name);
>       const result = await rpc.OpenAI.executeTool(toolCall);
>       console.log(result);
>     }
>   }
> };
>
> main();
>
> ```

> [tab] OpenAI Agents SDK
>
> ```py theme={null}
> import asyncio
> import os
>
> from agentrpc import AgentRPC
> from agents import Agent, Runner
>
>
> async def main():
>     agentrpc = AgentRPC(api_secret=os.environ.get("AGENTRPC_API_SECRET", ""))
>     agent = Agent(name="AgentRPC Agent", tools=agentrpc.openai.agents.get_tools())
>
>     result = await Runner.run(
>         agent,
>         input="What is the weather in Melbourne?",
>     )
>     print(result.final_output)
>
>
> if __name__ == "__main__":
>     asyncio.run(main())
>
> ```

> [tab] Claude MCP
>
> Add the following to your `claude_desktop_config.json`:
>
> ```json theme={null}
> {
>   "mcpServers": {
>     "agentrpc": {
>       "command": "npx",
>       "args": ["-y", "agentrpc", "mcp"],
>       "env": {
>         "AGENTRPC_API_SECRET": "<YOUR_API_SECRET>"
>       }
>     }
>   }
> }
> ```
>
> [More details](https://modelcontextprotocol.io/quickstart/user)

> [tab] Claude Cursor
>
> Add the following to your `~/.cursor/mcp.json`:
>
> ```json theme={null}
> {
>   "mcpServers": {
>     "agentrpc": {
>       "command": "npx",
>       "args": ["-y", "agentrpc", "mcp"],
>       "env": {
>         "AGENTRPC_API_SECRET": "<YOUR_API_SECRET>"
>       }
>     }
>   }
> }
> ```
>
> [More details](https://docs.cursor.com/context/model-context-protocol#configuring-mcp-servers)

### 4. Monitor and Manage Tools

Navigate to the [AgentRPC Dashboard](https://app.agentrpc.com) to monitor tool usage, health, and performance.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.