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.get

Retrieves an agent by its ID.

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

    Retrieves an agent by its ID.

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

    Retrieves an agent by its ID.

    Goal

    View detailed agent configuration.

    Context

    Called when viewing agent details or editing.

    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 GetAgentQuery = defineQuery({
    	meta: {
    		key: 'agent-console.agent.get',
    		version: '1.0.0',
    		stability: 'stable',
    		owners: ['@agent-console-team'],
    		tags: ['agent', 'get'],
    		description: 'Retrieves an agent by its ID.',
    		goal: 'View detailed agent configuration.',
    		context: 'Called when viewing agent details or editing.',
    	},
    	io: {
    		input: defineSchemaModel({
    			name: 'GetAgentInput',
    			fields: {
    				agentId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
    				includeTools: { type: ScalarTypeEnum.Boolean(), isOptional: true },
    			},
    		}),
    		output: AgentWithToolsModel,
    		errors: {
    			AGENT_NOT_FOUND: {
    				description: 'The specified agent does not exist',
    				http: 404,
    				gqlCode: 'AGENT_NOT_FOUND',
    				when: 'Agent ID is invalid',
    			},
    		},
    	},
    	policy: { auth: 'user' },
    	acceptance: {
    		scenarios: [
    			{
    				key: 'get-agent-happy-path',
    				given: ['Agent exists'],
    				when: ['User requests agent by ID'],
    				then: ['Agent details are returned'],
    			},
    			{
    				key: 'get-agent-with-tools',
    				given: ['Agent exists with assigned tools'],
    				when: ['User requests agent with includeTools=true'],
    				then: ['Agent details with tools list are returned'],
    			},
    		],
    		examples: [
    			{
    				key: 'get-basic',
    				input: { agentId: 'agent-123', includeTools: false },
    				output: {
    					id: 'agent-123',
    					name: 'Support Assistant',
    					status: 'active',
    					tools: [],
    				},
    			},
    		],
    	},
    });