Runtime¶
The Reminix Agent Runtime for building AI agents that integrate with the Reminix API.
Installation¶
Install with runtime dependencies:
pip install reminix[runtime]
Quick Start¶
from reminix.runtime import Agent, serve
agent = Agent("my-agent")
@agent.invoke
async def handle_invoke(input_data: dict) -> dict:
return {"output": f"Processed: {input_data.get('message', '')}"}
@agent.chat
async def handle_chat(messages: list) -> dict:
last_message = messages[-1]["content"] if messages else ""
return {"message": {"role": "assistant", "content": f"Reply: {last_message}"}}
if __name__ == "__main__":
serve(agent, port=8080)
API Reference¶
An AI agent that can handle invoke and chat requests. |
|
Start the HTTP server to serve agents. |
|
Request context passed to handlers. |
|
Chat message in OpenAI-compatible format. |
|
Assistant message response. |