AgentRegistry
Defined in: scoring/agents.ts:132
Registry for managing available agents
Example
Section titled “Example”const registry = new AgentRegistry();
// Register your agents (implementations from @jbcom/agentic or custom)registry.register(myOllamaAgent);registry.register(myJulesAgent);registry.register(myCustomAgent);
// Get best agent for a complexity tierconst agent = registry.optimalFor('moderate');Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new AgentRegistry():
AgentRegistry
Returns
Section titled “Returns”AgentRegistry
Accessors
Section titled “Accessors”Get Signature
Section titled “Get Signature”get size():
number
Defined in: scoring/agents.ts:243
Get count of registered agents
Returns
Section titled “Returns”number
Methods
Section titled “Methods”all():
AgentDefinition<unknown>[]
Defined in: scoring/agents.ts:193
Get all registered agents
Returns
Section titled “Returns”AgentDefinition<unknown>[]
clear()
Section titled “clear()”clear():
void
Defined in: scoring/agents.ts:250
Clear all agents
Returns
Section titled “Returns”void
enabled()
Section titled “enabled()”enabled():
AgentDefinition<unknown>[]
Defined in: scoring/agents.ts:200
Get all enabled agents
Returns
Section titled “Returns”AgentDefinition<unknown>[]
export()
Section titled “export()”export():
Omit<AgentDefinition<unknown>,"execute">[]
Defined in: scoring/agents.ts:257
Export registry configuration (for serialization)
Returns
Section titled “Returns”Omit<AgentDefinition<unknown>, "execute">[]
forTier()
Section titled “forTier()”forTier(
tier,includeDisabled?):AgentDefinition<unknown>[]
Defined in: scoring/agents.ts:208
Get agents that can handle a specific complexity tier Sorted by priority (lowest first), then by cost
Parameters
Section titled “Parameters”includeDisabled?
Section titled “includeDisabled?”boolean = false
Returns
Section titled “Returns”AgentDefinition<unknown>[]
get(
id):AgentDefinition<unknown> |undefined
Defined in: scoring/agents.ts:229
Get agent by ID
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”AgentDefinition<unknown> | undefined
has(
id):boolean
Defined in: scoring/agents.ts:236
Check if an agent is registered
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”boolean
optimalFor()
Section titled “optimalFor()”optimalFor(
tier):AgentDefinition<unknown> |undefined
Defined in: scoring/agents.ts:222
Get the optimal (first choice) agent for a complexity tier
Parameters
Section titled “Parameters”Returns
Section titled “Returns”AgentDefinition<unknown> | undefined
register()
Section titled “register()”register<
T>(agent):this
Defined in: scoring/agents.ts:138
Register an agent
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”Returns
Section titled “Returns”this
registerAll()
Section titled “registerAll()”registerAll(
agents):this
Defined in: scoring/agents.ts:146
Register multiple agents at once
Parameters
Section titled “Parameters”agents
Section titled “agents”AgentDefinition<unknown>[]
Returns
Section titled “Returns”this
setCost()
Section titled “setCost()”setCost(
id,cost):void
Defined in: scoring/agents.ts:183
Update an agent’s cost (for dynamic pricing)
Parameters
Section titled “Parameters”string
number
Returns
Section titled “Returns”void
setEnabled()
Section titled “setEnabled()”setEnabled(
id,enabled):void
Defined in: scoring/agents.ts:163
Enable/disable an agent at runtime
Parameters
Section titled “Parameters”string
enabled
Section titled “enabled”boolean
Returns
Section titled “Returns”void
setPriority()
Section titled “setPriority()”setPriority(
id,priority):void
Defined in: scoring/agents.ts:173
Update an agent’s priority (for dynamic rebalancing)
Parameters
Section titled “Parameters”string
priority
Section titled “priority”number
Returns
Section titled “Returns”void
unregister()
Section titled “unregister()”unregister(
id):boolean
Defined in: scoring/agents.ts:156
Unregister an agent
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”boolean