I cloned the template. Followed the steps mentioned in README.md for enhancing the User Experience with PlatformUIAnnotation:
import os
from collections.abc import AsyncGenerator
from acp_sdk import Annotations, MessagePart, Metadata
from acp_sdk.models import Message
from acp_sdk.models.platform import PlatformUIAnnotation, PlatformUIType, AgentToolInfo
from acp_sdk.server import Context, RunYield, RunYieldResume, Server
from beeai_framework.agents.experimental.agent import RequirementAgent
server = Server()
@server.agent(
name="example_agent",
description="Example Agent",
metadata=Metadata(
annotations=Annotations(
beeai_ui=PlatformUIAnnotation(
ui_type=PlatformUIType.CHAT,
display_name="Example Agent",
user_greeting="Hello! I'm your AI assistant. How can I help you today?",
)
),
framework="BeeAI",
programming_language="Python",
recommended_models=["ibm/granite-3-3-8b-instruct"],
)
)
async def example_agent(input: list[Message], context: Context) -> AsyncGenerator[RunYield, RunYieldResume]:
agent = RequirementAgent(...)
response = await agent.run(input[-1].parts[0].content)
yield MessagePart(content=response.answer.text)
def run():
server.run(
host=os.getenv("HOST", "127.0.0.1"),
port=int(os.getenv("PORT", 8001))
)
if __name__ == "__main__":
run()
pyproject.toml:
dependencies = [
"beeai-framework[mcp]>=0.1.32",
"beeai-framework[acp]>=0.1.32",
"acp-sdk>=1.0.1",
"pyyaml>=6.0.2",
]
After running the server, the agent won't show up on BeeAI UI.
Running the agent from cli shows truncated error:
(example-agent) chintansoni@Chintans-MacBook-Pro Cloud-AI-Assistant % beeai run example_agent
💥 Error: Agent example_agent does not use any supported UIs.
Please use the agent according to the following examples and schema:
Moreover, the beeai list cli command lists the agent but UI shows as :
(cloud-docs-agent) chintansoni@Chintans-MacBook-Pro Cloud-AI-Assistant % beeai list
NAME STA… DESCRIPTION UI LOCATION MISSIN…
example_agent rea… Example Agent <non… http://host.docker.internal:8001/ <none>
agent_docs_creator mis… The agent analyzes AI sou… hand… official/beeai-framework/agent-docs-creator:agents-v… <none>
aider mis… An AI pair programmer tha… hand… community/aider:agents-v0.1.3 <none>
chat mis… The agent is an AI-powere… chat official/beeai-framework/chat:agents-v0.1.3 <none>
gpt_researcher mis… The agent conducts in-dep… hand… community/gpt-researcher:agents-v0.1.3 <none>
literature_review mis… This agent automates deep… hand… community/literature-review:agents-v0.1.3 <none>
marketing_strategy mis… The agent performs compre… hand… community/marketing-strategy:agents-v0.1.3 <none>
ollama_deep_resea… mis… The agent performs AI-dri… hand… community/ollama-deep-researcher:agents-v0.1.3 <none>
podcast_creator mis… The agent creates structu… hand… official/beeai-framework/podcast-creator:agents-v0.1… <none>
sequential_workfl… mis… The agent orchestrates a … <non… official/sequential-workflow:agents-v0.1.3 <none>
I cloned the template. Followed the steps mentioned in README.md for enhancing the User Experience with PlatformUIAnnotation:
pyproject.toml:
After running the server, the agent won't show up on BeeAI UI.
Running the agent from cli shows truncated error:
Moreover, the beeai list cli command lists the agent but UI shows as :