Get your first agent live and start calling it from your app. Configure via UI for quick results, or deploy custom code for full control — either way, you’ll have a working agent in minutes.
response = client.agents.invoke( "chat-assistant", messages=[ {"role": "user", "content": "Hello! What can you do?"} ])# Chat agents return 'message' with the assistant's responseprint(response["message"]["content"])
# Streaming task agentfor chunk in client.agents.invoke( "my-agent", prompt="Generate a story about AI", stream=True): print(chunk, end="", flush=True)# Streaming chat agentfor chunk in client.agents.invoke( "chat-assistant", messages=[{"role": "user", "content": "Tell me a story"}], stream=True): print(chunk, end="", flush=True)