AgentFlow Python client library
pip install agentflow
import agentflow as af client = af.Client(endpoint="http://localhost:8000")
response = await af.chat("What can you do?", agent="MainAgent") print(response)
async for event in af.chat_stream("Hello", agent="MainAgent"): if event.type == "DELTA": print(event.delta, end="", flush=True)
response = await af.chat( "Follow up on the last topic", agent="MainAgent", conversation_id="conv_abc123", )
results = await af.KnowledgeBase.search( "How does billing work?", kb_id="kb_123", top_k=5, ) for result in results: print(result.content, result.score)
conversations = await af.Conversation.list()
messages = await af.Conversation.messages("conv_abc123")
status = await af.System.health() print(status)