Before you can generate the AgentContext document you have to export your agent's .class file from the IDE to the file system so it can be read by Notes.
Export your class file to the file system
To export your agent's .class file, from the Workbench:
Your agent's .class file is now in the file system. Next, you should generate your AgentContext document in a Notes database.
Generating an AgentContext document
To create a Java agent in a Notes database:
The AgentContext document is automatically generated in the AgentRunner.nsf when you run your agent in Notes from an agent class that extends DebugAgentBase. A call to getSession() will, after generating an AgentContext document, return null. Any use of the returned session will result in a thrown exception, but since the purpose of running the agent is only to generate the context document (and not to run any of the agent code), you can ignore the exception.
When you have generated an AgentContext document, you are ready to run and debug your agent in the VisualAge for Java IDE.
Exporting Bytecode
Setting up for the AgentRunner
Write or Import an Agent
Running and Debugging your Agent
Creating the Production Agent