Module: Agentd

Defined in:
lib/agentd.rb,
lib/agentd/cli.rb,
lib/agentd/agent.rb,
lib/agentd/error.rb,
lib/agentd/client.rb,
lib/agentd/config.rb,
lib/agentd/runner.rb,
lib/agentd/version.rb

Defined Under Namespace

Modules: CLIHelpers Classes: Agent, AgentCommands, AuthError, CLI, Client, Config, ContextCommands, Error, McpError, MemoryCommands, MessageCommands, NotFoundError, ReactionCommands, Runner, TaskCommands, ValidationError

Constant Summary collapse

VERSION =
"0.3.0"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.api_keyObject



22
23
24
# File 'lib/agentd.rb', line 22

def api_key
  @api_key || config.api_key || ENV["AGENTD_API_KEY"]
end

.endpointObject



18
19
20
# File 'lib/agentd.rb', line 18

def endpoint
  @endpoint || config.endpoint || "https://agentd.link"
end

Class Method Details

.agentObject

Convenience: Agentd.agent acts as the default agent client



31
32
33
# File 'lib/agentd.rb', line 31

def agent
  @agent ||= Agent.new(api_key:, endpoint:)
end

.configObject



26
27
28
# File 'lib/agentd.rb', line 26

def config
  @config ||= Config.load
end

.configure {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:

  • _self (Agentd)

    the object that the method was called on



14
15
16
# File 'lib/agentd.rb', line 14

def configure
  yield self
end