What To Do Next
Now that you have an agent connected to the platform, this page is a high-level map for customizing what your agent does and how each optimization run is executed.
How the pieces fit together
When the platform starts an optimization, your process receives the job through the Connector, which instantiates an executor you pass in and calls run(). That is the core contract; kwargs forwarded from Connector are defined by whichever executor you choose — they may differ widely, or be absent beyond the BaseExecutor defaults.
The stock RLExecutor (also what genie setup scaffolds) is a convenience for RL: it runs the standard loop for you and asks for an RLAgentEnv subclass that implements Gymnasium stepping. The agent / environment split in templates follows from that choice, not from the ADK itself. For other optimization methods, subclass BaseExecutor and implement run() directly — often via OptimizationContext.
flowchart LR
Platform[Genie platform] --> Connector
Connector --> Executor
Executor --> Agent[Your agent class]
Agent --> Env[Gymnasium env / simulator]
| Piece | Your code | Default |
|---|---|---|
| Entry point | src/main.py | Wires Connector + executor |
| Executor | Optional custom subclass | RLExecutor |
| Agent / optimizer | RLAgentEnv subclass or logic inside BaseExecutor | Template in src/agent.py |
| Environment | Built-in env ID or custom OptimizationEnv | Often AI4EE-Direct-Action-Env |
Most projects only replace src/agent.py and keep the stock RLExecutor entry point.
Choose your path
Reinforcement learning (most common)
Subclass RLAgentEnv and implement both:
AgentInterface—compute_action,experience,learn,save_models,load_models- Gymnasium —
reset,step,observation_space,action_space, …
Wire it in src/main.py:
from adk.connector import Connector
from adk.executors.rl import RLExecutor
from my_agent import MyAgent
app = Connector(
RLExecutor,
rl_agent_env_class=MyAgent,
model_handler=MyAgent, # required if the agent supports model transfer / export / import
)
app.start()
Start here: RL Agents, Environments, RLExecutor
Custom executor (non-RL or full control)
Subclass BaseExecutor and implement run() yourself. Use OptimizationContext to read design parameters and targets, call ctx.step_world(...), report progress with ctx.update_display(...), and finish with ctx.finish_optimization(...).
from adk.connector import Connector
from adk.base_executor import BaseExecutor
class MyOptimizerExecutor(BaseExecutor):
def run(self) -> None:
ctx = self.build_optimization_context()
while not ctx.is_stop_requested():
# your optimization logic
pass
app = Connector(MyOptimizerExecutor)
app.start()
Use this path for heuristics, evolutionary methods, Bayesian optimization, or any loop that does not map cleanly onto the RL episode/step API.
Start here: BaseExecutor, OptimizationContext, Agents (custom executor section)
Environments and simulator interaction
RL agents usually hold a Gymnasium env (for example a built-in ADK environment) that translates actions into simulator steps. You can use a stock env ID, subclass OptimizationEnv, or implement stepping directly on your RLAgentEnv — but the Gymnasium interface on your agent class is still required when using RLExecutor. With a custom executor, use OptimizationContext instead.
Start here: RL Agents, Environments, Specifications, RL run data
What happens during a run
Regardless of path, an optimization run loads context from the platform (design parameters, targets, observations), loops until stopped or a limit is reached, and streams progress back to Genie.
RLExecutor implements the usual RL cycle — episodes, reset / step / learn, checkpoint saves. See Optimization loop for the step-by-step breakdown.
Models, checkpoints, and model handling
Models are how one agent implementation serves many circuits or systems: weights and per-system metadata live under models/<name>/. The executor loads checkpoints from models/<genie-model>/models/ at run time; changes sync to the platform while the agent is running.
| Task | Where to look |
|---|---|
| Add or configure a model | Getting Started, Models |
Day-to-day genie model commands | Models, genie model -h |
| Transfer, export, or import between models | Model handling, ModelHandler |
Quick reference
| Goal | Start here |
|---|---|
| Implement an RL agent | RL Agents, RLAgentEnv, and AgentInterface |
| Understand the RL run loop | Optimization loop and RLExecutor |
| Use or extend a Gymnasium environment | Environments and OptimizationEnv |
| Custom (non-RL) optimization logic | BaseExecutor and OptimizationContext |
| Agent project layout and settings | Agents |
| End-to-end walkthrough | Getting Started and this page |