This is a home-made openai-agents based framework for simple agent coding. I am writing it for myself, so as they say, no guarantees.
pip install -r requirements.txt
pip install -e .Now the is only one provider - Openrouter. It has automatic refiller, so, in theory, there will be always actual models.
The framework rely on env var for providers key. It can be placed in environment, local .env (in project), .env near .venv
Simple hello world
from agents import Agent, Runner
import reagentic.providers.openrouter as openrouter
provider = openrouter.OpenrouterProvider(openrouter.DEEPSEEK_CHAT_V3_0324)
agent = Agent(name="Assistant", instructions="You are a helpful assistant", model=provider.get_openai_model())
result = Runner.run_sync(agent, "Write a haiku about recursion in programming.")
print(result.final_output)or with auto choose of model:
from agents import Agent, Runner
from reagentic.providers import openrouter
provider = openrouter.auto()
print(f"Will use {provider.model} model")
agent = Agent(name="Assistant", instructions="You are a helpful assistant", model=provider.get_openai_model())
result = Runner.run_sync(agent, "Write a haiku about recursion in programming.")
print(result.final_output)python3 -m reagentic --script openrouter_refillerpython3 -m reagentic --script model_chooser --provider openrouter --request "latest deepseek model"Example output:
Chosen Model: DEEPSEEK_CHAT
python -m reagentic --script model_chooser --provider openrouter --request "latest deepseek model" --paid trueExample output:
Chosen Model: deepseek/deepseek-chat-v3-0324
Reason: DeepSeek Chat V3 0324 is the latest iteration of DeepSeek models, offering a massive 685B-parameter MoE
architecture with outstanding instruction following and coding capabilities. This model succeeds the previous DeepSeek V3 and delivers strong performance across a variety of tasks, making it ideal for users seeking cutting-edge open-source DeepSeek models.