The Galadriel framework includes a built-in Gradio UI Client and a Terminal Client, enabling seamless local experimentation right out of the box. Unlike third-party clients such as Discord or Telegram, these clients require no additional configuration or authentication tokens. This makes them ideal for testing and debugging your agent before transitioning to a more advanced setup.

Gradio Client

Using Gradio with AgentRuntime

Gradio can be easily imported and used as a client right out of the box. For example, let’s take the Discord agent setup and swap out the client for Gradio, as demonstrated in the code snippet below:

from galadriel.core_agent import LiteLLMModel
from dotenv import load_dotenv
from pathlib import Path
from character_agent import CharacterAgent
from galadriel.tools.composio_converter import convert_action
from tools import get_time
from galadriel import AgentRuntime
import os
import asyncio
from galadriel.clients import GradioClient

load_dotenv(dotenv_path=Path(".") / ".env", override=True)
model = LiteLLMModel(model_id="gpt-4o", api_key=os.getenv("OPENAI_API_KEY"))

composio_weather_tool = convert_action(
    os.getenv("COMPOSIO_API_KEY"), "WEATHERMAP_WEATHER"
)

elon_musk_agent = CharacterAgent(
    character_json_path="agent.json",
    tools=[composio_weather_tool, get_time],
    model=model,
    max_steps=6,
)

**gradio_client = GradioClient()**

runtime = AgentRuntime(
    inputs=[**gradio_client**],
    outputs=[**gradio_client**],
    agent=elon_musk_agent,
)

asyncio.run(runtime.run())

Notice how simple it is, no extra configuration or token is required.

Interacting with Gradio UI

Once the Agent is running, you can open Gradio UI locally in http://0.0.0.0:7860.

Here’s a screenshot showcasing an couple message interaction with Gradio:

Terminal client

The Terminal Client provides an all-in-one debugging and testing environment. It is particularly useful as a minimal solution for agents that require ongoing conversations, as it keeps both the interaction and logs in the same terminal session.

Using Terminal client with AgentRuntime

Similar to the Gradio client, the Terminal Client can be imported and used directly without extra configuration:

from galadriel.clients import TerminalClient

terminal_client = TerminalClient()

runtime = AgentRuntime(
    inputs=[terminal_client],
    outputs=[terminal_client],
    agent=<your-agent>,
)

Interacting with Terminal Client

Once the agent is running, you can interact with it directly in the terminal. Your input will appear after the you: prompt, and the agent’s response will follow the Agent: log.

Below is a screenshot showcasing a simple interaction:

Conclusion

The Gradio UI Client offers an intuitive and seamless way to test and debug your agent locally, requiring no extra configuration or authentication tokens. This makes it ideal for rapid experimentation before integrating with more complex clients like Discord or Telegram.

For a lightweight alternative, the Terminal Client allows direct command-line interaction, making it useful for quick tests in non-graphical environments or when running agents on remote servers.

By leveraging both Gradio and the Terminal Client, you can efficiently prototype, debug, and refine your agent before deploying it in a production setting.

What next?

To unlock more capabilities to your agent, check out how to use more complex clients: