huginn / huginn

Create agents that monitor and act on your behalf. Your agents are standing by!
MIT License
43.12k stars 3.75k forks source link

IRC agent(s): how to go about it #113

Closed kyzh closed 10 years ago

kyzh commented 10 years ago

I am now pondering writing a huginn agent to send data to IRC. I'm able to create an agent that do "connect -> join -> send message -> disconnect" using a randomly chosen gem.

But there is possibly more to IRC than the simple workflow above. Here is a couple of example:

It would be nice to have a discussion on what we could do and what we actually want to do when we couple huginn with IRC capability.

cantino commented 10 years ago

I think an IRC agent is a great idea!

It could be like the Twitter Agent that has a special external process that watches Twitter, or it could connect and disconnect.

One thing I've been thinking about is allowing Agents to run processes, like the TwitterAgent does. Maybe Agents can register an EventMachine listener and run persistent processes?

On Wed, Dec 11, 2013 at 8:04 AM, Florentin Raud notifications@github.comwrote:

I am now pondering writing a huginn agent to send data to IRC. I'm able to create an agent that do "connect -> join -> send message -> disconnect" using a randomly chosen gem.

But there is possibly more to IRC than the simple workflow above. Here is a couple of example:

  • listen for an IRC event (join, quit, etc.) -> create an event on match
  • listen for specific message -> create an event on message
  • listen for specific command -> run an agent, re-emit event, etc...
  • listen for private message -> send events to the user that sent private messages
  • listen for a regex -> create an event on match.

It would be nice to have a discussion on what we could do and what we actually want to do when we couple huginn with IRC capability.

— Reply to this email directly or view it on GitHubhttps://github.com/cantino/huginn/issues/113 .

crawfordcomeaux commented 10 years ago

Check out how GitHub uses hubot. That might open up several possibilities. A hubot agent would also be handy.

On Wed, Dec 11, 2013 at 12:27 PM, Andrew Cantino notifications@github.com wrote:

I think an IRC agent is a great idea! It could be like the Twitter Agent that has a special external process that watches Twitter, or it could connect and disconnect. One thing I've been thinking about is allowing Agents to run processes, like the TwitterAgent does. Maybe Agents can register an EventMachine listener and run persistent processes? On Wed, Dec 11, 2013 at 8:04 AM, Florentin Raud notifications@github.comwrote:

I am now pondering writing a huginn agent to send data to IRC. I'm able to create an agent that do "connect -> join -> send message -> disconnect" using a randomly chosen gem.

But there is possibly more to IRC than the simple workflow above. Here is a couple of example:

  • listen for an IRC event (join, quit, etc.) -> create an event on match
  • listen for specific message -> create an event on message
  • listen for specific command -> run an agent, re-emit event, etc...
  • listen for private message -> send events to the user that sent private messages
  • listen for a regex -> create an event on match.

It would be nice to have a discussion on what we could do and what we actually want to do when we couple huginn with IRC capability.

— Reply to this email directly or view it on GitHubhttps://github.com/cantino/huginn/issues/113 .


Reply to this email directly or view it on GitHub: https://github.com/cantino/huginn/issues/113#issuecomment-30347280

kyzh commented 10 years ago

@cantino I would be really keen on the EventMachine listener.But i think it is out of my abilities I looked around before posting the question and the obvious contestant was em-irc. It seems quite old too: https://github.com/jch/em-irc

I will have a look at the twitter agent maybe that is something i can try to replicate. I didn't look at the code for it yet.

One more question: what is your workflow when you create new agents? Do you use pry or something else to make the development easier? Any advise would be much appreciated.

@crawfordcomeaux i totally agree. I looked at the third party script for at the hubot page, looking for ad-hoc way to talk to it. It's all campfire,IRC, jabber etc, using shell from Huginn sounds wrong too. Maybe IRC support will be the way to tell hubot what is going on indeed.

cantino commented 10 years ago

I generally write a spec and an Agent simultaneously, then test it in the interface. An IRC Agent is a fairly complex prospect, but definitely something we can figure out.

0xdevalias commented 10 years ago

Added to agent suggestions list in #353