Agents
agents
¶
Prepares agent config directories with wrappers, instructions, and session hooks.
Generates the terok-executor.sh wrapper that sets up git identity and CLI
flags inside task containers, writes the per-task instructions file, injects it
into the shared OpenCode configs, and installs the Claude SessionStart hook.
AgentConfigSpec(tasks_root, task_id, prompt=None, agent='claude', instructions=None, default_agent=None, mounts_base=None)
dataclass
¶
Groups parameters for preparing an agent-config directory.
tasks_root
instance-attribute
¶
task_id
instance-attribute
¶
prompt = None
class-attribute
instance-attribute
¶
agent = 'claude'
class-attribute
instance-attribute
¶
instructions = None
class-attribute
instance-attribute
¶
default_agent = None
class-attribute
instance-attribute
¶
mounts_base = None
class-attribute
instance-attribute
¶
prepare_agent_config_dir(spec)
¶
Create and populate the agent-config directory for a task.
Writes:
- terok-executor.sh (always) — wrapper functions with git env vars
- prompt.txt (if prompt given, headless only)
- instructions.md (always) — custom instructions or a neutral default
- instructions path injected into shared
OpenCode and Blablador configs
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
spec
|
AgentConfigSpec
|
All agent-config parameters bundled in an |
required |
Returns the agent_config_dir path.