Every agent comes with a beautiful web UI out of the box. The interface is fully customizable and supports both static customization (header/intro) and dynamic generative UI that can render arbitrary HTML and TailwindCSS.
You can customize the header and introduction sections of your agent’s web UI using HTML and TailwindCSS:
Copy
import cycls# Initialize the agentagent = cycls.Agent()header = """<raw><div style="width:100%;padding:32px 0;background:linear-gradient(90deg,#e3eafc,#f5f7fa,#d1d9e6);color:#2c3e50;text-align:center;font-size:2.5rem;font-weight:bold;letter-spacing:2px;box-shadow:0 4px 16px rgba(44,62,80,0.08);border-radius:16px;margin:32px 0;"> 🚀 This is a <span style="text-decoration:underline;color:#4682b4;">Header</span></div></raw>"""intro = """this is an intro"""# Decorate your function to register it as an agent@agent(header=header, intro=intro)async def my_agent(context): return "Hello, world!"agent.run()
HTML/TailwindCSS string for the header section of your agent’s web UI. Use to customize the top portion of the interface. Must be wrapped in <raw> tags.
You can create clickable links that automatically send encoded text to the chat when clicked. This is useful for providing suggested questions or actions:
Copy
import cycls# Initialize the agentagent = cycls.Agent()header = """<raw><div style="width:100%;padding:32px 0;background:linear-gradient(90deg,#e3eafc,#f5f7fa,#d1d9e6);color:#2c3e50;text-align:center;font-size:2.5rem;font-weight:bold;letter-spacing:2px;box-shadow:0 4px 16px rgba(44,62,80,0.08);border-radius:16px;margin:32px 0;"> 🚀 This is a <span style="text-decoration:underline;color:#4682b4;">Header</span></div></raw>"""intro = """Welcome! Here are some things you can ask me:- [What can you help me with?](https://cycls.com/send/${encodeURIComponent("What can you help me with?")})- [Tell me about your features](https://cycls.com/send/${encodeURIComponent("Tell me about your features")})- [Show me an example](https://cycls.com/send/${encodeURIComponent("Show me an example")})"""# Decorate your function to register it as an agent@agent(header=header, intro=intro)async def my_agent(context): return """- [this a link](https://cycls.com/send/${encodeURIComponent("this is a link")})"""agent.run()
The default chat UI can render arbitrary HTML and TailwindCSS in responses. This enables you to create rich, interactive interfaces:
Copy
import cycls# Initialize the agentagent = cycls.Agent()header = """<raw><div style="width:100%;padding:32px 0;background:linear-gradient(90deg,#e3eafc,#f5f7fa,#d1d9e6);color:#2c3e50;text-align:center;font-size:2.5rem;font-weight:bold;letter-spacing:2px;box-shadow:0 4px 16px rgba(44,62,80,0.08);border-radius:16px;margin:32px 0;"> 🚀 This is a <span style="text-decoration:underline;color:#4682b4;">Header</span></div></raw>"""intro = """this is an intro"""# Decorate your function to register it as an agent@agent(header=header, intro=intro)async def my_agent(context): return """<div class="max-w-md mx-auto mt-10 bg-white rounded-xl shadow-md overflow-hidden md:max-w-2xl border border-gray-200"><div class="p-8"><div class="uppercase tracking-wide text-sm text-indigo-500 font-semibold">Card Title</div><p class="mt-2 text-gray-500">Hello, world! This is a card rendered with <span class="font-bold">HTML</span> and <span class="font-bold">TailwindCSS</span>.</p></div></div>"""agent.run()
Use the chat completion API to integrate your agent into mobile apps or any interface:
Copy
# Your agent provides an OpenAI-compatible API# Mobile apps can use the standard OpenAI SDKimport openaiclient = openai.OpenAI( api_key="sk-proj-1234567890", base_url="https://my-agent.cycls.ai")response = client.chat.completions.create( model="my-agent", messages=[ {"role": "user", "content": "Hello from mobile app!"} ])