Socket
Book a DemoInstallSign in
Socket

@ag-kit/examples-claude-agent-agentic-chat

Package Overview
Dependencies
Maintainers
2
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ag-kit/examples-claude-agent-agentic-chat

Claude Agent SDK agentic chat example

latest
npmnpm
Version
0.0.11-alpha.2
Version published
Maintainers
2
Created
Source

Claude Agent SDK - Agentic Chat Example

This example demonstrates how to use Claude Agent SDK with AG-Kit for a simple conversational chatbot.

Features

  • Claude Agent SDK Integration: Uses the official Claude Agent SDK
  • Built-in Tools: Leverages Claude's powerful built-in tools (Bash, File Operations, Web tools, etc.)
  • Permission Management: Fine-grained control over tool execution
  • MCP Support: Model Context Protocol for extending capabilities
  • AG-Kit Compatible: Integrates seamlessly with AG-Kit server infrastructure

Structure

claude-agent/agentic-chat/
├── src/
│   ├── agent.ts      # Agent creation logic
│   └── index.ts      # Export entry point
├── package.json
├── tsconfig.json
├── tsup.config.ts
└── README.md

Usage

This package is designed to be imported by the AG-Kit server. The agent factory is exposed via:

import { createAgent } from "@ag-kit/examples-claude-agent-agentic-chat";

const agent = createAgent();

Configuration

The agent is configured through environment variables:

  • ANTHROPIC_API_KEY: Your Anthropic API key (required)
  • CLAUDE_MODEL: Claude model to use (default: claude-3-5-sonnet-20241022)

Permission Modes

  • auto: Execute tools automatically with permission checking
  • ask: Always ask user before executing tools
  • silent: Execute tools without notifications
  • disable: Disable all tool execution

Built-in Tools

Claude Agent SDK includes powerful built-in tools:

  • Bash: Execute shell commands
  • File Operations: Read, write, edit files
  • Glob: Find files by pattern
  • Grep: Search file contents
  • Web Fetch: Fetch web content
  • Web Search: Search the web

Development

Build

pnpm build

This will compile the TypeScript code to the dist directory.

Learn More

  • Claude Agent SDK Documentation
  • AG-Kit Documentation
  • Model Context Protocol (MCP)

FAQs

Package last updated on 23 Dec 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts