Skip to main content

A beautiful terminal chat interface for OpenAI agents and DSPy Modules

Project description

agent-repl-chat

A beautiful terminal chat interface for OpenAI agents with rich markdown support and an elegant UI.

Installation

Install from PyPI:

pip install agent-repl-chat

Or install in development mode using uv:

uv pip install -e .

Usage

from repl_chat import start_chat
from agents import Agent

# Create your agent
agent = Agent(
    name="My Assistant",
    instructions="You are a helpful assistant that provides clear and concise answers.",
    model="gpt-4.1-mini"
)

# Start the chat interface
start_chat(agent)

Features

  • 🎨 Beautiful terminal interface with rich markdown rendering
  • 🔄 Conversation continuity with response threading
  • ⌨️ Interactive commands:
    • q, quit, or exit - Quit the chat
    • n or new - Start a new conversation
  • 🤖 Works with any OpenAI Agent configuration
  • ⚡ Async support for responsive interactions

Requirements

  • Python 3.11+
  • openai-agents
  • prompt-toolkit
  • rich

Development

The package follows Python packaging best practices with a src/ layout for clean imports and development workflows.

Setup for Development

  1. Clone the repository:

    git clone https://github.com/yourusername/agent-repl-chat.git
    cd agent-repl-chat
    
  2. Install in development mode:

    uv pip install -e .
    
  3. Run the example:

    uv run example.py
    

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Changelog

v0.1.1 (2025-01-03)

  • Updated README example to use gpt-4.1-mini model
  • Enhanced project metadata and documentation

v0.1.0 (2025-01-03)

  • Initial release
  • Beautiful terminal chat interface
  • Rich markdown support
  • Conversation continuity
  • Interactive commands (quit, new chat)
  • Async support for responsive interactions

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agent_repl_chat-0.2.0.tar.gz (111.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agent_repl_chat-0.2.0-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file agent_repl_chat-0.2.0.tar.gz.

File metadata

  • Download URL: agent_repl_chat-0.2.0.tar.gz
  • Upload date:
  • Size: 111.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.11

File hashes

Hashes for agent_repl_chat-0.2.0.tar.gz
Algorithm Hash digest
SHA256 0e391132e0f0e34203cfbd19314429e8b6a962c309ea492cb973562d1cbcfd86
MD5 93bb95e928c9295d0855cf68f4b98211
BLAKE2b-256 9257da3b357502c9a730b6c48337c336762f710760f81538ece5a2130bb5faab

See more details on using hashes here.

File details

Details for the file agent_repl_chat-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for agent_repl_chat-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ad737080a9ac014ef38d0b0286e07e20c0163c722cd233ef6269da8cf79da2ab
MD5 95e34863328a37a3ae1159cbdd88eae8
BLAKE2b-256 bb720eca23486a094be1fddd4930b90ea0e08495e6e21b99e974941258c96082

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page