OSS-first docs

These docs teach the open system first: contracts, generated surfaces, runtimes, governance, and incremental adoption. Studio shows up as the operating layer on top, not as the source of truth.

agent-console.agent.list

Lists agents for an organization with optional filtering.

  • Type: operation (query)
  • Version: 1.0.0
  • Stability: stable
  • Owners: @agent-console-team
  • Tags: agent, list
  • File: packages/examples/agent-console/src/agent/agent.operation.ts
  • field.key.label
    agent-console.agent.list
    field.version.label
    1.0.0
    field.type.label
    operation (query)
    field.title.label
    agent-console.agent.list
    field.description.label

    Lists agents for an organization with optional filtering.

  • Type: operation (query)
  • Version: 1.0.0
  • Stability: stable
  • Owners: @agent-console-team
  • Tags: agent, list
  • File: packages/examples/agent-console/src/agent/agent.operation.ts
  • field.tags.label
    agent,list
    field.owners.label
    @agent-console-team
    field.stability.label
    stable

    Lists agents for an organization with optional filtering.

    Goal

    Browse and search available agents.

    Context

    Agent list/dashboard view.

    Source Definition

    import {
    	defineCommand,
    	defineQuery,
    } from '@lssm-tech/lib.contracts-spec/operations';
    import { defineSchemaModel, ScalarTypeEnum } from '@lssm-tech/lib.schema';
    import { AgentStatusEnum, ModelProviderEnum } from './agent.enum';
    import { AgentCreatedEvent } from './agent.event';
    import {
    	AgentSummaryModel,
    	AgentWithToolsModel,
    	CreateAgentInputModel,
    	UpdateAgentInputModel,
    } from './agent.schema';
    
    export const ListAgentsQuery = defineQuery({
    	meta: {
    		key: 'agent-console.agent.list',
    		version: '1.0.0',
    		stability: 'stable',
    		owners: ['@agent-console-team'],
    		tags: ['agent', 'list'],
    		description: 'Lists agents for an organization with optional filtering.',
    		goal: 'Browse and search available agents.',
    		context: 'Agent list/dashboard view.',
    	},
    	io: {
    		input: defineSchemaModel({
    			name: 'ListAgentsInput',
    			fields: {
    				organizationId: {
    					type: ScalarTypeEnum.String_unsecure(),
    					isOptional: false,
    				},
    				status: { type: AgentStatusEnum, isOptional: true },
    				modelProvider: { type: ModelProviderEnum, isOptional: true },
    				search: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
    				limit: {
    					type: ScalarTypeEnum.Int_unsecure(),
    					isOptional: true,
    					defaultValue: 20,
    				},
    				offset: {
    					type: ScalarTypeEnum.Int_unsecure(),
    					isOptional: true,
    					defaultValue: 0,
    				},
    			},
    		}),
    		output: defineSchemaModel({
    			name: 'ListAgentsOutput',
    			fields: {
    				items: { type: AgentSummaryModel, isArray: true, isOptional: false },
    				total: { type: ScalarTypeEnum.Int_unsecure(), isOptional: false },
    				hasMore: { type: ScalarTypeEnum.Boolean(), isOptional: false },
    			},
    		}),
    	},
    	policy: { auth: 'user' },
    	acceptance: {
    		scenarios: [
    			{
    				key: 'list-agents-happy-path',
    				given: ['Organization has agents'],
    				when: ['User lists agents'],
    				then: ['Paginated list of agents is returned'],
    			},
    			{
    				key: 'list-agents-filter-by-status',
    				given: ['Organization has agents with mixed statuses'],
    				when: ['User filters by status=active'],
    				then: ['Only active agents are returned'],
    			},
    		],
    		examples: [
    			{
    				key: 'list-basic',
    				input: { organizationId: 'org-123', limit: 10, offset: 0 },
    				output: { items: [], total: 0, hasMore: false },
    			},
    		],
    	},
    });