PHPackages                             llm-agents/cli-chat - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. llm-agents/cli-chat

ActiveLibrary[CLI &amp; Console](/categories/cli)

llm-agents/cli-chat
===================

A simple CLI chat application

1.4.0(1y ago)0244MITPHPPHP ^8.2

Since Aug 31Pushed 1y ago1 watchersCompare

[ Source](https://github.com/llm-agents-php/cli-chat)[ Packagist](https://packagist.org/packages/llm-agents/cli-chat)[ RSS](/packages/llm-agents-cli-chat/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (8)Dependencies (7)Versions (9)Used By (0)

LLM Agents CLI Chat
===================

[](#llm-agents-cli-chat)

This cool package gives you a CLI chat interface to chat with LLM agents. It's built on top of Symfony Console, so you know it's gonna be smooth sailing.

What's this all about?
----------------------

[](#whats-this-all-about)

- Start chat sessions with different agents
- Send messages and get responses
- Handle tool calls and their results
- Display chat history

It's perfect for testing your agents or building CLI-based chatbots.

Installation
------------

[](#installation)

You can install the package via Composer:

```
composer require llm-agents/cli-chat
```

Configuration
-------------

[](#configuration)

This package doesn't require much configuration. The main things you'll need to set up are:

- An implementation of `LLM\Agents\Chat\ChatServiceInterface`
- An implementation of `LLM\Agents\Chat\ChatHistoryRepositoryInterface`
- An implementation of `LLM\Agents\Chat\SessionInterface`
- Your agent registry
- Your tool registry

Usage
-----

[](#usage)

To use this package, you need to create two console commands in your application:

- A command to start a chat session
- A command to display chat history

Here's how you can set these up using Spiral framework:

> **Note:** You can use any framework or library that supports Symfony Console commands.

### Chat Session Command

[](#chat-session-command)

This command starts a new chat session:

```
