@javier/agent
flwr new @javier/agentFlower AgentApp
This minimal AgentApp uses the OpenAI SDK to send the current prompt and the conversation's previous user and assistant messages through Flower Runtime. In a Space, it reads SpaceItems and sends its final response back as a message item. It also publishes streamed response events and prints the final response text. Use it as a starting point for a custom Flower Agent.
Flower Runtime supplies the SDK base URL and task token, so the AgentApp does not need provider credentials.
Build
Install the project and build its Flower App Bundle (FAB):
uv sync uv run flwr build
Customize
Edit agent/agent_app.py to change the model or add your agent logic. Direct runs use agent.prompt and agent.events.get_trace(); always-on runs read messages from agent.space.
Chat with an always-on agent
Create an agent and its initial Space (the script asks for its description):
../flower/framework/.venv/bin/python chat.py @javier/agent "Hello" --new
For a follow-up, the script lists matching Spaces and asks you to choose one:
../flower/framework/.venv/bin/python chat.py @javier/agent "Hello again"
Pass --space-id SPACE_ID to choose a known Space without the menu. The script uses the adjacent Flower framework checkout for the SpaceItems API. Creating an agent by Hub app ID runs the published FAB, so publish this app before using the script for a regular chat.
Learn more
See the Flower Agent documentation for more tutorials and guides.